https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460
--- Comment #36 from Costas Argyris <costas.argyris at gmail dot com> --- Regarding usage of the -r flag: Building windows(mingw)-hosted gcc with clang at this point seems highly experimental at best, and impossible with msvc. With clang (lld linker), -r is supported with ELF, but not with COFF (windows). This sounds like incomplete support on the lld side though, and therefore not something that should prevent us from using -r (I think lld should support it for COFF as it does for ELF, because it is meant to be a drop-in replacement after all).