about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-01-04 18:53:23 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-01-04 18:55:47 +0100
commit50a78baa8e385fac36d54d51800dc5c61ef7f139 (patch)
treebaec51d994dc22e0431fb9725da4a01d6c3acc0d /sysdeps
parent12e166dd80bd3056f667930719572017d25a79c4 (diff)
downloadglibc-50a78baa8e385fac36d54d51800dc5c61ef7f139.tar.gz
glibc-50a78baa8e385fac36d54d51800dc5c61ef7f139.tar.xz
glibc-50a78baa8e385fac36d54d51800dc5c61ef7f139.zip
htl: Move pthread_atfork to libc_nonshared.a
This follows bd60ce86520b ('nptl: Move pthread_atfork to libc_nonshared.a')
with the same rationale: there is no non-libpthread equivalent to be used
for making linking against libpthread optional.

libpthread_nonshared.a is unused after this, so remove it from the
build.

There is no ABI impact because pthread_atfork was implemented using
__register_atfork in libc even before this change.

pthread_atfork has to be a weak alias because pthread_* names are not
reserved in libc.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/htl/Makeconfig3
-rw-r--r--sysdeps/htl/pt-atfork.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/htl/Makeconfig b/sysdeps/htl/Makeconfig
index 3af4c1de35..ad56cc6bd1 100644
--- a/sysdeps/htl/Makeconfig
+++ b/sysdeps/htl/Makeconfig
@@ -3,8 +3,7 @@
 
 have-thread-library = yes
 
-shared-thread-library = $(common-objpfx)htl/libpthread_nonshared.a \
-			$(common-objpfx)htl/libpthread.so
+shared-thread-library = $(common-objpfx)htl/libpthread.so
 static-thread-library = $(common-objpfx)htl/libpthread.a
 bounded-thread-library = $(static-thread-library)
 
diff --git a/sysdeps/htl/pt-atfork.c b/sysdeps/htl/pt-atfork.c
index 4512fe72b6..d547dd58e6 100644
--- a/sysdeps/htl/pt-atfork.c
+++ b/sysdeps/htl/pt-atfork.c
@@ -22,9 +22,10 @@
 #include <dso_handle.h>
 
 int
-pthread_atfork (void (*prepare) (void),
+__pthread_atfork (void (*prepare) (void),
 		void (*parent) (void),
 		void (*child) (void))
 {
   return __register_atfork (prepare, parent, child, __dso_handle);
 }
+weak_alias (__pthread_atfork, pthread_atfork)