This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] Fix bug 15915, erroneous make rule for linkobj/libc.so.
- From: Brooks Moses <bmoses at google dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Tue, 24 Sep 2013 14:19:50 -0700
- Subject: Re: [patch] Fix bug 15915, erroneous make rule for linkobj/libc.so.
- Authentication-results: sourceware.org; auth=none
- References: <CAOxa4KomMpMcTRhCQtT9cWNeZ7QbzxBwQNbTL=qvCcLjk1L6fQ at mail dot gmail dot com> <CAOxa4KpUcQOmKadisHmVTX-nxon-0uhoyGhDT-2U+Zx01va40Q at mail dot gmail dot com> <CAAKybw9ttZJG1MYwKeh-ap24yBQVHiYXz4wrQ-_xGm3x+2D7=w at mail dot gmail dot com> <CAOxa4KrBhdzNP9uzba=-hguu69VXZ2XwZunRiURgk2hrp7Duqg at mail dot gmail dot com> <1378744628 dot 5770 dot 349 dot camel at ubuntu-sellcey> <CAOxa4KpK2z5OrGG0XNLdMEtYXfpZChoBhHChgCmD0YuCbkQBgQ at mail dot gmail dot com> <1378757027 dot 5770 dot 352 dot camel at ubuntu-sellcey> <CAOxa4Kq=+157Do-KEgO16Kmf7iYfnNzqDELeJpPdoSFU1oDEmA at mail dot gmail dot com> <CAOxa4KqiE1k1Z10Y6VuA30L2ofSZ8-oLAEX8NL_UGi57xqy7qA at mail dot gmail dot com> <CAOxa4KoqxX4K2x3V0f2fE6pP6oY7GjnOX9t+NqvbKfyoerFVxg at mail dot gmail dot com> <20130924205626 dot 212812C08C at topped-with-meat dot com>
On 09/24/2013 01:56 PM, Roland McGrath wrote:
I have yet to see a proper non-attachment patch posting with a log entry.
Fair enough, although following the advice on https://sourceware.org/glibc
/wiki/Contribution%20checklist I have been attaching patches because the
mailer I use "unavoidably wraps long lines or otherwise alters patch
content". For your convenience I have included a non-attachment version of
the patch below; I _think_ I've broken my mailer settings correctly to
avoid line-wrapping it.
I have also included a log entry. Sorry for the earlier omission.
Thanks,
- Brooks
2013-09-24 Brooks Moses <bmoses@google.com>
[BZ #15915]
* Makefile (linkobj/libc_pic.a, linkobj/libc.so): Move rules to...
* Makerules: ...here, and adjust associated comments.
diff --git a/Makefile b/Makefile
index ba1820d..74e8880 100644
--- a/Makefile
+++ b/Makefile
@@ -124,35 +124,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
endif # $(build-shared)
diff --git a/Makerules b/Makerules
index cca3f82..37a24b5 100644
--- a/Makerules
+++ b/Makerules
@@ -565,16 +565,46 @@ 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
- References:
- Re: [patch] Fix bug 15915, erroneous make rule for linkobj/libc.so.
- Re: [patch] Fix bug 15915, erroneous make rule for linkobj/libc.so.
- Re: [patch] Fix bug 15915, erroneous make rule for linkobj/libc.so.
- Re: [patch] Fix bug 15915, erroneous make rule for linkobj/libc.so.
- Re: [patch] Fix bug 15915, erroneous make rule for linkobj/libc.so.
- Re: [patch] Fix bug 15915, erroneous make rule for linkobj/libc.so.
- Re: [patch] Fix bug 15915, erroneous make rule for linkobj/libc.so.
- Re: [patch] Fix bug 15915, erroneous make rule for linkobj/libc.so.
- Re: [patch] Fix bug 15915, erroneous make rule for linkobj/libc.so.
- Re: [patch] Fix bug 15915, erroneous make rule for linkobj/libc.so.