From: Denys Vlasenko Date: Fri, 26 Jun 2009 22:24:35 +0000 (+0200) Subject: trylink: don't use ld --gc-sections if ld doesn't support it X-Git-Tag: 1_14_4~1 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f5d4bddfbee4d9a5af479e20f4e17b5e2fb4a3ed;p=oweals%2Fbusybox.git trylink: don't use ld --gc-sections if ld doesn't support it Signed-off-by: Ian Abbott Signed-off-by: Denys Vlasenko Signed-off-by: Mike Frysinger --- 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`