Created attachment 578144 [details, diff] proposed patch crossdev --target x86_64-w64-mingw64 (8.3.0 and 9.1.0) fails for me at stage1 because of: In file included from /usr/x86_64-w64-mingw64/sys-include/_mingw.h:12, from /usr/x86_64-w64-mingw64/sys-include/crtdefs.h:10, from /usr/x86_64-w64-mingw64/sys-include/stddef.h:7, from /tmp/portage/cross-x86_64-w64-mingw64/gcc-8.3.0-r1/work/build/gcc/include/stddef.h:1, from /tmp/portage/cross-x86_64-w64-mingw64/gcc-8.3.0-r1/work/gcc-8.3.0/libgcc/../gcc/tsystem.h:44, from /tmp/portage/cross-x86_64-w64-mingw64/gcc-8.3.0-r1/work/gcc-8.3.0/libgcc/libgcc2.c:27: /tmp/portage/cross-x86_64-w64-mingw64/gcc-8.3.0-r1/work/build/gcc/include-fixed/stdio.h: In function ‘_func’: /tmp/portage/cross-x86_64-w64-mingw64/gcc-8.3.0-r1/work/build/gcc/include-fixed/stdio.h:136:3: error: expected declaration specifiers before ‘__extension__’ __MINGW_EXTENSION typedef __int64 fpos_t; ^~~~~~~~~~~~~~~~~ The real reason behind this error is a mis-applied fixincludes-patch for hpux. A simple fix to the problem is my proposed and attached patch. I've just submitted this to upstream here: https://gcc.gnu.org/ml/gcc-patches/2019-05/msg02127.html
The toolchain team deals with this stuff.
I wonder why I don't see a build failure. Can you attach your gcc's build.log?
Created attachment 578508 [details] cross-x86_64-w64-mingw64:gcc-8.3.0-r1:20190529-234457.log build log containing the failure
Only now I've noticed that you are using 'x86_64-w64-mingw64' instead of more popular 'x86_64-w64-mingw32'. Trying to reproduce locally.
(In reply to Sergei Trofimovich from comment #4) > Only now I've noticed that you are using 'x86_64-w64-mingw64' instead of > more popular 'x86_64-w64-mingw32'. Trying to reproduce locally. Confirmed. '-mingw64' variant fails while '-mingw32' works. I wonder where the difference comes from.
(In reply to Sergei Trofimovich from comment #5) > (In reply to Sergei Trofimovich from comment #4) > > Only now I've noticed that you are using 'x86_64-w64-mingw64' instead of > > more popular 'x86_64-w64-mingw32'. Trying to reproduce locally. > > Confirmed. '-mingw64' variant fails while '-mingw32' works. I wonder where > the difference comes from. Found it. fixincludes is a no-op for mingw32*, but not on mingw64: https://github.com/gcc-mirror/gcc/blob/661fdbbb031bbc6d46c52523b1842493b31737eb/fixincludes/mkfixinc.sh#L12 Looking at libstdc++-v3/configure.host there are more assumptions about mingw32*-style prefix: mingw32*) case "$host" in *-w64-*) os_include_dir="os/mingw32-w64" error_constants_dir="os/mingw32-w64" ;; *) os_include_dir="os/mingw32" error_constants_dir="os/mingw32" ;; esac OPT_LDFLAGS="${OPT_LDFLAGS} \$(lt_host_flags)" ;; Closing as invalid. Consider using 'mingw32*' tuples.
Thanks for your investigation! I've learned by now that one has to use *-mingw32 even though one wants a 64-bit-target compiler. I've updated the wiki page to prevent further confusion :) https://wiki.gentoo.org/wiki/Mingw