From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Matthieu Baerts <matttbe@kernel.org>
Cc: stable@vger.kernel.org, Sasha Levin <sashal@kernel.org>,
MPTCP Upstream <mptcp@lists.linux.dev>,
Nathan Chancellor <nathan@kernel.org>,
Ard Biesheuvel <ardb@kernel.org>,
Alexey Dobriyan <adobriyan@gmail.com>,
Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH 5.15.y 2/3] arch: back to -std=gnu89 in < v5.18
Date: Mon, 3 Nov 2025 10:41:14 +0900 [thread overview]
Message-ID: <2025110343-unbiased-hydration-f828@gregkh> (raw)
In-Reply-To: <a23607ec-e1a2-45b6-bc80-01deec03d6f0@kernel.org>
On Mon, Oct 20, 2025 at 05:58:12PM +0200, Matthieu Baerts wrote:
> Hi Greg,
>
> On 20/10/2025 15:30, Greg Kroah-Hartman wrote:
> > On Fri, Oct 17, 2025 at 06:24:01PM +0200, Matthieu Baerts (NGI0) wrote:
> >> Recent fixes have been backported to < v5.18 to fix build issues with
> >> GCC 5.15. They all force -std=gnu11 in the CFLAGS, "because [the kernel]
> >> requests the gnu11 standard via '-std=' in the main Makefile".
> >>
> >> This is true for >= 5.18 versions, but not before. This switch to
> >> -std=gnu11 has been done in commit e8c07082a810 ("Kbuild: move to
> >> -std=gnu11").
> >>
> >> For a question of uniformity, force -std=gnu89, similar to what is done
> >> in the main Makefile.
> >>
> >> Note: the fixes tags below refers to upstream commits, but this fix is
> >> only for kernels not having commit e8c07082a810 ("Kbuild: move to
> >> -std=gnu11").
> >>
> >> Fixes: 7cbb015e2d3d ("parisc: fix building with gcc-15")
> >> Fixes: 3b8b80e99376 ("s390: Add '-std=gnu11' to decompressor and purgatory CFLAGS")
> >> Fixes: b3bee1e7c3f2 ("x86/boot: Compile boot code with -std=gnu11 too")
> >> Fixes: ee2ab467bddf ("x86/boot: Use '-std=gnu11' to fix build with GCC 15")
> >> Fixes: 8ba14d9f490a ("efi: libstub: Use '-std=gnu11' to fix build with GCC 15")
> >> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> >> ---
> >> Note:
> >> An alternative is to backport commit e8c07082a810 ("Kbuild: move to
> >> -std=gnu11"), but I guess we might not want to do that for stable, as
> >> it might introduce new warnings.
> >
> > I would rather do that, as that would allow us to make things align up
> > and be easier to support over the next two years that this kernel needs
> > to be alive for. How much work would that entail?
>
> Good question. I'm not an expert in this area, but I just did a quick
> test: I backported commit e8c07082a810 ("Kbuild: move to -std=gnu11")
> and its parent commit 4d94f910e79a ("Kbuild: use
> -Wdeclaration-after-statement"). A build with 'make allyesconfig' and
> GCC 5.15 looks OK to me, no warnings.
>
> But when looking a bit around, I noticed these patches have already been
> suggested to be backported to v5.15 in 2023, but they got removed --
> except the doc update, see patch 3/3 -- because they were causing build
> issues with GCC 8 and 12, see:
>
> https://lore.kernel.org/a2fbbaa2-51d2-4a8c-b032-5331e72cd116@linaro.org
>
> I didn't try to reproduce the issues, but maybe we can re-add them to
> the v5.15 queue, and ask the CIs to test that?
>
> Note that even if we do that, the first patch will still be needed to
> have GCC 15 support in v5.15.
Ok, 5.15.y and 5.10.y will be alive for a while, so I'll go queue these
up now as odds are, I'll end up hitting this issue myself :)
thanks for the patches!
greg k-h
next prev parent reply other threads:[~2025-11-03 1:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 16:23 [PATCH 5.15.y 0/3] v5.15: fix build with GCC 15 Matthieu Baerts (NGI0)
2025-10-17 16:24 ` [PATCH 5.15.y 1/3] x86/boot: Compile boot code with -std=gnu11 too Matthieu Baerts (NGI0)
2025-11-03 1:38 ` Patch "x86/boot: Compile boot code with -std=gnu11 too" has been added to the 5.15-stable tree gregkh
2025-10-17 16:24 ` [PATCH 5.15.y 2/3] arch: back to -std=gnu89 in < v5.18 Matthieu Baerts (NGI0)
2025-10-20 13:30 ` Greg Kroah-Hartman
2025-10-20 15:58 ` Matthieu Baerts
2025-11-03 1:41 ` Greg Kroah-Hartman [this message]
2025-11-03 1:38 ` Patch "arch: back to -std=gnu89 in < v5.18" has been added to the 5.15-stable tree gregkh
2025-10-17 16:24 ` [PATCH 5.15.y 3/3] Revert "docs/process/howto: Replace C89 with C11" Matthieu Baerts (NGI0)
2025-11-03 1:38 ` Patch "Revert "docs/process/howto: Replace C89 with C11"" has been added to the 5.15-stable tree gregkh
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=2025110343-unbiased-hydration-f828@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=adobriyan@gmail.com \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=sashal@kernel.org \
--cc=stable@vger.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