Hello. Im facing a rather weird problem bootstrapping gcc-4.7.0.
My build environment works for bootstrapping all versions of gcc up untill 4.6.3 but 4.7.0 fails to build because it cannot find system headers (complains about missing stdarg.h stddef.h etc.) going through the log i notice that stage2 is not including any system headers at all, only headers local to the source. also it fails to build unless you make a symlink to cpp.exe in /usr/lib (sanity error). building without bootstrapping also fails so thats not an option it seems, but ray linn has built it so i was wondering if he could share some insight ?.
Show your configure options for gcc, binutils, mingw-w64-headers and mingw-w64-crt.
gcc build flags
-enable-cxx-flags='-fomit-frame-pointer -fno-function-sections -fno-data-sections' \
MAKEINFO="/usr/bin/makeinfo" && make
the above for the x86 compiler.
echo "int _dowildcard = -1;" >$PWD/glob_enable.c && \
gcc -c -o $PWD/glob_enable.o $PWD/glob_enable.c && \
-enable-targets=i686-pc-mingw32 -enable-checking=release -enable-lto -enable-plugin \
-disable-werror -prefix=/mingw32 \
-with-sysroot=/mingw32 -disable-nls -disable-multilib \
CFLAGS="-I/mingw32/include -s" \
CXXFLAGS="-I/mingw32/include -s -mthreads" \
LDFLAGS="-L/mingw32/lib -s -Wl,$PWD/glob_enable.o" && make
and mingw-w64 api
-disable-multilib && make
Did you link your CRT/headers i686-w64-mingw32 to mingw?
You should have mingw32/mingw.
aye the sysroot is there /mingw32/mingw/include /mingw32/mingw/lib etc. i linked the content of i686-w64-mingw32 to /mingw32/mingw.
its a bit weird as it works with all previous versions of gcc, but 4.7.0 just cannot find headers.
i stumbled about a bug report on the gcc site where someone else had the same problem but there was no fix yet.
btw ignore the i686-pc-mingw32 in my binutils flags its from an older build.sh i dont use anymore i changed it to i686-w64-mingw32 but else the options are the same.
i can build it if i copy all headers/libraries to the builddir/gcc folder in the final boostrap but that should not be nessesary.
Ok bootstrap still a nogo but i managed to build it, there are a few problems though.
Anything relying on libstdc++ will crash with error 0x000005 (maybe sources needs to be fixed for the new keyword in c++11 ?).
Lto is broken… building anything with lto will segfault the lto wrapper.
Ok libstdc++ is atleast one of the problems it seems. i can build things with it just fine but they all crash. Confirmed by replacing the libstdc++ dll with a previous version (works again then but not applicapable for a static build though).
Seems a bug snuck in with the new version ?.
Bootstrap still a nogo header path composition seems to go wrong in stage2 when looking for system headers with #include_next <someheader> odd thing is that it tries to use the stage1 includes ???
Btw the error was 0xc00000005 from libstdc++. (might be a zero to much im writing of my head here heh).
Tried building from trunk but the bootstrap bug is not fixed yet as far as i can see.