public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r14-10151] libgcc: Do use weakrefs for glibc 2.34 on GNU Hurd
Date: Tue, 30 Apr 2024 07:07:42 +0000 (GMT)	[thread overview]
Message-ID: <20240430070742.12861385842C@sourceware.org> (raw)

https://gcc.gnu.org/g:af925ba8e2b1e76d33a83a85df398f23a2ea2b34

commit r14-10151-gaf925ba8e2b1e76d33a83a85df398f23a2ea2b34
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Apr 30 09:00:07 2024 +0200

    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.
    
    (cherry picked from commit 3146a92a77f1fccec71a880c7f890a1251aeab41)

Diff:
---
 libgcc/gthr.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libgcc/gthr.h b/libgcc/gthr.h
index 53a5f0f7458..33c2d8ff630 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

                 reply	other threads:[~2024-04-30  7:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240430070742.12861385842C@sourceware.org \
    --to=jakub@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).