* Older kernels like 6.6 and lower may not compile with GCC15 due to -std=gnu23
@ 2025-05-01 6:34 Philip Müller
2025-05-01 6:44 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Philip Müller @ 2025-05-01 6:34 UTC (permalink / raw)
To: stable@vger.kernel.org; +Cc: Greg Kroah-Hartman
Hi all,
GCC 15 changed the default C standard dialect from gnu17 to gnu23,
which should not have impacted the kernel because it explicitly requests
the gnu11 standard in the main Makefile. However I see these errors in
older kernels series and some realtime kernels:
5.4, 5.10, 5.15, 6.1, 6.1-rt, 6.6, 6.13-rt
2025-04-30T19:26:10.5226566Z from
arch/x86/realmode/rm/wakemain.c:2:
2025-04-30T19:26:10.5228293Z ./include/linux/stddef.h:11:9: error:
cannot use keyword ‘false’ as enumeration constant
2025-04-30T19:26:10.5229525Z 11 | false = 0,
2025-04-30T19:26:10.5230691Z | ^~~~~
2025-04-30T19:26:10.5232337Z ./include/linux/stddef.h:11:9: note:
‘false’ is a keyword with ‘-std=c23’ onwards
2025-04-30T19:26:10.5234141Z ./include/linux/types.h:30:33: error:
‘bool’ cannot be defined via ‘typedef’
2025-04-30T19:26:10.5235478Z 30 | typedef _Bool bool;
2025-04-30T19:26:10.5236557Z | ^~~~
2025-04-30T19:26:10.5238016Z ./include/linux/types.h:30:33: note: ‘bool’
is a keyword with ‘-std=c23’ onwards
2025-04-30T19:26:10.5239544Z ./include/linux/types.h:30:1: warning:
useless type name in empty declaration
2025-04-30T19:26:10.5241119Z 30 | typedef _Bool bool;
2025-04-30T19:26:10.5242189Z | ^~~~~~~
2025-04-30T19:26:10.5351835Z make[4]: *** [scripts/Makefile.build:250:
arch/x86/realmode/rm/wakemain.o] Error 1
2025-04-30T19:26:10.5362380Z make[3]: ***
[arch/x86/realmode/Makefile:22: arch/x86/realmode/rm/realmode.bin] Error 2
I found this with mips:
https://lkml.iu.edu/hypermail/linux/kernel/2503.2/09285.html
Do we miss some patch not backported?
--
Best, Philip
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Older kernels like 6.6 and lower may not compile with GCC15 due to -std=gnu23
2025-05-01 6:34 Older kernels like 6.6 and lower may not compile with GCC15 due to -std=gnu23 Philip Müller
@ 2025-05-01 6:44 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-01 6:44 UTC (permalink / raw)
To: Philip Müller; +Cc: stable@vger.kernel.org
On Thu, May 01, 2025 at 08:34:36AM +0200, Philip Müller wrote:
> Hi all,
>
> GCC 15 changed the default C standard dialect from gnu17 to gnu23,
> which should not have impacted the kernel because it explicitly requests
> the gnu11 standard in the main Makefile. However I see these errors in older
> kernels series and some realtime kernels:
>
> 5.4, 5.10, 5.15, 6.1, 6.1-rt, 6.6, 6.13-rt
That's to be expected, no one has backported the fixes for this yet.
Someone on the list started to, but then said they would wait for
someone else to do it, see this thread:
https://lore.kernel.org/r/fb4cce81-1e36-4887-a1e0-0cfd1a26693e@googlemail.com
So, until that happens, or one of my build-boxes accidentally gets
upgraded to gcc-15 and I'm forced to do it myself, this is going to stay
as-is.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-01 6:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-01 6:34 Older kernels like 6.6 and lower may not compile with GCC15 due to -std=gnu23 Philip Müller
2025-05-01 6:44 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox