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:
@@ -212,6 +212,27 @@ real_path()
|
|||||||
perl -MCwd=realpath -e'print realpath($ARGV[0]), "\n"' "$1"
|
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
|
# standard_gcc_settings
|
||||||
#
|
#
|
||||||
# Sets the variables for a GCC platform.
|
# Sets the variables for a GCC platform.
|
||||||
@@ -884,7 +905,7 @@ else
|
|||||||
*) MAKE=make;;
|
*) MAKE=make;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ ! -d "$crossToolsDir" ]; then
|
if ! valid_toolchain "${targetMachine}" "${crossToolsDir}"; then
|
||||||
MAKE=$MAKE \
|
MAKE=$MAKE \
|
||||||
SECONDARY_ARCH=$secondaryArch \
|
SECONDARY_ARCH=$secondaryArch \
|
||||||
HAIKU_USE_GCC_GRAPHITE=`get_variable \
|
HAIKU_USE_GCC_GRAPHITE=`get_variable \
|
||||||
|
|||||||
Reference in New Issue
Block a user