I can build i686-w64-mingw32-gcc and x86_64-w64-mingw32-gcc under Linux, but when I use this compiler to compile native Windows compiler, gcc 4.7 success, gcc 4.8 failed with same build script like this:
make[2]: Entering directory `/home/cauchy/obj/native/gcc-4.8-win32/gcc/gcc' g++ -c -g -O2 -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I/home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc -I/home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/build -I/home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/../include -I/home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/../libcpp/include -I/home/cauchy/native/gcc-4.8-win32-3rd/include -I/home/cauchy/native/gcc-4.8-win32-3rd/include -I/home/cauchy/native/gcc-4.8-win32-3rd/include -I/home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/../libdecnumber -I/home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/../libdecnumber/bid -I../libdecnumber -I/home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/../libbacktrace \ -o build/genconstants.o /home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/genconstants.c In file included from /usr/include/x86_64-linux-gnu/sys/resource.h:25:0, from /usr/include/x86_64-linux-gnu/sys/wait.h:32, from /home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/system.h:352, from /home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/genconstants.c:28: /usr/include/x86_64-linux-gnu/bits/resource.h:133:18: error: declaration does not declare anything [-fpermissive] In file included from /home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/genconstants.c:28:0: /home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/system.h:444:23: error: declaration of C function ‘void* sbrk(int)’ conflicts with In file included from /home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/system.h:254:0, from /home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/genconstants.c:28: /usr/include/unistd.h:1056:14: error: previous declaration ‘void* sbrk(intptr_t)’ here In file included from /home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/genconstants.c:28:0: /home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/system.h:448:48: error: new declaration ‘char* strstr(const char*, const char*)’ In file included from /usr/include/c++/4.7/cstring:44:0, from /home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/system.h:205, from /home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/genconstants.c:28: /usr/include/string.h:335:1: error: ambiguates old declaration ‘const char* strstr(const char*, const char*)’ In file included from /home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/genconstants.c:28:0: /home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/system.h:500:34: error: declaration of C function ‘const char* strsignal(int)’ conflicts with In file included from /usr/include/c++/4.7/cstring:44:0, from /home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/system.h:205, from /home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/genconstants.c:28: /usr/include/string.h:566:14: error: previous declaration ‘char* strsignal(int)’ here In file included from /home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/system.h:645:0, from /home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/genconstants.c:28: /home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/../include/libiberty.h:110:36: error: new declaration ‘char* basename(const char*)’ In file included from /usr/include/c++/4.7/cstring:44:0, from /home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/system.h:205, from /home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/gcc/genconstants.c:28: /usr/include/string.h:603:28: error: ambiguates old declaration ‘const char* basename(const char*)’ make[2]: *** [build/genconstants.o] Error 1 make[2]: Leaving directory `/home/cauchy/obj/native/gcc-4.8-win32/gcc/gcc' make[1]: *** [all-gcc] Error 2 make[1]: Leaving directory `/home/cauchy/obj/native/gcc-4.8-win32/gcc' make: *** [all] Error 2 Regards, Dongsheng ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public