2 # Copyright (C) 1994-2020 Free Software Foundation, Inc.
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/>.
27 libpthread-routines
:= pt-attr pt-attr-destroy pt-attr-getdetachstate \
28 pt-attr-getguardsize pt-attr-getinheritsched \
29 pt-attr-getschedparam pt-attr-getschedpolicy pt-attr-getscope \
30 pt-attr-getstack pt-attr-getstackaddr pt-attr-getstacksize \
31 pt-attr-init pt-attr-setdetachstate pt-attr-setguardsize \
32 pt-attr-setinheritsched pt-attr-setschedparam \
33 pt-attr-setschedpolicy pt-attr-setscope pt-attr-setstack \
34 pt-attr-setstackaddr pt-attr-setstacksize \
36 pt-barrier-destroy pt-barrier-init pt-barrier-wait \
37 pt-barrier pt-barrierattr-destroy pt-barrierattr-init \
38 pt-barrierattr-getpshared pt-barrierattr-setpshared \
40 pt-destroy-specific pt-init-specific \
41 pt-key-create pt-key-delete \
42 pt-getspecific pt-setspecific \
64 pt-mutexattr-destroy pt-mutexattr-init \
65 pt-mutexattr-getprioceiling pt-mutexattr-getprotocol \
66 pt-mutexattr-getpshared pt-mutexattr-gettype \
67 pt-mutexattr-setprioceiling pt-mutexattr-setprotocol \
68 pt-mutexattr-setpshared pt-mutexattr-settype \
69 pt-mutexattr-getrobust pt-mutexattr-setrobust \
71 pt-mutex-init pt-mutex-destroy pt-mutex-checklocked \
72 pt-mutex-lock pt-mutex-trylock pt-mutex-timedlock \
74 pt-mutex-transfer-np \
75 pt-mutex-getprioceiling pt-mutex-setprioceiling \
79 pt-rwlockattr-init pt-rwlockattr-destroy \
80 pt-rwlockattr-getpshared pt-rwlockattr-setpshared \
82 pt-rwlock-init pt-rwlock-destroy \
83 pt-rwlock-rdlock pt-rwlock-tryrdlock \
84 pt-rwlock-trywrlock pt-rwlock-wrlock \
85 pt-rwlock-timedrdlock pt-rwlock-timedwrlock \
89 pt-condattr-init pt-condattr-destroy \
90 pt-condattr-getclock pt-condattr-getpshared \
91 pt-condattr-setclock pt-condattr-setpshared \
93 pt-cond-destroy pt-cond-init \
99 pt-hurd-cond-timedwait \
104 pt-thread-terminate \
107 pt-getconcurrency pt-setconcurrency \
121 pt-sigstate-destroy \
128 pt-getschedparam pt-setschedparam pt-setschedprio \
131 sem-close sem-destroy sem-getvalue sem-init sem-open \
132 sem-post sem-timedwait sem-trywait sem-unlink \
148 bits
/pthreadtypes.h \
149 bits
/pthreadtypes-arch.h \
150 bits
/thread-shared-types.h \
151 bits
/types
/struct___pthread_mutex.h \
152 bits
/types
/struct___pthread_cond.h \
153 bits
/types
/struct___pthread_condattr.h \
154 bits
/types
/__pthread_spinlock_t.h \
155 bits
/spin-lock-inline.h \
157 bits
/types
/struct___pthread_attr.h \
158 bits
/types
/struct___pthread_barrierattr.h \
159 bits
/types
/struct___pthread_barrier.h \
160 bits
/types
/__pthread_key.h \
161 bits
/types
/struct___pthread_once.h \
162 bits
/types
/struct___pthread_mutexattr.h \
163 bits
/types
/struct___pthread_rwlock.h \
164 bits
/types
/struct___pthread_rwlockattr.h \
169 routines
:= forward libc_pthread_init alloca_cutoff register-atfork pt-atfork
170 shared-only-routines
= forward
171 static-only-routines
= pt-atfork
173 extra-libs
:= libpthread
174 extra-libs-others
:= $(extra-libs
)
175 install-lib
:= libpthread.so
177 include ..
/Makeconfig
179 CFLAGS-lockfile.c
= -D_IO_MTSAFE_IO
181 all: # Make this the default target; it will be defined in Rules.
183 subdir_install
: $(inst_libdir
)/libpthread2.a
185 # XXX: If $(inst_libdir)/libpthread2.a is installed and
186 # $(inst_libdir)/libpthread is not, we can have some issues.
187 .PHONY
: $(inst_libdir
)/libpthread.a
$(inst_libdir
)/libpthread_pic.a
189 # XXX: These rules are a hack. But it is better than messing with
190 # ../Makeconf at the moment. Note that the linker scripts
191 # $(srcdir)/libpthread.a and $(srcdir)/libpthread_pic.a get overwritten
192 # when building in $(srcdir) and not a seperate build directory.
193 $(inst_libdir
)/libpthread2.a
: $(inst_libdir
)/libpthread.a
195 $(INSTALL_DATA
) $(srcdir)/libpthread.a
$<
197 $(inst_libdir
)/libpthread2_pic.a
: $(inst_libdir
)/libpthread_pic.a
199 $(INSTALL_DATA
) $(srcdir)/libpthread_pic.a
$<
201 libc-link.so
= $(common-objpfx
)libc.so
203 extra-B-pthread.so
= -B
$(common-objpfx
)htl
/
207 ifeq (yes
,$(build-shared
))
208 $(addprefix $(objpfx
), \
209 $(filter-out $(tests-static
) $(xtests-static
) $(tests-reverse
) \
210 $(tests-nolibpthread
), \
211 $(tests
) $(tests-internal
) $(xtests
) $(test-srcs
))): $(objpfx
)libpthread.so
214 $(addprefix $(objpfx
),$(tests-static
) $(xtests-static
)): $(objpfx
)libpthread.a