https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119136

--- Comment #28 from Steve Kargl <kargl at gcc dot gnu.org> ---
(In reply to Thomas Koenig from comment #27)
> Created attachment 63214 [details]
> Patch based on ID comparison
> 
> This patch uses Jerry's, adjusted for the comparison of the result
> of __gthread_self () to the locking unit.
> 
> This passes regression-test on Linux with a new glibc, but it would be
> important to test this on a system where pthreads are not automatically
> linked.
> 
> Any idea where this could be tested?

FWIW, the patch applies cleanly, builds, and
regression tests okay on x86_64-*-freebsd.
On FreeBSD, the -fopenmp will add the -pthread
option to the command line, which adds -lpthread
for the thread library.  In the absences of
-pthread, -lpthread is not linked.

Reply via email to