diff options
author | Denys Vlasenko | 2015-10-20 16:40:43 +0200 |
---|---|---|
committer | Denys Vlasenko | 2015-10-20 16:40:43 +0200 |
commit | 58d0e20ad00cc8a24f3485a363a5a51ab2387bdc (patch) | |
tree | d698f8fc5f888b3cb9d47b80503406351c20dee2 /scripts | |
parent | 5134010d88b4aab286b4480822a8d8db8c32d903 (diff) | |
download | busybox-58d0e20ad00cc8a24f3485a363a5a51ab2387bdc.zip busybox-58d0e20ad00cc8a24f3485a363a5a51ab2387bdc.tar.gz |
scripts/trylink: remove $CPPFLAGS
We don't use it in final link, should not use it in check_FOO then.
This uncovered a logic bug in glibc check...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/trylink | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/trylink b/scripts/trylink index 2609997..9132b3f 100755 --- a/scripts/trylink +++ b/scripts/trylink @@ -51,10 +51,10 @@ check_cc() { echo "int main(int argc,char**argv){return argv?argc:0;}" >"$tempname".c # Can use "-o /dev/null", but older gcc tend to *unlink it* on failure! :( # Was using "-xc /dev/null", but we need a valid C program. - # "eval" is needed because CFLAGS can contain + # "eval" may be needed is CFLAGS can contain # '... -D"BB_VER=KBUILD_STR(1.N.M)" ...' # and we need shell to process quotes! - eval $CC $CPPFLAGS $CFLAGS $1 "$tempname".c -o "$tempname" >/dev/null 2>&1 + $CC $CFLAGS $1 "$tempname".c -o "$tempname" >/dev/null 2>&1 r=$? rm -f "$tempname" "$tempname".c "$tempname".o return $r @@ -70,7 +70,7 @@ check_libc_is_glibc() { syntax error here #endif " >"$tempname".c - $CC $CPPFLAGS $CFLAGS "$tempname".c -c -o "$tempname".o >/dev/null 2>&1 + ! $CC $CFLAGS "$tempname".c -c -o "$tempname".o >/dev/null 2>&1 r=$? rm -f "$tempname" "$tempname".c "$tempname".o return $r |