localedef: Update LC_MONETARY handling (Bug 28845)
[glibc.git] / nptl / Makefile
blobb585663974df724ad3d8dc48c2c0f431122b3b37
1 # Copyright (C) 2002-2022 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
4 # The GNU C Library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
9 # The GNU C Library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with the GNU C Library; if not, see
16 # <https://www.gnu.org/licenses/>.
19 # Sub-makefile for NPTL portion of the library.
21 subdir := nptl
23 include ../Makeconfig
25 headers := \
26 bits/atomic_wide_counter.h \
27 bits/semaphore.h \
28 bits/struct_mutex.h \
29 bits/struct_rwlock.h \
30 pthread.h \
31 semaphore.h \
32 # headers
34 extra-libs := libpthread
35 extra-libs-others := $(extra-libs)
37 routines = \
38 alloca_cutoff \
39 cancellation \
40 cleanup \
41 cleanup_compat \
42 cleanup_defer \
43 cleanup_defer_compat \
44 cleanup_routine \
45 elision-conf \
46 elision-lock \
47 elision-timed \
48 elision-trylock \
49 elision-unlock \
50 events \
51 futex-internal \
52 libc-cleanup \
53 libc_multiple_threads \
54 lowlevellock \
55 nptl-stack \
56 nptl_deallocate_tsd \
57 nptl_free_tcb \
58 nptl_nthreads \
59 nptl_setxid \
60 nptlfreeres \
61 old_pthread_cond_broadcast \
62 old_pthread_cond_destroy \
63 old_pthread_cond_init \
64 old_pthread_cond_signal \
65 old_pthread_cond_timedwait \
66 old_pthread_cond_wait \
67 pthread_atfork \
68 pthread_attr_copy \
69 pthread_attr_destroy \
70 pthread_attr_extension \
71 pthread_attr_getaffinity \
72 pthread_attr_getdetachstate \
73 pthread_attr_getguardsize \
74 pthread_attr_getinheritsched \
75 pthread_attr_getschedparam \
76 pthread_attr_getschedpolicy \
77 pthread_attr_getscope \
78 pthread_attr_getsigmask \
79 pthread_attr_getstack \
80 pthread_attr_getstackaddr \
81 pthread_attr_getstacksize \
82 pthread_attr_init \
83 pthread_attr_setaffinity \
84 pthread_attr_setdetachstate \
85 pthread_attr_setguardsize \
86 pthread_attr_setinheritsched \
87 pthread_attr_setschedparam \
88 pthread_attr_setschedpolicy \
89 pthread_attr_setscope \
90 pthread_attr_setsigmask \
91 pthread_attr_setsigmask_internal \
92 pthread_attr_setstack \
93 pthread_attr_setstackaddr \
94 pthread_attr_setstacksize \
95 pthread_barrier_destroy \
96 pthread_barrier_init \
97 pthread_barrier_wait \
98 pthread_barrierattr_destroy \
99 pthread_barrierattr_getpshared \
100 pthread_barrierattr_init \
101 pthread_barrierattr_setpshared \
102 pthread_cancel \
103 pthread_cleanup_upto \
104 pthread_clockjoin \
105 pthread_cond_broadcast \
106 pthread_cond_destroy \
107 pthread_cond_init \
108 pthread_cond_signal \
109 pthread_cond_wait \
110 pthread_condattr_destroy \
111 pthread_condattr_getclock \
112 pthread_condattr_getpshared \
113 pthread_condattr_init \
114 pthread_condattr_setclock \
115 pthread_condattr_setpshared \
116 pthread_create \
117 pthread_detach \
118 pthread_equal \
119 pthread_exit \
120 pthread_getaffinity \
121 pthread_getattr_default_np \
122 pthread_getattr_np \
123 pthread_getconcurrency \
124 pthread_getcpuclockid \
125 pthread_getname \
126 pthread_getschedparam \
127 pthread_getspecific \
128 pthread_join \
129 pthread_join_common \
130 pthread_key_create \
131 pthread_key_delete \
132 pthread_keys \
133 pthread_kill \
134 pthread_kill_other_threads \
135 pthread_mutex_cond_lock \
136 pthread_mutex_conf \
137 pthread_mutex_consistent \
138 pthread_mutex_destroy \
139 pthread_mutex_getprioceiling \
140 pthread_mutex_init \
141 pthread_mutex_lock \
142 pthread_mutex_setprioceiling \
143 pthread_mutex_timedlock \
144 pthread_mutex_trylock \
145 pthread_mutex_unlock \
146 pthread_mutexattr_destroy \
147 pthread_mutexattr_getprioceiling \
148 pthread_mutexattr_getprotocol \
149 pthread_mutexattr_getpshared \
150 pthread_mutexattr_getrobust \
151 pthread_mutexattr_gettype \
152 pthread_mutexattr_init \
153 pthread_mutexattr_setprioceiling \
154 pthread_mutexattr_setprotocol \
155 pthread_mutexattr_setpshared \
156 pthread_mutexattr_setrobust \
157 pthread_mutexattr_settype \
158 pthread_once \
159 pthread_rwlock_clockrdlock \
160 pthread_rwlock_clockwrlock \
161 pthread_rwlock_destroy \
162 pthread_rwlock_init \
163 pthread_rwlock_rdlock \
164 pthread_rwlock_timedrdlock \
165 pthread_rwlock_timedwrlock \
166 pthread_rwlock_tryrdlock \
167 pthread_rwlock_trywrlock \
168 pthread_rwlock_unlock \
169 pthread_rwlock_wrlock \
170 pthread_rwlockattr_destroy \
171 pthread_rwlockattr_getkind_np \
172 pthread_rwlockattr_getpshared \
173 pthread_rwlockattr_init \
174 pthread_rwlockattr_setkind_np \
175 pthread_rwlockattr_setpshared \
176 pthread_self \
177 pthread_setaffinity \
178 pthread_setattr_default_np \
179 pthread_setcancelstate \
180 pthread_setcanceltype \
181 pthread_setconcurrency \
182 pthread_setname \
183 pthread_setschedparam \
184 pthread_setschedprio \
185 pthread_setspecific \
186 pthread_sigmask \
187 pthread_sigqueue \
188 pthread_spin_destroy \
189 pthread_spin_init \
190 pthread_spin_lock \
191 pthread_spin_trylock \
192 pthread_spin_unlock \
193 pthread_testcancel \
194 pthread_timedjoin \
195 pthread_tryjoin \
196 pthread_yield \
197 sem_clockwait \
198 sem_close \
199 sem_destroy \
200 sem_getvalue \
201 sem_init \
202 sem_open \
203 sem_post \
204 sem_routines \
205 sem_timedwait \
206 sem_unlink \
207 sem_wait \
208 tpp \
209 unwind \
210 vars \
212 static-only-routines = pthread_atfork
213 libpthread-routines = libpthread-compat
214 libpthread-shared-only-routines = libpthread-compat
216 # Pretend that libpthread.so is a linker script, so that the symbolic
217 # link is not installed.
218 install-lib-ldscripts = libpthread.so
219 $(inst_libdir)/libpthread.so:
221 # Since cancellation handling is in large parts handled using exceptions
222 # we have to compile some files with exception handling enabled, some
223 # even with asynchronous unwind tables.
225 # nptl-init.c contains sigcancel_handler().
226 CFLAGS-nptl-init.c += -fexceptions -fasynchronous-unwind-tables
227 # The unwind code itself,
228 CFLAGS-unwind.c += -fexceptions
229 CFLAGS-unwind-forcedunwind.c += -fexceptions -fasynchronous-unwind-tables
231 # The following three functions must be async-cancel safe.
232 CFLAGS-pthread_cancel.c += -fexceptions -fasynchronous-unwind-tables
233 CFLAGS-pthread_setcancelstate.c += -fexceptions -fasynchronous-unwind-tables
234 CFLAGS-pthread_setcanceltype.c += -fexceptions -fasynchronous-unwind-tables
236 # These are internal functions which similar functionality as setcancelstate
237 # and setcanceltype.
238 CFLAGS-cancellation.c += -fasynchronous-unwind-tables
240 # Calling pthread_exit() must cause the registered cancel handlers to
241 # be executed. Therefore exceptions have to be thrown through this
242 # function.
243 CFLAGS-pthread_exit.c += -fexceptions
245 # Among others, __pthread_unwind is forwarded. This function must handle
246 # exceptions.
247 CFLAGS-forward.c += -fexceptions
249 # The following are cancellation points. Some of the functions can
250 # block and therefore temporarily enable asynchronous cancellation.
251 # Those must be compiled asynchronous unwind tables.
252 CFLAGS-pthread_testcancel.c += -fexceptions
253 CFLAGS-pthread_join.c += -fexceptions -fasynchronous-unwind-tables
254 CFLAGS-pthread_timedjoin.c += -fexceptions -fasynchronous-unwind-tables
255 CFLAGS-pthread_clockjoin.c += -fexceptions -fasynchronous-unwind-tables
256 CFLAGS-pthread_once.c += $(uses-callbacks) -fexceptions \
257 -fasynchronous-unwind-tables
258 CFLAGS-pthread_cond_wait.c += -fexceptions -fasynchronous-unwind-tables
259 CFLAGS-pthread_kill.c = -fexceptions -fasynchronous-unwind-tables
260 CFLAGS-sem_wait.c += -fexceptions -fasynchronous-unwind-tables
261 CFLAGS-sem_timedwait.c += -fexceptions -fasynchronous-unwind-tables
262 CFLAGS-sem_clockwait.c = -fexceptions -fasynchronous-unwind-tables
264 CFLAGS-futex-internal.c += -fexceptions -fasynchronous-unwind-tables
266 LDLIBS-tst-once5 = -lstdc++
267 CFLAGS-tst-thread_local1.o = -std=gnu++11
268 LDLIBS-tst-thread_local1 = -lstdc++
269 CFLAGS-tst-thread-exit-clobber.o = -std=gnu++11
270 LDLIBS-tst-thread-exit-clobber = -lstdc++
271 CFLAGS-tst-minstack-throw.o = -std=gnu++11
272 LDLIBS-tst-minstack-throw = -lstdc++
274 tests = tst-attr2 tst-attr3 tst-default-attr \
275 tst-mutex5a tst-mutex7a \
276 tst-mutexpi1 tst-mutexpi2 tst-mutexpi3 tst-mutexpi4 \
277 tst-mutexpi5 tst-mutexpi5a tst-mutexpi6 tst-mutexpi7 tst-mutexpi7a \
278 tst-mutexpi9 tst-mutexpi10 \
279 tst-cond26 \
280 tst-robustpi1 tst-robustpi2 tst-robustpi3 tst-robustpi4 tst-robustpi5 \
281 tst-robustpi6 tst-robustpi7 tst-robustpi9 \
282 tst-rwlock2 tst-rwlock2a tst-rwlock2b tst-rwlock3 \
283 tst-rwlock6 tst-rwlock7 tst-rwlock8 \
284 tst-rwlock9 tst-rwlock10 tst-rwlock11 \
285 tst-rwlock15 tst-rwlock17 tst-rwlock18 \
286 tst-once5 \
287 tst-sem17 \
288 tst-tsd3 tst-tsd4 \
289 tst-cancel4_1 tst-cancel4_2 \
290 tst-cancel7 tst-cancel17 tst-cancel24 \
291 tst-signal3 \
292 tst-exec4 tst-exec5 \
293 tst-stack2 tst-stack3 tst-stack4 \
294 tst-pthread-attr-affinity \
295 tst-pthread-attr-affinity-fail \
296 tst-dlsym1 \
297 tst-context1 \
298 tst-sched1 \
299 tst-initializers1 $(addprefix tst-initializers1-,\
300 c89 gnu89 c99 gnu99 c11 gnu11) \
301 tst-thread_local1 \
302 tst-robust-fork \
303 tst-thread-exit-clobber tst-minstack-cancel tst-minstack-exit \
304 tst-minstack-throw \
305 tst-rwlock-pwn \
306 tst-thread-affinity-pthread \
307 tst-thread-affinity-pthread2 \
308 tst-thread-affinity-sched \
309 tst-pthread-defaultattr-free \
310 tst-pthread-attr-sigmask \
311 tst-pthread-timedlock-lockloop \
312 tst-pthread-gdb-attach tst-pthread-gdb-attach-static \
313 tst-pthread_exit-nothreads \
314 tst-pthread_exit-nothreads-static \
315 tst-thread-setspecific
317 tests-nolibpthread = \
318 tst-pthread_exit-nothreads \
319 tst-pthread_exit-nothreads-static \
321 tests-container = tst-pthread-getattr
323 tests-internal := tst-robustpi8 tst-rwlock19 tst-rwlock20 \
324 tst-sem11 tst-sem12 tst-sem13 \
325 tst-barrier5 tst-signal7 tst-mutex8 tst-mutex8-static \
326 tst-mutexpi8 tst-mutexpi8-static \
327 tst-setgetname \
328 tst-cond22 \
330 xtests = tst-setuid1 tst-setuid1-static tst-setuid2 \
331 tst-mutexpp1 tst-mutexpp6 tst-mutexpp10 tst-setgroups \
332 tst-mutexpp5 tst-mutexpp9
334 tests-time64 := \
335 tst-cancel4_2-time64
337 # This test can run into task limits because of a linux kernel bug
338 # and then cause the make process to fail too, see bug 24537.
339 xtests += tst-eintr1
341 test-srcs = tst-oddstacklimit
343 gen-as-const-headers = unwindbuf.sym \
344 pthread-pi-defines.sym
346 gen-py-const-headers := nptl_lock_constants.pysym
347 pretty-printers := nptl-printers.py
348 tests-printers := test-mutexattr-printers test-mutex-printers \
349 test-condattr-printers test-cond-printers \
350 test-rwlockattr-printers test-rwlock-printers
352 # We must specify both CFLAGS and CPPFLAGS to override any
353 # compiler options the user might have provided that conflict
354 # with what we need e.g. user specifies CPPFLAGS with -O2 and
355 # we need -O0.
356 CFLAGS-test-mutexattr-printers.c := $(CFLAGS-printers-tests)
357 CFLAGS-test-mutex-printers.c := $(CFLAGS-printers-tests)
358 CFLAGS-test-condattr-printers.c := $(CFLAGS-printers-tests)
359 CFLAGS-test-cond-printers.c := $(CFLAGS-printers-tests)
360 CFLAGS-test-rwlockattr-printers.c := $(CFLAGS-printers-tests)
361 CFLAGS-test-rwlock-printers.c := $(CFLAGS-printers-tests)
362 CPPFLAGS-test-mutexattr-printers.c := $(CFLAGS-printers-tests)
363 CPPFLAGS-test-mutex-printers.c := $(CFLAGS-printers-tests)
364 CPPFLAGS-test-condattr-printers.c := $(CFLAGS-printers-tests)
365 CPPFLAGS-test-cond-printers.c := $(CFLAGS-printers-tests)
366 CPPFLAGS-test-rwlockattr-printers.c := $(CFLAGS-printers-tests)
367 CPPFLAGS-test-rwlock-printers.c := $(CFLAGS-printers-tests)
369 # Reuse the CFLAGS setting for the GDB attaching test. It needs
370 # debugging information.
371 CFLAGS-tst-pthread-gdb-attach.c := $(CFLAGS-printers-tests)
372 CPPFLAGS-tst-pthread-gdb-attach.c := $(CFLAGS-printers-tests)
373 ifeq ($(build-shared)$(build-hardcoded-path-in-tests),yesno)
374 CPPFLAGS-tst-pthread-gdb-attach.c += -DDO_ADD_SYMBOL_FILE=1
375 else
376 CPPFLAGS-tst-pthread-gdb-attach.c += -DDO_ADD_SYMBOL_FILE=0
377 endif
378 CFLAGS-tst-pthread-gdb-attach-static.c := $(CFLAGS-printers-tests)
379 CPPFLAGS-tst-pthread-gdb-attach-static.c := \
380 $(CFLAGS-printers-tests) -DDO_ADD_SYMBOL_FILE=0
381 # As of version 9.2, GDB cannot attach properly to PIE programs that
382 # were launched with an explicit ld.so invocation.
383 tst-pthread-gdb-attach-no-pie = yes
385 tests += tst-cancelx7 tst-cancelx17
387 ifeq ($(build-shared),yes)
388 tests += tst-compat-forwarder tst-audit-threads
389 tests-internal += tst-tls3 tst-tls3-malloc tst-tls5 tst-stackguard1
390 ifeq ($(have-z-execstack),yes)
391 tests += tst-execstack
392 endif
393 endif
395 modules-names = tst-tls3mod \
396 tst-tls5mod tst-tls5moda tst-tls5modb tst-tls5modc \
397 tst-tls5modd tst-tls5mode tst-tls5modf tst-stack4mod \
398 tst-execstack-mod \
399 tst-compat-forwarder-mod tst-audit-threads-mod1 \
400 tst-audit-threads-mod2
401 extra-test-objs += $(addsuffix .os,$(strip $(modules-names))) \
402 tst-cleanup4aux.o tst-cleanupx4aux.o
403 test-extras += tst-cleanup4aux tst-cleanupx4aux
405 # This test exercises compat symbols removed in glibc 2.34.
406 ifdef have-GLIBC_2.33
407 tests += tst-cleanup4
408 ifeq ($(build-shared),yes)
409 tests += tst-cleanupx4
410 endif
411 endif
413 tst-tls3mod.so-no-z-defs = yes
414 tst-tls5mod.so-no-z-defs = yes
415 tst-tls5moda.so-no-z-defs = yes
416 tst-tls5modb.so-no-z-defs = yes
417 tst-tls5modc.so-no-z-defs = yes
418 tst-tls5modd.so-no-z-defs = yes
419 tst-tls5mode.so-no-z-defs = yes
420 tst-tls5modf.so-no-z-defs = yes
422 ifeq ($(build-shared),yes)
424 # Set the `multidir' variable by grabbing the variable from the compiler.
425 # We do it once and save the result in a generated makefile.
426 -include $(objpfx)multidir.mk
427 $(objpfx)multidir.mk: $(common-objpfx)config.make
428 $(make-target-directory)
429 dir=`$(CC) $(CFLAGS) $(CPPFLAGS) -print-multi-directory`; \
430 echo "multidir := $$dir" > $@T
431 mv -f $@T $@
433 endif
435 CFLAGS-ftrylockfile.c += $(libio-mtsafe)
436 CFLAGS-funlockfile.c += $(libio-mtsafe)
438 link-libc-static := $(common-objpfx)libc.a $(static-gnulib) \
439 $(common-objpfx)libc.a
441 tests-static += tst-stackguard1-static \
442 tst-cancel24-static \
443 tst-mutex8-static tst-mutexpi8-static tst-sem11-static \
444 tst-sem12-static tst-cond11-static \
445 tst-pthread-gdb-attach-static \
446 tst-pthread_exit-nothreads-static
448 tests += tst-cancel24-static
450 tests-internal += tst-sem11-static tst-sem12-static tst-stackguard1-static
451 xtests-static += tst-setuid1-static
453 ifeq ($(run-built-tests),yes)
454 tests-special += $(objpfx)tst-stack3-mem.out $(objpfx)tst-oddstacklimit.out
455 ifeq ($(build-shared),yes)
456 tests-special += $(objpfx)tst-tls6.out
457 endif
458 endif
460 ifeq (,$(CXX))
461 # These tests require a C++ compiler and runtime.
462 tests-unsupported += tst-cancel24 tst-cancel24-static tst-once5 \
463 tst-thread-exit-clobber tst-minstack-throw
464 endif
465 # These tests require a C++ compiler and runtime with thread_local support.
466 ifneq ($(have-cxx-thread_local),yes)
467 tests-unsupported += tst-thread_local1
468 endif
470 include ../Rules
472 ifeq (yes,$(build-shared))
473 # Make sure these things are built in the `make lib' pass so they can be used
474 # to run programs during the `make others' pass.
475 lib-noranlib: $(addprefix $(objpfx),$(extra-objs))
476 endif
479 # 'pthread_self' is a simple memory or register load. Setting up the
480 # stack frame is more work than the actual operation. Disable the
481 # frame creation entirely. This will help applications which call the
482 # function frequently to get a thread-specific handle.
483 CFLAGS-pthread_self.os += -fomit-frame-pointer
485 # Run the cancellation and cleanup tests also for the modern, exception-based
486 # implementation. For this we have to pass the -fexceptions parameter.
487 CFLAGS-tst-cancelx7.c += -fexceptions
488 CFLAGS-tst-cancelx17.c += -fexceptions
489 CFLAGS-tst-cleanupx4.c += -fexceptions
490 CFLAGS-tst-cleanupx4aux.c += -fexceptions
491 CFLAGS-tst-initializers1.c += -W -Wall -Werror
492 CFLAGS-tst-initializers1-< = $(CFLAGS-tst-initializers1.c) \
493 $(patsubst tst-initializers1-%.c,-std=%,$<)
494 CFLAGS-tst-initializers1-c89.c += $(CFLAGS-tst-initializers1-<)
495 CFLAGS-tst-initializers1-c99.c += $(CFLAGS-tst-initializers1-<)
496 CFLAGS-tst-initializers1-c11.c += $(CFLAGS-tst-initializers1-<)
497 CFLAGS-tst-initializers1-gnu89.c += $(CFLAGS-tst-initializers1-<)
498 CFLAGS-tst-initializers1-gnu99.c += $(CFLAGS-tst-initializers1-<)
499 CFLAGS-tst-initializers1-gnu11.c += $(CFLAGS-tst-initializers1-<)
501 tst-cancel7-ARGS = --command "exec $(host-test-program-cmd)"
502 tst-cancelx7-ARGS = $(tst-cancel7-ARGS)
504 tst-stack3-ENV = MALLOC_TRACE=$(objpfx)tst-stack3.mtrace \
505 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
506 $(objpfx)tst-stack3-mem.out: $(objpfx)tst-stack3.out
507 $(common-objpfx)malloc/mtrace $(objpfx)tst-stack3.mtrace > $@; \
508 $(evaluate-test)
509 generated += tst-stack3-mem.out tst-stack3.mtrace
511 tst-stack4mod.sos=$(shell for i in 0 1 2 3 4 5 6 7 8 9 10 \
512 11 12 13 14 15 16 17 18 19; do \
513 for j in 0 1 2 3 4 5 6 7 8 9 10 \
514 11 12 13 14 15 16 17 18 19; do \
515 echo $(objpfx)tst-stack4mod-$$i-$$j.so; \
516 done; done)
517 $(objpfx)tst-stack4.out: $(tst-stack4mod.sos)
518 $(tst-stack4mod.sos): $(objpfx)tst-stack4mod.so
519 cp -f $< $@
520 clean:
521 rm -f $(tst-stack4mod.sos)
523 $(objpfx)tst-cleanup4: $(objpfx)tst-cleanup4aux.o
524 $(objpfx)tst-cleanupx4: $(objpfx)tst-cleanupx4aux.o
526 LDFLAGS-tst-tls3 = -rdynamic
527 $(objpfx)tst-tls3.out: $(objpfx)tst-tls3mod.so
529 LDFLAGS-tst-tls3-malloc = -rdynamic
530 $(objpfx)tst-tls3-malloc.out: $(objpfx)tst-tls3mod.so
532 $(objpfx)tst-tls5: $(objpfx)tst-tls5mod.so
533 LDFLAGS-tst-tls5 = -Wl,--no-as-needed
534 LDFLAGS-tst-tls5mod.so = -Wl,-soname,tst-tls5mod.so
536 ifeq ($(build-shared),yes)
537 $(objpfx)tst-tls6.out: tst-tls6.sh $(objpfx)tst-tls5 \
538 $(objpfx)tst-tls5moda.so $(objpfx)tst-tls5modb.so \
539 $(objpfx)tst-tls5modc.so $(objpfx)tst-tls5modd.so \
540 $(objpfx)tst-tls5mode.so $(objpfx)tst-tls5modf.so
541 $(BASH) $< $(common-objpfx) '$(test-via-rtld-prefix)' \
542 '$(test-wrapper-env)' '$(run-program-env)'; \
543 $(evaluate-test)
544 endif
546 LDLIBS-tst-cancel24 = -Wl,--no-as-needed -lstdc++
547 LDLIBS-tst-cancel24-static = $(LDLIBS-tst-cancel24)
549 ifeq ($(build-shared),yes)
551 generated += multidir.mk tst-tls6.out
552 endif
554 tst-exec4-ARGS = $(host-test-program-cmd)
556 $(objpfx)tst-execstack.out: $(objpfx)tst-execstack-mod.so
557 LDFLAGS-tst-execstack = -Wl,-z,noexecstack
558 CFLAGS-tst-execstack-mod.c += -Wno-trampolines
560 tst-stackguard1-ARGS = --command "$(host-test-program-cmd) --child"
561 tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child"
563 ifeq ($(run-built-tests),yes)
564 $(objpfx)tst-oddstacklimit.out: $(objpfx)tst-oddstacklimit $(objpfx)tst-basic1
565 $(test-program-prefix) $< --command '$(host-test-program-cmd)' > $@; \
566 $(evaluate-test)
567 endif
569 $(objpfx)tst-compat-forwarder: $(objpfx)tst-compat-forwarder-mod.so
571 tst-mutex10-ENV = GLIBC_TUNABLES=glibc.elision.enable=1
573 # Protect against a build using -Wl,-z,now.
574 LDFLAGS-tst-audit-threads-mod1.so = -Wl,-z,lazy
575 LDFLAGS-tst-audit-threads-mod2.so = -Wl,-z,lazy
576 LDFLAGS-tst-audit-threads = -Wl,-z,lazy
577 $(objpfx)tst-audit-threads: $(objpfx)tst-audit-threads-mod2.so
578 $(objpfx)tst-audit-threads.out: $(objpfx)tst-audit-threads-mod1.so
579 tst-audit-threads-ENV = LD_AUDIT=$(objpfx)tst-audit-threads-mod1.so
581 # The test uses dlopen indirectly and would otherwise load system
582 # objects.
583 tst-setuid1-static-ENV = \
584 LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)elf:$(common-objpfx)nss
586 # The tests here better do not run in parallel.
587 ifeq ($(run-built-tests),yes)
588 ifneq ($(filter %tests,$(MAKECMDGOALS)),)
589 .NOTPARALLEL:
590 endif
591 endif