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