diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-01-04 18:53:23 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-01-04 18:55:47 +0100 |
commit | 50a78baa8e385fac36d54d51800dc5c61ef7f139 (patch) | |
tree | baec51d994dc22e0431fb9725da4a01d6c3acc0d /htl | |
parent | 12e166dd80bd3056f667930719572017d25a79c4 (diff) | |
download | glibc-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 'htl')
-rw-r--r-- | htl/Makefile | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/htl/Makefile b/htl/Makefile index 3b5c10635d..e091077a28 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -120,7 +120,6 @@ libpthread-routines := pt-attr pt-attr-destroy pt-attr-getdetachstate \ pt-sigstate-destroy \ pt-sigstate \ \ - pt-atfork \ old_pt-atfork \ pt-kill \ pt-getcpuclockid \ @@ -137,8 +136,6 @@ libpthread-routines := pt-attr pt-attr-destroy pt-attr-getdetachstate \ cthreads-compat \ $(SYSDEPS) -libpthread-static-only-routines = pt-atfork - headers := \ pthread.h \ semaphore.h \ @@ -166,8 +163,9 @@ headers := \ distribute := -routines := forward libc_pthread_init alloca_cutoff +routines := forward libc_pthread_init alloca_cutoff pt-atfork shared-only-routines = forward +static-only-routines = pt-atfork extra-libs := libpthread extra-libs-others := $(extra-libs) @@ -204,34 +202,8 @@ extra-B-pthread.so = -B$(common-objpfx)htl/ include ../Rules ifeq (yes,$(build-shared)) -# What we install as libpthread.so for programs to link against is in fact a -# link script. It contains references for the various libraries we need. -# The libpthread.so object is not complete since some functions are only -# defined in libpthread_nonshared.a. -# We need to use absolute paths since otherwise local copies (if they exist) -# of the files are taken by the linker. -install: $(inst_libdir)/libpthread.so - -$(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \ - $(objpfx)libpthread.so$(libpthread.so-version) \ - $(inst_libdir)/$(patsubst %,$(libtype.oS),\ - $(libprefix)pthread) \ - $(+force) - (echo '/* GNU ld script';\ - echo ' Use the shared library, but some functions are only in';\ - echo ' the static library, so try that secondarily. */';\ - cat $<; \ - echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \ - '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\ - ')' \ - ) > $@.new - mv -f $@.new $@ - $(addprefix $(objpfx), \ $(filter-out $(tests-static) $(xtests-static) $(tests-reverse) \ $(tests-nolibpthread), \ - $(tests) $(xtests) $(test-srcs))): $(objpfx)libpthread.so \ - $(objpfx)libpthread_nonshared.a + $(tests) $(xtests) $(test-srcs))): $(objpfx)libpthread.so endif - -generated += libpthread_nonshared.a |