Linux: consolidate dup2 implementation
[glibc.git] / sysdeps / i386 / Makefile
bloba2e8c0b12822be0bad293570a72b3bdddf23972c
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),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
16 ifeq ($(subdir),gmon)
17 sysdep_routines += i386-mcount
18 endif
20 ifeq ($(subdir),elf)
21 CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
22 CFLAGS-dl-load.c += -Wno-unused
23 CFLAGS-dl-reloc.c += -Wno-unused
24 endif
26 ifeq ($(subdir),csu)
27 gen-as-const-headers += link-defines.sym
28 else
29 stack-align-test-flags += -malign-double
30 endif
32 ifeq ($(subdir),elf)
33 sysdep-dl-routines += tlsdesc dl-tlsdesc
35 tests += tst-audit3
36 modules-names += tst-auditmod3a tst-auditmod3b
38 $(objpfx)tst-audit3: $(objpfx)tst-auditmod3a.so
39 $(objpfx)tst-audit3.out: $(objpfx)tst-auditmod3b.so
40 tst-audit3-ENV = LD_AUDIT=$(objpfx)tst-auditmod3b.so
41 endif
43 ifeq ($(subdir),csu)
44 gen-as-const-headers += tlsdesc.sym
45 endif
47 # Make sure no code in ld.so uses mm/xmm/ymm/zmm registers on i386 since
48 # the first 3 mm/xmm/ymm/zmm registers are used to pass vector parameters
49 # which must be preserved.
50 # With SSE disabled, ensure -fpmath is not set to use sse either.
51 rtld-CFLAGS += -mno-sse -mno-mmx -mfpmath=387
52 ifeq ($(subdir),elf)
53 CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
54 $(rtld-CFLAGS))
56 tests-special += $(objpfx)tst-ld-sse-use.out
57 $(objpfx)tst-ld-sse-use.out: ../sysdeps/i386/tst-ld-sse-use.sh $(objpfx)ld.so
58 @echo "Checking ld.so for SSE register use. This will take a few seconds..."
59 $(BASH) $< $(objpfx) '$(NM)' '$(OBJDUMP)' '$(READELF)' > $@; \
60 $(evaluate-test)
61 else
62 CFLAGS-.os += $(if $(filter rtld-%.os,$(@F)), $(rtld-CFLAGS))
63 endif