From: Jonathan Wakely <jwakely@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Florian Weimer <fweimer@redhat.com>,
libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] libstdc++: Ensure __gthread_self doesn't call undefined weak symbol [PR 95989]
Date: Wed, 11 Nov 2020 19:24:03 +0000 [thread overview]
Message-ID: <20201111192403.GY503596@redhat.com> (raw)
In-Reply-To: <20201111180822.GR3788@tucnak>
On 11/11/20 19:08 +0100, Jakub Jelinek via Libstdc++ wrote:
>On Wed, Nov 11, 2020 at 05:24:42PM +0000, Jonathan Wakely wrote:
>> --- a/libgcc/gthr-posix.h
>> +++ b/libgcc/gthr-posix.h
>> @@ -684,7 +684,14 @@ __gthread_equal (__gthread_t __t1, __gthread_t __t2)
>> static inline __gthread_t
>> __gthread_self (void)
>> {
>> +#if __GLIBC_PREREQ(2, 27)
>
>What if it is a non-glibc system where __GLIBC_PREREQ macro isn't defined?
Ah yes, I forgot non-glibc systems exist :-)
Thanks, I'll fix it tomorrow, and test on some more targets.
>I think you'd get then
>error: missing binary operator before token "("
>So I think you want
>#if defined __GLIBC__ && defined __GLIBC_PREREQ
>#if __GLIBC_PREREQ(2, 27)
> return pthread_self ();
>#else
> return __gthrw_(pthread_self) ();
>#else
> return __gthrw_(pthread_self) ();
>#endif
>or similar.
>
> Jakub
>
next prev parent reply other threads:[~2020-11-11 19:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-11 17:24 Jonathan Wakely
2020-11-11 18:08 ` Jakub Jelinek
2020-11-11 19:24 ` Jonathan Wakely [this message]
2020-11-12 17:34 ` Jonathan Wakely
2020-11-19 21:42 ` Jonathan Wakely
2020-11-20 13:50 ` Jonathan Wakely
2020-11-24 15:06 ` Jonathan Wakely
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=20201111192403.GY503596@redhat.com \
--to=jwakely@redhat.com \
--cc=fweimer@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=libstdc++@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).