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.18-196-g5f855e3


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  5f855e3598a576c35e54623a13b256f3e87fcd4d (commit)
      from  b7f2d27dbd85f6a0966dc389ad4f8205085b7ae8 (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=5f855e3598a576c35e54623a13b256f3e87fcd4d

commit 5f855e3598a576c35e54623a13b256f3e87fcd4d
Author: Brooks Moses <bmoses@google.com>
Date:   Thu Oct 3 10:38:14 2013 -0700

    Fix erroneous (and circular) implied pattern rule for linkobj/libc.so.
    
    [BZ #15915] As described in the bug, the pattern rule for lib%.so files
    in Makerules includes linkobj/libc.so as a dependency.  However, the
    explicit rule for linkobj/libc.so is in the top-level Makefile.
    
    Thus, the subdirectory makefiles that include Makerules end up with an
    erroneous makefile pattern rule for linkobj/libc.so that includes
    itself as a dependency.  The result is make warnings whenever rules
    for other .so files are resolved -- and, on occasion, actual makefile
    failures when a race condition causes the implicit rule to actually be
    used.
    
    This patch moves the explicit rules for linkobj/libc.so into Makerules
    to clear up this problem.  It also elaborates a couple of comments
    that I'd initially found confusing.

diff --git a/ChangeLog b/ChangeLog
index beba952..12c2417 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-10-03  Brooks Moses  <bmoses@google.com>
+
+	[BZ #15915]
+	* Makefile (linkobj/libc_pic.a, linkobj/libc.so): Move rules to...
+	* Makerules: ...here, and adjust associated comments.
+
 2013-10-02  Will Newton  <will.newton@linaro.org>
 
 	* malloc/Makefile: Add tst-pvalloc.
diff --git a/Makefile b/Makefile
index ba1820d..302a300 100644
--- a/Makefile
+++ b/Makefile
@@ -123,36 +123,7 @@ lib-noranlib: subdir_lib
 
 ifeq (yes,$(build-shared))
 # Build the shared object from the PIC object library.
-lib: $(common-objpfx)libc.so
-
-lib: $(common-objpfx)linkobj/libc.so
-
-# Do not filter ld.so out of libc.so link.
-$(common-objpfx)linkobj/libc.so: link-libc-deps = # empty
-
-$(common-objpfx)linkobj/libc.so: $(elfobjdir)/soinit.os \
-				 $(common-objpfx)linkobj/libc_pic.a \
-				 $(elfobjdir)/sofini.os \
-				 $(elfobjdir)/interp.os \
-				 $(elfobjdir)/ld.so \
-				 $(shlib-lds)
-	$(build-shlib)
-
-ifeq (,$(filter sunrpc,$(subdirs)))
-$(common-objpfx)linkobj/libc_pic.a: $(common-objpfx)libc_pic.a
-	$(make-target-directory)
-	ln -f $< $@
-else
-$(common-objpfx)linkobj/libc_pic.a: $(common-objpfx)libc_pic.a \
-				    $(common-objpfx)sunrpc/librpc_compat_pic.a
-	$(make-target-directory)
-	(cd $(common-objpfx)linkobj; \
-	 $(AR) x ../libc_pic.a; \
-	 rm $$($(AR) t ../sunrpc/librpc_compat_pic.a | sed 's/^compat-//'); \
-	 $(AR) x ../sunrpc/librpc_compat_pic.a; \
-	 $(AR) cr libc_pic.a *.os; \
-	 rm *.os)
-endif # $(subdirs) contains sunrpc
+lib: $(common-objpfx)libc.so $(common-objpfx)linkobj/libc.so
 endif # $(build-shared)
 
 
diff --git a/Makerules b/Makerules
index cca3f82..92c2872 100644
--- a/Makerules
+++ b/Makerules
@@ -565,16 +565,47 @@ generated += libc_pic.opts libc_pic.os.clean
 libc_pic_clean := .clean
 endif
 
-# Do not filter ld.so out of libc.so link.
+# Build a possibly-modified version of libc_pic.a for use in building
+# linkobj/libc.so.
+ifeq (,$(filter sunrpc,$(subdirs)))
+$(common-objpfx)linkobj/libc_pic.a: $(common-objpfx)libc_pic.a
+	$(make-target-directory)
+	ln -f $< $@
+else
+$(common-objpfx)linkobj/libc_pic.a: $(common-objpfx)libc_pic.a \
+				    $(common-objpfx)sunrpc/librpc_compat_pic.a
+	$(make-target-directory)
+	(cd $(common-objpfx)linkobj; \
+	 $(AR) x ../libc_pic.a; \
+	 rm $$($(AR) t ../sunrpc/librpc_compat_pic.a | sed 's/^compat-//'); \
+	 $(AR) x ../sunrpc/librpc_compat_pic.a; \
+	 $(AR) cr libc_pic.a *.os; \
+	 rm *.os)
+endif # $(subdirs) contains sunrpc
+
+# Clear link-libc-deps for the libc.so libraries so build-shlibs does not
+# filter ld.so out of the list of linked objects.
 $(common-objpfx)libc.so: link-libc-deps = # empty
+$(common-objpfx)linkobj/libc.so: link-libc-deps = # empty
 
-# Use our own special initializer and finalizer files for libc.so.
+# Use our own special initializer and finalizer files for the libc.so
+# libraries.
 $(common-objpfx)libc.so: $(elfobjdir)/soinit.os \
 			 $(common-objpfx)libc_pic.os$(libc_pic_clean) \
 			 $(elfobjdir)/sofini.os \
-			 $(elfobjdir)/interp.os $(elfobjdir)/ld.so \
+			 $(elfobjdir)/interp.os \
+			 $(elfobjdir)/ld.so \
+			 $(shlib-lds)
+	$(build-shlib)
+
+$(common-objpfx)linkobj/libc.so: $(elfobjdir)/soinit.os \
+			 $(common-objpfx)linkobj/libc_pic.a \
+			 $(elfobjdir)/sofini.os \
+			 $(elfobjdir)/interp.os \
+			 $(elfobjdir)/ld.so \
 			 $(shlib-lds)
 	$(build-shlib)
+
 ifeq ($(build-shared),yes)
 $(common-objpfx)libc.so: $(common-objpfx)libc.map
 endif

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

Summary of changes:
 ChangeLog |    6 ++++++
 Makefile  |   31 +------------------------------
 Makerules |   37 ++++++++++++++++++++++++++++++++++---
 3 files changed, 41 insertions(+), 33 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]