https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89714
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- -D_GLIBCXX_GTHREAD_USE_WEAK=0 appears to work, but is not officially supported. It also only affects the code in the libstdc++ headers, not the code inside libstdc++.so that checks __gthread_active_p.