https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93471
--- Comment #4 from Keith Marshall <keith.marshall at mailinator dot com> --- (In reply to Keith Marshall from comment #3) > Although this initially manifests for libgomp, the actual source of the > failure may lie elsewhere within the GCC build system. After placing > libpthread.a into the ${top_builddir}/mingw32/winsup hierarchy, other > components -- initially ada -- fail in identical circumstances, with > identical -L path specs, except that it is -lws2_32 which cannot be found, > unless it too is copied to the ${top_builddir}/mingw32/winsup hierarchy. Interestingly, I can no longer reproduce this failure, w.r.t. -lws2_32. I believe this to be the result of a local patch, which I've applied to Ada's gsocket.h, to remove gratuitously introduced dependencies on getaddrinfo(), getnameinfo(), and freeaddrinfo() functions, (which are unsupported in Windows versions predating WinXP), replacing them with a MinGW emulation of Microsoft's wspiapi.h fallback API, based on Microsoft's equivalent of a dlopen()/dlsym() lookup, and so eliminating all direct link-time dependencies on -lws2_32, (even though it remains specified in the linking command). OTOH, the failure w.r.t. -lpthread remains consistently reproducible.