Attached are revised patches. These are exported from trunk. There is a change since my last message: * A new Makefile variable `SHLIB_MCFGTHREAD_LIBS` has been introduced, to keep the other thread models from being affected. After applying these patches, configure scripts in these subdirectories need to be regenerated: * gcc * libgcc * libatomic * libstdc++-v3 The patch for libgfortran fixes * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105764 I have successfully bootstrapped GCC 12 with these patches, on i686-w64-mingw32 (with MSVCRT) and x86_64-w64-mingw32 (with MSVCRT and UCRT). No errors have been observed so far. Once these patches land in GCC, we can start the work in mingw-w64 basing on `__USING_MCFGTHREAD__`. -- Best regards, LIU Hao