public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable@vger.kernel.org, Sasha Levin <sashal@kernel.org>,
	MPTCP Upstream <mptcp@lists.linux.dev>,
	Nathan Chancellor <nathan@kernel.org>,
	Kostadin Shishmanov <kostadinshishmanov@protonmail.com>,
	Jakub Jelinek <jakub@redhat.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Ingo Molnar <mingo@kernel.org>,
	"H. Peter Anvin (Intel)" <hpa@zytor.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Nathan Chancellor <natechancellor@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH 5.4.y 0/5] v5.4: fix build with GCC 15
Date: Mon, 20 Oct 2025 17:59:09 +0200	[thread overview]
Message-ID: <a01bc438-8f27-4bf8-8bbe-05801fd3157a@kernel.org> (raw)
In-Reply-To: <2025102004-throwaway-compare-75c2@gregkh>

Hi Greg,

Thank you for your reply!

On 20/10/2025 15:29, Greg Kroah-Hartman wrote:
> On Fri, Oct 17, 2025 at 07:33:37PM +0200, Matthieu Baerts (NGI0) wrote:
>> Two backports linked to build issues with GCC 15 have failed in this
>> version:
>>
>>   - ee2ab467bddf ("x86/boot: Use '-std=gnu11' to fix build with GCC 15")
>>   - 8ba14d9f490a ("efi: libstub: Use '-std=gnu11' to fix build with GCC 15")
>>
>> Conflicts have been solved, and described.
>>
>> After that, this kernel version still didn't build with GCC 15:
>>
>>   In file included from include/uapi/linux/posix_types.h:5,
>>                    from include/uapi/linux/types.h:14,
>>                    from include/linux/types.h:6,
>>                    from arch/x86/realmode/rm/wakeup.h:11,
>>                    from arch/x86/realmode/rm/wakemain.c:2:
>>   include/linux/stddef.h:11:9: error: cannot use keyword 'false' as enumeration constant
>>      11 |         false   = 0,
>>         |         ^~~~~
>>   include/linux/stddef.h:11:9: note: 'false' is a keyword with '-std=c23' onwards
>>   include/linux/types.h:30:33: error: 'bool' cannot be defined via 'typedef'
>>      30 | typedef _Bool                   bool;
>>         |                                 ^~~~
>>   include/linux/types.h:30:33: note: 'bool' is a keyword with '-std=c23' onwards
>>   include/linux/types.h:30:1: warning: useless type name in empty declaration
>>      30 | typedef _Bool                   bool;
>>         | ^~~~~~~
>>
>> I initially fixed this by adding -std=gnu11 in arch/x86/Makefile, then I
>> realised this fix was already done in an upstream commit, created before
>> the GCC 15 release and not mentioning the error I had. This is patch 3.
>>
>> When I was investigating my error, I noticed other commits were already
>> backported to stable versions. They were all adding -std=gnu11 in
>> different Makefiles. In their commit message, they were mentioning
>> 'gnu11' was picked to use the same as the one from the main Makefile.
>> But this is not the case in this kernel version. Patch 4 fixes that.
>>
>> Finally, I noticed extra warnings I didn't have in v5.10. Patch 5 fixes
>> that.
> 
> 5.4 is only going to be alive for about 1 more month, so I really don't
> think trying to "downgrade" things here is worth it at all.  Anyone
> still stuck on this old, obsolete, and very insecure kernel tree isn't
> going to be attempting to build it using the bleeding edge gcc release :)

Fine by me for v5.4. I only suggested these very small patches because I
had issues with GCC 15 when building v5.15, and I did the small work for
older kernels.

Please note that the two last patches are not directly linked to GCC 15:

- Patch 4/5 fixes the possible bump to C11 standard for some arch. So if
I'm not mistaken, it changes the minimal requirements from GCC 4.6 to
GCC 4.9. Is it not an issue for such old kernel?
(Note: this patch depends on the parents ones, but can be adapted)

- Patch 5/5 fixes a warning I saw, but I don't know from which version
GCC complains about that.

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


      reply	other threads:[~2025-10-20 15:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-17 17:33 [PATCH 5.4.y 0/5] v5.4: fix build with GCC 15 Matthieu Baerts (NGI0)
2025-10-17 17:33 ` [PATCH 5.4.y 1/5] x86/boot: Use '-std=gnu11' to " Matthieu Baerts (NGI0)
2025-10-17 17:33 ` [PATCH 5.4.y 2/5] efi: libstub: " Matthieu Baerts (NGI0)
2025-10-17 17:33 ` [PATCH 5.4.y 3/5] x86/boot: Compile boot code with -std=gnu11 too Matthieu Baerts (NGI0)
2025-10-17 17:33 ` [PATCH 5.4.y 4/5] arch: back to -std=gnu89 in < v5.18 Matthieu Baerts (NGI0)
2025-10-17 17:33 ` [PATCH 5.4.y 5/5] kernel/profile.c: use cpumask_available to check for NULL cpumask Matthieu Baerts (NGI0)
2025-10-20 13:29 ` [PATCH 5.4.y 0/5] v5.4: fix build with GCC 15 Greg Kroah-Hartman
2025-10-20 15:59   ` Matthieu Baerts [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=a01bc438-8f27-4bf8-8bbe-05801fd3157a@kernel.org \
    --to=matttbe@kernel.org \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=jakub@redhat.com \
    --cc=kostadinshishmanov@protonmail.com \
    --cc=mingo@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=natechancellor@gmail.com \
    --cc=nathan@kernel.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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