http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57897
Bug ID: 57897 Summary: pragma Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dongsheng.song at gmail dot com Due to Bug 57848, I must build gcc 4.9 with '--with-arch=corei7', then the cross compiler building success. But when I use the cross compiler to build native compiler, it failed with: x86_64-w64-mingw32-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 -I. -I. -I/home/cauchy/vcs/svn/gcc/trunk/gcc -I/home/cauchy/vcs/svn/gcc/trunk/gcc/. -I/home/cauchy/vcs/svn/gcc/trunk/gcc/../include -I/home/cauchy/vcs/svn/gcc/trunk/gcc/../libcpp/include -I/home/cauchy/obj/native/gcc-4.9-win64/gcc/./gmp -I/home/cauchy/vcs/svn/gcc/trunk/gmp -I/home/cauchy/obj/native/gcc-4.9-win64/gcc/./mpfr/src -I/home/cauchy/vcs/svn/gcc/trunk/mpfr/src -I/home/cauchy/vcs/svn/gcc/trunk/mpc/src -I/home/cauchy/vcs/svn/gcc/trunk/gcc/../libdecnumber -I/home/cauchy/vcs/svn/gcc/trunk/gcc/../libdecnumber/bid -I../libdecnumber -I/home/cauchy/vcs/svn/gcc/trunk/gcc/../libbacktrace -DCLOOG_INT_GMP -I/home/cauchy/obj/native/gcc-4.9-win64/gcc/./cloog/include -I/home/cauchy/vcs/svn/gcc/trunk/cloog/include -I/home/cauchy/vcs/svn/gcc/trunk/cloog/include -I/home/cauchy/obj/native/gcc-4.9-win64/gcc/./isl/include -I/home/cauchy/vcs/svn/gcc/trunk/isl/include -I. -I. -I/home/cauchy/vcs/svn/gcc/trunk/gcc -I/home/cauchy/vcs/svn/gcc/trunk/gcc/. -I/home/cauchy/vcs/svn/gcc/trunk/gcc/../include -I/home/cauchy/vcs/svn/gcc/trunk/gcc/../libcpp/include -I/home/cauchy/obj/native/gcc-4.9-win64/gcc/./gmp -I/home/cauchy/vcs/svn/gcc/trunk/gmp -I/home/cauchy/obj/native/gcc-4.9-win64/gcc/./mpfr/src -I/home/cauchy/vcs/svn/gcc/trunk/mpfr/src -I/home/cauchy/vcs/svn/gcc/trunk/mpc/src -I/home/cauchy/vcs/svn/gcc/trunk/gcc/../libdecnumber -I/home/cauchy/vcs/svn/gcc/trunk/gcc/../libdecnumber/bid -I../libdecnumber -I/home/cauchy/vcs/svn/gcc/trunk/gcc/../libbacktrace -DCLOOG_INT_GMP -I/home/cauchy/obj/native/gcc-4.9-win64/gcc/./cloog/include -I/home/cauchy/vcs/svn/gcc/trunk/cloog/include -I/home/cauchy/vcs/svn/gcc/trunk/cloog/include -I/home/cauchy/obj/native/gcc-4.9-win64/gcc/./isl/include -I/home/cauchy/vcs/svn/gcc/trunk/isl/include \ /home/cauchy/vcs/svn/gcc/trunk/gcc/config/i386/host-mingw32.c In file included from /home/cauchy/cross/x86_64-windows-gcc49/lib/gcc/x86_64-w64-mingw32/4.9.0/include/x86intrin.h:39:0, from /home/cauchy/cross/x86_64-windows-gcc49/x86_64-w64-mingw32/include/winnt.h:1369, from /home/cauchy/cross/x86_64-windows-gcc49/x86_64-w64-mingw32/include/windef.h:139, from /home/cauchy/cross/x86_64-windows-gcc49/x86_64-w64-mingw32/include/windows.h:69, from /home/cauchy/vcs/svn/gcc/trunk/gcc/config/i386/host-mingw32.c:29: /home/cauchy/cross/x86_64-windows-gcc49/lib/gcc/x86_64-w64-mingw32/4.9.0/include/ammintrin.h:35:27: sorry, unimplemented: -mno-fentry isn't compatible with SEH #pragma GCC target("sse4a") ^ make[2]: *** [host-mingw32.o] Error 1 make[2]: Leaving directory `/home/cauchy/obj/native/gcc-4.9-win64/gcc/gcc' make[1]: *** [install-strip-gcc] Error 2 make[1]: Leaving directory `/home/cauchy/obj/native/gcc-4.9-win64/gcc' make: *** [install-strip] Error 2 >From http://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html -fasynchronous-unwind-tables Generate unwind table in DWARF 2 format, if supported by target machine. There maybe something wrong, why when I use SEH, the gcc build script use '-fasynchronous-unwind-tables' ? $ cat x.c #pragma GCC target("sse4a") $ x86_64-w64-mingw32-g++ -c -fasynchronous-unwind-tables x.c x.c:1:27: sorry, unimplemented: -mno-fentry isn't compatible with SEH #pragma GCC target("sse4a") ^ $ x86_64-w64-mingw32-g++ -v Using built-in specs. COLLECT_GCC=x86_64-w64-mingw32-g++ COLLECT_LTO_WRAPPER=/home/cauchy/cross/x86_64-windows-gcc48/libexec/gcc/x86_64-w64-mingw32/4.8.2/lto-wrapper Target: x86_64-w64-mingw32 Configured with: /home/cauchy/vcs/svn/gcc/branches/gcc-4_8-branch/configure --prefix=/home/cauchy/cross/x86_64-windows-gcc48 --with-sysroot=/home/cauchy/cross/x86_64-windows-gcc48 --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=x86_64-w64-mingw32 --disable-multilib --disable-nls --enable-checking=release --enable-languages=c,c++,fortran --with-arch=core2 --with-tune=generic Thread model: win32 gcc version 4.8.2 20130712 (prerelease) (GCC)