[Bug target/99913] GCC11 fails to build for MinGW-w64 for Windows 32-bit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99913 Brecht Sanders changed: What|Removed |Added Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #5 from Brecht Sanders --- I can confirm GCC 13.2.0 builds with MinGW-w64 11.0.1 without explicitly configuring with LDFLAGS="-pthread"
[Bug target/99913] GCC11 fails to build for MinGW-w64 for Windows 32-bit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99913 LIU Hao changed: What|Removed |Added CC||lh_mouse at 126 dot com --- Comment #4 from LIU Hao --- Is there still such an error for you? It looks to me that this linker command line did not contain `-pthread` unlike the ones above. Maybe the configure script is worth looking at. ``` configure:16911: /R/winlibs32_stage/gcc-11-20210404/build_mingw/./gcc/xgcc -B/R/winlibs32_stage/gcc-11-20210404/build_mingw/./gcc/ -L/R/winlibs32_stage/inst_gcc-11-20210404/share/gcc/i686-w64-mingw32/lib -L/R/winlibs32_stage/inst_gcc-11-20210404/share/gcc/mingw/lib -isystem /R/winlibs32_stage/inst_gcc-11-20210404/share/gcc/i686-w64-mingw32/include -isystem /R/winlibs32_stage/inst_gcc-11-20210404/share/gcc/mingw/include -B/R/winlibs32_stage/inst_gcc-11-20210404/share/gcc/i686-w64-mingw32/bin/ -B/R/winlibs32_stage/inst_gcc-11-20210404/share/gcc/i686-w64-mingw32/lib/ -isystem /R/winlibs32_stage/inst_gcc-11-20210404/share/gcc/i686-w64-mingw32/include -isystem /R/winlibs32_stage/inst_gcc-11-20210404/share/gcc/i686-w64-mingw32/sys-include --sysroot=/R/winlibs32_stage/gcc-11-20210404/build_mingw/mingw-w64 -o conftest.exe -O0 -include confdefs.h -include ../../../libgomp/config/posix/omp-lock.h -s conftest.c -ldl >&5 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' ```
[Bug target/99913] GCC11 fails to build for MinGW-w64 for Windows 32-bit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99913 --- Comment #3 from Brecht Sanders --- Just to clarify: libwinpthread is built as part of the GCC build against MinGW-w64. MinGW-w64 also already has a libwinpthread (including libwinpthread-1.dll which can be found in the PATH).
[Bug target/99913] GCC11 fails to build for MinGW-w64 for Windows 32-bit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99913 --- Comment #2 from Brecht Sanders --- By the time I get to that error the build process already generated these files: - mingw-w64/mingw/lib/libwinpthread.a - mingw-w64/mingw/lib/libwinpthread.dll.a - mingw-w64/mingw/lib/libwinpthread.la However I couldn't find a matching DLL, which I assume should be here: - mingw-w64/mingw/bin/libwinpthread-1.dll
[Bug target/99913] GCC11 fails to build for MinGW-w64 for Windows 32-bit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99913 --- Comment #1 from Andrew Pinski --- 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.