summaryrefslogtreecommitdiff
path: root/util/xcompile
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2017-05-10 22:06:31 +0200
committerPatrick Georgi <pgeorgi@google.com>2017-06-27 20:57:34 +0000
commitf138320f9e4ac5b3650f2044c0136bfc3f295c1e (patch)
tree689002f963be83ff720849e2097530714fe84315 /util/xcompile
parentc6ef9dbd94b4bae54ce019b32b1c2ac0f88c827a (diff)
downloadcoreboot-f138320f9e4ac5b3650f2044c0136bfc3f295c1e.tar.gz
xcompile: Also try clang variants under the $triplet-clang scheme
That seems to be the more reliable way to build clang cross compilers for now. Change-Id: I14fe767d20f91b64e96c909291760bddcd108e5c Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/19660 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util/xcompile')
-rwxr-xr-xutil/xcompile/xcompile6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index 7e2d6b3480..c84780b0ce 100755
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -435,14 +435,16 @@ test_architecture() {
fi
for clang_arch in $TCLIST invalid; do
- testcc "${XGCCPATH}clang" "-target ${clang_arch}-$TABI -c" && break
+ for clang_prefix in $search $XGCCPATH ""; do
+ testcc "${clang_prefix}clang" "-target ${clang_arch}-$TABI -c" && break 2
+ done
done
if [ "invalid" != "$clang_arch" ]; then
# FIXME: this may break in a clang && !gcc configuration,
# but that's more of a clang limitation. Let's be optimistic
# that this will change in the future.
- CLANG="${XGCCPATH}clang"
+ CLANG="${clang_prefix}clang"
CFLAGS_CLANG="-target ${clang_arch}-${TABI} --rtlib=${CLANG_RUNTIME} $CFLAGS_CLANG -ccc-gcc-name ${GCC}"
fi
}