|
| 1 | +From ed8a28bfd78e90ae9fe27b6eafe1affd93a80f71 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Sergio Lopez < [email protected]> |
| 3 | +Date: Mon, 20 Jan 2025 16:38:26 +0100 |
| 4 | +Subject: [PATCH 23/27] arch/x86,efi/libstub: use -std=gnu11 flag |
| 5 | + |
| 6 | +GCC 15 defaults to gnu23, but the kernel is not compatible to that |
| 7 | +standard. Other parts of the kernel use -std=gnu11, so let's do the same |
| 8 | +in arch/x86/boot/compressed and efi/libstub. |
| 9 | + |
| 10 | +Signed-off-by: Sergio Lopez < [email protected]> |
| 11 | +--- |
| 12 | + arch/x86/boot/compressed/Makefile | 2 +- |
| 13 | + drivers/firmware/efi/libstub/Makefile | 2 +- |
| 14 | + 2 files changed, 2 insertions(+), 2 deletions(-) |
| 15 | + |
| 16 | +diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile |
| 17 | +index f2051644de94..5c8b86dfb1ea 100644 |
| 18 | +--- a/arch/x86/boot/compressed/Makefile |
| 19 | ++++ b/arch/x86/boot/compressed/Makefile |
| 20 | +@@ -24,7 +24,7 @@ targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \ |
| 21 | + # case of cross compiling, as it has the '--target=' flag, which is needed to |
| 22 | + # avoid errors with '-march=i386', and future flags may depend on the target to |
| 23 | + # be valid. |
| 24 | +-KBUILD_CFLAGS := -m$(BITS) -O2 $(CLANG_FLAGS) |
| 25 | ++KBUILD_CFLAGS := -std=gnu11 -m$(BITS) -O2 $(CLANG_FLAGS) |
| 26 | + KBUILD_CFLAGS += -fno-strict-aliasing -fPIE |
| 27 | + KBUILD_CFLAGS += -Wundef |
| 28 | + KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING |
| 29 | +diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile |
| 30 | +index ed4e8ddbe76a..78cdf380ffcc 100644 |
| 31 | +--- a/drivers/firmware/efi/libstub/Makefile |
| 32 | ++++ b/drivers/firmware/efi/libstub/Makefile |
| 33 | +@@ -36,7 +36,7 @@ cflags-$(CONFIG_LOONGARCH) += -fpie |
| 34 | + cflags-$(CONFIG_EFI_PARAMS_FROM_FDT) += -I$(srctree)/scripts/dtc/libfdt |
| 35 | + |
| 36 | + KBUILD_CFLAGS := $(subst $(CC_FLAGS_FTRACE),,$(cflags-y)) \ |
| 37 | +- -Os -DDISABLE_BRANCH_PROFILING \ |
| 38 | ++ -std=gnu11 -Os -DDISABLE_BRANCH_PROFILING \ |
| 39 | + -include $(srctree)/include/linux/hidden.h \ |
| 40 | + -D__NO_FORTIFY \ |
| 41 | + -ffreestanding \ |
| 42 | +-- |
| 43 | +2.45.2 |
| 44 | + |
0 commit comments