Re: [PATCH] powerpc: e500: Fix compilation with gcc e500 compiler

From: Arnd Bergmann
Date: Mon Jul 04 2022 - 09:24:18 EST


On Mon, Jul 4, 2022 at 3:13 PM Pali Rohár <pali@xxxxxxxxxx> wrote:
> On Monday 04 July 2022 14:07:10 Arnd Bergmann wrote:

> > CFLAGS_CPU-$(CONFIG_PPC_BOOK3S_32) := -mcpu=powerpc
> > CFLAGS_CPU-$(CONFIG_PPC_85xx) := -mcpu=8540
> > CFLAGS_CPU-$(CONFIG_PPC8xx) := -mcpu=860
> > CFLAGS_CPU-$(CONFIG_PPC44x) := -mcpu=440
> > CFLAGS_CPU-$(CONFIG_PPC40x) := -mcpu=405
> > ifdef CONFIG_CPU_LITTLE_ENDIAN
> > CFLAGS_CPU-$(CONFIG_BOOK3S_64) := -mcpu=power8
> > else
> > CFLAGS_CPU-$(CONFIG_BOOK3S_64) := -mcpu=power5
> > endif
> > CFLAGS_CPU-$(CONFIG_BOOK3E_64) := -mcpu=powerpc64
>
> Yes, this is something I would expect that in Makefile should be.
>
> But what to do with fallback value?

Most of the fallback values can just be removed because we don't support
building with gcc versions older than 5.1.0 any more. The only one
that I think still needs a fallback is mtune=power9, which requires gcc-6.1
or higher. CONFIG_POWER9_CPU could similarly use a
"depends on GCC_VERSION > 60100".

Arnd