[PATCH] powerpc/boot: Fix build with gcc 15
Mukesh Kumar Chaurasiya
mchauras at linux.ibm.com
Thu Apr 17 16:07:09 AEST 2025
On Fri, Mar 07, 2025 at 10:20:52AM +0100, Michal Suchanek wrote:
> 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 at suse.de>
> ---
> arch/powerpc/boot/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
> index 1ff6ad4f6cd2..e6b35699c049 100644
> --- a/arch/powerpc/boot/Makefile
> +++ b/arch/powerpc/boot/Makefile
> @@ -33,6 +33,7 @@ else
> endif
>
> ifdef CONFIG_PPC64_BOOT_WRAPPER
> +BOOTTARGETFLAGS += -std=gnu11
> BOOTTARGETFLAGS += -m64
> BOOTTARGETFLAGS += -mabi=elfv2
> ifdef CONFIG_PPC64_ELF_ABI_V2
> --
> 2.47.1
>
There's another patch which fixes this problem by version comparison.
https://lore.kernel.org/all/20250323163607.537270-2-misanjum@linux.ibm.com/
In my opinion this is a better solution as it will use the features of latest
compiler.
More information about the Linuxppc-dev
mailing list