initial commit
[glibc.git] / sysdeps / alpha / Makefile
1 # Copyright (C) 1993-2022 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
3
4 # The GNU C Library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8
9 # The GNU C Library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
13
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with the GNU C Library. If not, see
16 # <https://www.gnu.org/licenses/>.
17
18 ifeq ($(subdir),db2)
19 CPPFLAGS += -DHAVE_SPINLOCKS=1 -DHAVE_ASSEM_ALPHA=1
20 endif
21
22 ifeq ($(subdir),debug)
23 # Consider making this GCC's default...
24 CFLAGS-backtrace.c = -fasynchronous-unwind-tables
25 endif
26
27 ifeq ($(subdir),gmon)
28 sysdep_routines += _mcount
29 endif
30
31 ifeq ($(subdir),gnulib)
32 sysdep_routines += divl divlu divq divqu reml remlu remq remqu
33 endif
34
35 ifeq ($(subdir),string)
36 sysdep_routines += stxcpy stxncpy
37 endif
38
39 ifeq ($(subdir),elf)
40 # The ld.so startup code cannot use literals until it self-relocates.
41 CFLAGS-rtld.c = -mbuild-constants
42 endif
43
44 ifeq ($(subdir),math)
45 # The fma routines rely on inexact being raised for correct results.
46 CFLAGS-s_fma.c = -mieee-with-inexact
47 CFLAGS-s_fmaf.c = -mieee-with-inexact
48 # This test tries to check for inexact being raised by arithmetic.
49 CFLAGS-test-misc.c += -mieee-with-inexact
50 # Avoid "conflicting types for built-in function" warnings
51 CFLAGS-s_isnan.c += -fno-builtin-isnanf
52 endif
53
54 # Build everything with full IEEE math support, and with dynamic rounding;
55 # there are a number of math routines that are defined to work with the
56 # "current" rounding mode, and it's easiest to set this with all of them.
57 sysdep-CFLAGS += -mieee -mfp-rounding-mode=d
58
59 # Software floating-point emulation.
60
61 ifeq ($(subdir),soft-fp)
62 sysdep_routines += ots_add ots_sub ots_mul ots_div ots_cmp ots_cmpe \
63 ots_cvtxq ots_cvtqx ots_cvtqux ots_cvttx ots_cvtxt ots_nintxq \
64 fraiseexcpt
65 endif
66
67 ifeq ($(subdir),math)
68 CPPFLAGS += -I../soft-fp
69 endif