]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/i386/Makefile
i386: Remove NO_TLS_DIRECT_SEG_REFS handling
[thirdparty/glibc.git] / sysdeps / i386 / Makefile
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
4
5 # The i386 `long double' is a distinct type we support.
6 long-double-fcts = yes
7
8 ifeq ($(subdir),math)
9 # These functions change the rounding mode internally and need to
10 # update both the SSE2 rounding mode and the 387 rounding mode. See
11 # the handling of MATH_SET_BOTH_ROUNDING_MODES in
12 # sysdeps/i386/fpu/fenv_private.h.
13 CFLAGS-e_gamma_r.c += -DMATH_SET_BOTH_ROUNDING_MODES
14 endif
15
16 ifeq ($(subdir),string)
17 sysdep_routines += cacheinfo
18 endif
19
20 ifeq ($(subdir),gmon)
21 sysdep_routines += i386-mcount
22 endif
23
24 ifeq ($(subdir),elf)
25 CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
26 CFLAGS-dl-load.c += -Wno-unused
27 CFLAGS-dl-reloc.c += -Wno-unused
28 endif
29
30 ifeq ($(subdir),csu)
31 gen-as-const-headers += link-defines.sym
32 else
33 stack-align-test-flags += -malign-double
34 endif
35
36 ifeq ($(subdir),elf)
37 sysdep-dl-routines += tlsdesc dl-tlsdesc
38
39 tests += tst-audit3
40 modules-names += tst-auditmod3a tst-auditmod3b
41
42 $(objpfx)tst-audit3: $(objpfx)tst-auditmod3a.so
43 $(objpfx)tst-audit3.out: $(objpfx)tst-auditmod3b.so
44 tst-audit3-ENV = LD_AUDIT=$(objpfx)tst-auditmod3b.so
45 endif
46
47 ifeq ($(subdir),csu)
48 gen-as-const-headers += tlsdesc.sym
49 endif
50
51 # Make sure no code in ld.so uses mm/xmm/ymm/zmm registers on i386 since
52 # the first 3 mm/xmm/ymm/zmm registers are used to pass vector parameters
53 # which must be preserved.
54 # With SSE disabled, ensure -fpmath is not set to use sse either.
55 rtld-CFLAGS += -mno-sse -mno-mmx -mfpmath=387
56 ifeq ($(subdir),elf)
57 CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
58 $(rtld-CFLAGS))
59
60 tests-special += $(objpfx)tst-ld-sse-use.out
61 $(objpfx)tst-ld-sse-use.out: ../sysdeps/i386/tst-ld-sse-use.sh $(objpfx)ld.so
62 @echo "Checking ld.so for SSE register use. This will take a few seconds..."
63 $(BASH) $< $(objpfx) '$(NM)' '$(OBJDUMP)' '$(READELF)' > $@; \
64 $(evaluate-test)
65 else
66 CFLAGS-.os += $(if $(filter rtld-%.os,$(@F)), $(rtld-CFLAGS))
67 endif