Daniel Jacobowitz <drow@xxxxxxxxx> writes: > GCC is built (in bootstrap mode at least, where we know the compiler > will be GCC) using -Werror. OK. Then it should be configured with -Werror too. In general, you can't configure with one set of options, and build with a different set of options, without running into problems like this. In general, if you're going to use two different compilers in different stages of thebuild, you to have to do the equivalent of running 'configure' twice. Once for the native compiler, and once for the bootstrap mode where you know the compiler is GCC. This is because the two compilers won't necessarily be compatible. If I recall correctly, GCC doesn't run 'configure' twice; instead, it uses 'configure' to determine the characteristics of the native compiler, and then overrides that determination when it knows that it is compiling itself. You can do this with something like the following: #include <config.h> /* Do not include <memory.h> if compiling with GCC, even if 'configure' found it available with the native compiler. GCC never needs <memory.h>, and since we use -Werror in bootstrap mode, including <memory.h> here might cause a compilation failure. */ #ifdef __GNU_C__ # undef HAVE_MEMORY_H #endif