[Bug testsuite/100748] [12 regression] 30_threads/jthread/95989.cc fails after r12-843
law at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Sep 9 03:06:57 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100748
--- Comment #4 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Bernd E. analyzed this in the thread referenced in c#1.
The test links staticly and we're pulling in the weak definition of
pthread_join.
I'm not sure why we're linking statically. Reverting to normal dynamic linking
would likely fix this problem.
If that's not desired, then something like --whole-archive -lpthread
--no-whole-archive in the link line will make this work as long as it appears
before -lc.
Or we could add -Wl,-u,pthread_join to the link line.
Or we could hack up the source per Bernd's patch in that thread.
No strong opinions here. Just trying to get another failure resolved on our
target :-)
More information about the Gcc-bugs
mailing list