aboutsummaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makerules b/Makerules
index 36e2441be0..027beef31b 100644
--- a/Makerules
+++ b/Makerules
@@ -572,6 +572,11 @@ define build-module
$(build-module-helper) -o $@ -T $(common-objpfx)shlib.lds \
$(csu-objpfx)abi-note.o $(build-module-objlist)
endef
+define build-module-asneeded
+$(build-module-helper) -o $@ -T $(common-objpfx)shlib.lds \
+ $(csu-objpfx)abi-note.o \
+ -Wl,--as-needed $(build-module-objlist) -Wl,--no-as-needed
+endef
else
ifneq (,$(findstring aix,$(config-os)))
define build-module