When configure is called in the build-i686-cygwin/libiberty subdir, CC is set correctly to build gcc, but CPP is inherited as "powerpc-linux-gcc -E". It seems like we should be setting CPP to "${CC_FOR_BUILD} -E" in all the places where CC is set to ${CC_FOR_BUILD}. diff -urN gcc-4.2.2-orig/Makefile.in gcc-4.2.2/Makefile.in --- gcc-4.2.2-orig/Makefile.in 2007-11-23 14:22:43.000000000 +0100 +++ gcc-4.2.2/Makefile.in 2007-11-23 15:27:04.809090200 +0100 @@ -113,6 +113,7 @@ AS="$(AS_FOR_BUILD)"; export AS; \ CC="$(CC_FOR_BUILD)"; export CC; \ CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ + CPP="$(CC_FOR_BUILD) -E "; export CPP; \ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ CXX="$(CXX_FOR_BUILD)"; export CXX; \ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ diff -urN gcc-4.2.2-orig/Makefile.tpl gcc-4.2.2/Makefile.tpl --- gcc-4.2.2-orig/Makefile.tpl 2007-11-23 14:22:42.000000000 +0100 +++ gcc-4.2.2/Makefile.tpl 2007-11-23 15:26:35.574341000 +0100 @@ -116,6 +116,7 @@ AS="$(AS_FOR_BUILD)"; export AS; \ CC="$(CC_FOR_BUILD)"; export CC; \ CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ + CPP="$(CC_FOR_BUILD) -E "; export CPP; \ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ CXX="$(CXX_FOR_BUILD)"; export CXX; \ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ diff -urN gcc-4.2.2-orig/gcc/configure gcc-4.2.2/gcc/configure --- gcc-4.2.2-orig/gcc/configure 2007-11-23 14:22:47.000000000 +0100 +++ gcc-4.2.2/gcc/configure 2007-11-23 15:26:19.136630600 +0100 @@ -12716,6 +12716,7 @@ esac saved_CFLAGS="${CFLAGS}" CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ + CPP="${CC_FOR_BUILD} -E " \ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \ --enable-languages=${enable_languages-all} \ --target=$target_alias --host=$build_alias --build=$build_alias diff -urN gcc-4.2.2-orig/gcc/configure.ac gcc-4.2.2/gcc/configure.ac --- gcc-4.2.2-orig/gcc/configure.ac 2007-11-23 14:22:30.000000000 +0100 +++ gcc-4.2.2/gcc/configure.ac 2007-11-23 15:26:28.355498600 +0100 @@ -1490,6 +1490,7 @@ esac saved_CFLAGS="${CFLAGS}" CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ + CPP="${CC_FOR_BUILD} -E " \ ${realsrcdir}/configure \ --enable-languages=${enable_languages-all} \ --target=$target_alias --host=$build_alias --build=$build_alias
Not a preprocessor bug; refiling to 'other'.
It looks like it is working already in GCC 10: configure:4018: checking how to run the C preprocessor configure:4049: gcc -E conftest.c configure:4049: $? = 0 I don't see anywhere CPP gets set in the normal process. So unless you define it, it will not be passed. How did you configure GCC? Normally you don't need to set CC or CXX or CPP.