support_become_root: Enable file creation in user namespaces
[glibc.git] / sysdeps / x86_64 / Makefile
blob9f1562f1b25a2df50a3a5d5f27e91c952a98c284
1 # The i387 `long double' is a distinct type we support.
2 long-double-fcts = yes
4 ifeq ($(subdir),csu)
5 gen-as-const-headers += link-defines.sym
6 endif
8 ifeq ($(subdir),gmon)
9 sysdep_routines += _mcount
10 # We cannot compile _mcount.S with -pg because that would create
11 # recursive calls when ENTRY is used. Just copy the normal static
12 # object.
13 sysdep_noprof += _mcount
14 endif
16 ifeq ($(subdir),malloc)
17 tests += tst-mallocalign1
18 endif
20 ifeq ($(subdir),string)
21 sysdep_routines += cacheinfo strcasecmp_l-nonascii strncase_l-nonascii
22 gen-as-const-headers += locale-defines.sym
23 endif
25 ifeq ($(subdir),elf)
26 # There is no good reason to use MMX in x86-64 ld.so with GCC.
27 CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
28 -mno-mmx)
30 sysdep-dl-routines += tlsdesc dl-tlsdesc tls_get_addr
32 tests += ifuncmain8
33 modules-names += ifuncmod8
35 $(objpfx)ifuncmain8: $(objpfx)ifuncmod8.so
37 tests += tst-quad1 tst-quad2
38 modules-names += tst-quadmod1 tst-quadmod2
40 $(objpfx)tst-quad1: $(objpfx)tst-quadmod1.so
41 $(objpfx)tst-quad2: $(objpfx)tst-quadmod2.so
43 quad-pie-test += tst-quad1pie tst-quad2pie
44 tests += $(quad-pie-test)
45 tests-pie += $(quad-pie-test)
46 test-extras += tst-quadmod1pie tst-quadmod2pie
47 extra-test-objs += tst-quadmod1pie.o tst-quadmod2pie.o
49 $(objpfx)tst-quad1pie: $(objpfx)tst-quadmod1pie.o
50 $(objpfx)tst-quad2pie: $(objpfx)tst-quadmod2pie.o
52 CFLAGS-tst-quad1pie.c = $(PIE-ccflag)
53 CFLAGS-tst-quad2pie.c = $(PIE-ccflag)
55 tests += tst-x86_64-1
56 modules-names += x86_64/tst-x86_64mod-1
57 LDFLAGS-tst-x86_64mod-1.so = -Wl,-soname,tst-x86_64mod-1.so
58 ifneq (no,$(have-tunables))
59 # Test the state size for XSAVE when XSAVEC is disabled.
60 tst-x86_64-1-ENV = GLIBC_TUNABLES=glibc.tune.hwcaps=-XSAVEC_Usable
61 endif
63 $(objpfx)tst-x86_64-1: $(objpfx)x86_64/tst-x86_64mod-1.so
65 ifneq (no,$(have-tunables))
66 tests += tst-platform-1
67 modules-names += tst-platformmod-1 x86_64/tst-platformmod-2
68 CFLAGS-tst-platform-1.c = -mno-avx
69 CFLAGS-tst-platformmod-1.c = -mno-avx
70 CFLAGS-tst-platformmod-2.c = -mno-avx
71 LDFLAGS-tst-platformmod-2.so = -Wl,-soname,tst-platformmod-2.so
72 $(objpfx)tst-platform-1: $(objpfx)tst-platformmod-1.so
73 $(objpfx)tst-platform-1.out: $(objpfx)x86_64/tst-platformmod-2.so
74 # Turn off AVX512F_Usable and AVX2_Usable so that GLRO(dl_platform) is
75 # always set to x86_64.
76 tst-platform-1-ENV = LD_PRELOAD=$(objpfx)\$$PLATFORM/tst-platformmod-2.so \
77 GLIBC_TUNABLES=glibc.tune.hwcaps=-AVX512F_Usable,-AVX2_Usable
78 endif
80 tests += tst-audit3 tst-audit4 tst-audit5 tst-audit6 tst-audit7 \
81 tst-audit10 tst-sse tst-avx tst-avx512
82 test-extras += tst-audit4-aux tst-audit10-aux \
83 tst-avx-aux tst-avx512-aux
84 extra-test-objs += tst-audit4-aux.o tst-audit10-aux.o \
85 tst-avx-aux.o tst-avx512-aux.o
87 ifeq ($(have-insert),yes)
88 tests += tst-split-dynreloc
89 LDFLAGS-tst-split-dynreloc = -Wl,-T,$(..)sysdeps/x86_64/tst-split-dynreloc.lds
90 tst-split-dynreloc-ENV = LD_BIND_NOW=1
91 endif
93 modules-names += tst-auditmod3a tst-auditmod3b \
94 tst-auditmod4a tst-auditmod4b \
95 tst-auditmod5a tst-auditmod5b \
96 tst-auditmod6a tst-auditmod6b tst-auditmod6c \
97 tst-auditmod7a tst-auditmod7b \
98 tst-auditmod10a tst-auditmod10b \
99 tst-ssemod tst-avxmod tst-avx512mod
101 $(objpfx)tst-audit3: $(objpfx)tst-auditmod3a.so
102 $(objpfx)tst-audit3.out: $(objpfx)tst-auditmod3b.so
103 tst-audit3-ENV = LD_AUDIT=$(objpfx)tst-auditmod3b.so
105 $(objpfx)tst-audit4: $(objpfx)tst-audit4-aux.o $(objpfx)tst-auditmod4a.so
106 $(objpfx)tst-audit4.out: $(objpfx)tst-auditmod4b.so
107 tst-audit4-ENV = LD_AUDIT=$(objpfx)tst-auditmod4b.so
109 $(objpfx)tst-audit5: $(objpfx)tst-auditmod5a.so
110 $(objpfx)tst-audit5.out: $(objpfx)tst-auditmod5b.so
111 tst-audit5-ENV = LD_AUDIT=$(objpfx)tst-auditmod5b.so
113 $(objpfx)tst-audit6: $(objpfx)tst-auditmod6a.so
114 $(objpfx)tst-audit6.out: $(objpfx)tst-auditmod6b.so \
115 $(objpfx)tst-auditmod6c.so
116 tst-audit6-ENV = LD_AUDIT=$(objpfx)tst-auditmod6b.so:$(objpfx)tst-auditmod6c.so
118 $(objpfx)tst-audit7: $(objpfx)tst-auditmod7a.so
119 $(objpfx)tst-audit7.out: $(objpfx)tst-auditmod7b.so
120 tst-audit7-ENV = LD_AUDIT=$(objpfx)tst-auditmod7b.so
122 $(objpfx)tst-audit10: $(objpfx)tst-audit10-aux.o $(objpfx)tst-auditmod10a.so
123 $(objpfx)tst-audit10.out: $(objpfx)tst-auditmod10b.so
124 tst-audit10-ENV = LD_AUDIT=$(objpfx)tst-auditmod10b.so
126 $(objpfx)tst-sse: $(objpfx)tst-ssemod.so
127 $(objpfx)tst-avx: $(objpfx)tst-avx-aux.o $(objpfx)tst-avxmod.so
128 $(objpfx)tst-avx512: $(objpfx)tst-avx512-aux.o $(objpfx)tst-avx512mod.so
130 AVX-CFLAGS=-mavx -mno-vzeroupper
131 CFLAGS-tst-audit4-aux.c += $(AVX-CFLAGS)
132 CFLAGS-tst-auditmod4a.c += $(AVX-CFLAGS)
133 CFLAGS-tst-auditmod4b.c += $(AVX-CFLAGS)
134 CFLAGS-tst-auditmod6b.c += $(AVX-CFLAGS)
135 CFLAGS-tst-auditmod6c.c += $(AVX-CFLAGS)
136 CFLAGS-tst-auditmod7b.c += $(AVX-CFLAGS)
137 CFLAGS-tst-avx-aux.c += $(AVX-CFLAGS)
138 CFLAGS-tst-avxmod.c += $(AVX-CFLAGS)
139 ifeq (yes,$(config-cflags-avx512))
140 AVX512-CFLAGS = -mavx512f
141 CFLAGS-tst-audit10-aux.c += $(AVX512-CFLAGS)
142 CFLAGS-tst-auditmod10a.c += $(AVX512-CFLAGS)
143 CFLAGS-tst-auditmod10b.c += $(AVX512-CFLAGS)
144 CFLAGS-tst-avx512-aux.c += $(AVX512-CFLAGS)
145 CFLAGS-tst-avx512mod.c += $(AVX512-CFLAGS)
146 endif
147 endif
149 ifeq ($(subdir),csu)
150 gen-as-const-headers += tlsdesc.sym rtld-offsets.sym
151 endif
153 $(objpfx)x86_64/tst-x86_64mod-1.os: $(objpfx)tst-x86_64mod-1.os
154 $(make-target-directory)
155 rm -f $@
156 ln $< $@
158 do-tests-clean common-mostlyclean: tst-x86_64-1-clean
160 .PHONY: tst-x86_64-1-clean
161 tst-x86_64-1-clean:
162 -rm -rf $(objpfx)x86_64
164 $(objpfx)x86_64/tst-platformmod-2.os: $(objpfx)tst-platformmod-2.os
165 $(make-target-directory)
166 rm -f $@
167 ln $< $@