diff options
author | Jakub Jelinek <jakub@redhat.com> | 2024-04-25 20:43:13 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2024-04-25 20:43:13 +0200 |
commit | fe02f6caac2d9b51ad311889e76ba0c484356ea1 (patch) | |
tree | c60b5fdbb2a910e031ab78e600c61c6160427b61 /gcc | |
parent | c39654e7a431992773b48d61f804494b0d70855f (diff) | |
download | gcc-fe02f6caac2d9b51ad311889e76ba0c484356ea1.zip gcc-fe02f6caac2d9b51ad311889e76ba0c484356ea1.tar.gz gcc-fe02f6caac2d9b51ad311889e76ba0c484356ea1.tar.bz2 |
libgcc: Don't use weakrefs for glibc 2.34
glibc 2.34 and later doesn't have separate libpthread (libpthread.so.0 is a
dummy shared library with just some symbol versions for compatibility, but
all the pthread_* APIs are in libc.so.6).
So, we don't need to do the .weakref dances to check whether a program
has been linked with -lpthread or not, in dynamically linked apps those
will be always true anyway.
In -static linking, this fixes various issues people had when only linking
some parts of libpthread.a and getting weird crashes. A hack for that was
what e.g. some Fedora glibcs used, where libpthread.a was a library
containing just one giant *.o file which had all the normal libpthread.a
*.o files linked with -r together.
libstdc++-v3 actually does something like this already since r10-10928,
the following patch is meant to fix it even for libgfortran, libobjc and
whatever else uses gthr.h.
2024-04-25 Jakub Jelinek <jakub@redhat.com>
* gthr.h (GTHREAD_USE_WEAK): Redefine to 0 for GLIBC 2.34 or later.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions