1 # The i387 `long double' is a distinct type we support.
4 ifeq (yes
,$(have-z-mark-plt
))
5 # Always generate DT_X86_64_PLT* tags.
6 sysdep-LDFLAGS
+= -Wl
,-z
,mark-plt
7 # Never generate DT_X86_64_PLT* tags on ld.so to avoid changing its own
9 LDFLAGS-rtld
+= -Wl
,-z
,nomark-plt
13 gen-as-const-headers
+= link-defines.sym
17 sysdep_routines
+= _mcount
18 # We cannot compile _mcount.S with -pg because that would create
19 # recursive calls when ENTRY is used. Just copy the normal static
21 sysdep_noprof
+= _mcount
24 ifeq ($(subdir
),string
)
26 strcasecmp_l-nonascii \
33 gen-as-const-headers
+= locale-defines.sym
39 # There is no good reason to use MMX in x86-64 ld.so with GCC.
40 CFLAGS-.os
+= $(if
$(filter $(@F
),$(patsubst %,%.os
,$(all-rtld-routines
))),\
43 sysdep-dl-routines
+= tlsdesc dl-tlsdesc tls_get_addr
46 modules-names
+= ifuncmod8
48 $(objpfx
)ifuncmain8
: $(objpfx
)ifuncmod8.so
50 tests
+= tst-quad1 tst-quad2
51 modules-names
+= tst-quadmod1 tst-quadmod2
53 $(objpfx
)tst-quad1
: $(objpfx
)tst-quadmod1.so
54 $(objpfx
)tst-quad2
: $(objpfx
)tst-quadmod2.so
56 quad-pie-test
+= tst-quad1pie tst-quad2pie
57 tests
+= $(quad-pie-test
)
58 tests-pie
+= $(quad-pie-test
)
59 test-extras
+= tst-quadmod1pie tst-quadmod2pie
60 extra-test-objs
+= tst-quadmod1pie.o tst-quadmod2pie.o
62 $(objpfx
)tst-quad1pie
: $(objpfx
)tst-quadmod1pie.o
63 $(objpfx
)tst-quad2pie
: $(objpfx
)tst-quadmod2pie.o
65 CFLAGS-tst-quad1pie.c
= $(PIE-ccflag
)
66 CFLAGS-tst-quad2pie.c
= $(PIE-ccflag
)
68 tests
+= tst-platform-1
69 modules-names
+= tst-platformmod-1 x86_64
/tst-platformmod-2
70 extra-test-objs
+= tst-platformmod-2.o
71 CFLAGS-tst-platform-1.c
= -mno-avx
72 CFLAGS-tst-platformmod-1.c
= -mno-avx
73 CFLAGS-tst-platformmod-2.c
= -mno-avx
74 LDFLAGS-tst-platformmod-2.so
= -Wl
,-soname
,tst-platformmod-2.so
75 $(objpfx
)tst-platform-1
: $(objpfx
)tst-platformmod-1.so
76 $(objpfx
)tst-platform-1.out
: $(objpfx
)x86_64
/tst-platformmod-2.so
77 # Turn off AVX512F and AVX2 so that GLRO(dl_platform) is
78 # always set to x86_64.
79 tst-platform-1-ENV
= LD_PRELOAD
=$(objpfx
)\
$$PLATFORM/tst-platformmod-2.so \
80 GLIBC_TUNABLES
=glibc.cpu.hwcaps
=-AVX512F
,-AVX2
82 tests
+= tst-audit3 tst-audit4 tst-audit5 tst-audit6 tst-audit7 \
83 tst-audit10 tst-sse tst-avx tst-avx512
84 test-extras
+= tst-audit4-aux tst-audit10-aux \
85 tst-avx-aux tst-avx512-aux
86 extra-test-objs
+= tst-audit4-aux.o tst-audit10-aux.o \
87 tst-avx-aux.o tst-avx512-aux.o
89 ifeq ($(have-insert
),yes
)
90 tests
+= tst-split-dynreloc
91 LDFLAGS-tst-split-dynreloc
= -Wl
,-T
,$(..
)sysdeps
/x86_64
/tst-split-dynreloc.lds
92 tst-split-dynreloc-ENV
= LD_BIND_NOW
=1
95 modules-names
+= tst-auditmod3a tst-auditmod3b \
96 tst-auditmod4a tst-auditmod4b \
97 tst-auditmod5a tst-auditmod5b \
98 tst-auditmod6a tst-auditmod6b tst-auditmod6c \
99 tst-auditmod7a tst-auditmod7b \
100 tst-auditmod10a tst-auditmod10b \
101 tst-ssemod tst-avxmod tst-avx512mod
103 $(objpfx
)tst-audit3
: $(objpfx
)tst-auditmod3a.so
104 $(objpfx
)tst-audit3.out
: $(objpfx
)tst-auditmod3b.so
105 tst-audit3-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod3b.so
107 $(objpfx
)tst-audit4
: $(objpfx
)tst-audit4-aux.o
$(objpfx
)tst-auditmod4a.so
108 $(objpfx
)tst-audit4.out
: $(objpfx
)tst-auditmod4b.so
109 tst-audit4-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod4b.so
111 $(objpfx
)tst-audit5
: $(objpfx
)tst-auditmod5a.so
112 $(objpfx
)tst-audit5.out
: $(objpfx
)tst-auditmod5b.so
113 tst-audit5-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod5b.so
115 $(objpfx
)tst-audit6
: $(objpfx
)tst-auditmod6a.so
116 $(objpfx
)tst-audit6.out
: $(objpfx
)tst-auditmod6b.so \
117 $(objpfx
)tst-auditmod6c.so
118 tst-audit6-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod6b.so
:$(objpfx
)tst-auditmod6c.so
120 $(objpfx
)tst-audit7
: $(objpfx
)tst-auditmod7a.so
121 $(objpfx
)tst-audit7.out
: $(objpfx
)tst-auditmod7b.so
122 tst-audit7-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod7b.so
124 $(objpfx
)tst-audit10
: $(objpfx
)tst-audit10-aux.o
$(objpfx
)tst-auditmod10a.so
125 $(objpfx
)tst-audit10.out
: $(objpfx
)tst-auditmod10b.so
126 tst-audit10-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod10b.so
128 $(objpfx
)tst-sse
: $(objpfx
)tst-ssemod.so
129 $(objpfx
)tst-avx
: $(objpfx
)tst-avx-aux.o
$(objpfx
)tst-avxmod.so
130 $(objpfx
)tst-avx512
: $(objpfx
)tst-avx512-aux.o
$(objpfx
)tst-avx512mod.so
132 AVX-CFLAGS
=-mavx
-mno-vzeroupper
133 CFLAGS-tst-audit4-aux.c
+= $(AVX-CFLAGS
)
134 CFLAGS-tst-auditmod4a.c
+= $(AVX-CFLAGS
)
135 CFLAGS-tst-auditmod4b.c
+= $(AVX-CFLAGS
)
136 CFLAGS-tst-auditmod6b.c
+= $(AVX-CFLAGS
)
137 CFLAGS-tst-auditmod6c.c
+= $(AVX-CFLAGS
)
138 CFLAGS-tst-auditmod7b.c
+= $(AVX-CFLAGS
)
139 CFLAGS-tst-avx-aux.c
+= $(AVX-CFLAGS
)
140 CFLAGS-tst-avxmod.c
+= $(AVX-CFLAGS
)
141 AVX512-CFLAGS
= -mavx512f
142 CFLAGS-tst-audit10-aux.c
+= $(AVX512-CFLAGS
)
143 CFLAGS-tst-auditmod10a.c
+= $(AVX512-CFLAGS
)
144 CFLAGS-tst-auditmod10b.c
+= $(AVX512-CFLAGS
)
145 CFLAGS-tst-avx512-aux.c
+= $(AVX512-CFLAGS
)
146 CFLAGS-tst-avx512mod.c
+= $(AVX512-CFLAGS
)
148 $(objpfx
)tst-glibc-hwcaps
: $(objpfx
)libmarkermod2-1.so \
149 $(objpfx
)libmarkermod3-1.so
$(objpfx
)libmarkermod4-1.so
150 $(objpfx
)tst-glibc-hwcaps.out
: \
151 $(objpfx
)libmarkermod2.so \
152 $(objpfx
)glibc-hwcaps
/x86-64-v2
/libmarkermod2.so \
153 $(objpfx
)libmarkermod3.so \
154 $(objpfx
)glibc-hwcaps
/x86-64-v2
/libmarkermod3.so \
155 $(objpfx
)glibc-hwcaps
/x86-64-v3
/libmarkermod3.so \
156 $(objpfx
)libmarkermod4.so \
157 $(objpfx
)glibc-hwcaps
/x86-64-v2
/libmarkermod4.so \
158 $(objpfx
)glibc-hwcaps
/x86-64-v3
/libmarkermod4.so \
159 $(objpfx
)glibc-hwcaps
/x86-64-v4
/libmarkermod4.so \
161 $(objpfx
)glibc-hwcaps
/x86-64-v2
/libmarkermod2.so
: $(objpfx
)libmarkermod2-2.so
162 $(make-target-directory
)
164 $(objpfx
)glibc-hwcaps
/x86-64-v2
/libmarkermod3.so
: $(objpfx
)libmarkermod3-2.so
165 $(make-target-directory
)
167 $(objpfx
)glibc-hwcaps
/x86-64-v3
/libmarkermod3.so
: $(objpfx
)libmarkermod3-3.so
168 $(make-target-directory
)
170 $(objpfx
)glibc-hwcaps
/x86-64-v2
/libmarkermod4.so
: $(objpfx
)libmarkermod4-2.so
171 $(make-target-directory
)
173 $(objpfx
)glibc-hwcaps
/x86-64-v3
/libmarkermod4.so
: $(objpfx
)libmarkermod4-3.so
174 $(make-target-directory
)
176 $(objpfx
)glibc-hwcaps
/x86-64-v4
/libmarkermod4.so
: $(objpfx
)libmarkermod4-4.so
177 $(make-target-directory
)
180 ifeq (no
,$(build-hardcoded-path-in-tests
))
181 # This is an ld.so.cache test, and RPATH/RUNPATH in the executable
182 # interferes with its test objectives.
183 tests-container
+= tst-glibc-hwcaps-cache
186 ifeq (yes
,$(have-z-mark-plt
))
192 tst-plt-rewritemod1 \
193 tst-plt-rewritemod2 \
196 tst-plt-rewrite1-no-pie
= yes
197 LDFLAGS-tst-plt-rewrite1
= -Wl
,-z
,now
198 LDFLAGS-tst-plt-rewritemod1.so
= -Wl
,-z
,now
199 tst-plt-rewrite1-ENV
= GLIBC_TUNABLES
=glibc.cpu.plt_rewrite
=1 LD_DEBUG
=files
:bindings
200 $(objpfx
)tst-plt-rewrite1
: $(objpfx
)tst-plt-rewritemod1.so
201 $(objpfx
)tst-plt-rewrite1.out
: /dev
/null
$(objpfx
)tst-plt-rewrite1
202 $(tst-plt-rewrite1-ENV
) $(make-test-out
) > $@
2>&1; \
203 grep
-q
-E
"changing 'bar' PLT entry in .*/elf/tst-plt-rewritemod1.so' to direct branch" $@
; \
206 tst-plt-rewrite2-no-pie
= yes
207 LDFLAGS-tst-plt-rewrite2
= -Wl
,-z
,now
208 LDFLAGS-tst-plt-rewritemod2.so
= -Wl
,-z
,now
,-z
,undefs
209 tst-plt-rewrite2-ENV
= GLIBC_TUNABLES
=glibc.cpu.plt_rewrite
=2
210 $(objpfx
)tst-plt-rewrite2
: $(objpfx
)tst-plt-rewritemod2.so
213 endif # $(subdir) == elf
216 gen-as-const-headers
+= tlsdesc.sym rtld-offsets.sym
219 ifeq ($(subdir
),wcsmbs
)
236 do-tests-clean common-mostlyclean
: tst-x86_64-1-clean
238 .PHONY
: tst-x86_64-1-clean
240 -rm -rf
$(objpfx
)x86_64
242 $(objpfx
)x86_64
/tst-platformmod-2.os
: $(objpfx
)tst-platformmod-2.os
243 $(make-target-directory
)