aboutsummaryrefslogtreecommitdiff
path: root/libgcc/gthr.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2024-04-30 09:00:07 +0200
committerJakub Jelinek <jakub@redhat.com>2024-04-30 09:00:07 +0200
commit3146a92a77f1fccec71a880c7f890a1251aeab41 (patch)
tree9d5dbbac84fb54ae714c4b60f69f633516e23f6c /libgcc/gthr.h
parenta2452a68917bcf2d45fd911de779f8e9911c4ca6 (diff)
downloadgcc-3146a92a77f1fccec71a880c7f890a1251aeab41.zip
gcc-3146a92a77f1fccec71a880c7f890a1251aeab41.tar.gz
gcc-3146a92a77f1fccec71a880c7f890a1251aeab41.tar.bz2
libgcc: Do use weakrefs for glibc 2.34 on GNU Hurd
On Mon, Apr 29, 2024 at 01:44:24PM +0000, Joseph Myers wrote: > > 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). > > I suspect this has caused link failures in the glibc testsuite for Hurd, > which still has separate libpthread. > > https://sourceware.org/pipermail/libc-testresults/2024q2/012556.html So like this then? 2024-04-30 Jakub Jelinek <jakub@redhat.com> * gthr.h (GTHREAD_USE_WEAK): Don't redefine to 0 for glibc 2.34+ on GNU Hurd.
Diffstat (limited to 'libgcc/gthr.h')
-rw-r--r--libgcc/gthr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgcc/gthr.h b/libgcc/gthr.h
index 53a5f0f..33c2d8f 100644
--- a/libgcc/gthr.h
+++ b/libgcc/gthr.h
@@ -142,7 +142,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#endif
#ifdef __GLIBC_PREREQ
-#if __GLIBC_PREREQ(2, 34)
+#if __GLIBC_PREREQ(2, 34) && !defined(__gnu_hurd__)
/* glibc 2.34 and later has all pthread_* APIs inside of libc,
no need to link separately with -lpthread. */
#undef GTHREAD_USE_WEAK