summaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2015-02-12 13:38:47 -0800
committerRoland McGrath <roland@hack.frob.com>2015-02-12 13:38:47 -0800
commit04f5a636b6ac79677967d901a956f336a7ccfee3 (patch)
treed15e1815c2338b2af7dd504597240368568b7850 /Makerules
parent87a629c5d7aa559e5c144196bce123469b17af4c (diff)
downloadglibc-04f5a636b6ac79677967d901a956f336a7ccfee3.tar.gz
Support after-link variable to run a final step on binaries.
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makerules b/Makerules
index ca238f1c6e..c79915f07b 100644
--- a/Makerules
+++ b/Makerules
@@ -505,6 +505,7 @@ link-libc-deps = $(common-objpfx)libc.so $(common-objpfx)linkobj/libc.so \
# to be as similar as possible to a default link with an installed libc.
lib%.so: lib%_pic.a $(+preinit) $(+postinit) $(link-libc-deps)
$(build-shlib) $(link-libc-args)
+ $(call after-link,$@)
define build-shlib-helper
$(LINK.o) -shared $(static-libgcc) -Wl,-O1 $(sysdep-LDFLAGS) \
@@ -580,12 +581,14 @@ endef
define build-module
$(build-module-helper) -o $@ $(shlib-lds-flags) \
$(csu-objpfx)abi-note.o $(build-module-objlist) $(link-libc-args)
+$(call after-link,$@)
endef
define build-module-asneeded
$(build-module-helper) -o $@ $(shlib-lds-flags) \
$(csu-objpfx)abi-note.o \
-Wl,--as-needed $(build-module-objlist) -Wl,--no-as-needed \
$(link-libc-args)
+$(call after-link,$@)
endef
build-module-helper-objlist = \
@@ -666,6 +669,7 @@ $(common-objpfx)libc.so: $(elf-objpfx)soinit.os \
$(elf-objpfx)ld.so \
$(shlib-lds)
$(build-shlib)
+ $(call after-link,$@)
$(common-objpfx)linkobj/libc.so: $(elf-objpfx)soinit.os \
$(common-objpfx)linkobj/libc_pic.a \
@@ -674,6 +678,7 @@ $(common-objpfx)linkobj/libc.so: $(elf-objpfx)soinit.os \
$(elf-objpfx)ld.so \
$(shlib-lds)
$(build-shlib)
+ $(call after-link,$@)
ifeq ($(build-shared),yes)
$(common-objpfx)libc.so: $(common-objpfx)libc.map