lkml.org 
[lkml]   [2022]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2022-12-17 02:10    [W:0.056 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site