--- gcc/libgcc/Makefile.in.org 2010-04-29 23:43:30.179106889 +0200 +++ gcc/libgcc/Makefile.in 2010-04-29 23:43:41.993233119 +0200 @@ -64,7 +64,7 @@ AR = @AR@ AR_FLAGS = rc -CC = @CC@ +override CC = @CC@ CFLAGS = @CFLAGS@ RANLIB = @RANLIB@ LN_S = @LN_S@ --- gcc-9.5.0/libgcc/configure.orig 2023-04-15 23:24:15.271132715 +0200 +++ gcc-9.5.0/libgcc/configure 2023-04-16 07:36:39.584410765 +0200 @@ -3208,6 +3208,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } +CC="$CC -isystem `pwd`/../../sysroot/i386-mingw32/include -isystem `pwd`/../../sysroot/i386-mingw32/sys-include -B`pwd`/../../sysroot/i386-mingw32/lib/" if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else --- gcc/libiberty/Makefile.in.org 2010-04-29 23:53:50.429231967 +0200 +++ gcc/libiberty/Makefile.in 2010-04-29 23:54:00.206482863 +0200 @@ -53,7 +53,7 @@ AR = @AR@ AR_FLAGS = rc -CC = @CC@ +override CC = @CC@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ RANLIB = @RANLIB@ --- gcc-9.5.0/libiberty/configure.orig 2023-04-15 23:24:15.307799183 +0200 +++ gcc-9.5.0/libiberty/configure 2023-04-16 07:37:20.094191305 +0200 @@ -2990,6 +2990,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } +CC="$CC -isystem `pwd`/../../sysroot/i386-mingw32/include -isystem `pwd`/../../sysroot/i386-mingw32/sys-include -B`pwd`/../../sysroot/i386-mingw32/lib/" if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else --- gcc-9.5.0/libstdc++-v3/Makefile.in.orig 2022-05-27 09:21:13.311391084 +0200 +++ gcc-9.5.0/libstdc++-v3/Makefile.in 2023-04-15 23:24:15.351132282 +0200 @@ -197,7 +197,7 @@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_H = @BASIC_FILE_H@ -CC = @CC@ +override CC = @CC@ CCODECVT_CC = @CCODECVT_CC@ CCOLLATE_CC = @CCOLLATE_CC@ CCTYPE_CC = @CCTYPE_CC@ @@ -217,7 +217,7 @@ CPU_OPT_EXT_RANDOM = @CPU_OPT_EXT_RANDOM CSTDIO_H = @CSTDIO_H@ CTIME_CC = @CTIME_CC@ CTIME_H = @CTIME_H@ -CXX = @CXX@ +override CXX = @CXX@ CXXCPP = @CXXCPP@ CXXFILT = @CXXFILT@ CXXFLAGS = @CXXFLAGS@ --- gcc-9.5.0/libstdc++-v3/configure.orig 2022-05-27 09:21:13.335391201 +0200 +++ gcc-9.5.0/libstdc++-v3/configure 2023-04-16 07:38:19.120538198 +0200 @@ -3795,6 +3795,7 @@ fi save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -fno-builtin" ac_ext=c +CPP=$CXXCPP ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -3804,6 +3805,8 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } +CC="$CC -isystem `pwd`/../../sysroot/i386-mingw32/include -isystem `pwd`/../../sysroot/i386-mingw32/sys-include -B`pwd`/../../sysroot/i386-mingw32/lib/" +CXX="$CXX -isystem `pwd`/../../sysroot/i386-mingw32/include -isystem `pwd`/../../sysroot/i386-mingw32/sys-include -B`pwd`/../../sysroot/i386-mingw32/lib/" if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else