Skip to content

Commit 0f4ae7c

Browse files
krajtsbogend
authored andcommitted
mips: Add -std= flag specified in KBUILD_CFLAGS to vdso CFLAGS
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, mips/vdso code uses its own CFLAGS without a '-std=' value, which break with this dialect change because of the kernel's own definitions of bool, false, and true conflicting with the C23 reserved keywords. 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 Add -std as specified in KBUILD_CFLAGS to the decompressor and purgatory CFLAGS to eliminate these errors and make the C standard version of these areas match the rest of the kernel. Signed-off-by: Khem Raj <[email protected]> Cc: [email protected] Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 6d223b8 commit 0f4ae7c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/mips/vdso/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ endif
2727
# offsets.
2828
cflags-vdso := $(ccflags-vdso) \
2929
$(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \
30+
$(filter -std=%,$(KBUILD_CFLAGS)) \
3031
-O3 -g -fPIC -fno-strict-aliasing -fno-common -fno-builtin -G 0 \
3132
-mrelax-pic-calls $(call cc-option, -mexplicit-relocs) \
3233
-fno-stack-protector -fno-jump-tables -DDISABLE_BRANCH_PROFILING \

0 commit comments

Comments
 (0)