float128: Add public _Float128 declarations to libm.
[glibc.git] / sysdeps / i386 / Makefile
blobe30e1339f0554dd53be1ab881cb4df04de820792
1 # The mpn functions need a #define for asm syntax flavor.
2 # Every i386 port in use uses gas syntax (I think).
3 asm-CPPFLAGS += -DGAS_SYNTAX
5 # The i386 `long double' is a distinct type we support.
6 long-double-fcts = yes
8 ifeq ($(subdir),string)
9 sysdep_routines += cacheinfo
10 endif
12 ifeq ($(subdir),gmon)
13 sysdep_routines += i386-mcount
14 endif
16 ifeq ($(subdir),elf)
17 CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
18 CFLAGS-dl-load.c += -Wno-unused
19 CFLAGS-dl-reloc.c += -Wno-unused
20 endif
22 ifeq ($(subdir),debug)
23 CFLAGS-backtrace.c += -fexceptions
24 endif
26 # Most of the glibc routines don't ever call user defined callbacks
27 # nor use any FPU or SSE* and as such don't need bigger %esp alignment
28 # than 4 bytes.
29 # Lots of routines in math will use FPU, so make math subdir an exception
30 # here.
31 # In gcc 4.6 (and maybe earlier?) giving -mpreferred-stack-boundary=2 is
32 # an error, so don't try to reduce it here like we used to. We still
33 # explicit set -mpreferred-stack-boundary=4 the places where it matters,
34 # in case an older compiler defaulted to 2.
35 ifeq ($(subdir),math)
36 sysdep-CFLAGS += -mpreferred-stack-boundary=4
37 else
38 ifeq ($(subdir),csu)
39 sysdep-CFLAGS += -mpreferred-stack-boundary=4
40 gen-as-const-headers += link-defines.sym
41 else
42 # Likewise, any function which calls user callbacks
43 uses-callbacks += -mpreferred-stack-boundary=4
44 # Likewise, any stack alignment tests
45 stack-align-test-flags += -malign-double -mpreferred-stack-boundary=4
46 endif
47 endif
49 # And a couple of other routines
50 ifeq ($(subdir),stdlib)
51 CFLAGS-exit.c += -mpreferred-stack-boundary=4
52 CFLAGS-cxa_finalize.c += -mpreferred-stack-boundary=4
53 endif
54 ifeq ($(subdir),elf)
55 CFLAGS-dl-init.c += -mpreferred-stack-boundary=4
56 CFLAGS-dl-fini.c += -mpreferred-stack-boundary=4
57 CFLAGS-dl-open.c += -mpreferred-stack-boundary=4
58 CFLAGS-dl-close.c += -mpreferred-stack-boundary=4
59 CFLAGS-dl-error.c += -mpreferred-stack-boundary=4
60 endif
61 ifeq ($(subdir),dlfcn)
62 CFLAGS-dlopen.c += -mpreferred-stack-boundary=4
63 CFLAGS-dlopenold.c += -mpreferred-stack-boundary=4
64 CFLAGS-dlclose.c += -mpreferred-stack-boundary=4
65 CFLAGS-dlerror.c += -mpreferred-stack-boundary=4
66 endif
68 ifneq (,$(filter -mno-tls-direct-seg-refs,$(CFLAGS)))
69 defines += -DNO_TLS_DIRECT_SEG_REFS
70 endif
72 ifeq ($(subdir),elf)
73 sysdep-dl-routines += tlsdesc dl-tlsdesc
75 tests += tst-audit3
76 modules-names += tst-auditmod3a tst-auditmod3b
78 $(objpfx)tst-audit3: $(objpfx)tst-auditmod3a.so
79 $(objpfx)tst-audit3.out: $(objpfx)tst-auditmod3b.so
80 tst-audit3-ENV = LD_AUDIT=$(objpfx)tst-auditmod3b.so
81 endif
83 ifeq ($(subdir),csu)
84 gen-as-const-headers += tlsdesc.sym
85 endif
87 # Make sure no code in ld.so uses mm/xmm/ymm/zmm registers on i386 since
88 # the first 3 mm/xmm/ymm/zmm registers are used to pass vector parameters
89 # which must be preserved.
90 # With SSE disabled, ensure -fpmath is not set to use sse either.
91 rtld-CFLAGS += -mno-sse -mno-mmx -mfpmath=387
92 ifeq ($(subdir),elf)
93 CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
94 $(rtld-CFLAGS))
96 tests-special += $(objpfx)tst-ld-sse-use.out
97 $(objpfx)tst-ld-sse-use.out: ../sysdeps/i386/tst-ld-sse-use.sh $(objpfx)ld.so
98 @echo "Checking ld.so for SSE register use. This will take a few seconds..."
99 $(BASH) $< $(objpfx) '$(NM)' '$(OBJDUMP)' '$(READELF)' > $@; \
100 $(evaluate-test)
101 else
102 CFLAGS-.os += $(if $(filter rtld-%.os,$(@F)), $(rtld-CFLAGS))
103 endif