From: Richard Biener <richard.guenther@gmail.com>
To: Sebastian Huber <sebastian.huber@embedded-brains.de>
Cc: gcc-patches@gcc.gnu.org, Matthias Klose <doko@ubuntu.com>
Subject: Re: [PATCH] gcov: Fix __LIBGCC_HAVE_LIBATOMIC definition
Date: Fri, 1 Dec 2023 07:56:13 +0100 [thread overview]
Message-ID: <CAFiYyc3TyH6ZsT_Ox_=ez5SGd9rxHRA4On6cuwd_GQOj8A=U7w@mail.gmail.com> (raw)
In-Reply-To: <20231130162054.89738-1-sebastian.huber@embedded-brains.de>
On Thu, Nov 30, 2023 at 5:21 PM Sebastian Huber
<sebastian.huber@embedded-brains.de> wrote:
>
> In libgcov we use defined (__LIBGCC_HAVE_LIBATOMIC), so we must define it only
> if needed (vs. #if __LIBGCC_HAVE_LIBATOMIC).
For consistency wouldn't it be better to change the user side in libgcc?
> gcc/c-family/ChangeLog:
>
> PR target/112777
>
> * c-cppbuiltin.cc (c_cpp_builtins): Define __LIBGCC_HAVE_LIBATOMIC
> only if targetm.have_libatomic is true.
> ---
> gcc/c-family/c-cppbuiltin.cc | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc
> index e536429fa4c..f8ec6f1747c 100644
> --- a/gcc/c-family/c-cppbuiltin.cc
> +++ b/gcc/c-family/c-cppbuiltin.cc
> @@ -1570,8 +1570,8 @@ c_cpp_builtins (cpp_reader *pfile)
> /* For libgcov. */
> builtin_define_with_int_value ("__LIBGCC_VTABLE_USES_DESCRIPTORS__",
> TARGET_VTABLE_USES_DESCRIPTORS);
> - builtin_define_with_int_value ("__LIBGCC_HAVE_LIBATOMIC",
> - targetm.have_libatomic);
> + if (targetm.have_libatomic)
> + cpp_define (pfile, "__LIBGCC_HAVE_LIBATOMIC");
> }
>
> /* For use in assembly language. */
> --
> 2.35.3
>
prev parent reply other threads:[~2023-12-01 6:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-30 16:20 Sebastian Huber
2023-12-01 6:56 ` Richard Biener [this message]
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='CAFiYyc3TyH6ZsT_Ox_=ez5SGd9rxHRA4On6cuwd_GQOj8A=U7w@mail.gmail.com' \
--to=richard.guenther@gmail.com \
--cc=doko@ubuntu.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=sebastian.huber@embedded-brains.de \
/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).