Created attachment 757109 [details] cross-x86_64-w64-mingw32-info.log I'm encountering the same build failure as seen in https://bugs.gentoo.org/513706 from 2014. Though I'm opening a new issue as I'm sure there have been a lot of changes in the 7 years since, and apparently this bug was "Fixed in CVS" (@zorry). I'm not sure what change it was that had meant to fix it. /usr/libexec/gcc/x86_64-w64-mingw32/ld: /usr/x86_64-w64-mingw32/mingw/lib/../lib/libmingw32.a(lib64_libmingw32_a-pseudo-reloc.o):pseudo-reloc.c:(.text+0x202): undefined reference to `__stack_chk_fail' /usr/libexec/gcc/x86_64-w64-mingw32/ld: /usr/x86_64-w64-mingw32/mingw/lib/../lib/libmingw32.a(lib64_libmingw32_a-pseudo-reloc.o):pseudo-reloc.c:(.text+0x4e2): undefined reference to `__stack_chk_fail' /usr/libexec/gcc/x86_64-w64-mingw32/ld: /usr/x86_64-w64-mingw32/mingw/lib/../lib/libmingw32.a(lib64_libmingw32_a-pseudo-reloc.o):pseudo-reloc.c:(.rdata$.refptr.__stack_chk_guard[.refptr.__stack_chk_guard]+0x0): undefined reference to `__stack_chk_guard' collect2: error: ld returned 1 exit status make[2]: *** [Makefile:994: libgcc_s.dll] Error 1 Cheers
Created attachment 757110 [details] cross-x86_64-w64-mingw32-gcc-stage2.log.xz
Created attachment 757111 [details] gcc-config.logs.tar.xz
Note: I'm using the default USE flags for the cross compiler installation through crossdev
I see "-fstack-protector-strong -D_FORTIFY_SOURCE=2" in your CFLAGS. It would be troublesome if cross-x86_64-w64-mingw32_ucrt/mingw64-runtime were built with these flags.
Ah that's a duh on my part as I use the Clang compiler on my system, and Clang doesn't have sane semi-hardening defaults. https://wiki.gentoo.org/wiki/Clang#Clang_environments Now crossdev works a treat after switching mingw64-runtime to use a gcc env. Thanks for helping me fix this :)