From: Jakub Jelinek <jakub@redhat.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org,
Florian Weimer <fweimer@redhat.com>
Subject: Re: [PATCH] libstdc++: Ensure __gthread_self doesn't call undefined weak symbol [PR 95989]
Date: Wed, 11 Nov 2020 19:08:22 +0100 [thread overview]
Message-ID: <20201111180822.GR3788@tucnak> (raw)
In-Reply-To: <20201111172442.GA163354@redhat.com>
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?
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 18:08 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 [this message]
2020-11-11 19:24 ` Jonathan Wakely
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=20201111180822.GR3788@tucnak \
--to=jakub@redhat.com \
--cc=fweimer@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jwakely@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).