This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.27.9000-143-gbd60ce8


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  bd60ce86520b781ca24b99b2555e2ad389bbfeaa (commit)
      from  e2bcf6a8551c6b6a7eeed8f84be42b29eef4d0e2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bd60ce86520b781ca24b99b2555e2ad389bbfeaa

commit bd60ce86520b781ca24b99b2555e2ad389bbfeaa
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Mar 1 08:18:27 2018 +0100

    nptl: Move pthread_atfork to libc_nonshared.a
    
    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.
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>

diff --git a/ChangeLog b/ChangeLog
index 8f641de..aab581a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2018-03-01  Florian Weimer  <fweimer@redhat.com>
+
+	Move pthread_atfork to libc.  Remove libpthread_nonshared.a.
+	* nptl/Makefile (routines): Add pthread_atfork.
+	(static-only-routines): Set to pthread_atfork.
+	(libpthread-routines): Remove pthread_atfork.
+	(libpthread-static-only-routines): Remove.
+	(install): Update comment.
+	(libpthread.so): Do not install libpthread_nonshared.a.
+	(tests): Do not link with libpthread_nonshared.a.
+	(generated): Remove libpthread_nonshared.a.
+	* nptl/pthread_atfork.c (pthread_atfork): Turn into weak alias.
+	* sysdeps/nptl/Makeconfig (shared-thread-library): Do not link
+	with libpthread_nonshared.a.
+
 2018-02-28  Joseph Myers  <joseph@codesourcery.com>
 
 	[BZ #22902]
diff --git a/nptl/Makefile b/nptl/Makefile
index de37fb4..ba586c2 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -30,8 +30,9 @@ install-lib-ldscripts := libpthread.so
 
 routines = alloca_cutoff forward libc-lowlevellock libc-cancellation \
 	   libc-cleanup libc_pthread_init libc_multiple_threads \
-	   register-atfork pthread_self
+	   register-atfork pthread_atfork pthread_self
 shared-only-routines = forward
+static-only-routines = pthread_atfork
 
 # We need to provide certain routines for compatibility with existing
 # binaries.
@@ -106,7 +107,7 @@ libpthread-routines = nptl-init vars events version pt-interp \
 		      pthread_cancel pthread_testcancel \
 		      pthread_setcancelstate pthread_setcanceltype \
 		      pthread_once \
-		      old_pthread_atfork pthread_atfork \
+		      old_pthread_atfork \
 		      pthread_getcpuclockid \
 		      pthread_clock_gettime pthread_clock_settime \
 		      shm-directory \
@@ -147,7 +148,6 @@ libpthread-routines = nptl-init vars events version pt-interp \
 
 libpthread-shared-only-routines = version pt-interp pt-allocrtsig \
 				  unwind-forcedunwind
-libpthread-static-only-routines = pthread_atfork
 
 # Since cancellation handling is in large parts handled using exceptions
 # we have to compile some files with exception handling enabled, some
@@ -476,16 +476,12 @@ lib-noranlib: $(addprefix $(objpfx),$(extra-objs))
 
 # 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';\
@@ -644,14 +640,12 @@ $(addprefix $(objpfx), \
   $(filter-out $(tests-static) $(xtests-static) $(tests-reverse) \
     $(tests-nolibpthread), \
     $(tests) $(tests-internal) $(xtests) $(test-srcs))): \
-	$(objpfx)libpthread.so \
-	$(objpfx)libpthread_nonshared.a
+	$(objpfx)libpthread.so
 $(objpfx)tst-unload: $(libdl)
 # $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
 # since otherwise libpthread.so comes before libc.so when linking.
 $(addprefix $(objpfx), $(tests-reverse)): \
-  $(objpfx)../libc.so $(objpfx)libpthread.so \
-  $(objpfx)libpthread_nonshared.a
+  $(objpfx)../libc.so $(objpfx)libpthread.so
 $(objpfx)../libc.so: $(common-objpfx)libc.so ;
 $(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a
 
@@ -681,8 +675,7 @@ $(objpfx)$(multidir)/crtn.o: $(objpfx)crtn.o $(objpfx)$(multidir)/
 	ln -f $< $@
 endif
 
-generated += libpthread_nonshared.a \
-	     multidir.mk tst-atfork2.mtrace tst-cancel-wrappers.out \
+generated += multidir.mk tst-atfork2.mtrace tst-cancel-wrappers.out \
 	     tst-tls6.out
 
 generated += $(objpfx)tst-atfork2.mtrace \
diff --git a/nptl/pthread_atfork.c b/nptl/pthread_atfork.c
index 1c4ba23..5ac62bf 100644
--- a/nptl/pthread_atfork.c
+++ b/nptl/pthread_atfork.c
@@ -53,5 +53,5 @@ __pthread_atfork (void (*prepare) (void), void (*parent) (void),
 #ifndef __pthread_atfork
 extern int pthread_atfork (void (*prepare) (void), void (*parent) (void),
 			   void (*child) (void)) attribute_hidden;
-strong_alias (__pthread_atfork, pthread_atfork)
+weak_alias (__pthread_atfork, pthread_atfork)
 #endif
diff --git a/sysdeps/nptl/Makeconfig b/sysdeps/nptl/Makeconfig
index 5595f35..ce8998b 100644
--- a/sysdeps/nptl/Makeconfig
+++ b/sysdeps/nptl/Makeconfig
@@ -21,8 +21,7 @@
 
 have-thread-library = yes
 
-shared-thread-library = $(common-objpfx)nptl/libpthread_nonshared.a \
-			$(common-objpfx)nptl/libpthread.so
+shared-thread-library = $(common-objpfx)nptl/libpthread.so
 static-thread-library = $(common-objpfx)nptl/libpthread.a
 
 rpath-dirs += nptl

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog               |   15 +++++++++++++++
 nptl/Makefile           |   19 ++++++-------------
 nptl/pthread_atfork.c   |    2 +-
 sysdeps/nptl/Makeconfig |    3 +--
 4 files changed, 23 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]