MinGW-w64 toolchains use mingw64-runtime as their libc, but gcc_do_configure() in toolchain.eclass looks for ${CATEGORY}/mingw-runtime for both MinGW32 and MinGW-w64 toolchains regardless. One line needs to be added to toolchain.eclass: if is_crosscompile ; then # When building a stage1 cross-compiler (just C compiler), we have to # disable a bunch of features or gcc goes boom local needed_libc="" case ${CTARGET} in *-linux) needed_libc=no-fucking-clue;; *-dietlibc) needed_libc=dietlibc;; *-elf|*-eabi) needed_libc=newlib;; *-freebsd*) needed_libc=freebsd-lib;; *-gnu*) needed_libc=glibc;; *-klibc) needed_libc=klibc;; *-uclibc*) needed_libc=uclibc;; *-cygwin) needed_libc=cygwin;; + *-w64-mingw*) needed_libc=mingw64-runtime;; mingw*|*-mingw*) needed_libc=mingw-runtime;; avr) confgcc+=" --enable-shared --disable-threads";; esac
(In reply to comment #0) > + *-w64-mingw*) needed_libc=mingw64-runtime;; After making the above addition in toolchain.ebuild, emerging of gcc fails with this message: The directory that should contain system headers does not exist: /usr/x86_64-w64-mingw32/mingw/include As an attempt at a temporary workaround, I've placed a mingw->usr symlink at /usr/x86_64-w64-mingw32. I'm rebuilding now to see if the symlink allows gcc to build.
http://sources.gentoo.org/eclass/toolchain.eclass?r1=1.539&r2=1.540