在 2026-7-3 10:45, LIU Hao via Gcc 写道:
This allows building libgomp with win32 or mcf thread model. When yesterday I tried to build GCC master it ICE'd, so I had to backport the patches to GCC 16, and everything built successfully.

However, it turns out that any program that is linked against libgomp DLL deadlocks upon exit; the reason is complex but tl;dr; mingw-w64 CRT has to be patched as well (which I'll push later today):

With https://sourceforge.net/p/mingw-w64/mingw-w64/ci/0fad182ff178044ee442b05e1913aa16cde8efcf/ committed, I tried updating mingw-w64 CRT and rebuilding GCC with win32 thread model.

The ICE was gone, so I went ahead and ran libgomp tests. There were ~20 failures in C and C++ tests; some of them didn't compile, for example, libgomp/testsuite/libgomp.c-c++-common/cancel-taskgroup-1.c contains a call to `random()` which doesn't exist on Windows, and libgomp/alloc_cache.h still contains calls to pthread functions. There were also many failures in Fortran tests which I'm not familiar with.

I think this attempt to port libgomp to Windows without winpthreads is almost complete, but there are still some remaining changes.




--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to