summaryrefslogtreecommitdiff
path: root/scripts/trylink
diff options
context:
space:
mode:
authorMike Frysinger2015-12-01 11:25:10 -0500
committerMike Frysinger2015-12-01 11:25:10 -0500
commit77e2bde6a50f0f6b9b3c9983c86e661a9872b5f6 (patch)
treec2d6806d06d30c436165d2fb77eb68a230dfa284 /scripts/trylink
parent196e400441652946b9c7ad7bc2d78c73885f2359 (diff)
downloadbusybox-77e2bde6a50f0f6b9b3c9983c86e661a9872b5f6.zip
busybox-77e2bde6a50f0f6b9b3c9983c86e661a9872b5f6.tar.gz
trylink: include LDFLAGS when checking linkage
The user might be including options in their LDFLAGS (like -fuse-ld=gold) that change the behavior of the linker and thus change the results of the flag tests. Make sure we include the user's LDFLAGS when running these tests so we filter out flags that will fail when used later on. URL: https://bugs.gentoo.org/499712 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'scripts/trylink')
-rwxr-xr-xscripts/trylink2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/trylink b/scripts/trylink
index 6e1187e..3c431ed 100755
--- a/scripts/trylink
+++ b/scripts/trylink
@@ -54,7 +54,7 @@ check_cc() {
# "eval" may be needed if CFLAGS can contain
# '... -D"BB_VER=KBUILD_STR(1.N.M)" ...'
# and we need shell to process quotes!
- $CC $CFLAGS $1 "$tempname".c -o "$tempname" >/dev/null 2>&1
+ $CC $CFLAGS $LDFLAGS $1 "$tempname".c -o "$tempname" >/dev/null 2>&1
r=$?
rm -f "$tempname" "$tempname".c "$tempname".o
return $r