configure: Rebuild cross-tools if GCC configure is newer than built GCC.
This commit is contained in:
@@ -214,23 +214,22 @@ real_path()
|
|||||||
|
|
||||||
# valid_toolchain
|
# valid_toolchain
|
||||||
#
|
#
|
||||||
# check if toolchain is valid
|
# check if a toolchain is valid
|
||||||
#
|
#
|
||||||
valid_toolchain()
|
valid_toolchain()
|
||||||
{
|
{
|
||||||
TRIPLET="$1"
|
TRIPLET="$1"
|
||||||
BASE="$2"
|
BASE="$2"
|
||||||
|
SOURCE="$3"
|
||||||
if [ ! -d "$BASE" ]; then
|
if [ ! -d "$BASE" ]; then
|
||||||
return 1;
|
return 1
|
||||||
fi
|
fi
|
||||||
if [ -f "$BASE/bin/$TRIPLET-gcc" ]; then
|
if [ -f "$BASE/bin/$TRIPLET-gcc" ]; then
|
||||||
return 0;
|
[ "$BASE/bin/$TRIPLET-gcc" -nt "$SOURCE/legacy/gcc/configure" ] && \
|
||||||
|
[ "$BASE/bin/$TRIPLET-gcc" -nt "$SOURCE/gcc/gcc/configure" ]
|
||||||
|
return $?
|
||||||
fi
|
fi
|
||||||
# TODO: Check this!
|
return 1
|
||||||
if [ -f "$BASE/bin/$TRIPLET-clang" ]; then
|
|
||||||
return 0;
|
|
||||||
fi
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# standard_gcc_settings
|
# standard_gcc_settings
|
||||||
@@ -906,7 +905,7 @@ else
|
|||||||
*) MAKE=make;;
|
*) MAKE=make;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if ! valid_toolchain "${targetMachine}" "${crossToolsDir}"; then
|
if ! valid_toolchain "${targetMachine}" "${crossToolsDir}" "${buildCrossTools}"; 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