2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/arch/x86/boot/compressed
Nathan Chancellor ee2ab467bd x86/boot: Use '-std=gnu11' to fix build with GCC 15
GCC 15 changed the default C standard version to C23, which should not
have impacted the kernel because it requests the gnu11 standard via
'-std=' in the main Makefile. However, the x86 compressed boot Makefile
uses its own set of KBUILD_CFLAGS without a '-std=' value (i.e., using
the default), resulting in errors from the kernel's definitions of bool,
true, and false in stddef.h, which are reserved keywords under C23.

  ./include/linux/stddef.h:11:9: error: expected identifier before ‘false’
     11 |         false   = 0,
  ./include/linux/types.h:35:33: error: two or more data types in declaration specifiers
     35 | typedef _Bool                   bool;

Set '-std=gnu11' in the x86 compressed boot Makefile to resolve the
error and consistently use the same C standard version for the entire
kernel.

Closes: https://lore.kernel.org/4OAhbllK7x4QJGpZjkYjtBYNLd_2whHx9oFiuZcGwtVR4hIzvduultkgfAIRZI3vQpZylu7Gl929HaYFRGeMEalWCpeMzCIIhLxxRhq4U-Y=@protonmail.com/
Closes: https://lore.kernel.org/Z4467umXR2PZ0M1H@tucnak/
Reported-by: Kostadin Shishmanov <kostadinshishmanov@protonmail.com>
Reported-by: Jakub Jelinek <jakub@redhat.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Cc:stable@vger.kernel.org
Link: https://lore.kernel.org/all/20250121-x86-use-std-consistently-gcc-15-v1-1-8ab0acf645cb%40kernel.org
2025-01-30 09:59:24 -08:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
acpi.c x86: Do not include <asm/bootparam.h> in several files 2024-01-30 15:17:24 +01:00
cmdline.c x86: Do not include <asm/bootparam.h> in several files 2024-01-30 15:17:24 +01:00
cpuflags.c x86/sev-es: Check required CPU features for SEV-ES 2020-09-10 21:49:25 +02:00
early_serial_console.c x86/boot: Put globals that are accessed early into the .data section 2022-04-20 20:10:54 +02:00
efi_mixed.S x86/efistub: Add missing boot_params for mixed mode compat entry 2024-03-26 08:45:27 +01:00
efi.c x86: Do not include <asm/bootparam.h> in several files 2024-01-30 15:17:24 +01:00
efi.h x86/setup: Move internal setup_data structures into setup_data.h 2024-01-30 15:17:12 +01:00
error.c x86/purgatory: Include header for warn() declaration 2023-08-03 16:37:18 +02:00
error.h x86/purgatory: Include header for warn() declaration 2023-08-03 16:37:18 +02:00
head_32.S x86/efistub: Avoid legacy decompressor when doing EFI boot 2023-08-07 21:07:43 +02:00
head_64.S x86/boot/64: Clear most of CR4 in startup_64(), except PAE, MCE and LA57 2024-04-11 15:37:17 +02:00
ident_map_64.c - Sumanth Korikkar has taught s390 to allocate hotplug-time page frames 2024-03-14 17:43:30 -07:00
idt_64.c x86/boot: Ignore NMIs during very early boot 2023-11-30 09:55:40 +01:00
idt_handlers_64.S x86/boot: Ignore NMIs during very early boot 2023-11-30 09:55:40 +01:00
kaslr.c x86/boot/compressed: Remove unused header includes from kaslr.c 2024-12-02 16:44:32 +01:00
kernel_info.S x86/boot: Introduce setup_indirect 2019-11-12 16:21:15 +01:00
Makefile x86/boot: Use '-std=gnu11' to fix build with GCC 15 2025-01-30 09:59:24 -08:00
mem_encrypt.S x86/boot/compressed: Only build mem_encrypt.S if AMD_MEM_ENCRYPT=y 2022-11-24 08:57:41 +01:00
mem.c arch/x86: Fix typos 2024-01-03 11:46:22 +01:00
misc.c x86/boot: Skip video memory access in the decompressor for SEV-ES/SNP 2024-10-28 16:54:16 +01:00
misc.h mm: rework accept memory helpers 2024-09-01 20:26:07 -07:00
mkpiggy.c x86/boot: Remove run-time relocations from head_{32,64}.S 2020-08-14 12:52:35 +02:00
pgtable_64.c x86: Do not include <asm/bootparam.h> in several files 2024-01-30 15:17:24 +01:00
pgtable.h x86/decompressor: Pass pgtable address to trampoline directly 2023-08-07 20:49:26 +02:00
sev.c x86/sev: Add the Secure TSC feature for SNP guests 2025-01-09 10:21:56 +01:00
sev.h x86/sev: Add SNP-specific unaccepted memory support 2023-06-06 18:31:37 +02:00
string.c x86/boot: Provide KASAN compatible aliases for string routines 2019-05-24 08:44:16 +02:00
tdcall.S x86/boot: Port I/O: Add decompression-time support for TDX 2022-04-07 08:27:52 -07:00
tdx-shared.c x86/tdx: Add unaccepted memory support 2023-06-06 18:25:57 +02:00
tdx.c x86/tdx: Remove 'struct tdx_hypercall_args' 2023-09-12 16:30:14 -07:00
tdx.h x86/tdx: Detect TDX at early kernel decompression time 2022-04-07 08:27:51 -07:00
vmlinux.lds.S x86/boot: Increase section and file alignment to 4k/512 2023-09-17 19:48:44 +02:00