aboutsummaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2011-06-11 03:41:23 -0700
committerRoland McGrath <roland@hack.frob.com>2011-07-02 15:13:05 -0700
commit2d4fa81e11abc464b5b1f6417525285e84ff787c (patch)
tree8fc8ac42073a093cb5d4ecccf76cd887c2355a9c /Makerules
parent31fffa6b0700f9cc0f903a53489b829290168b4c (diff)
downloadglibc-2d4fa81e11abc464b5b1f6417525285e84ff787c.zip
glibc-2d4fa81e11abc464b5b1f6417525285e84ff787c.tar.gz
glibc-2d4fa81e11abc464b5b1f6417525285e84ff787c.tar.bz2
Consolidate shlib.lds references in new variables.
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules13
1 files changed, 8 insertions, 5 deletions
diff --git a/Makerules b/Makerules
index 6b4b0e1..d3cb4cc 100644
--- a/Makerules
+++ b/Makerules
@@ -514,8 +514,11 @@ $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
mv -f $@T $@
common-generated += shlib.lds
+shlib-lds = $(common-objpfx)shlib.lds
+shlib-lds-flags = -T $(shlib-lds)
+
define build-shlib
-$(build-shlib-helper) -o $@ -T $(common-objpfx)shlib.lds \
+$(build-shlib-helper) -o $@ $(shlib-lds-flags) \
$(csu-objpfx)abi-note.o $(build-shlib-objlist)
endef
else
@@ -557,11 +560,11 @@ ifeq (yes,$(elf))
# binutils only position loadable notes into the first page for binaries,
# not for shared objects
define build-module
-$(build-module-helper) -o $@ -T $(common-objpfx)shlib.lds \
+$(build-module-helper) -o $@ $(shlib-lds-flags) \
$(csu-objpfx)abi-note.o $(build-module-objlist)
endef
define build-module-asneeded
-$(build-module-helper) -o $@ -T $(common-objpfx)shlib.lds \
+$(build-module-helper) -o $@ $(shlib-lds-flags) \
$(csu-objpfx)abi-note.o \
-Wl,--as-needed $(build-module-objlist) -Wl,--no-as-needed
endef
@@ -618,7 +621,7 @@ $(common-objpfx)libc.so: $(elfobjdir)/soinit.os \
$(common-objpfx)libc_pic.os \
$(elfobjdir)/sofini.os \
$(elfobjdir)/interp.os $(elfobjdir)/ld.so \
- $(common-objpfx)shlib.lds
+ $(shlib-lds)
$(build-shlib)
ifeq ($(versioning),yes)
$(common-objpfx)libc.so: $(common-objpfx)libc.map
@@ -689,7 +692,7 @@ include $(patsubst %,$(..)extra-modules.mk,$(modules-names))
extra-modules-build := $(filter-out $(modules-names-nobuild),$(modules-names))
$(extra-modules-build:%=$(objpfx)%.so): $(objpfx)%.so: \
- $(objpfx)%.os $(common-objpfx)shlib.lds \
+ $(objpfx)%.os $(shlib-lds) \
$(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
$(build-module)
endif