summaryrefslogtreecommitdiff
path: root/scripts/Makefile.lib
diff options
context:
space:
mode:
authorDenis Vlasenko2008-11-08 20:36:32 +0000
committerDenis Vlasenko2008-11-08 20:36:32 +0000
commit2a8329e0e9d1d6dcbcec27f01b0affef67a33554 (patch)
tree8ca23a5c42929c6c946188873e0e955c86d7cbb0 /scripts/Makefile.lib
parent30e1ab691cba8e472be329206ee576f685229f2f (diff)
downloadbusybox-2a8329e0e9d1d6dcbcec27f01b0affef67a33554.zip
busybox-2a8329e0e9d1d6dcbcec27f01b0affef67a33554.tar.gz
build system: remove '-Wl,' when we pass flags to ld.
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r--scripts/Makefile.lib8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 22c6430..be679b6 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -117,8 +117,12 @@ a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \
cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(__cpp_flags)
-# TODO: seems to be a wrong thing to do! LDFLAGS contains gcc's flags!
-ld_flags = $(LDFLAGS) $(EXTRA_LDFLAGS)
+# Seems to be a wrong thing to do. LDFLAGS contains gcc's flags,
+# yet ld_flags is fed to ld.
+#ld_flags = $(LDFLAGS) $(EXTRA_LDFLAGS)
+# Remove the -Wl, prefix from linker options normally passed through gcc
+ld_flags = $(filter-out -Wl$(comma)%,$(LDFLAGS) $(EXTRA_LDFLAGS))
+
# Finds the multi-part object the current object will be linked into
modname-multi = $(sort $(foreach m,$(multi-used),\