aboutsummaryrefslogtreecommitdiff
path: root/scripts/trylink
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-06-27 00:24:35 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-06-27 00:24:35 +0200
commiteb1cda2f2d6236baf36986d2da07cc564617fa88 (patch)
tree81b4a21fd3bc5941e142808726c0a1816b0b5ad2 /scripts/trylink
parent7e6034309e31d6d4d6a80341897cbf693a281dde (diff)
downloadbusybox-eb1cda2f2d6236baf36986d2da07cc564617fa88.tar.gz
trylink: don't use ld --gc-sections if ld doesn't support it
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'scripts/trylink')
-rwxr-xr-xscripts/trylink5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/trylink b/scripts/trylink
index 7ea1d5cad..8c8854679 100755
--- a/scripts/trylink
+++ b/scripts/trylink
@@ -99,6 +99,11 @@ else
fi
)`
+# The --gc-sections option is not supported by older versions of ld
+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`