MIPS: Add relocation types
[glibc.git] / sysdeps / x86_64 / Makefile
blob00120ca9caf41ffd16ca71006e619b15c575fdc9
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),string)
17 sysdep_routines += \
18 strcasecmp_l-nonascii \
19 strcspn-generic \
20 strncase_l-nonascii \
21 strpbrk-generic \
22 strspn-generic \
23 varshift \
24 # sysdep_routines
25 gen-as-const-headers += locale-defines.sym
26 tests += \
27 tst-rsi-strlen
28 endif
30 ifeq ($(subdir),elf)
31 # There is no good reason to use MMX in x86-64 ld.so with GCC.
32 CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
33 -mno-mmx)
35 sysdep-dl-routines += tlsdesc dl-tlsdesc tls_get_addr
37 tests += ifuncmain8
38 modules-names += ifuncmod8
40 $(objpfx)ifuncmain8: $(objpfx)ifuncmod8.so
42 tests += tst-quad1 tst-quad2
43 modules-names += tst-quadmod1 tst-quadmod2
45 $(objpfx)tst-quad1: $(objpfx)tst-quadmod1.so
46 $(objpfx)tst-quad2: $(objpfx)tst-quadmod2.so
48 quad-pie-test += tst-quad1pie tst-quad2pie
49 tests += $(quad-pie-test)
50 tests-pie += $(quad-pie-test)
51 test-extras += tst-quadmod1pie tst-quadmod2pie
52 extra-test-objs += tst-quadmod1pie.o tst-quadmod2pie.o
54 $(objpfx)tst-quad1pie: $(objpfx)tst-quadmod1pie.o
55 $(objpfx)tst-quad2pie: $(objpfx)tst-quadmod2pie.o
57 CFLAGS-tst-quad1pie.c = $(PIE-ccflag)
58 CFLAGS-tst-quad2pie.c = $(PIE-ccflag)
60 tests += tst-platform-1
61 modules-names += tst-platformmod-1 x86_64/tst-platformmod-2
62 extra-test-objs += tst-platformmod-2.o
63 CFLAGS-tst-platform-1.c = -mno-avx
64 CFLAGS-tst-platformmod-1.c = -mno-avx
65 CFLAGS-tst-platformmod-2.c = -mno-avx
66 LDFLAGS-tst-platformmod-2.so = -Wl,-soname,tst-platformmod-2.so
67 $(objpfx)tst-platform-1: $(objpfx)tst-platformmod-1.so
68 $(objpfx)tst-platform-1.out: $(objpfx)x86_64/tst-platformmod-2.so
69 # Turn off AVX512F and AVX2 so that GLRO(dl_platform) is
70 # always set to x86_64.
71 tst-platform-1-ENV = LD_PRELOAD=$(objpfx)\$$PLATFORM/tst-platformmod-2.so \
72 GLIBC_TUNABLES=glibc.cpu.hwcaps=-AVX512F,-AVX2
74 tests += tst-audit3 tst-audit4 tst-audit5 tst-audit6 tst-audit7 \
75 tst-audit10 tst-sse tst-avx tst-avx512
76 test-extras += tst-audit4-aux tst-audit10-aux \
77 tst-avx-aux tst-avx512-aux
78 extra-test-objs += tst-audit4-aux.o tst-audit10-aux.o \
79 tst-avx-aux.o tst-avx512-aux.o
81 ifeq ($(have-insert),yes)
82 tests += tst-split-dynreloc
83 LDFLAGS-tst-split-dynreloc = -Wl,-T,$(..)sysdeps/x86_64/tst-split-dynreloc.lds
84 tst-split-dynreloc-ENV = LD_BIND_NOW=1
85 endif
87 modules-names += tst-auditmod3a tst-auditmod3b \
88 tst-auditmod4a tst-auditmod4b \
89 tst-auditmod5a tst-auditmod5b \
90 tst-auditmod6a tst-auditmod6b tst-auditmod6c \
91 tst-auditmod7a tst-auditmod7b \
92 tst-auditmod10a tst-auditmod10b \
93 tst-ssemod tst-avxmod tst-avx512mod
95 $(objpfx)tst-audit3: $(objpfx)tst-auditmod3a.so
96 $(objpfx)tst-audit3.out: $(objpfx)tst-auditmod3b.so
97 tst-audit3-ENV = LD_AUDIT=$(objpfx)tst-auditmod3b.so
99 $(objpfx)tst-audit4: $(objpfx)tst-audit4-aux.o $(objpfx)tst-auditmod4a.so
100 $(objpfx)tst-audit4.out: $(objpfx)tst-auditmod4b.so
101 tst-audit4-ENV = LD_AUDIT=$(objpfx)tst-auditmod4b.so
103 $(objpfx)tst-audit5: $(objpfx)tst-auditmod5a.so
104 $(objpfx)tst-audit5.out: $(objpfx)tst-auditmod5b.so
105 tst-audit5-ENV = LD_AUDIT=$(objpfx)tst-auditmod5b.so
107 $(objpfx)tst-audit6: $(objpfx)tst-auditmod6a.so
108 $(objpfx)tst-audit6.out: $(objpfx)tst-auditmod6b.so \
109 $(objpfx)tst-auditmod6c.so
110 tst-audit6-ENV = LD_AUDIT=$(objpfx)tst-auditmod6b.so:$(objpfx)tst-auditmod6c.so
112 $(objpfx)tst-audit7: $(objpfx)tst-auditmod7a.so
113 $(objpfx)tst-audit7.out: $(objpfx)tst-auditmod7b.so
114 tst-audit7-ENV = LD_AUDIT=$(objpfx)tst-auditmod7b.so
116 $(objpfx)tst-audit10: $(objpfx)tst-audit10-aux.o $(objpfx)tst-auditmod10a.so
117 $(objpfx)tst-audit10.out: $(objpfx)tst-auditmod10b.so
118 tst-audit10-ENV = LD_AUDIT=$(objpfx)tst-auditmod10b.so
120 $(objpfx)tst-sse: $(objpfx)tst-ssemod.so
121 $(objpfx)tst-avx: $(objpfx)tst-avx-aux.o $(objpfx)tst-avxmod.so
122 $(objpfx)tst-avx512: $(objpfx)tst-avx512-aux.o $(objpfx)tst-avx512mod.so
124 AVX-CFLAGS=-mavx -mno-vzeroupper
125 CFLAGS-tst-audit4-aux.c += $(AVX-CFLAGS)
126 CFLAGS-tst-auditmod4a.c += $(AVX-CFLAGS)
127 CFLAGS-tst-auditmod4b.c += $(AVX-CFLAGS)
128 CFLAGS-tst-auditmod6b.c += $(AVX-CFLAGS)
129 CFLAGS-tst-auditmod6c.c += $(AVX-CFLAGS)
130 CFLAGS-tst-auditmod7b.c += $(AVX-CFLAGS)
131 CFLAGS-tst-avx-aux.c += $(AVX-CFLAGS)
132 CFLAGS-tst-avxmod.c += $(AVX-CFLAGS)
133 AVX512-CFLAGS = -mavx512f
134 CFLAGS-tst-audit10-aux.c += $(AVX512-CFLAGS)
135 CFLAGS-tst-auditmod10a.c += $(AVX512-CFLAGS)
136 CFLAGS-tst-auditmod10b.c += $(AVX512-CFLAGS)
137 CFLAGS-tst-avx512-aux.c += $(AVX512-CFLAGS)
138 CFLAGS-tst-avx512mod.c += $(AVX512-CFLAGS)
140 $(objpfx)tst-glibc-hwcaps: $(objpfx)libmarkermod2-1.so \
141 $(objpfx)libmarkermod3-1.so $(objpfx)libmarkermod4-1.so
142 $(objpfx)tst-glibc-hwcaps.out: \
143 $(objpfx)libmarkermod2.so \
144 $(objpfx)glibc-hwcaps/x86-64-v2/libmarkermod2.so \
145 $(objpfx)libmarkermod3.so \
146 $(objpfx)glibc-hwcaps/x86-64-v2/libmarkermod3.so \
147 $(objpfx)glibc-hwcaps/x86-64-v3/libmarkermod3.so \
148 $(objpfx)libmarkermod4.so \
149 $(objpfx)glibc-hwcaps/x86-64-v2/libmarkermod4.so \
150 $(objpfx)glibc-hwcaps/x86-64-v3/libmarkermod4.so \
151 $(objpfx)glibc-hwcaps/x86-64-v4/libmarkermod4.so \
153 $(objpfx)glibc-hwcaps/x86-64-v2/libmarkermod2.so: $(objpfx)libmarkermod2-2.so
154 $(make-target-directory)
155 cp $< $@
156 $(objpfx)glibc-hwcaps/x86-64-v2/libmarkermod3.so: $(objpfx)libmarkermod3-2.so
157 $(make-target-directory)
158 cp $< $@
159 $(objpfx)glibc-hwcaps/x86-64-v3/libmarkermod3.so: $(objpfx)libmarkermod3-3.so
160 $(make-target-directory)
161 cp $< $@
162 $(objpfx)glibc-hwcaps/x86-64-v2/libmarkermod4.so: $(objpfx)libmarkermod4-2.so
163 $(make-target-directory)
164 cp $< $@
165 $(objpfx)glibc-hwcaps/x86-64-v3/libmarkermod4.so: $(objpfx)libmarkermod4-3.so
166 $(make-target-directory)
167 cp $< $@
168 $(objpfx)glibc-hwcaps/x86-64-v4/libmarkermod4.so: $(objpfx)libmarkermod4-4.so
169 $(make-target-directory)
170 cp $< $@
172 ifeq (no,$(build-hardcoded-path-in-tests))
173 # This is an ld.so.cache test, and RPATH/RUNPATH in the executable
174 # interferes with its test objectives.
175 tests-container += tst-glibc-hwcaps-cache
176 endif
178 endif # $(subdir) == elf
180 ifeq ($(subdir),csu)
181 gen-as-const-headers += tlsdesc.sym rtld-offsets.sym
182 endif
184 ifeq ($(subdir),wcsmbs)
186 sysdep_routines += \
187 wcpcpy-generic \
188 wcpncpy-generic \
189 wcscat-generic \
190 wcscpy-generic \
191 wcsncat-generic \
192 wcsncmp-generic \
193 wcsncpy-generic \
194 wcsnlen-generic \
195 # sysdep_routines
197 tests += \
198 tst-rsi-wcslen
199 endif
201 do-tests-clean common-mostlyclean: tst-x86_64-1-clean
203 .PHONY: tst-x86_64-1-clean
204 tst-x86_64-1-clean:
205 -rm -rf $(objpfx)x86_64
207 $(objpfx)x86_64/tst-platformmod-2.os: $(objpfx)tst-platformmod-2.os
208 $(make-target-directory)
209 rm -f $@
210 ln $< $@