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

--- Comment #4 from Paul Pluzhnikov <ppluzhnikov at google dot com> ---
(In reply to Jakub Jelinek from comment #3)
> This is a glibc bug

I (obviously) disagree.

, coming up with a set of weakref checks for gthr.h that
> would satisfy static linking of glibc and all possible combinations of
> included vs. non-included objects is impossible.

If you call pthread_mutex_lock (or any other function) via weakref, then you
should ensure that the function is actually available.

AFAICT, libgcc only calls a few pthread_* functions. Why is it hard to check
that *all* of them are present?

> E.g. Fedora/RHEL ld -r libpthread.a objects into a single exactly because of 
> this.

That is a workaround, not a fix. And it has significant negative effects in the
resulting program code size.

> There are many dups of this both on the gcc side and glibc side.

Well, I think GCC and GLIBC developers need to sit down and decide whose bug it
is, and fix it once and for all :-)

Reply via email to