|
Packit |
6c4009 |
# Copyright (C) 2002-2018 Free Software Foundation, Inc.
|
|
Packit |
6c4009 |
# This file is part of the GNU C Library.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# The GNU C Library is free software; you can redistribute it and/or
|
|
Packit |
6c4009 |
# modify it under the terms of the GNU Lesser General Public
|
|
Packit |
6c4009 |
# License as published by the Free Software Foundation; either
|
|
Packit |
6c4009 |
# version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit |
6c4009 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
6c4009 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
6c4009 |
# Lesser General Public License for more details.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# You should have received a copy of the GNU Lesser General Public
|
|
Packit |
6c4009 |
# License along with the GNU C Library; if not, see
|
|
Packit |
6c4009 |
# <http://www.gnu.org/licenses/>.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#
|
|
Packit |
6c4009 |
# Sub-makefile for NPTL portion of the library.
|
|
Packit |
6c4009 |
#
|
|
Packit |
6c4009 |
subdir := nptl
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
include ../Makeconfig
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
headers := pthread.h semaphore.h bits/semaphore.h threads.h
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
extra-libs := libpthread
|
|
Packit |
6c4009 |
extra-libs-others := $(extra-libs)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
routines = alloca_cutoff forward libc-lowlevellock libc-cancellation \
|
|
Packit |
6c4009 |
libc-cleanup libc_pthread_init libc_multiple_threads \
|
|
Packit |
6c4009 |
register-atfork pthread_atfork pthread_self thrd_current \
|
|
Packit |
6c4009 |
thrd_equal thrd_sleep thrd_yield
|
|
Packit |
6c4009 |
shared-only-routines = forward
|
|
Packit |
6c4009 |
static-only-routines = pthread_atfork
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# We need to provide certain routines for compatibility with existing
|
|
Packit |
6c4009 |
# binaries.
|
|
Packit |
6c4009 |
pthread-compat-wrappers = \
|
|
Packit |
6c4009 |
write read close accept \
|
|
Packit |
6c4009 |
connect recv recvfrom send \
|
|
Packit |
6c4009 |
sendto fsync lseek lseek64 \
|
|
Packit |
6c4009 |
msync nanosleep open open64 pause \
|
|
Packit |
6c4009 |
pread pread64 pwrite pwrite64 \
|
|
Packit |
6c4009 |
tcdrain wait waitpid msgrcv msgsnd \
|
|
Packit |
6c4009 |
sigwait sigsuspend \
|
|
Packit |
6c4009 |
recvmsg sendmsg
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
libpthread-routines = nptl-init nptlfreeres vars events version pt-interp \
|
|
Packit |
6c4009 |
pthread_create pthread_exit pthread_detach \
|
|
Packit |
6c4009 |
pthread_join pthread_tryjoin pthread_timedjoin \
|
|
Packit |
6c4009 |
pthread_join_common \
|
|
Packit |
6c4009 |
compat-pthread_self pthread_equal pthread_yield \
|
|
Packit |
6c4009 |
pthread_getconcurrency pthread_setconcurrency \
|
|
Packit |
6c4009 |
pthread_getschedparam pthread_setschedparam \
|
|
Packit |
6c4009 |
pthread_setschedprio \
|
|
Packit |
6c4009 |
pthread_attr_init pthread_attr_destroy \
|
|
Packit |
6c4009 |
pthread_attr_getdetachstate pthread_attr_setdetachstate \
|
|
Packit |
6c4009 |
pthread_attr_getguardsize pthread_attr_setguardsize \
|
|
Packit |
6c4009 |
pthread_attr_getschedparam pthread_attr_setschedparam \
|
|
Packit |
6c4009 |
pthread_attr_getschedpolicy pthread_attr_setschedpolicy \
|
|
Packit |
6c4009 |
pthread_attr_getinheritsched \
|
|
Packit |
6c4009 |
pthread_attr_setinheritsched \
|
|
Packit |
6c4009 |
pthread_attr_getscope pthread_attr_setscope \
|
|
Packit |
6c4009 |
pthread_attr_getstackaddr pthread_attr_setstackaddr \
|
|
Packit |
6c4009 |
pthread_attr_getstacksize pthread_attr_setstacksize \
|
|
Packit |
6c4009 |
pthread_attr_getstack pthread_attr_setstack \
|
|
Packit |
6c4009 |
pthread_getattr_np \
|
|
Packit |
6c4009 |
pthread_mutex_init pthread_mutex_destroy \
|
|
Packit |
6c4009 |
pthread_mutex_lock pthread_mutex_trylock \
|
|
Packit |
6c4009 |
pthread_mutex_timedlock pthread_mutex_unlock \
|
|
Packit |
6c4009 |
pthread_mutex_cond_lock \
|
|
Packit |
6c4009 |
pthread_mutexattr_init pthread_mutexattr_destroy \
|
|
Packit |
6c4009 |
pthread_mutexattr_getpshared \
|
|
Packit |
6c4009 |
pthread_mutexattr_setpshared \
|
|
Packit |
6c4009 |
pthread_mutexattr_gettype pthread_mutexattr_settype \
|
|
Packit |
6c4009 |
pthread_rwlock_init pthread_rwlock_destroy \
|
|
Packit |
6c4009 |
pthread_rwlock_rdlock pthread_rwlock_timedrdlock \
|
|
Packit |
6c4009 |
pthread_rwlock_wrlock pthread_rwlock_timedwrlock \
|
|
Packit |
6c4009 |
pthread_rwlock_tryrdlock pthread_rwlock_trywrlock \
|
|
Packit |
6c4009 |
pthread_rwlock_unlock \
|
|
Packit |
6c4009 |
pthread_rwlockattr_init pthread_rwlockattr_destroy \
|
|
Packit |
6c4009 |
pthread_rwlockattr_getpshared \
|
|
Packit |
6c4009 |
pthread_rwlockattr_setpshared \
|
|
Packit |
6c4009 |
pthread_rwlockattr_getkind_np \
|
|
Packit |
6c4009 |
pthread_rwlockattr_setkind_np \
|
|
Packit |
6c4009 |
pthread_cond_init pthread_cond_destroy \
|
|
Packit |
6c4009 |
pthread_cond_wait \
|
|
Packit |
6c4009 |
pthread_cond_signal pthread_cond_broadcast \
|
|
Packit |
6c4009 |
old_pthread_cond_init old_pthread_cond_destroy \
|
|
Packit |
6c4009 |
old_pthread_cond_wait old_pthread_cond_timedwait \
|
|
Packit |
6c4009 |
old_pthread_cond_signal old_pthread_cond_broadcast \
|
|
Packit |
6c4009 |
pthread_condattr_init pthread_condattr_destroy \
|
|
Packit |
6c4009 |
pthread_condattr_getpshared pthread_condattr_setpshared \
|
|
Packit |
6c4009 |
pthread_condattr_getclock pthread_condattr_setclock \
|
|
Packit |
6c4009 |
pthread_spin_init pthread_spin_destroy \
|
|
Packit |
6c4009 |
pthread_spin_lock pthread_spin_trylock \
|
|
Packit |
6c4009 |
pthread_spin_unlock \
|
|
Packit |
6c4009 |
pthread_barrier_init pthread_barrier_destroy \
|
|
Packit |
6c4009 |
pthread_barrier_wait \
|
|
Packit |
6c4009 |
pthread_barrierattr_init pthread_barrierattr_destroy \
|
|
Packit |
6c4009 |
pthread_barrierattr_getpshared \
|
|
Packit |
6c4009 |
pthread_barrierattr_setpshared \
|
|
Packit |
6c4009 |
pthread_key_create pthread_key_delete \
|
|
Packit |
6c4009 |
pthread_getspecific pthread_setspecific \
|
|
Packit |
6c4009 |
pthread_sigmask pthread_kill pthread_sigqueue \
|
|
Packit |
6c4009 |
pthread_cancel pthread_testcancel \
|
|
Packit |
6c4009 |
pthread_setcancelstate pthread_setcanceltype \
|
|
Packit |
6c4009 |
pthread_once \
|
|
Packit |
6c4009 |
old_pthread_atfork \
|
|
Packit |
6c4009 |
pthread_getcpuclockid \
|
|
Packit Service |
3b0880 |
pthread_clock_gettime pthread_clock_settime \
|
|
Packit |
6c4009 |
shm-directory \
|
|
Packit |
6c4009 |
sem_init sem_destroy \
|
|
Packit |
6c4009 |
sem_open sem_close sem_unlink \
|
|
Packit |
6c4009 |
sem_getvalue \
|
|
Packit |
6c4009 |
sem_wait sem_timedwait sem_post \
|
|
Packit |
6c4009 |
cleanup cleanup_defer cleanup_compat \
|
|
Packit |
6c4009 |
cleanup_defer_compat unwind \
|
|
Packit |
6c4009 |
pt-longjmp pt-cleanup\
|
|
Packit |
6c4009 |
cancellation \
|
|
Packit |
6c4009 |
lowlevellock \
|
|
Packit |
6c4009 |
lll_timedlock_wait lll_timedwait_tid \
|
|
Packit Service |
3b0880 |
pt-fork pt-vfork pt-fcntl \
|
|
Packit |
6c4009 |
$(pthread-compat-wrappers) \
|
|
Packit |
6c4009 |
pt-raise pt-system \
|
|
Packit |
6c4009 |
flockfile ftrylockfile funlockfile \
|
|
Packit |
6c4009 |
sigaction \
|
|
Packit |
6c4009 |
herrno res pt-allocrtsig \
|
|
Packit |
6c4009 |
pthread_kill_other_threads \
|
|
Packit |
6c4009 |
pthread_getaffinity pthread_setaffinity \
|
|
Packit |
6c4009 |
pthread_attr_getaffinity pthread_attr_setaffinity \
|
|
Packit |
6c4009 |
pthread_mutexattr_getrobust pthread_mutexattr_setrobust \
|
|
Packit |
6c4009 |
pthread_mutex_consistent \
|
|
Packit |
6c4009 |
cleanup_routine unwind-forcedunwind \
|
|
Packit |
6c4009 |
pthread_mutexattr_getprotocol \
|
|
Packit |
6c4009 |
pthread_mutexattr_setprotocol \
|
|
Packit |
6c4009 |
pthread_mutexattr_getprioceiling \
|
|
Packit |
6c4009 |
pthread_mutexattr_setprioceiling tpp \
|
|
Packit |
6c4009 |
pthread_mutex_getprioceiling \
|
|
Packit |
6c4009 |
pthread_mutex_setprioceiling \
|
|
Packit |
6c4009 |
pthread_setname pthread_getname \
|
|
Packit |
6c4009 |
pthread_setattr_default_np pthread_getattr_default_np \
|
|
Packit |
6c4009 |
thrd_create thrd_detach thrd_exit thrd_join \
|
|
Packit |
6c4009 |
mtx_destroy mtx_init mtx_lock mtx_timedlock \
|
|
Packit |
6c4009 |
mtx_trylock mtx_unlock call_once cnd_broadcast \
|
|
Packit |
6c4009 |
cnd_destroy cnd_init cnd_signal cnd_timedwait cnd_wait \
|
|
Packit Service |
3b0880 |
tss_create tss_delete tss_get tss_set
|
|
Packit |
6c4009 |
# pthread_setuid pthread_seteuid pthread_setreuid \
|
|
Packit |
6c4009 |
# pthread_setresuid \
|
|
Packit |
6c4009 |
# pthread_setgid pthread_setegid pthread_setregid \
|
|
Packit |
6c4009 |
# pthread_setresgid
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
libpthread-shared-only-routines = version pt-interp pt-allocrtsig \
|
|
Packit |
6c4009 |
unwind-forcedunwind
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Since cancellation handling is in large parts handled using exceptions
|
|
Packit |
6c4009 |
# we have to compile some files with exception handling enabled, some
|
|
Packit |
6c4009 |
# even with asynchronous unwind tables.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# nptl-init.c contains sigcancel_handler().
|
|
Packit |
6c4009 |
CFLAGS-nptl-init.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
# The unwind code itself,
|
|
Packit |
6c4009 |
CFLAGS-unwind.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-unwind-forcedunwind.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# The following three functions must be async-cancel safe.
|
|
Packit |
6c4009 |
CFLAGS-pthread_cancel.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-pthread_setcancelstate.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-pthread_setcanceltype.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# These are internal functions which similar functionality as setcancelstate
|
|
Packit |
6c4009 |
# and setcanceltype.
|
|
Packit |
6c4009 |
CFLAGS-cancellation.c += -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-libc-cancellation.c += -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Calling pthread_exit() must cause the registered cancel handlers to
|
|
Packit |
6c4009 |
# be executed. Therefore exceptions have to be thrown through this
|
|
Packit |
6c4009 |
# function.
|
|
Packit |
6c4009 |
CFLAGS-pthread_exit.c += -fexceptions
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Among others, __pthread_unwind is forwarded. This function must handle
|
|
Packit |
6c4009 |
# exceptions.
|
|
Packit |
6c4009 |
CFLAGS-forward.c += -fexceptions
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# The following are cancellation points. Some of the functions can
|
|
Packit |
6c4009 |
# block and therefore temporarily enable asynchronous cancellation.
|
|
Packit |
6c4009 |
# Those must be compiled asynchronous unwind tables.
|
|
Packit |
6c4009 |
CFLAGS-pthread_testcancel.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-pthread_join.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-pthread_timedjoin.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-pthread_once.c += $(uses-callbacks) -fexceptions \
|
|
Packit |
6c4009 |
-fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-pthread_cond_wait.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-sem_wait.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-sem_timedwait.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# These are the function wrappers we have to duplicate here.
|
|
Packit |
6c4009 |
CFLAGS-fcntl.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-fcntl64.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-lockf.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-pread.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-pread64.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-pwrite.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-pwrite64.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-wait.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-waitpid.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-sigwait.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-msgrcv.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-msgsnd.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-tcdrain.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-open.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-open64.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-pause.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-recv.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-send.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-accept.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-sendto.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-connect.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-recvfrom.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-recvmsg.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-sendmsg.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-close.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-read.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-write.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-nanosleep.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-sigsuspend.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-msync.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-fdatasync.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-fsync.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
CFLAGS-pt-system.c += -fexceptions
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
LDLIBS-tst-once5 = -lstdc++
|
|
Packit |
6c4009 |
CFLAGS-tst-thread_local1.o = -std=gnu++11
|
|
Packit |
6c4009 |
LDLIBS-tst-thread_local1 = -lstdc++
|
|
Packit |
6c4009 |
CFLAGS-tst-thread-exit-clobber.o = -std=gnu++11
|
|
Packit |
6c4009 |
LDLIBS-tst-thread-exit-clobber = -lstdc++
|
|
Packit |
6c4009 |
CFLAGS-tst-minstack-throw.o = -std=gnu++11
|
|
Packit |
6c4009 |
LDLIBS-tst-minstack-throw = -lstdc++
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
tests = tst-attr1 tst-attr2 tst-attr3 tst-default-attr \
|
|
Packit |
6c4009 |
tst-mutex1 tst-mutex2 tst-mutex3 tst-mutex4 tst-mutex5 tst-mutex6 \
|
|
Packit Service |
3b0880 |
tst-mutex7 tst-mutex9 tst-mutex5a tst-mutex7a tst-mutex7robust \
|
|
Packit Service |
3b0880 |
tst-mutexpi1 tst-mutexpi2 tst-mutexpi3 tst-mutexpi4 tst-mutexpi5 \
|
|
Packit Service |
3b0880 |
tst-mutexpi5a tst-mutexpi6 tst-mutexpi7 tst-mutexpi7a \
|
|
Packit |
6c4009 |
tst-mutexpi9 \
|
|
Packit |
6c4009 |
tst-spin1 tst-spin2 tst-spin3 tst-spin4 \
|
|
Packit |
6c4009 |
tst-cond1 tst-cond2 tst-cond3 tst-cond4 tst-cond5 tst-cond6 tst-cond7 \
|
|
Packit |
6c4009 |
tst-cond8 tst-cond9 tst-cond10 tst-cond11 tst-cond12 tst-cond13 \
|
|
Packit |
6c4009 |
tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18 tst-cond19 \
|
|
Packit |
6c4009 |
tst-cond20 tst-cond21 tst-cond22 tst-cond23 tst-cond24 tst-cond25 \
|
|
Packit |
6c4009 |
tst-cond-except \
|
|
Packit |
6c4009 |
tst-robust1 tst-robust2 tst-robust3 tst-robust4 tst-robust5 \
|
|
Packit |
6c4009 |
tst-robust6 tst-robust7 tst-robust8 tst-robust9 \
|
|
Packit |
6c4009 |
tst-robustpi1 tst-robustpi2 tst-robustpi3 tst-robustpi4 tst-robustpi5 \
|
|
Packit |
6c4009 |
tst-robustpi6 tst-robustpi7 tst-robustpi8 tst-robustpi9 \
|
|
Packit |
6c4009 |
tst-rwlock1 tst-rwlock2 tst-rwlock2a tst-rwlock2b tst-rwlock3 \
|
|
Packit |
6c4009 |
tst-rwlock4 tst-rwlock5 tst-rwlock6 tst-rwlock7 tst-rwlock8 \
|
|
Packit |
6c4009 |
tst-rwlock9 tst-rwlock10 tst-rwlock11 tst-rwlock12 tst-rwlock13 \
|
|
Packit |
6c4009 |
tst-rwlock14 tst-rwlock15 tst-rwlock16 tst-rwlock17 tst-rwlock18 \
|
|
Packit |
6c4009 |
tst-once1 tst-once2 tst-once3 tst-once4 tst-once5 \
|
|
Packit |
6c4009 |
tst-key1 tst-key2 tst-key3 tst-key4 \
|
|
Packit |
6c4009 |
tst-sem1 tst-sem2 tst-sem3 tst-sem4 tst-sem5 tst-sem6 tst-sem7 \
|
|
Packit |
6c4009 |
tst-sem8 tst-sem9 tst-sem10 tst-sem14 \
|
|
Packit |
6c4009 |
tst-sem15 tst-sem16 \
|
|
Packit |
6c4009 |
tst-barrier1 tst-barrier2 tst-barrier3 tst-barrier4 \
|
|
Packit |
6c4009 |
tst-align tst-align3 \
|
|
Packit |
6c4009 |
tst-basic1 tst-basic2 tst-basic3 tst-basic4 tst-basic5 tst-basic6 \
|
|
Packit |
6c4009 |
tst-basic7 \
|
|
Packit |
6c4009 |
tst-kill1 tst-kill2 tst-kill3 tst-kill4 tst-kill5 tst-kill6 \
|
|
Packit |
6c4009 |
tst-raise1 \
|
|
Packit |
6c4009 |
tst-join1 tst-join2 tst-join3 tst-join4 tst-join5 tst-join6 tst-join7 \
|
|
Packit |
6c4009 |
tst-detach1 \
|
|
Packit |
6c4009 |
tst-eintr1 tst-eintr2 tst-eintr3 tst-eintr4 tst-eintr5 \
|
|
Packit |
6c4009 |
tst-tsd1 tst-tsd2 tst-tsd3 tst-tsd4 tst-tsd5 tst-tsd6 \
|
|
Packit |
6c4009 |
tst-tls1 tst-tls2 \
|
|
Packit |
6c4009 |
tst-fork1 tst-fork2 tst-fork3 tst-fork4 \
|
|
Packit |
6c4009 |
tst-atfork1 \
|
|
Packit |
6c4009 |
tst-cancel1 tst-cancel2 tst-cancel3 tst-cancel4 tst-cancel4_1 \
|
|
Packit |
6c4009 |
tst-cancel4_2 tst-cancel5 \
|
|
Packit |
6c4009 |
tst-cancel6 tst-cancel7 tst-cancel8 tst-cancel9 tst-cancel10 \
|
|
Packit |
6c4009 |
tst-cancel11 tst-cancel12 tst-cancel13 tst-cancel14 tst-cancel15 \
|
|
Packit |
6c4009 |
tst-cancel16 tst-cancel17 tst-cancel18 tst-cancel19 tst-cancel20 \
|
|
Packit |
6c4009 |
tst-cancel21 tst-cancel22 tst-cancel23 tst-cancel24 tst-cancel25 \
|
|
Packit |
6c4009 |
tst-cancel26 tst-cancel27 \
|
|
Packit |
6c4009 |
tst-cancel-self tst-cancel-self-cancelstate \
|
|
Packit |
6c4009 |
tst-cancel-self-canceltype tst-cancel-self-testcancel \
|
|
Packit |
6c4009 |
tst-cleanup0 tst-cleanup1 tst-cleanup2 tst-cleanup3 tst-cleanup4 \
|
|
Packit |
6c4009 |
tst-flock1 tst-flock2 \
|
|
Packit |
6c4009 |
tst-signal1 tst-signal2 tst-signal3 tst-signal4 tst-signal5 \
|
|
Packit |
6c4009 |
tst-signal6 \
|
|
Packit |
6c4009 |
tst-exec1 tst-exec2 tst-exec3 tst-exec4 tst-exec5 \
|
|
Packit |
6c4009 |
tst-exit1 tst-exit2 tst-exit3 \
|
|
Packit |
6c4009 |
tst-stdio1 tst-stdio2 \
|
|
Packit Service |
3b0880 |
tst-stack1 tst-stack2 tst-stack3 tst-stack4 tst-pthread-getattr \
|
|
Packit |
6c4009 |
tst-pthread-attr-affinity tst-pthread-mutexattr \
|
|
Packit |
6c4009 |
tst-unload \
|
|
Packit |
6c4009 |
tst-dlsym1 \
|
|
Packit |
6c4009 |
tst-sysconf \
|
|
Packit |
6c4009 |
tst-locale1 tst-locale2 \
|
|
Packit |
6c4009 |
tst-umask1 \
|
|
Packit |
6c4009 |
tst-popen1 \
|
|
Packit |
6c4009 |
tst-clock1 \
|
|
Packit |
6c4009 |
tst-context1 \
|
|
Packit |
6c4009 |
tst-sched1 \
|
|
Packit |
6c4009 |
tst-backtrace1 \
|
|
Packit |
6c4009 |
tst-abstime \
|
|
Packit |
6c4009 |
tst-vfork1 tst-vfork2 tst-vfork1x tst-vfork2x \
|
|
Packit |
6c4009 |
tst-getpid3 \
|
|
Packit |
6c4009 |
tst-setuid3 \
|
|
Packit |
6c4009 |
tst-initializers1 $(addprefix tst-initializers1-,\
|
|
Packit |
6c4009 |
c89 gnu89 c99 gnu99 c11 gnu11) \
|
|
Packit |
6c4009 |
tst-bad-schedattr \
|
|
Packit |
6c4009 |
tst-thread_local1 tst-mutex-errorcheck tst-robust10 \
|
|
Packit |
6c4009 |
tst-robust-fork tst-create-detached tst-memstream \
|
|
Packit |
6c4009 |
tst-thread-exit-clobber tst-minstack-cancel tst-minstack-exit \
|
|
Packit |
6c4009 |
tst-minstack-throw \
|
|
Packit |
6c4009 |
tst-cnd-basic tst-mtx-trylock tst-cnd-broadcast \
|
|
Packit |
6c4009 |
tst-cnd-timedwait tst-thrd-detach tst-mtx-basic tst-thrd-sleep \
|
|
Packit Service |
3b0880 |
tst-mtx-recursive tst-tss-basic tst-call-once tst-mtx-timedlock
|
|
Packit Service |
321dbc |
|
|
Packit |
6c4009 |
tests-internal := tst-rwlock19 tst-rwlock20 \
|
|
Packit |
6c4009 |
tst-sem11 tst-sem12 tst-sem13 \
|
|
Packit |
6c4009 |
tst-barrier5 tst-signal7 tst-mutex8 tst-mutex8-static \
|
|
Packit |
6c4009 |
tst-mutexpi8 tst-mutexpi8-static
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
xtests = tst-setuid1 tst-setuid1-static tst-setuid2 \
|
|
Packit |
6c4009 |
tst-mutexpp1 tst-mutexpp6 tst-mutexpp10
|
|
Packit |
6c4009 |
test-srcs = tst-oddstacklimit
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Test expected to fail on most targets (except x86_64) due to bug
|
|
Packit |
6c4009 |
# 18435 - pthread_once hangs when init routine throws an exception.
|
|
Packit |
6c4009 |
test-xfail-tst-once5 = yes
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Files which must not be linked with libpthread.
|
|
Packit |
6c4009 |
tests-nolibpthread = tst-unload
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
gen-as-const-headers = pthread-errnos.sym \
|
|
Packit |
6c4009 |
unwindbuf.sym \
|
|
Packit |
6c4009 |
pthread-pi-defines.sym
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
gen-py-const-headers := nptl_lock_constants.pysym
|
|
Packit |
6c4009 |
pretty-printers := nptl-printers.py
|
|
Packit |
6c4009 |
tests-printers := test-mutexattr-printers test-mutex-printers \
|
|
Packit |
6c4009 |
test-condattr-printers test-cond-printers \
|
|
Packit |
6c4009 |
test-rwlockattr-printers test-rwlock-printers
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# We must specify both CFLAGS and CPPFLAGS to override any
|
|
Packit |
6c4009 |
# compiler options the user might have provided that conflict
|
|
Packit |
6c4009 |
# with what we need e.g. user specifies CPPFLAGS with -O2 and
|
|
Packit |
6c4009 |
# we need -O0.
|
|
Packit |
6c4009 |
CFLAGS-test-mutexattr-printers.c := $(CFLAGS-printers-tests)
|
|
Packit |
6c4009 |
CFLAGS-test-mutex-printers.c := $(CFLAGS-printers-tests)
|
|
Packit |
6c4009 |
CFLAGS-test-condattr-printers.c := $(CFLAGS-printers-tests)
|
|
Packit |
6c4009 |
CFLAGS-test-cond-printers.c := $(CFLAGS-printers-tests)
|
|
Packit |
6c4009 |
CFLAGS-test-rwlockattr-printers.c := $(CFLAGS-printers-tests)
|
|
Packit |
6c4009 |
CFLAGS-test-rwlock-printers.c := $(CFLAGS-printers-tests)
|
|
Packit |
6c4009 |
CPPFLAGS-test-mutexattr-printers.c := $(CFLAGS-printers-tests)
|
|
Packit |
6c4009 |
CPPFLAGS-test-mutex-printers.c := $(CFLAGS-printers-tests)
|
|
Packit |
6c4009 |
CPPFLAGS-test-condattr-printers.c := $(CFLAGS-printers-tests)
|
|
Packit |
6c4009 |
CPPFLAGS-test-cond-printers.c := $(CFLAGS-printers-tests)
|
|
Packit |
6c4009 |
CPPFLAGS-test-rwlockattr-printers.c := $(CFLAGS-printers-tests)
|
|
Packit |
6c4009 |
CPPFLAGS-test-rwlock-printers.c := $(CFLAGS-printers-tests)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(build-shared),yes)
|
|
Packit |
6c4009 |
tests-printers-libs := $(shared-thread-library)
|
|
Packit |
6c4009 |
else
|
|
Packit |
6c4009 |
tests-printers-libs := $(static-thread-library)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
LDFLAGS-pthread.so = -Wl,--enable-new-dtags,-z,nodelete,-z,initfirst
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# GCC-4.9 compiles 'sprintf(NULL, ...)' into UD2 on x86_64 without -fno-builtin
|
|
Packit |
6c4009 |
CFLAGS-tst-cleanup2.c += -fno-builtin
|
|
Packit |
6c4009 |
CFLAGS-tst-cleanupx2.c += -fno-builtin
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
tests += tst-cancelx2 tst-cancelx3 tst-cancelx4 tst-cancelx5 \
|
|
Packit |
6c4009 |
tst-cancelx6 tst-cancelx7 tst-cancelx8 tst-cancelx9 tst-cancelx10 \
|
|
Packit |
6c4009 |
tst-cancelx11 tst-cancelx12 tst-cancelx13 tst-cancelx14 tst-cancelx15 \
|
|
Packit |
6c4009 |
tst-cancelx16 tst-cancelx17 tst-cancelx18 tst-cancelx20 tst-cancelx21 \
|
|
Packit |
6c4009 |
tst-cleanupx0 tst-cleanupx1 tst-cleanupx2 tst-cleanupx3 tst-cleanupx4 \
|
|
Packit |
6c4009 |
tst-oncex3 tst-oncex4
|
|
Packit |
6c4009 |
ifeq ($(build-shared),yes)
|
|
Packit Service |
3b0880 |
tests += tst-atfork2 tst-tls4 tst-_res1 tst-fini1 tst-compat-forwarder
|
|
Packit |
6c4009 |
tests-internal += tst-tls3 tst-tls3-malloc tst-tls5 tst-stackguard1
|
|
Packit |
6c4009 |
tests-nolibpthread += tst-fini1
|
|
Packit |
6c4009 |
ifeq ($(have-z-execstack),yes)
|
|
Packit |
6c4009 |
tests += tst-execstack
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
modules-names = tst-atfork2mod tst-tls3mod tst-tls4moda tst-tls4modb \
|
|
Packit |
6c4009 |
tst-tls5mod tst-tls5moda tst-tls5modb tst-tls5modc \
|
|
Packit |
6c4009 |
tst-tls5modd tst-tls5mode tst-tls5modf tst-stack4mod \
|
|
Packit |
6c4009 |
tst-_res1mod1 tst-_res1mod2 tst-execstack-mod tst-fini1mod \
|
|
Packit Service |
3b0880 |
tst-join7mod tst-compat-forwarder-mod
|
|
Packit |
6c4009 |
extra-test-objs += $(addsuffix .os,$(strip $(modules-names))) \
|
|
Packit |
6c4009 |
tst-cleanup4aux.o tst-cleanupx4aux.o
|
|
Packit |
6c4009 |
test-extras += tst-cleanup4aux tst-cleanupx4aux
|
|
Packit |
6c4009 |
test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(modules-names)))
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
tst-atfork2mod.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-tls3mod.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-tls5mod.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-tls5moda.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-tls5modb.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-tls5modc.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-tls5modd.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-tls5mode.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-tls5modf.so-no-z-defs = yes
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(build-shared),yes)
|
|
Packit |
6c4009 |
# Build all the modules even when not actually running test programs.
|
|
Packit |
6c4009 |
tests: $(test-modules)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(build-shared),yes)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Set the `multidir' variable by grabbing the variable from the compiler.
|
|
Packit |
6c4009 |
# We do it once and save the result in a generated makefile.
|
|
Packit |
6c4009 |
-include $(objpfx)multidir.mk
|
|
Packit |
6c4009 |
$(objpfx)multidir.mk: $(common-objpfx)config.make
|
|
Packit |
6c4009 |
$(make-target-directory)
|
|
Packit |
6c4009 |
dir=`$(CC) $(CFLAGS) $(CPPFLAGS) -print-multi-directory`; \
|
|
Packit |
6c4009 |
echo "multidir := $$dir" > $@T
|
|
Packit |
6c4009 |
mv -f $@T $@
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
crti-objs := crti.o
|
|
Packit |
6c4009 |
crtn-objs := crtn.o
|
|
Packit |
6c4009 |
ifneq (,$(patsubst .,,$(multidir)))
|
|
Packit |
6c4009 |
generated-dirs += $(firstword $(subst /, , $(multidir)))
|
|
Packit |
6c4009 |
crti-objs += $(multidir)/crti.o
|
|
Packit |
6c4009 |
crtn-objs += $(multidir)/crtn.o
|
|
Packit |
6c4009 |
$(objpfx)$(multidir):
|
|
Packit |
6c4009 |
mkdir -p $@
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
extra-objs += $(crti-objs) $(crtn-objs)
|
|
Packit |
6c4009 |
extra-objs += pt-crti.o
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
CFLAGS-flockfile.c += $(libio-mtsafe)
|
|
Packit |
6c4009 |
CFLAGS-ftrylockfile.c += $(libio-mtsafe)
|
|
Packit |
6c4009 |
CFLAGS-funlockfile.c += $(libio-mtsafe)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
link-libc-static := $(common-objpfx)libc.a $(static-gnulib) \
|
|
Packit |
6c4009 |
$(common-objpfx)libc.a
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
tests-static += tst-locale1 tst-locale2 tst-stackguard1-static \
|
|
Packit |
6c4009 |
tst-cancel21-static tst-cancel24-static tst-cond8-static \
|
|
Packit |
6c4009 |
tst-mutex8-static tst-mutexpi8-static tst-sem11-static \
|
|
Packit |
6c4009 |
tst-sem12-static
|
|
Packit |
6c4009 |
tests += tst-cancel21-static tst-cancel24-static \
|
|
Packit |
6c4009 |
tst-cond8-static
|
|
Packit |
6c4009 |
tests-internal += tst-sem11-static tst-sem12-static tst-stackguard1-static
|
|
Packit |
6c4009 |
xtests-static += tst-setuid1-static
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# These tests are linked with libc before libpthread
|
|
Packit |
6c4009 |
tests-reverse += tst-cancel5 tst-cancel23 tst-vfork1x tst-vfork2x
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(run-built-tests),yes)
|
|
Packit |
6c4009 |
tests-special += $(objpfx)tst-stack3-mem.out $(objpfx)tst-oddstacklimit.out
|
|
Packit |
6c4009 |
ifeq ($(build-shared),yes)
|
|
Packit |
6c4009 |
tests-special += $(objpfx)tst-tls6.out $(objpfx)tst-cleanup0-cmp.out \
|
|
Packit |
6c4009 |
$(objpfx)tst-cancel-wrappers.out
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq (,$(CXX))
|
|
Packit |
6c4009 |
# These tests require a C++ compiler and runtime.
|
|
Packit |
6c4009 |
tests-unsupported += tst-cancel24 tst-cancel24-static tst-once5 \
|
|
Packit |
6c4009 |
tst-thread-exit-clobber tst-minstack-throw
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
# These tests require a C++ compiler and runtime with thread_local support.
|
|
Packit |
6c4009 |
ifneq ($(have-cxx-thread_local),yes)
|
|
Packit |
6c4009 |
tests-unsupported += tst-thread_local1
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
include ../Rules
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq (yes,$(build-shared))
|
|
Packit |
6c4009 |
# Make sure these things are built in the `make lib' pass so they can be used
|
|
Packit |
6c4009 |
# to run programs during the `make others' pass.
|
|
Packit |
6c4009 |
lib-noranlib: $(addprefix $(objpfx),$(extra-objs))
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# 'pthread_self' is a simple memory or register load. Setting up the
|
|
Packit |
6c4009 |
# stack frame is more work than the actual operation. Disable the
|
|
Packit |
6c4009 |
# frame creation entirely. This will help applications which call the
|
|
Packit |
6c4009 |
# function frequently to get a thread-specific handle.
|
|
Packit |
6c4009 |
CFLAGS-pthread_self.os += -fomit-frame-pointer
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Run the cancellation and cleanup tests also for the modern, exception-based
|
|
Packit |
6c4009 |
# implementation. For this we have to pass the -fexceptions parameter.
|
|
Packit |
6c4009 |
CFLAGS-tst-cancelx2.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-cancelx3.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-cancelx4.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-cancelx5.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-cancelx6.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-cancelx7.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-cancelx8.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-cancelx9.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-cancelx10.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-cancelx11.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-cancelx12.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-cancelx13.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-cancelx14.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-cancelx15.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-cancelx16.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-cancelx17.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-cancelx18.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-cancelx20.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-tst-cancelx21.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-tst-cleanupx0.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-tst-cleanupx1.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-tst-cleanupx2.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-cleanupx3.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-cleanupx4.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-cleanupx4aux.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-oncex3.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-oncex4.c += -fexceptions
|
|
Packit |
6c4009 |
CFLAGS-tst-align.c += $(stack-align-test-flags)
|
|
Packit |
6c4009 |
CFLAGS-tst-align3.c += $(stack-align-test-flags)
|
|
Packit |
6c4009 |
CFLAGS-tst-initializers1.c += -W -Wall -Werror
|
|
Packit |
6c4009 |
CFLAGS-tst-initializers1-< = $(CFLAGS-tst-initializers1.c) \
|
|
Packit |
6c4009 |
$(patsubst tst-initializers1-%.c,-std=%,$<)
|
|
Packit |
6c4009 |
CFLAGS-tst-initializers1-c89.c += $(CFLAGS-tst-initializers1-<)
|
|
Packit |
6c4009 |
CFLAGS-tst-initializers1-c99.c += $(CFLAGS-tst-initializers1-<)
|
|
Packit |
6c4009 |
CFLAGS-tst-initializers1-c11.c += $(CFLAGS-tst-initializers1-<)
|
|
Packit |
6c4009 |
CFLAGS-tst-initializers1-gnu89.c += $(CFLAGS-tst-initializers1-<)
|
|
Packit |
6c4009 |
CFLAGS-tst-initializers1-gnu99.c += $(CFLAGS-tst-initializers1-<)
|
|
Packit |
6c4009 |
CFLAGS-tst-initializers1-gnu11.c += $(CFLAGS-tst-initializers1-<)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
tst-cancel7-ARGS = --command "exec $(host-test-program-cmd)"
|
|
Packit |
6c4009 |
tst-cancelx7-ARGS = $(tst-cancel7-ARGS)
|
|
Packit |
6c4009 |
tst-umask1-ARGS = $(objpfx)tst-umask1.temp
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-atfork2: $(libdl) $(shared-thread-library)
|
|
Packit |
6c4009 |
LDFLAGS-tst-atfork2 = -rdynamic
|
|
Packit |
6c4009 |
tst-atfork2-ENV = MALLOC_TRACE=$(objpfx)tst-atfork2.mtrace
|
|
Packit |
6c4009 |
$(objpfx)tst-atfork2mod.so: $(shared-thread-library)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
tst-stack3-ENV = MALLOC_TRACE=$(objpfx)tst-stack3.mtrace
|
|
Packit |
6c4009 |
$(objpfx)tst-stack3-mem.out: $(objpfx)tst-stack3.out
|
|
Packit |
6c4009 |
$(common-objpfx)malloc/mtrace $(objpfx)tst-stack3.mtrace > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
generated += tst-stack3-mem.out tst-stack3.mtrace
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-stack4: $(libdl) $(shared-thread-library)
|
|
Packit |
6c4009 |
tst-stack4mod.sos=$(shell for i in 0 1 2 3 4 5 6 7 8 9 10 \
|
|
Packit |
6c4009 |
11 12 13 14 15 16 17 18 19; do \
|
|
Packit |
6c4009 |
for j in 0 1 2 3 4 5 6 7 8 9 10 \
|
|
Packit |
6c4009 |
11 12 13 14 15 16 17 18 19; do \
|
|
Packit |
6c4009 |
echo $(objpfx)tst-stack4mod-$$i-$$j.so; \
|
|
Packit |
6c4009 |
done; done)
|
|
Packit |
6c4009 |
$(objpfx)tst-stack4.out: $(tst-stack4mod.sos)
|
|
Packit |
6c4009 |
$(tst-stack4mod.sos): $(objpfx)tst-stack4mod.so
|
|
Packit |
6c4009 |
cp -f $< $@
|
|
Packit |
6c4009 |
clean:
|
|
Packit |
6c4009 |
rm -f $(tst-stack4mod.sos)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-cleanup4: $(objpfx)tst-cleanup4aux.o $(shared-thread-library)
|
|
Packit |
6c4009 |
$(objpfx)tst-cleanupx4: $(objpfx)tst-cleanupx4aux.o $(shared-thread-library)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls3: $(libdl) $(shared-thread-library)
|
|
Packit |
6c4009 |
LDFLAGS-tst-tls3 = -rdynamic
|
|
Packit |
6c4009 |
$(objpfx)tst-tls3.out: $(objpfx)tst-tls3mod.so
|
|
Packit |
6c4009 |
$(objpfx)tst-tls3mod.so: $(shared-thread-library)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls3-malloc: $(libdl) $(shared-thread-library)
|
|
Packit |
6c4009 |
LDFLAGS-tst-tls3-malloc = -rdynamic
|
|
Packit |
6c4009 |
$(objpfx)tst-tls3-malloc.out: $(objpfx)tst-tls3mod.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls4: $(libdl) $(shared-thread-library)
|
|
Packit |
6c4009 |
$(objpfx)tst-tls4.out: $(objpfx)tst-tls4moda.so $(objpfx)tst-tls4modb.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls5: $(objpfx)tst-tls5mod.so $(shared-thread-library)
|
|
Packit |
6c4009 |
LDFLAGS-tst-tls5 = $(no-as-needed)
|
|
Packit |
6c4009 |
LDFLAGS-tst-tls5mod.so = -Wl,-soname,tst-tls5mod.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(build-shared),yes)
|
|
Packit |
6c4009 |
$(objpfx)tst-tls6.out: tst-tls6.sh $(objpfx)tst-tls5 \
|
|
Packit |
6c4009 |
$(objpfx)tst-tls5moda.so $(objpfx)tst-tls5modb.so \
|
|
Packit |
6c4009 |
$(objpfx)tst-tls5modc.so $(objpfx)tst-tls5modd.so \
|
|
Packit |
6c4009 |
$(objpfx)tst-tls5mode.so $(objpfx)tst-tls5modf.so
|
|
Packit |
6c4009 |
$(BASH) $< $(common-objpfx) '$(test-via-rtld-prefix)' \
|
|
Packit |
6c4009 |
'$(test-wrapper-env)' '$(run-program-env)' > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-join7: $(libdl) $(shared-thread-library)
|
|
Packit |
6c4009 |
$(objpfx)tst-join7.out: $(objpfx)tst-join7mod.so
|
|
Packit |
6c4009 |
$(objpfx)tst-join7mod.so: $(shared-thread-library)
|
|
Packit |
6c4009 |
LDFLAGS-tst-join7mod.so = -Wl,-soname,tst-join7mod.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-dlsym1: $(libdl) $(shared-thread-library)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-fini1: $(shared-thread-library) $(objpfx)tst-fini1mod.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq (yes,$(build-shared))
|
|
Packit |
6c4009 |
librt = $(common-objpfx)rt/librt.so
|
|
Packit |
6c4009 |
else
|
|
Packit |
6c4009 |
librt = $(common-objpfx)rt/librt.a
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# `make check' sometimes triggers a rebuild of librt.so using this Makefile,
|
|
Packit |
6c4009 |
# which ignores librt's dependence on libpthread
|
|
Packit |
6c4009 |
$(common-objpfx)rt/librt.so: $(shared-thread-library)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-cancel17: $(librt)
|
|
Packit |
6c4009 |
$(objpfx)tst-cancelx17: $(librt)
|
|
Packit |
6c4009 |
$(objpfx)tst-_res1mod2.so: $(objpfx)tst-_res1mod1.so
|
|
Packit |
6c4009 |
LDFLAGS-tst-_res1mod1.so = -Wl,-soname,tst-_res1mod1.so
|
|
Packit |
6c4009 |
LDFLAGS-tst-_res1mod2.so = -Wl,-soname,tst-_res1mod2.so
|
|
Packit |
6c4009 |
$(objpfx)tst-_res1: $(objpfx)tst-_res1mod1.so $(objpfx)tst-_res1mod2.so \
|
|
Packit |
6c4009 |
$(shared-thread-library)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
LDLIBS-tst-cancel24 = $(no-as-needed) -lstdc++
|
|
Packit |
6c4009 |
LDLIBS-tst-cancel24-static = $(LDLIBS-tst-cancel24)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
extra-B-pthread.so = -B$(common-objpfx)nptl/
|
|
Packit |
6c4009 |
$(objpfx)libpthread.so: $(addprefix $(objpfx),$(crti-objs) $(crtn-objs))
|
|
Packit |
6c4009 |
$(objpfx)libpthread.so: +preinit += $(addprefix $(objpfx),$(crti-objs))
|
|
Packit |
6c4009 |
$(objpfx)libpthread.so: +postinit += $(addprefix $(objpfx),$(crtn-objs))
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Make sure we link with the thread library.
|
|
Packit |
6c4009 |
ifeq ($(build-shared),yes)
|
|
Packit |
6c4009 |
$(addprefix $(objpfx), \
|
|
Packit |
6c4009 |
$(filter-out $(tests-static) $(xtests-static) $(tests-reverse) \
|
|
Packit |
6c4009 |
$(tests-nolibpthread), \
|
|
Packit Service |
3b0880 |
$(tests) $(tests-internal) $(xtests) $(test-srcs))): \
|
|
Packit |
6c4009 |
$(objpfx)libpthread.so
|
|
Packit |
6c4009 |
$(objpfx)tst-unload: $(libdl)
|
|
Packit |
6c4009 |
# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
|
|
Packit |
6c4009 |
# since otherwise libpthread.so comes before libc.so when linking.
|
|
Packit |
6c4009 |
$(addprefix $(objpfx), $(tests-reverse)): \
|
|
Packit |
6c4009 |
$(objpfx)../libc.so $(objpfx)libpthread.so
|
|
Packit |
6c4009 |
$(objpfx)../libc.so: $(common-objpfx)libc.so ;
|
|
Packit |
6c4009 |
$(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-atfork2.out: $(objpfx)tst-atfork2mod.so
|
|
Packit |
6c4009 |
else
|
|
Packit |
6c4009 |
$(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(build-shared),yes)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-cleanup0.out: /dev/null $(objpfx)tst-cleanup0
|
|
Packit |
6c4009 |
$(make-test-out) > $@ 2>&1; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-cleanup0-cmp.out: tst-cleanup0.expect $(objpfx)tst-cleanup0.out
|
|
Packit |
6c4009 |
cmp $^ > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)crti.o: $(objpfx)pt-crti.o
|
|
Packit |
6c4009 |
ln -f $< $@
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifneq ($(multidir),.)
|
|
Packit |
6c4009 |
$(objpfx)$(multidir)/crti.o: $(objpfx)crti.o $(objpfx)$(multidir)/
|
|
Packit |
6c4009 |
ln -f $< $@
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)$(multidir)/crtn.o: $(objpfx)crtn.o $(objpfx)$(multidir)/
|
|
Packit |
6c4009 |
ln -f $< $@
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
generated += multidir.mk tst-atfork2.mtrace tst-cancel-wrappers.out \
|
|
Packit |
6c4009 |
tst-tls6.out
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
generated += $(objpfx)tst-atfork2.mtrace \
|
|
Packit |
6c4009 |
$(addsuffix .so,$(strip $(modules-names)))
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Give libpthread.so an entry point and make it directly runnable itself.
|
|
Packit |
6c4009 |
LDFLAGS-pthread.so += -e __nptl_main
|
|
Packit |
6c4009 |
# pt-interp.c exists just to get the runtime linker path into libpthread.so.
|
|
Packit |
6c4009 |
$(objpfx)pt-interp.os: $(common-objpfx)runtime-linker.h
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(run-built-tests),yes)
|
|
Packit |
6c4009 |
ifeq (yes,$(build-shared))
|
|
Packit |
6c4009 |
$(objpfx)tst-cancel-wrappers.out: tst-cancel-wrappers.sh
|
|
Packit |
6c4009 |
$(SHELL) $< '$(NM)' \
|
|
Packit |
6c4009 |
$(common-objpfx)libc_pic.a \
|
|
Packit |
6c4009 |
$(common-objpfx)libc.a \
|
|
Packit |
6c4009 |
$(objpfx)libpthread_pic.a \
|
|
Packit |
6c4009 |
$(objpfx)libpthread.a > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
tst-exec4-ARGS = $(host-test-program-cmd)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-execstack: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-execstack.out: $(objpfx)tst-execstack-mod.so
|
|
Packit |
6c4009 |
LDFLAGS-tst-execstack = -Wl,-z,noexecstack
|
|
Packit |
6c4009 |
CFLAGS-tst-execstack-mod.c += -Wno-trampolines
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-fini1mod.so: $(shared-thread-library)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
tst-stackguard1-ARGS = --command "$(host-test-program-cmd) --child"
|
|
Packit |
6c4009 |
tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child"
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(run-built-tests),yes)
|
|
Packit |
6c4009 |
$(objpfx)tst-oddstacklimit.out: $(objpfx)tst-oddstacklimit $(objpfx)tst-basic1
|
|
Packit |
6c4009 |
$(test-program-prefix) $< --command '$(host-test-program-cmd)' > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-compat-forwarder: $(objpfx)tst-compat-forwarder-mod.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# The tests here better do not run in parallel
|
|
Packit |
6c4009 |
ifneq ($(filter %tests,$(MAKECMDGOALS)),)
|
|
Packit |
6c4009 |
.NOTPARALLEL:
|
|
Packit |
6c4009 |
endif
|