mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 07:18:40 +01:00
configure: Improve toolchain validation
* Seeing an issue on our builders where the toolchain directory exists, but the gcc binaries do not. * Check for the path, as well as the actual compiler binaries to improve detection of need to rebuild toolchain. Change-Id: I54fd5789e3255c8295136bb0614e72c5393718fe
This commit is contained in:
parent
f9492b5f11
commit
e5d446fcc9
23
configure
vendored
23
configure
vendored
@ -212,6 +212,27 @@ real_path()
|
||||
perl -MCwd=realpath -e'print realpath($ARGV[0]), "\n"' "$1"
|
||||
}
|
||||
|
||||
# valid_toolchain
|
||||
#
|
||||
# check if toolchain is valid
|
||||
#
|
||||
valid_toolchain()
|
||||
{
|
||||
TRIPLET="$1"
|
||||
BASE="$2"
|
||||
if [ ! -d "$BASE" ]; then
|
||||
return 1;
|
||||
fi
|
||||
if [ -f "$BASE/bin/$TRIPLET-gcc" ]; then
|
||||
return 0;
|
||||
fi
|
||||
# TODO: Check this!
|
||||
if [ -f "$BASE/bin/$TRIPLET-clang" ]; then
|
||||
return 0;
|
||||
fi
|
||||
return 1;
|
||||
}
|
||||
|
||||
# standard_gcc_settings
|
||||
#
|
||||
# Sets the variables for a GCC platform.
|
||||
@ -884,7 +905,7 @@ else
|
||||
*) MAKE=make;;
|
||||
esac
|
||||
|
||||
if [ ! -d "$crossToolsDir" ]; then
|
||||
if ! valid_toolchain "${targetMachine}" "${crossToolsDir}"; then
|
||||
MAKE=$MAKE \
|
||||
SECONDARY_ARCH=$secondaryArch \
|
||||
HAIKU_USE_GCC_GRAPHITE=`get_variable \
|
||||
|
Loading…
Reference in New Issue
Block a user