1# Copyright (C) 2002-2021 Free Software Foundation, Inc. 2# This file is part of the GNU C Library. 3 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. 8 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. 13 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/>. 17 18# 19# Sub-makefile for NPTL portion of the library. 20# 21subdir := nptl 22 23include ../Makeconfig 24 25headers := \ 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 33 34extra-libs := libpthread 35extra-libs-others := $(extra-libs) 36 37routines = \ 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 \ 211 212static-only-routines = pthread_atfork 213libpthread-routines = libpthread-compat 214libpthread-shared-only-routines = libpthread-compat 215 216# Pretend that libpthread.so is a linker script, so that the symbolic 217# link is not installed. 218install-lib-ldscripts = libpthread.so 219$(inst_libdir)/libpthread.so: 220 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. 224 225# nptl-init.c contains sigcancel_handler(). 226CFLAGS-nptl-init.c += -fexceptions -fasynchronous-unwind-tables 227# The unwind code itself, 228CFLAGS-unwind.c += -fexceptions 229CFLAGS-unwind-forcedunwind.c += -fexceptions -fasynchronous-unwind-tables 230 231# The following three functions must be async-cancel safe. 232CFLAGS-pthread_cancel.c += -fexceptions -fasynchronous-unwind-tables 233CFLAGS-pthread_setcancelstate.c += -fexceptions -fasynchronous-unwind-tables 234CFLAGS-pthread_setcanceltype.c += -fexceptions -fasynchronous-unwind-tables 235 236# These are internal functions which similar functionality as setcancelstate 237# and setcanceltype. 238CFLAGS-cancellation.c += -fasynchronous-unwind-tables 239 240# Calling pthread_exit() must cause the registered cancel handlers to 241# be executed. Therefore exceptions have to be thrown through this 242# function. 243CFLAGS-pthread_exit.c += -fexceptions 244 245# Among others, __pthread_unwind is forwarded. This function must handle 246# exceptions. 247CFLAGS-forward.c += -fexceptions 248 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. 252CFLAGS-pthread_testcancel.c += -fexceptions 253CFLAGS-pthread_join.c += -fexceptions -fasynchronous-unwind-tables 254CFLAGS-pthread_timedjoin.c += -fexceptions -fasynchronous-unwind-tables 255CFLAGS-pthread_clockjoin.c += -fexceptions -fasynchronous-unwind-tables 256CFLAGS-pthread_once.c += $(uses-callbacks) -fexceptions \ 257 -fasynchronous-unwind-tables 258CFLAGS-pthread_cond_wait.c += -fexceptions -fasynchronous-unwind-tables 259CFLAGS-pthread_kill.c = -fexceptions -fasynchronous-unwind-tables 260CFLAGS-sem_wait.c += -fexceptions -fasynchronous-unwind-tables 261CFLAGS-sem_timedwait.c += -fexceptions -fasynchronous-unwind-tables 262CFLAGS-sem_clockwait.c = -fexceptions -fasynchronous-unwind-tables 263 264CFLAGS-futex-internal.c += -fexceptions -fasynchronous-unwind-tables 265 266LDLIBS-tst-once5 = -lstdc++ 267CFLAGS-tst-thread_local1.o = -std=gnu++11 268LDLIBS-tst-thread_local1 = -lstdc++ 269CFLAGS-tst-thread-exit-clobber.o = -std=gnu++11 270LDLIBS-tst-thread-exit-clobber = -lstdc++ 271CFLAGS-tst-minstack-throw.o = -std=gnu++11 272LDLIBS-tst-minstack-throw = -lstdc++ 273 274tests = 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 316 317tests-nolibpthread = \ 318 tst-pthread_exit-nothreads \ 319 tst-pthread_exit-nothreads-static \ 320 321tests-container = tst-pthread-getattr 322 323tests-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 \ 329 330xtests = tst-setuid1 tst-setuid1-static tst-setuid2 \ 331 tst-mutexpp1 tst-mutexpp6 tst-mutexpp10 tst-setgroups \ 332 tst-mutexpp5 tst-mutexpp9 333 334tests-time64 := \ 335 tst-cancel4_2-time64 336 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. 339xtests += tst-eintr1 340 341test-srcs = tst-oddstacklimit 342 343gen-as-const-headers = unwindbuf.sym \ 344 pthread-pi-defines.sym 345 346gen-py-const-headers := nptl_lock_constants.pysym 347pretty-printers := nptl-printers.py 348tests-printers := test-mutexattr-printers test-mutex-printers \ 349 test-condattr-printers test-cond-printers \ 350 test-rwlockattr-printers test-rwlock-printers 351 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. 356CFLAGS-test-mutexattr-printers.c := $(CFLAGS-printers-tests) 357CFLAGS-test-mutex-printers.c := $(CFLAGS-printers-tests) 358CFLAGS-test-condattr-printers.c := $(CFLAGS-printers-tests) 359CFLAGS-test-cond-printers.c := $(CFLAGS-printers-tests) 360CFLAGS-test-rwlockattr-printers.c := $(CFLAGS-printers-tests) 361CFLAGS-test-rwlock-printers.c := $(CFLAGS-printers-tests) 362CPPFLAGS-test-mutexattr-printers.c := $(CFLAGS-printers-tests) 363CPPFLAGS-test-mutex-printers.c := $(CFLAGS-printers-tests) 364CPPFLAGS-test-condattr-printers.c := $(CFLAGS-printers-tests) 365CPPFLAGS-test-cond-printers.c := $(CFLAGS-printers-tests) 366CPPFLAGS-test-rwlockattr-printers.c := $(CFLAGS-printers-tests) 367CPPFLAGS-test-rwlock-printers.c := $(CFLAGS-printers-tests) 368 369# Reuse the CFLAGS setting for the GDB attaching test. It needs 370# debugging information. 371CFLAGS-tst-pthread-gdb-attach.c := $(CFLAGS-printers-tests) 372CPPFLAGS-tst-pthread-gdb-attach.c := $(CFLAGS-printers-tests) 373ifeq ($(build-shared)$(build-hardcoded-path-in-tests),yesno) 374CPPFLAGS-tst-pthread-gdb-attach.c += -DDO_ADD_SYMBOL_FILE=1 375else 376CPPFLAGS-tst-pthread-gdb-attach.c += -DDO_ADD_SYMBOL_FILE=0 377endif 378CFLAGS-tst-pthread-gdb-attach-static.c := $(CFLAGS-printers-tests) 379CPPFLAGS-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. 383tst-pthread-gdb-attach-no-pie = yes 384 385tests += tst-cancelx7 tst-cancelx17 386 387ifeq ($(build-shared),yes) 388tests += tst-compat-forwarder tst-audit-threads 389tests-internal += tst-tls3 tst-tls3-malloc tst-tls5 tst-stackguard1 390ifeq ($(have-z-execstack),yes) 391tests += tst-execstack 392endif 393endif 394 395modules-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 401extra-test-objs += $(addsuffix .os,$(strip $(modules-names))) \ 402 tst-cleanup4aux.o tst-cleanupx4aux.o 403test-extras += tst-cleanup4aux tst-cleanupx4aux 404 405# This test exercises compat symbols removed in glibc 2.34. 406ifdef have-GLIBC_2.33 407tests += tst-cleanup4 408ifeq ($(build-shared),yes) 409tests += tst-cleanupx4 410endif 411endif 412 413tst-tls3mod.so-no-z-defs = yes 414tst-tls5mod.so-no-z-defs = yes 415tst-tls5moda.so-no-z-defs = yes 416tst-tls5modb.so-no-z-defs = yes 417tst-tls5modc.so-no-z-defs = yes 418tst-tls5modd.so-no-z-defs = yes 419tst-tls5mode.so-no-z-defs = yes 420tst-tls5modf.so-no-z-defs = yes 421 422ifeq ($(build-shared),yes) 423 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 $@ 432 433endif 434 435CFLAGS-ftrylockfile.c += $(libio-mtsafe) 436CFLAGS-funlockfile.c += $(libio-mtsafe) 437 438link-libc-static := $(common-objpfx)libc.a $(static-gnulib) \ 439 $(common-objpfx)libc.a 440 441tests-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 447 448tests += tst-cancel24-static 449 450tests-internal += tst-sem11-static tst-sem12-static tst-stackguard1-static 451xtests-static += tst-setuid1-static 452 453ifeq ($(run-built-tests),yes) 454tests-special += $(objpfx)tst-stack3-mem.out $(objpfx)tst-oddstacklimit.out 455ifeq ($(build-shared),yes) 456tests-special += $(objpfx)tst-tls6.out 457endif 458endif 459 460ifeq (,$(CXX)) 461# These tests require a C++ compiler and runtime. 462tests-unsupported += tst-cancel24 tst-cancel24-static tst-once5 \ 463 tst-thread-exit-clobber tst-minstack-throw 464endif 465# These tests require a C++ compiler and runtime with thread_local support. 466ifneq ($(have-cxx-thread_local),yes) 467tests-unsupported += tst-thread_local1 468endif 469 470include ../Rules 471 472ifeq (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. 475lib-noranlib: $(addprefix $(objpfx),$(extra-objs)) 476endif 477 478 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. 483CFLAGS-pthread_self.os += -fomit-frame-pointer 484 485# Run the cancellation and cleanup tests also for the modern, exception-based 486# implementation. For this we have to pass the -fexceptions parameter. 487CFLAGS-tst-cancelx7.c += -fexceptions 488CFLAGS-tst-cancelx17.c += -fexceptions 489CFLAGS-tst-cleanupx4.c += -fexceptions 490CFLAGS-tst-cleanupx4aux.c += -fexceptions 491CFLAGS-tst-initializers1.c += -W -Wall -Werror 492CFLAGS-tst-initializers1-< = $(CFLAGS-tst-initializers1.c) \ 493 $(patsubst tst-initializers1-%.c,-std=%,$<) 494CFLAGS-tst-initializers1-c89.c += $(CFLAGS-tst-initializers1-<) 495CFLAGS-tst-initializers1-c99.c += $(CFLAGS-tst-initializers1-<) 496CFLAGS-tst-initializers1-c11.c += $(CFLAGS-tst-initializers1-<) 497CFLAGS-tst-initializers1-gnu89.c += $(CFLAGS-tst-initializers1-<) 498CFLAGS-tst-initializers1-gnu99.c += $(CFLAGS-tst-initializers1-<) 499CFLAGS-tst-initializers1-gnu11.c += $(CFLAGS-tst-initializers1-<) 500 501tst-cancel7-ARGS = --command "exec $(host-test-program-cmd)" 502tst-cancelx7-ARGS = $(tst-cancel7-ARGS) 503 504tst-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) 509generated += tst-stack3-mem.out tst-stack3.mtrace 510 511tst-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 $< $@ 520clean: 521 rm -f $(tst-stack4mod.sos) 522 523$(objpfx)tst-cleanup4: $(objpfx)tst-cleanup4aux.o 524$(objpfx)tst-cleanupx4: $(objpfx)tst-cleanupx4aux.o 525 526LDFLAGS-tst-tls3 = -rdynamic 527$(objpfx)tst-tls3.out: $(objpfx)tst-tls3mod.so 528 529LDFLAGS-tst-tls3-malloc = -rdynamic 530$(objpfx)tst-tls3-malloc.out: $(objpfx)tst-tls3mod.so 531 532$(objpfx)tst-tls5: $(objpfx)tst-tls5mod.so 533LDFLAGS-tst-tls5 = -Wl,--no-as-needed 534LDFLAGS-tst-tls5mod.so = -Wl,-soname,tst-tls5mod.so 535 536ifeq ($(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) 544endif 545 546LDLIBS-tst-cancel24 = -Wl,--no-as-needed -lstdc++ 547LDLIBS-tst-cancel24-static = $(LDLIBS-tst-cancel24) 548 549ifeq ($(build-shared),yes) 550 551generated += multidir.mk tst-tls6.out 552endif 553 554tst-exec4-ARGS = $(host-test-program-cmd) 555 556$(objpfx)tst-execstack.out: $(objpfx)tst-execstack-mod.so 557LDFLAGS-tst-execstack = -Wl,-z,noexecstack 558CFLAGS-tst-execstack-mod.c += -Wno-trampolines 559 560tst-stackguard1-ARGS = --command "$(host-test-program-cmd) --child" 561tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child" 562 563ifeq ($(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) 567endif 568 569$(objpfx)tst-compat-forwarder: $(objpfx)tst-compat-forwarder-mod.so 570 571tst-mutex10-ENV = GLIBC_TUNABLES=glibc.elision.enable=1 572 573# Protect against a build using -Wl,-z,now. 574LDFLAGS-tst-audit-threads-mod1.so = -Wl,-z,lazy 575LDFLAGS-tst-audit-threads-mod2.so = -Wl,-z,lazy 576LDFLAGS-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 579tst-audit-threads-ENV = LD_AUDIT=$(objpfx)tst-audit-threads-mod1.so 580 581# The test uses dlopen indirectly and would otherwise load system 582# objects. 583tst-setuid1-static-ENV = \ 584 LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)elf:$(common-objpfx)nss 585 586# The tests here better do not run in parallel. 587ifeq ($(run-built-tests),yes) 588ifneq ($(filter %tests,$(MAKECMDGOALS)),) 589.NOTPARALLEL: 590endif 591endif 592