aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2020-03-02 17:19:48 -0600
committerRob Landley <rob@landley.net>2020-03-02 17:19:48 -0600
commit20876694ab8f9ee1a821e464541d85e733fd44e0 (patch)
treea80d0b6ab56e7c578a39ed100322289f562b433d /scripts
parente86ad7d43ba18c0bcdc374a5ab86a3d12a3c4669 (diff)
downloadtoybox-20876694ab8f9ee1a821e464541d85e733fd44e0.tar.gz
Check that cross compiler is there, not linker, before building native.
It builds binutils first, so ld being there doesn't mean cc finished.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mcm-buildall.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/mcm-buildall.sh b/scripts/mcm-buildall.sh
index e82ce2d5..20713bc8 100755
--- a/scripts/mcm-buildall.sh
+++ b/scripts/mcm-buildall.sh
@@ -47,14 +47,15 @@ make_toolchain()
HOST="$TARGET"
export NATIVE=y
LP="$OUTPUT/${RENAME:-$TARGET}-cross/bin:$LP"
+ [ -z "$(which $TARGET-cc)" ] && return
fi
COMMON_CONFIG="CC=\"$HOST-gcc -static --static\" CXX=\"$HOST-g++ -static --static\""
export -n HOST
OUTPUT="$OUTPUT/${RENAME:-$TARGET}-$TYPE"
fi
- if [ -e "$OUTPUT.sqf" ] || [ -e "$OUTPUT/bin/$TARGET-ld" ] ||
- [ -e "$OUTPUT/bin/ld" ]
+ if [ -e "$OUTPUT.sqf" ] || [ -e "$OUTPUT/bin/$TARGET-cc" ] ||
+ [ -e "$OUTPUT/bin/cc" ]
then
return
fi