https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99913
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I Noticed: --enable-threads=posix and the error message is: D:\prog\winlibs32_stage\mingw32\i686-w64-mingw32\bin\ld.exe: R:/winlibs32_stage/gcc-11-20210404/build_mingw/gcc/libgcc_eh.a(unwind-dw2.o): in function `_gthread_once': R:\winlibs32_stage\gcc-11-20210404\build_mingw\i686-w64-mingw32\libgcc/./gthr-default.h:700: undefined reference to `pthread_once' .... More undefined references to pthread_* Either pthreads-win32 is not installed correctly or is not being linked correctly here.