From 50a78baa8e385fac36d54d51800dc5c61ef7f139 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 4 Jan 2020 18:53:23 +0100 Subject: 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. --- sysdeps/htl/Makeconfig | 3 +-- sysdeps/htl/pt-atfork.c | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sysdeps/htl') 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 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) -- cgit 1.4.1