public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Ambardar <tony.ambardar@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Miguel Ojeda <ojeda@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] compiler-gcc.h: Disable __retain on gcc-11
Date: Mon, 30 Sep 2024 16:50:32 -0700	[thread overview]
Message-ID: <Zvs5SJ/dAojRneC8@kodidev-ubuntu> (raw)
In-Reply-To: <CAMuHMdUwt9_zU_2ytSMOoB1VJqZYwonHTZd-bSzpXxRwj2+XfA@mail.gmail.com>

Hello Geert,

On Tue, Sep 24, 2024 at 08:30:30PM +0200, Geert Uytterhoeven wrote:
> Hi Miguel,
> 
> On Tue, Sep 24, 2024 at 7:21 PM Miguel Ojeda
> <miguel.ojeda.sandonis@gmail.com> wrote:
> > On Tue, Sep 24, 2024 at 3:55 PM Geert Uytterhoeven
> > <geert+renesas@glider.be> wrote:
> > > All my gcc-11 compilers (Ubuntu 11.4.0-1ubuntu1~22.04) claim to support
> > > the __retain__ attribute, but only riscv64-linux-gnu-gcc-11 and
> > > x86_64-linux-gnu-gcc-11 (not x86_64-linux-gnux32-gcc-11!) actually do.
> > > The arm-linux-gnueabi-gcc-11.5.0 compiler from kernel.org crosstool
> > > fails in the same way:

[snip]

> What's your definition of "all"? ;-)
> 
>   1. All compilers available on Ubuntu 22.04LTS:
> 
>       aarch64-linux-gnu-gcc-11
>       alpha-linux-gnu-gcc-11
>       arm-linux-gnueabi-gcc-11
>       arm-linux-gnueabihf-gcc-11
>       hppa64-linux-gnu-gcc-11
>       hppa-linux-gnu-gcc-11
>       i686-linux-gnu-gcc-11
>       m68k-linux-gnu-gcc-11
>       powerpc64le-linux-gnu-gcc-11
>       powerpc64-linux-gnu-gcc-11
>       powerpc-linux-gnu-gcc-11
>       riscv64-linux-gnu-gcc-11
>       s390x-linux-gnu-gcc-11
>       sh4-linux-gnu-gcc-11
>       sparc64-linux-gnu-gcc-11
>       x86_64-linux-gnu-gcc-11
>       x86_64-linux-gnux32-gcc-11
> 
>   2. A few from kernel.org crosstool:
> 
>       ia64-linux-gcc-11.1.0
>       sh2eb-linux-muslfdpic-gcc-11.2.0
>       arm-linux-gnueabi-gcc-11.5.0
> 
>   3. A compiler from the J-Core folks:
> 
>       sh2eb-linux-muslfdpic-gcc-11.2.0
> 

Thank you for testing the gcc-11 edge so thoroughly. For my testing, I
used a handful of gcc versions across 9 to 13, but ironically only
tried gcc 11 on x86_64 (which works... :-\ ).

> > > +#if GCC_VERSION < 120000
> > > +#undef __retain
> > > +#define __retain
> > > +#endif
> >
> > Should this go into the conditional in `compiler_types.h` instead? And
> > perhaps the `__has__attribute` test removed for GCC?
> 
> AFAIK, the gcc-specifics are in compiler-gcc.h...
> 

Right, I agree it's best left there.

> > Even if we keep it here, I think at least a comment there should be
> > added, since it says GCC >= 11 supports it, which can be confusing if
> > one is not aware of this other thing in this file.
> 
> Fair enough....

Yes, some clarifying text would be helpful e.g.
"Optional: only supported since gcc >= 11 (partial), clang >= 13"

Otherwise LGTM, so:

Reviewed-by: Tony Ambardar <tony.ambardar@gmail.com>

> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> -- 
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds

  reply	other threads:[~2024-09-30 23:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-24 13:55 [PATCH] compiler-gcc.h: Disable __retain on gcc-11 Geert Uytterhoeven
2024-09-24 17:21 ` Miguel Ojeda
2024-09-24 18:30   ` Geert Uytterhoeven
2024-09-30 23:50     ` Tony Ambardar [this message]
2024-10-01 15:32     ` Miguel Ojeda
2024-09-24 17:29 ` Andreas Schwab
2024-09-30 23:51   ` Tony Ambardar
2024-10-01 17:45     ` Andreas Schwab

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=Zvs5SJ/dAojRneC8@kodidev-ubuntu \
    --to=tony.ambardar@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=daniel@iogearbox.net \
    --cc=geert@linux-m68k.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ojeda@kernel.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