https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101711
--- Comment #8 from bootmgr at 163 dot com <bootmgr at 163 dot com> --- (In reply to ctice from comment #6) > I applied the patch supplied in comment 5. I added > --with-sysroot=/usr/local to my configure command (still not using > --enable-threads=mcf or --enable-vtable-verify). Now it configures, but the > make command fails while building gcc, complaining that: > > The directory that should contain system headers does not exist: > /usr/local/mingw/include > > Which is completely true. I'm working on an elf/linux machine (x86_64) and > I have no mingw headers. Where can I get the appropriate headers (and > anything else I will need) in order to make this cross compile work? Compiling a cross toolchain can be a bit complicated. The mingw-w64 wiki has documentation on how to compile the mingw cross toolchain. https://sourceforge.net/p/mingw-w64/wiki2/Cross%20Win32%20and%20Win64%20compiler/ If you want other thread models (other than win32), you can compile the winpthreads library (--enable-threads=posix) or copy release/mingw64/* (--enable-threads) from the mcfgthread repository to /path/to/install/x86_64-w64-mingw32/ after compiling crt.