From: "Michal Suchánek" <msuchanek@suse.de>
To: Mukesh Kumar Chaurasiya <mchauras@linux.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Naveen N Rao <naveen@kernel.org>,
Masahiro Yamada <masahiroy@kernel.org>,
Nicolas Schier <nicolas@fjasle.eu>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc/boot: Fix build with gcc 15
Date: Thu, 17 Apr 2025 13:02:05 +0200 [thread overview]
Message-ID: <aADfrUcNqBejcdrR@kitsune.suse.cz> (raw)
In-Reply-To: <fo7xb3bqk5h57mqgfrnyfpweitkr2l5vk3tomu6zgxgqlivwpt@afm2n3c2sxke>
On Thu, Apr 17, 2025 at 11:37:09AM +0530, Mukesh Kumar Chaurasiya wrote:
> On Fri, Mar 07, 2025 at 10:20:52AM +0100, Michal Suchanek wrote:
> > Similar to x86 the ppc boot code does not build with GCC 15.
> >
> > Copy the fix from
> > commit ee2ab467bddf ("x86/boot: Use '-std=gnu11' to fix build with GCC 15")
> >
> > Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> > ---
> > arch/powerpc/boot/Makefile | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
> > index 1ff6ad4f6cd2..e6b35699c049 100644
> > --- a/arch/powerpc/boot/Makefile
> > +++ b/arch/powerpc/boot/Makefile
> > @@ -33,6 +33,7 @@ else
> > endif
> >
> > ifdef CONFIG_PPC64_BOOT_WRAPPER
> > +BOOTTARGETFLAGS += -std=gnu11
> > BOOTTARGETFLAGS += -m64
> > BOOTTARGETFLAGS += -mabi=elfv2
> > ifdef CONFIG_PPC64_ELF_ABI_V2
> > --
> > 2.47.1
> >
> There's another patch which fixes this problem by version comparison.
> https://lore.kernel.org/all/20250323163607.537270-2-misanjum@linux.ibm.com/
>
> In my opinion this is a better solution as it will use the features of latest
> compiler.
No it's not a better solution. It's documented that the kernel is built
with the GNU dialect of ISO C11. When a file is not compiled with the
documented C dialect that's a bug.
If newer C dialect features are desirable then they should be enabled
consistently across the tree, not individually for a few files used in
boot code.
Thanks
Michal
next prev parent reply other threads:[~2025-04-17 11:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-07 9:20 [PATCH] powerpc/boot: Fix build with gcc 15 Michal Suchanek
2025-03-08 10:09 ` Nysal Jan K.A.
2025-03-10 8:40 ` Michal Suchánek
2025-03-14 9:25 ` [PATCH v2] " Michal Suchanek
2025-03-29 9:11 ` Michael Ellerman
2025-03-31 10:57 ` [PATCH v3] " Michal Suchanek
2025-04-17 4:39 ` Venkat Rao Bagalkote
2025-05-05 12:14 ` Amit Machhiwal
2025-05-14 4:03 ` Madhavan Srinivasan
2025-04-17 6:07 ` [PATCH] " Mukesh Kumar Chaurasiya
2025-04-17 11:02 ` Michal Suchánek [this message]
2025-04-21 8:26 ` Mukesh Kumar Chaurasiya
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=aADfrUcNqBejcdrR@kitsune.suse.cz \
--to=msuchanek@suse.de \
--cc=bhelgaas@google.com \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=masahiroy@kernel.org \
--cc=mchauras@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=naveen@kernel.org \
--cc=nicolas@fjasle.eu \
--cc=npiggin@gmail.com \
/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 NNTP newsgroup(s).