Linux kernel -stable discussions
 help / color / mirror / Atom feed
* Request to backport b3bee1e7c3f2b1b77182302c7b2131c804175870 (x86/boot: Compile boot code with -std=gnu11 too)
@ 2025-05-26 10:59 Hendrik Donner
  2025-05-26 12:23 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Hendrik Donner @ 2025-05-26 10:59 UTC (permalink / raw)
  To: stable

Hello,

with gcc 15.1.1 i see the following build issue on 6.6.91:

   CC      arch/x86/boot/a20.o
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/boot/boot.h:22,
                  from arch/x86/boot/a20.c:14:
./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:35:33: error: 'bool' cannot be defined via 'typedef'
    35 | typedef _Bool                   bool;
       |                                 ^~~~
./include/linux/types.h:35:33: note: 'bool' is a keyword with '-std=c23' 
onwards
./include/linux/types.h:35:1: warning: useless type name in empty 
declaration
    35 | typedef _Bool                   bool;
       | ^~~~~~~
make[2]: *** [scripts/Makefile.build:243: arch/x86/boot/a20.o] Error 1
make[1]: *** [arch/x86/Makefile:284: bzImage] Error 2

Fixed by b3bee1e7c3f2b1b77182302c7b2131c804175870 (x86/boot: Compile 
boot code with -std=gnu11 too), which hasn't been backported yet.

Should probably go into all stable trees.

Regards,
Hendrik

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Request to backport b3bee1e7c3f2b1b77182302c7b2131c804175870 (x86/boot: Compile boot code with -std=gnu11 too)
  2025-05-26 10:59 Request to backport b3bee1e7c3f2b1b77182302c7b2131c804175870 (x86/boot: Compile boot code with -std=gnu11 too) Hendrik Donner
@ 2025-05-26 12:23 ` Greg KH
  2025-05-26 13:54   ` Hendrik Donner
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2025-05-26 12:23 UTC (permalink / raw)
  To: Hendrik Donner; +Cc: stable

On Mon, May 26, 2025 at 12:59:20PM +0200, Hendrik Donner wrote:
> Hello,
> 
> with gcc 15.1.1 i see the following build issue on 6.6.91:
> 
>   CC      arch/x86/boot/a20.o
> 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/boot/boot.h:22,
>                  from arch/x86/boot/a20.c:14:
> ./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:35:33: error: 'bool' cannot be defined via 'typedef'
>    35 | typedef _Bool                   bool;
>       |                                 ^~~~
> ./include/linux/types.h:35:33: note: 'bool' is a keyword with '-std=c23'
> onwards
> ./include/linux/types.h:35:1: warning: useless type name in empty
> declaration
>    35 | typedef _Bool                   bool;
>       | ^~~~~~~
> make[2]: *** [scripts/Makefile.build:243: arch/x86/boot/a20.o] Error 1
> make[1]: *** [arch/x86/Makefile:284: bzImage] Error 2
> 
> Fixed by b3bee1e7c3f2b1b77182302c7b2131c804175870 (x86/boot: Compile boot
> code with -std=gnu11 too), which hasn't been backported yet.
> 
> Should probably go into all stable trees.z

Is this the only change that is needed to get gcc15 working on this
kernel tree?  What about newer kernel branches, they seem to be failing
on gcc15 still, which implies that 6.6.y still needs more changes,
right?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Request to backport b3bee1e7c3f2b1b77182302c7b2131c804175870 (x86/boot: Compile boot code with -std=gnu11 too)
  2025-05-26 12:23 ` Greg KH
@ 2025-05-26 13:54   ` Hendrik Donner
  0 siblings, 0 replies; 3+ messages in thread
From: Hendrik Donner @ 2025-05-26 13:54 UTC (permalink / raw)
  To: Greg KH; +Cc: stable


Hello,

On 26.05.25 14:23, Greg KH wrote:
> On Mon, May 26, 2025 at 12:59:20PM +0200, Hendrik Donner wrote:
>> Hello,
>>
>> with gcc 15.1.1 i see the following build issue on 6.6.91:
>>
>>    CC      arch/x86/boot/a20.o
>> 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/boot/boot.h:22,
>>                   from arch/x86/boot/a20.c:14:
>> ./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:35:33: error: 'bool' cannot be defined via 'typedef'
>>     35 | typedef _Bool                   bool;
>>        |                                 ^~~~
>> ./include/linux/types.h:35:33: note: 'bool' is a keyword with '-std=c23'
>> onwards
>> ./include/linux/types.h:35:1: warning: useless type name in empty
>> declaration
>>     35 | typedef _Bool                   bool;
>>        | ^~~~~~~
>> make[2]: *** [scripts/Makefile.build:243: arch/x86/boot/a20.o] Error 1
>> make[1]: *** [arch/x86/Makefile:284: bzImage] Error 2
>>
>> Fixed by b3bee1e7c3f2b1b77182302c7b2131c804175870 (x86/boot: Compile boot
>> code with -std=gnu11 too), which hasn't been backported yet.
>>
>> Should probably go into all stable trees.z
> 
> Is this the only change that is needed to get gcc15 working on this
> kernel tree?  What about newer kernel branches, they seem to be failing
> on gcc15 still, which implies that 6.6.y still needs more changes,
> right?
> 

that is the only fix i need on 6.6.x with the kernel configuration i
test and build for an x86_64 production environment. I also build arm32
and aarch64 kernel configuration for a few embedded systems with gcc
15.1.1 natively and cross, without issues. But according to the git
history gcc 15 related fixes have already been integrated over the last
few years into mainline and stable trees, so shouldn't be too much left.
The default KBUILD_CFLAGS include --std=gnu11 in the toplevel Makefile,
which takes care of a lot.

That said i haven't done extensive testing with other kernel 
configurations, just what our internal CI is building.

Regards,
Hendrik

> thanks,
> 
> greg k-h


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-26 13:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-26 10:59 Request to backport b3bee1e7c3f2b1b77182302c7b2131c804175870 (x86/boot: Compile boot code with -std=gnu11 too) Hendrik Donner
2025-05-26 12:23 ` Greg KH
2025-05-26 13:54   ` Hendrik Donner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox