diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-03-16 17:47:01 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-03-16 17:47:01 -0400 |
commit | 6798564b9e2f1a81b8c2d0cb4add97cb736d982b (patch) | |
tree | 98b9d2d748d1afe1ec93e6ee7877b9c489c2c819 | |
parent | 4a08e82d441dbde5412eca6a6db894b420f203f3 (diff) | |
download | busybox-w32-6798564b9e2f1a81b8c2d0cb4add97cb736d982b.tar.gz busybox-w32-6798564b9e2f1a81b8c2d0cb4add97cb736d982b.tar.bz2 busybox-w32-6798564b9e2f1a81b8c2d0cb4add97cb736d982b.zip |
trylink: respect compiler settings when probing features
The CPPFLAGS/CFLAGS settings might have features that matter, so make
sure we utilize them when testing the compiler.
URL: https://bugs.gentoo.org/471118
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rwxr-xr-x | scripts/trylink | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/trylink b/scripts/trylink index 5a67fcfa8..48c487bcd 100755 --- a/scripts/trylink +++ b/scripts/trylink | |||
@@ -49,7 +49,7 @@ check_cc() { | |||
49 | local tempname="$(mktemp)" | 49 | local tempname="$(mktemp)" |
50 | # Can use "-o /dev/null", but older gcc tend to *unlink it* on failure! :( | 50 | # Can use "-o /dev/null", but older gcc tend to *unlink it* on failure! :( |
51 | # "-xc": C language. "/dev/null" is an empty source file. | 51 | # "-xc": C language. "/dev/null" is an empty source file. |
52 | if $CC $1 -shared -xc /dev/null -o "$tempname".o >/dev/null 2>&1; then | 52 | if $CC $CPPFLAGS $CFLAGS $1 -shared -xc /dev/null -o "$tempname".o >/dev/null 2>&1; then |
53 | echo "$1"; | 53 | echo "$1"; |
54 | else | 54 | else |
55 | echo "$2"; | 55 | echo "$2"; |
@@ -66,7 +66,7 @@ check_libc_is_glibc() { | |||
66 | syntax error here | 66 | syntax error here |
67 | #endif | 67 | #endif |
68 | " >"$tempname".c | 68 | " >"$tempname".c |
69 | if $CC "$tempname".c -c -o "$tempname".o >/dev/null 2>&1; then | 69 | if $CC $CPPFLAGS $CFLAGS "$tempname".c -c -o "$tempname".o >/dev/null 2>&1; then |
70 | echo "$2"; | 70 | echo "$2"; |
71 | else | 71 | else |
72 | echo "$1"; | 72 | echo "$1"; |