configure: add flags when building gcc2 cross tools with a newer gcc

tested with gcc 15.2.0

Change-Id: I0f4a57050581c2f2b39b903037689b5b137a57d4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10330
Reviewed-by: Jérôme Duval <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
Jérôme Duval
2026-02-17 07:26:57 +00:00
committed by Adrien Destugues
parent 53a3cd8bd5
commit b0e37ca074
Vendored
+4
View File
@@ -647,6 +647,7 @@ fi
#
GIT_DIR=`git -C "$configureDir" rev-parse --git-dir | sed 's/^gitdir: //'`
HOST_GCC_MACHINE=`$CC -dumpmachine`
HOST_GCC_VERSION=`$CC -dumpversion`
HAIKU_INCLUDE_SOURCES=0
HAIKU_INCLUDE_3RDPARTY=0
HAIKU_DISTRO_COMPATIBILITY=default
@@ -752,6 +753,9 @@ while [ $# -gt 0 ] ; do
esac
set_variable buildCrossToolsMachine_$targetArch $targetMachine
targetArchs="$targetArchs $targetArch"
if [ "$targetArch" = "x86_gcc2" ] && [ ${HOST_GCC_VERSION%%.*} -ge 14 ]; then
CC="$CC -Wno-error=implicit-int -Wno-error=implicit-function-declaration"
fi
;;
--cross-tools-prefix)
assertparam "$1" $#