[PATCH] trylink: Don't use ld --gc-sections if compiler doesn't support it.
Ian Abbott
abbotti at mev.co.uk
Fri Jun 26 11:58:19 UTC 2009
Hi,
As mentioned by Thomas Chou in
<http://lists.busybox.net/pipermail/busybox/2009-June/069524.html>,
the old nios2nommu toolchain cannot handle the --gc-sections linker
option.
This patch filters it out if not supported.
Signed-off-by: Ian Abbott <abbotti at mev.co.uk>
---
scripts/trylink | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/scripts/trylink b/scripts/trylink
index 7ea1d5c..d53a04d 100755
--- a/scripts/trylink
+++ b/scripts/trylink
@@ -98,6 +98,10 @@ else
echo "-Wl,--gc-sections"
fi
)`
+# Don't use ld --gc-sections if not supported.
+if test -n "$GC_SECTIONS"; then
+ GC_SECTIONS=`check_cc "$GC_SECTIONS" ""`
+fi
# Sanitize lib list (dups, extra spaces etc)
LDLIBS=`echo "$LDLIBS" | xargs -n1 | sort | uniq | xargs`
--
1.6.3.1
More information about the busybox
mailing list