Messages in this thread | | | Date | Sat, 17 Dec 2022 02:10:21 +0100 | From | Pali Rohár <> | Subject | Re: [PATCH v2] powerpc: Pass correct CPU reference to assembler |
| |
On Friday 16 December 2022 09:35:50 Christophe Leroy wrote: > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile > index bf5f0a998273..528452ce80b4 100644 > --- a/arch/powerpc/Makefile > +++ b/arch/powerpc/Makefile > @@ -201,18 +201,20 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables > # often slow when they are implemented at all > KBUILD_CFLAGS += $(call cc-option,-mno-string) > > -cpu-as-$(CONFIG_40x) += -Wa,-m405 > -cpu-as-$(CONFIG_44x) += -Wa,-m440 > cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec) > -cpu-as-$(CONFIG_PPC_E500) += -Wa,-me500 > + > +ifeq ($(CONFIG_TARGET_CPU),powerpc) > +cpu-as-$(CONFIG_TARGET_CPU_BOOL) += -Wa,-mppc > +else > +cpu-as-$(CONFIG_TARGET_CPU_BOOL) += -Wa,-m$(CONFIG_TARGET_CPU) > +endif
This change will break compilation for e500 cores. Kconfig sets CONFIG_TARGET_CPU to string "8540" for e500 cores because gcc uses -mcpu=8540 for e500 but GNU AS uses -me500 for e500 cores.
| |