https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97481
--- Comment #3 from fdlbxtqi <euloanty at live dot com> --- (In reply to Jim Wilson from comment #2) > riscv-unknown-linux-gnu is not a supported target. You must use either > riscv32-unknown-linux-gnu or riscv64-unknwon-linux-gnu. Both compilers > support both word sizes, the only difference is which is the default word > size. This may be part of the reason why it failed. > > The attachment doesn't show any ICE. It is just a config.log file, and I > don't see anything interesting in there. > > Note that mingw64 builds of a linux toolchain are unlikely to work as glibc > requires a case sensitive file system. I'd suggest using WSL2 as something > more likely to work, but I haven't tried that myself. > > It looks like you have a badly broken compiler build. You will need to > figure out why it is broken. This doesn't seem to be a gcc problem, but > rather a build problem on your side. I have successfully built that by fixing problems by myself for both x86_64-linux-gnu and aarch64-linux-gnu. While on riscv, it fails at the configure for glibc since the compiler encounters ICE. Here is the proof https://gcc.gnu.org/pipermail/libstdc++/2020-October/051219.html https://github.com/riscv/riscv-gnu-toolchain/issues/523#issuecomment-711457612 And this is my detailed building process. https://github.com/expnkx/GCC-cross-compilation-scripts/blob/master/windows%20hosted/aarch64-linux-gnu.txt