summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/trylink5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/trylink b/scripts/trylink
index 7ea1d5c..8c88546 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`