https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109634
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |WONTFIX --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- As mentioned by Andrew, this is a user error. libgomp can be only dlopened in threaded apps if there is still space in the static TLS surplus, which unfortunately some versions of glibc use even for normal TLS rather than just static TLS. So, LD_PRELOAD=libgomp.so.1, or link the program with libgomp.so.1 rather than just its libraries, or dlopen it before spawning threads. This is how glibc behaves, and unless we want to slow down libgomp extremely, there is nothing that can be done about it on the GCC side.