Messages in this thread | | | From | Arnd Bergmann <> | Date | Fri, 8 Jul 2022 22:06:46 +0200 | Subject | Re: [PATCH] powerpc: e500: Fix compilation with gcc e500 compiler |
| |
On Fri, Jul 8, 2022 at 7:14 PM Pali Rohár <pali@kernel.org> wrote: > > -ifeq ($(HAS_BIARCH),y) > -ifeq ($(CROSS32_COMPILE),) > -ifdef CONFIG_PPC32 > -# These options will be overridden by any -mcpu option that the CPU > -# or platform code sets later on the command line, but they are needed > -# to set a sane 32-bit cpu target for the 64-bit cross compiler which > -# may default to the wrong ISA. > -KBUILD_CFLAGS += -mcpu=powerpc > -KBUILD_AFLAGS += -mcpu=powerpc > -endif > -endif
I think to remove these, we first need to ensure that /some/ option is set for any of the CPU options. > > -ifdef CONFIG_PPC32 > -ifdef CONFIG_PPC_E500MC > -CFLAGS-y += $(call cc-option,-mcpu=e500mc,-mcpu=powerpc) > -else > +CFLAGS-$(CONFIG_PPC_E500MC) += $(call cc-option,-mcpu=e500mc,-mcpu=powerpc) > CFLAGS-$(CONFIG_E500) += $(call cc-option,-mcpu=8540 -msoft-float,-mcpu=powerpc) > -endif > -endif >
And this part will not do what you want because CONFIG_PPC_E500MC is only set when CONFIG_E500 is also set, so the -mcpu=e500mc option always gets overridden by -mcpu=8540
Arnd
| |