1 # Copyright (C) 2002-2021 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.
25 headers := pthread.h semaphore.h bits/semaphore.h \
26 bits/struct_mutex.h bits/struct_rwlock.h
28 extra-libs := libpthread
29 extra-libs-others := $(extra-libs)
42 libc_multiple_threads \
45 old_pthread_cond_destroy \
46 old_pthread_cond_init \
49 pthread_attr_destroy \
50 pthread_attr_extension \
51 pthread_attr_getdetachstate \
52 pthread_attr_getinheritsched \
53 pthread_attr_getschedparam \
54 pthread_attr_getschedpolicy \
55 pthread_attr_getscope \
56 pthread_attr_getsigmask \
58 pthread_attr_setaffinity \
59 pthread_attr_setdetachstate \
60 pthread_attr_setinheritsched \
61 pthread_attr_setschedparam \
62 pthread_attr_setschedpolicy \
63 pthread_attr_setscope \
64 pthread_attr_setsigmask \
65 pthread_attr_setsigmask_internal \
66 pthread_cond_destroy \
68 pthread_condattr_destroy \
69 pthread_condattr_init \
73 pthread_getschedparam \
75 pthread_setschedparam \
78 shared-only-routines = forward
79 static-only-routines = pthread_atfork
81 # We need to provide certain routines for compatibility with existing
83 pthread-compat-wrappers = \
87 pread pread64 pwrite pwrite64 \
91 libpthread-routines = \
92 $(pthread-compat-wrappers) \
97 cleanup_defer_compat \
108 old_pthread_cond_broadcast \
109 old_pthread_cond_signal \
110 old_pthread_cond_timedwait \
111 old_pthread_cond_wait \
117 pthread_attr_getaffinity \
118 pthread_attr_getguardsize \
119 pthread_attr_getstack \
120 pthread_attr_getstackaddr \
121 pthread_attr_getstacksize \
122 pthread_attr_setguardsize \
123 pthread_attr_setstack \
124 pthread_attr_setstackaddr \
125 pthread_attr_setstacksize \
126 pthread_barrier_destroy \
127 pthread_barrier_init \
128 pthread_barrier_wait \
129 pthread_barrierattr_destroy \
130 pthread_barrierattr_getpshared \
131 pthread_barrierattr_init \
132 pthread_barrierattr_setpshared \
135 pthread_cond_broadcast \
136 pthread_cond_signal \
138 pthread_condattr_getclock \
139 pthread_condattr_getpshared \
140 pthread_condattr_setclock \
141 pthread_condattr_setpshared \
145 pthread_getattr_default_np \
146 pthread_getconcurrency \
147 pthread_getcpuclockid \
149 pthread_getspecific \
151 pthread_join_common \
155 pthread_kill_other_threads \
156 pthread_mutex_cond_lock \
158 pthread_mutex_consistent \
159 pthread_mutex_destroy \
160 pthread_mutex_getprioceiling \
163 pthread_mutex_setprioceiling \
164 pthread_mutex_timedlock \
165 pthread_mutex_trylock \
166 pthread_mutex_unlock \
167 pthread_mutexattr_destroy \
168 pthread_mutexattr_getprioceiling \
169 pthread_mutexattr_getprotocol \
170 pthread_mutexattr_getpshared \
171 pthread_mutexattr_getrobust \
172 pthread_mutexattr_gettype \
173 pthread_mutexattr_init \
174 pthread_mutexattr_setprioceiling \
175 pthread_mutexattr_setprotocol \
176 pthread_mutexattr_setpshared \
177 pthread_mutexattr_setrobust \
178 pthread_mutexattr_settype \
180 pthread_rwlock_clockrdlock \
181 pthread_rwlock_clockwrlock \
182 pthread_rwlock_destroy \
183 pthread_rwlock_init \
184 pthread_rwlock_rdlock \
185 pthread_rwlock_timedrdlock \
186 pthread_rwlock_timedwrlock \
187 pthread_rwlock_tryrdlock \
188 pthread_rwlock_trywrlock \
189 pthread_rwlock_unlock \
190 pthread_rwlock_wrlock \
191 pthread_rwlockattr_destroy \
192 pthread_rwlockattr_getkind_np \
193 pthread_rwlockattr_getpshared \
194 pthread_rwlockattr_init \
195 pthread_rwlockattr_setkind_np \
196 pthread_rwlockattr_setpshared \
197 pthread_setaffinity \
198 pthread_setattr_default_np \
199 pthread_setcancelstate \
200 pthread_setcanceltype \
201 pthread_setconcurrency \
203 pthread_setschedprio \
204 pthread_setspecific \
206 pthread_spin_destroy \
209 pthread_spin_trylock \
210 pthread_spin_unlock \
230 unwind-forcedunwind \
234 libpthread-shared-only-routines = \
237 unwind-forcedunwind \
240 # Since cancellation handling is in large parts handled using exceptions
241 # we have to compile some files with exception handling enabled, some
242 # even with asynchronous unwind tables.
244 # nptl-init.c contains sigcancel_handler().
245 CFLAGS-nptl-init.c += -fexceptions -fasynchronous-unwind-tables
246 # The unwind code itself,
247 CFLAGS-unwind.c += -fexceptions
248 CFLAGS-unwind-forcedunwind.c += -fexceptions -fasynchronous-unwind-tables
250 # The following three functions must be async-cancel safe.
251 CFLAGS-pthread_cancel.c += -fexceptions -fasynchronous-unwind-tables
252 CFLAGS-pthread_setcancelstate.c += -fexceptions -fasynchronous-unwind-tables
253 CFLAGS-pthread_setcanceltype.c += -fexceptions -fasynchronous-unwind-tables
255 # These are internal functions which similar functionality as setcancelstate
257 CFLAGS-cancellation.c += -fasynchronous-unwind-tables
258 CFLAGS-libc-cancellation.c += -fasynchronous-unwind-tables
260 # Calling pthread_exit() must cause the registered cancel handlers to
261 # be executed. Therefore exceptions have to be thrown through this
263 CFLAGS-pthread_exit.c += -fexceptions
265 # Among others, __pthread_unwind is forwarded. This function must handle
267 CFLAGS-forward.c += -fexceptions
269 # The following are cancellation points. Some of the functions can
270 # block and therefore temporarily enable asynchronous cancellation.
271 # Those must be compiled asynchronous unwind tables.
272 CFLAGS-pthread_testcancel.c += -fexceptions
273 CFLAGS-pthread_join.c += -fexceptions -fasynchronous-unwind-tables
274 CFLAGS-pthread_timedjoin.c += -fexceptions -fasynchronous-unwind-tables
275 CFLAGS-pthread_clockjoin.c += -fexceptions -fasynchronous-unwind-tables
276 CFLAGS-pthread_once.c += $(uses-callbacks) -fexceptions \
277 -fasynchronous-unwind-tables
278 CFLAGS-pthread_cond_wait.c += -fexceptions -fasynchronous-unwind-tables
279 CFLAGS-sem_wait.c += -fexceptions -fasynchronous-unwind-tables
280 CFLAGS-sem_timedwait.c += -fexceptions -fasynchronous-unwind-tables
281 CFLAGS-sem_clockwait.c = -fexceptions -fasynchronous-unwind-tables
283 # These are the function wrappers we have to duplicate here.
284 CFLAGS-lockf.c += -fexceptions
285 CFLAGS-pread.c += -fexceptions -fasynchronous-unwind-tables
286 CFLAGS-pread64.c += -fexceptions -fasynchronous-unwind-tables
287 CFLAGS-pwrite.c += -fexceptions -fasynchronous-unwind-tables
288 CFLAGS-pwrite64.c += -fexceptions -fasynchronous-unwind-tables
289 CFLAGS-sigwait.c += -fexceptions -fasynchronous-unwind-tables
290 CFLAGS-msgrcv.c += -fexceptions -fasynchronous-unwind-tables
291 CFLAGS-msgsnd.c += -fexceptions -fasynchronous-unwind-tables
292 CFLAGS-open.c += -fexceptions -fasynchronous-unwind-tables
293 CFLAGS-open64.c += -fexceptions -fasynchronous-unwind-tables
294 CFLAGS-send.c += -fexceptions -fasynchronous-unwind-tables
295 CFLAGS-sigsuspend.c += -fexceptions -fasynchronous-unwind-tables
296 CFLAGS-fdatasync.c += -fexceptions -fasynchronous-unwind-tables
298 CFLAGS-futex-internal.c += -fexceptions -fasynchronous-unwind-tables
300 LDLIBS-tst-once5 = -lstdc++
301 CFLAGS-tst-thread_local1.o = -std=gnu++11
302 LDLIBS-tst-thread_local1 = -lstdc++
303 CFLAGS-tst-thread-exit-clobber.o = -std=gnu++11
304 LDLIBS-tst-thread-exit-clobber = -lstdc++
305 CFLAGS-tst-minstack-throw.o = -std=gnu++11
306 LDLIBS-tst-minstack-throw = -lstdc++
308 tests = tst-attr2 tst-attr3 tst-default-attr \
309 tst-mutex5a tst-mutex7a \
310 tst-mutexpi1 tst-mutexpi2 tst-mutexpi3 tst-mutexpi4 \
311 tst-mutexpi5 tst-mutexpi5a tst-mutexpi6 tst-mutexpi7 tst-mutexpi7a \
312 tst-mutexpi9 tst-mutexpi10 \
313 tst-cond22 tst-cond26 \
314 tst-robustpi1 tst-robustpi2 tst-robustpi3 tst-robustpi4 tst-robustpi5 \
315 tst-robustpi6 tst-robustpi7 tst-robustpi9 \
316 tst-rwlock2 tst-rwlock2a tst-rwlock2b tst-rwlock3 \
317 tst-rwlock6 tst-rwlock7 tst-rwlock8 \
318 tst-rwlock9 tst-rwlock10 tst-rwlock11 \
319 tst-rwlock15 tst-rwlock17 tst-rwlock18 \
323 tst-cancel4_1 tst-cancel4_2 \
324 tst-cancel7 tst-cancel17 tst-cancel24 \
327 tst-exec4 tst-exec5 \
328 tst-stack2 tst-stack3 tst-stack4 \
329 tst-pthread-attr-affinity \
333 tst-initializers1 $(addprefix tst-initializers1-,\
334 c89 gnu89 c99 gnu99 c11 gnu11) \
337 tst-thread-exit-clobber tst-minstack-cancel tst-minstack-exit \
340 tst-thread-affinity-pthread \
341 tst-thread-affinity-pthread2 \
342 tst-thread-affinity-sched \
343 tst-pthread-defaultattr-free \
344 tst-pthread-attr-sigmask \
345 tst-pthread-timedlock-lockloop
347 tests-container = tst-pthread-getattr
349 tests-internal := tst-robustpi8 tst-rwlock19 tst-rwlock20 \
350 tst-sem11 tst-sem12 tst-sem13 \
351 tst-barrier5 tst-signal7 tst-mutex8 tst-mutex8-static \
352 tst-mutexpi8 tst-mutexpi8-static \
355 xtests = tst-setuid1 tst-setuid1-static tst-setuid2 \
356 tst-mutexpp1 tst-mutexpp6 tst-mutexpp10 tst-setgroups \
357 tst-mutexpp5 tst-mutexpp9
359 # This test can run into task limits because of a linux kernel bug
360 # and then cause the make process to fail too, see bug 24537.
363 test-srcs = tst-oddstacklimit
365 gen-as-const-headers = unwindbuf.sym \
366 pthread-pi-defines.sym
368 gen-py-const-headers := nptl_lock_constants.pysym
369 pretty-printers := nptl-printers.py
370 tests-printers := test-mutexattr-printers test-mutex-printers \
371 test-condattr-printers test-cond-printers \
372 test-rwlockattr-printers test-rwlock-printers
374 # We must specify both CFLAGS and CPPFLAGS to override any
375 # compiler options the user might have provided that conflict
376 # with what we need e.g. user specifies CPPFLAGS with -O2 and
378 CFLAGS-test-mutexattr-printers.c := $(CFLAGS-printers-tests)
379 CFLAGS-test-mutex-printers.c := $(CFLAGS-printers-tests)
380 CFLAGS-test-condattr-printers.c := $(CFLAGS-printers-tests)
381 CFLAGS-test-cond-printers.c := $(CFLAGS-printers-tests)
382 CFLAGS-test-rwlockattr-printers.c := $(CFLAGS-printers-tests)
383 CFLAGS-test-rwlock-printers.c := $(CFLAGS-printers-tests)
384 CPPFLAGS-test-mutexattr-printers.c := $(CFLAGS-printers-tests)
385 CPPFLAGS-test-mutex-printers.c := $(CFLAGS-printers-tests)
386 CPPFLAGS-test-condattr-printers.c := $(CFLAGS-printers-tests)
387 CPPFLAGS-test-cond-printers.c := $(CFLAGS-printers-tests)
388 CPPFLAGS-test-rwlockattr-printers.c := $(CFLAGS-printers-tests)
389 CPPFLAGS-test-rwlock-printers.c := $(CFLAGS-printers-tests)
391 ifeq ($(build-shared),yes)
392 tests-printers-libs := $(shared-thread-library)
394 tests-printers-libs := $(static-thread-library)
397 LDFLAGS-pthread.so = -Wl,--enable-new-dtags,-z,nodelete,-z,initfirst
399 tests += tst-cancelx7 tst-cancelx17 tst-cleanupx4
401 ifeq ($(build-shared),yes)
402 tests += tst-compat-forwarder tst-audit-threads
403 tests-internal += tst-tls3 tst-tls3-malloc tst-tls5 tst-stackguard1
404 ifeq ($(have-z-execstack),yes)
405 tests += tst-execstack
409 modules-names = tst-tls3mod \
410 tst-tls5mod tst-tls5moda tst-tls5modb tst-tls5modc \
411 tst-tls5modd tst-tls5mode tst-tls5modf tst-stack4mod \
413 tst-compat-forwarder-mod tst-audit-threads-mod1 \
414 tst-audit-threads-mod2
415 extra-test-objs += $(addsuffix .os,$(strip $(modules-names))) \
416 tst-cleanup4aux.o tst-cleanupx4aux.o
417 test-extras += tst-cleanup4aux tst-cleanupx4aux
419 tst-tls3mod.so-no-z-defs = yes
420 tst-tls5mod.so-no-z-defs = yes
421 tst-tls5moda.so-no-z-defs = yes
422 tst-tls5modb.so-no-z-defs = yes
423 tst-tls5modc.so-no-z-defs = yes
424 tst-tls5modd.so-no-z-defs = yes
425 tst-tls5mode.so-no-z-defs = yes
426 tst-tls5modf.so-no-z-defs = yes
428 ifeq ($(build-shared),yes)
430 # Set the `multidir' variable by grabbing the variable from the compiler.
431 # We do it once and save the result in a generated makefile.
432 -include $(objpfx)multidir.mk
433 $(objpfx)multidir.mk: $(common-objpfx)config.make
434 $(make-target-directory)
435 dir=`$(CC) $(CFLAGS) $(CPPFLAGS) -print-multi-directory`; \
436 echo "multidir := $$dir" > $@T
441 ifneq (,$(patsubst .,,$(multidir)))
442 generated-dirs += $(firstword $(subst /, , $(multidir)))
443 crti-objs += $(multidir)/crti.o
444 crtn-objs += $(multidir)/crtn.o
445 $(objpfx)$(multidir):
448 extra-objs += $(crti-objs) $(crtn-objs)
449 extra-objs += pt-crti.o
452 CFLAGS-flockfile.c += $(libio-mtsafe)
453 CFLAGS-ftrylockfile.c += $(libio-mtsafe)
454 CFLAGS-funlockfile.c += $(libio-mtsafe)
456 link-libc-static := $(common-objpfx)libc.a $(static-gnulib) \
457 $(common-objpfx)libc.a
459 tests-static += tst-stackguard1-static \
460 tst-cancel24-static \
461 tst-mutex8-static tst-mutexpi8-static tst-sem11-static \
462 tst-sem12-static tst-cond11-static
464 tests += tst-cancel24-static
466 tests-internal += tst-sem11-static tst-sem12-static tst-stackguard1-static
467 xtests-static += tst-setuid1-static
469 ifeq ($(run-built-tests),yes)
470 tests-special += $(objpfx)tst-stack3-mem.out $(objpfx)tst-oddstacklimit.out
471 ifeq ($(build-shared),yes)
472 tests-special += $(objpfx)tst-tls6.out
477 # These tests require a C++ compiler and runtime.
478 tests-unsupported += tst-cancel24 tst-cancel24-static tst-once5 \
479 tst-thread-exit-clobber tst-minstack-throw
481 # These tests require a C++ compiler and runtime with thread_local support.
482 ifneq ($(have-cxx-thread_local),yes)
483 tests-unsupported += tst-thread_local1
488 ifeq (yes,$(build-shared))
489 # Make sure these things are built in the `make lib' pass so they can be used
490 # to run programs during the `make others' pass.
491 lib-noranlib: $(addprefix $(objpfx),$(extra-objs))
495 # 'pthread_self' is a simple memory or register load. Setting up the
496 # stack frame is more work than the actual operation. Disable the
497 # frame creation entirely. This will help applications which call the
498 # function frequently to get a thread-specific handle.
499 CFLAGS-pthread_self.os += -fomit-frame-pointer
501 # Run the cancellation and cleanup tests also for the modern, exception-based
502 # implementation. For this we have to pass the -fexceptions parameter.
503 CFLAGS-tst-cancelx7.c += -fexceptions
504 CFLAGS-tst-cancelx17.c += -fexceptions
505 CFLAGS-tst-cleanupx4.c += -fexceptions
506 CFLAGS-tst-cleanupx4aux.c += -fexceptions
507 CFLAGS-tst-initializers1.c += -W -Wall -Werror
508 CFLAGS-tst-initializers1-< = $(CFLAGS-tst-initializers1.c) \
509 $(patsubst tst-initializers1-%.c,-std=%,$<)
510 CFLAGS-tst-initializers1-c89.c += $(CFLAGS-tst-initializers1-<)
511 CFLAGS-tst-initializers1-c99.c += $(CFLAGS-tst-initializers1-<)
512 CFLAGS-tst-initializers1-c11.c += $(CFLAGS-tst-initializers1-<)
513 CFLAGS-tst-initializers1-gnu89.c += $(CFLAGS-tst-initializers1-<)
514 CFLAGS-tst-initializers1-gnu99.c += $(CFLAGS-tst-initializers1-<)
515 CFLAGS-tst-initializers1-gnu11.c += $(CFLAGS-tst-initializers1-<)
517 tst-cancel7-ARGS = --command "exec $(host-test-program-cmd)"
518 tst-cancelx7-ARGS = $(tst-cancel7-ARGS)
520 tst-stack3-ENV = MALLOC_TRACE=$(objpfx)tst-stack3.mtrace
521 $(objpfx)tst-stack3-mem.out: $(objpfx)tst-stack3.out
522 $(common-objpfx)malloc/mtrace $(objpfx)tst-stack3.mtrace > $@; \
524 generated += tst-stack3-mem.out tst-stack3.mtrace
526 $(objpfx)tst-stack4: $(libdl) $(shared-thread-library)
527 tst-stack4mod.sos=$(shell for i in 0 1 2 3 4 5 6 7 8 9 10 \
528 11 12 13 14 15 16 17 18 19; do \
529 for j in 0 1 2 3 4 5 6 7 8 9 10 \
530 11 12 13 14 15 16 17 18 19; do \
531 echo $(objpfx)tst-stack4mod-$$i-$$j.so; \
533 $(objpfx)tst-stack4.out: $(tst-stack4mod.sos)
534 $(tst-stack4mod.sos): $(objpfx)tst-stack4mod.so
537 rm -f $(tst-stack4mod.sos)
539 $(objpfx)tst-cleanup4: $(objpfx)tst-cleanup4aux.o $(shared-thread-library)
540 $(objpfx)tst-cleanupx4: $(objpfx)tst-cleanupx4aux.o $(shared-thread-library)
542 $(objpfx)tst-tls3: $(libdl) $(shared-thread-library)
543 LDFLAGS-tst-tls3 = -rdynamic
544 $(objpfx)tst-tls3.out: $(objpfx)tst-tls3mod.so
545 $(objpfx)tst-tls3mod.so: $(shared-thread-library)
547 $(objpfx)tst-tls3-malloc: $(libdl) $(shared-thread-library)
548 LDFLAGS-tst-tls3-malloc = -rdynamic
549 $(objpfx)tst-tls3-malloc.out: $(objpfx)tst-tls3mod.so
551 $(objpfx)tst-tls5: $(objpfx)tst-tls5mod.so $(shared-thread-library)
552 LDFLAGS-tst-tls5 = -Wl,--no-as-needed
553 LDFLAGS-tst-tls5mod.so = -Wl,-soname,tst-tls5mod.so
555 ifeq ($(build-shared),yes)
556 $(objpfx)tst-tls6.out: tst-tls6.sh $(objpfx)tst-tls5 \
557 $(objpfx)tst-tls5moda.so $(objpfx)tst-tls5modb.so \
558 $(objpfx)tst-tls5modc.so $(objpfx)tst-tls5modd.so \
559 $(objpfx)tst-tls5mode.so $(objpfx)tst-tls5modf.so
560 $(BASH) $< $(common-objpfx) '$(test-via-rtld-prefix)' \
561 '$(test-wrapper-env)' '$(run-program-env)'; \
565 $(objpfx)tst-dlsym1: $(libdl) $(shared-thread-library)
567 ifeq (yes,$(build-shared))
568 librt = $(common-objpfx)rt/librt.so
570 librt = $(common-objpfx)rt/librt.a
573 # `make check' sometimes triggers a rebuild of librt.so using this Makefile,
574 # which ignores librt's dependence on libpthread
575 $(common-objpfx)rt/librt.so: $(shared-thread-library)
577 $(objpfx)tst-cancel17: $(librt)
578 $(objpfx)tst-cancelx17: $(librt)
580 LDLIBS-tst-cancel24 = -Wl,--no-as-needed -lstdc++
581 LDLIBS-tst-cancel24-static = $(LDLIBS-tst-cancel24)
583 extra-B-pthread.so = -B$(common-objpfx)nptl/
584 $(objpfx)libpthread.so: $(addprefix $(objpfx),$(crti-objs) $(crtn-objs))
585 $(objpfx)libpthread.so: +preinit += $(addprefix $(objpfx),$(crti-objs))
586 $(objpfx)libpthread.so: +postinit += $(addprefix $(objpfx),$(crtn-objs))
588 # Make sure we link with the thread library.
589 ifeq ($(build-shared),yes)
590 $(addprefix $(objpfx), \
591 $(filter-out $(tests-static) $(xtests-static) $(tests-reverse) \
592 $(tests-nolibpthread), \
593 $(tests) $(tests-internal) $(xtests) $(test-srcs) $(tests-container))): \
594 $(objpfx)libpthread.so
595 $(objpfx)tst-unload: $(libdl)
596 # $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
597 # since otherwise libpthread.so comes before libc.so when linking.
598 $(addprefix $(objpfx), $(tests-reverse)): \
599 $(objpfx)../libc.so $(objpfx)libpthread.so
600 $(objpfx)../libc.so: $(common-objpfx)libc.so ;
601 $(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a
603 $(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
606 ifeq ($(build-shared),yes)
607 $(objpfx)crti.o: $(objpfx)pt-crti.o
610 ifneq ($(multidir),.)
611 $(objpfx)$(multidir)/crti.o: $(objpfx)crti.o $(objpfx)$(multidir)/
614 $(objpfx)$(multidir)/crtn.o: $(objpfx)crtn.o $(objpfx)$(multidir)/
618 generated += multidir.mk tst-tls6.out
620 # Give libpthread.so an entry point and make it directly runnable itself.
621 LDFLAGS-pthread.so += -e __nptl_main
622 # pt-interp.c exists just to get the runtime linker path into libpthread.so.
623 $(objpfx)pt-interp.os: $(common-objpfx)runtime-linker.h
626 tst-exec4-ARGS = $(host-test-program-cmd)
628 $(objpfx)tst-execstack: $(libdl)
629 $(objpfx)tst-execstack.out: $(objpfx)tst-execstack-mod.so
630 LDFLAGS-tst-execstack = -Wl,-z,noexecstack
631 CFLAGS-tst-execstack-mod.c += -Wno-trampolines
633 tst-stackguard1-ARGS = --command "$(host-test-program-cmd) --child"
634 tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child"
636 ifeq ($(run-built-tests),yes)
637 $(objpfx)tst-oddstacklimit.out: $(objpfx)tst-oddstacklimit $(objpfx)tst-basic1
638 $(test-program-prefix) $< --command '$(host-test-program-cmd)' > $@; \
642 $(objpfx)tst-compat-forwarder: $(objpfx)tst-compat-forwarder-mod.so
644 tst-mutex10-ENV = GLIBC_TUNABLES=glibc.elision.enable=1
646 # Protect against a build using -Wl,-z,now.
647 LDFLAGS-tst-audit-threads-mod1.so = -Wl,-z,lazy
648 LDFLAGS-tst-audit-threads-mod2.so = -Wl,-z,lazy
649 LDFLAGS-tst-audit-threads = -Wl,-z,lazy
650 $(objpfx)tst-audit-threads: $(objpfx)tst-audit-threads-mod2.so
651 $(objpfx)tst-audit-threads.out: $(objpfx)tst-audit-threads-mod1.so
652 tst-audit-threads-ENV = LD_AUDIT=$(objpfx)tst-audit-threads-mod1.so
654 # The test uses dlopen indirectly and would otherwise load system
656 tst-setuid1-static-ENV = \
657 LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)elf:$(common-objpfx)nss
659 # The tests here better do not run in parallel.
660 ifeq ($(run-built-tests),yes)
661 ifneq ($(filter %tests,$(MAKECMDGOALS)),)