configure --prefix=/toolchain --exec-prefix=/toolchain/win32 --with-headers=/src/newlib-1.13.0/newlib/libc/include ....
make all-gcc dieds when building crtbegin.o due to missing header files. Looking into the build scripts: I see that the header files from newlib are copied to /toolchain/arm-elf/sys-include. But the compile statement is using -isystem /toolchain/win32/arm-elf/sys-include (the EXEC_PREFIX path). So there is a mismatch in using for PREFIX and EXEC_PREFIX for externally provided header files. This should be valid for any build using with-headers and specifying a exec-prefix. WORKAROUNDs: ln -s /toolchain/arm-elf/sys-include /toolchain/win32/arm-elf/sys-include or don't use --exec-prefix. -- Summary: Use of --prefix and --exec-prefix breaks compiler build with --with-headers Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: joachim dot zaers at web dot de CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: i386-unknown-cygwin GCC target triplet: arm-unknown-elf http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22479