diff mbox series

[v2] powerpc/boot: Fix build with gcc 15

Message ID 20250314092528.15506-1-msuchanek@suse.de (mailing list archive)
State Superseded
Headers show
Series [v2] powerpc/boot: Fix build with gcc 15 | expand

Commit Message

Michal Suchánek March 14, 2025, 9:25 a.m. UTC
Similar to x86 the ppc boot code does not build with GCC 15.

Copy the fix from
commit ee2ab467bddf ("x86/boot: Use '-std=gnu11' to fix build with GCC 15")

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
v2: Move the fix outside of ifdef to apply to all subarchitectures
---
 arch/powerpc/boot/Makefile | 2 ++
 1 file changed, 2 insertions(+)

Comments

Michael Ellerman March 29, 2025, 9:11 a.m. UTC | #1
Michal Suchanek <msuchanek@suse.de> writes:
> Similar to x86 the ppc boot code does not build with GCC 15.
>
> Copy the fix from
> commit ee2ab467bddf ("x86/boot: Use '-std=gnu11' to fix build with GCC 15")
>
> Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> ---
> v2: Move the fix outside of ifdef to apply to all subarchitectures
> ---
>  arch/powerpc/boot/Makefile | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
> index 1ff6ad4f6cd2..210c60d3d4cc 100644
> --- a/arch/powerpc/boot/Makefile
> +++ b/arch/powerpc/boot/Makefile
> @@ -32,6 +32,8 @@ else
>      BOOTAR := $(AR)
>  endif
>  
> +BOOTTARGETFLAGS	+= -std=gnu11
> +
 
BOOTTARGETFLAGS gets added to CFLAGS and AFLAGS.

I think -std=gnu11 should only be added to CFLAGS. In which case it'd be
better to add it directly to BOOTCFLAGS further down.

cheers
diff mbox series

Patch

diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 1ff6ad4f6cd2..210c60d3d4cc 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -32,6 +32,8 @@  else
     BOOTAR := $(AR)
 endif
 
+BOOTTARGETFLAGS	+= -std=gnu11
+
 ifdef CONFIG_PPC64_BOOT_WRAPPER
 BOOTTARGETFLAGS	+= -m64
 BOOTTARGETFLAGS	+= -mabi=elfv2