aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/Makefile
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2018-06-07 10:10:18 +0000
committerMichael Ellerman <mpe@ellerman.id.au>2018-08-08 00:32:36 +1000
commitcc62d20ce4ca4fe73a09d571144b29d43478cb9c (patch)
treeff7526650cc80304938188bee01060473c54d9b7 /arch/powerpc/Makefile
parentpowerpc/Makefiles: Convert ifeq to ifdef where possible (diff)
downloadlinux-dev-cc62d20ce4ca4fe73a09d571144b29d43478cb9c.tar.xz
linux-dev-cc62d20ce4ca4fe73a09d571144b29d43478cb9c.zip
powerpc: Make CPU selection logic generic in Makefile
At the time being, when adding a new CPU for selection, both Kconfig.cputype and Makefile have to be modified. This patch moves into Kconfig.cputype the name of the CPU to me passed to the -mcpu= argument. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Reviewed-by: Nicholas Piggin <npiggin@gmail.com> [mpe: Rename the option to TARGET_CPU to echo the gcc documentation] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/Makefile')
-rw-r--r--arch/powerpc/Makefile8
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index ccb64750eb6a..828efa7c2a35 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -164,13 +164,7 @@ ifdef CONFIG_MPROFILE_KERNEL
CC_FLAGS_FTRACE := -pg -mprofile-kernel
endif
-CFLAGS-$(CONFIG_CELL_CPU) += $(call cc-option,-mcpu=cell)
-CFLAGS-$(CONFIG_POWER5_CPU) += $(call cc-option,-mcpu=power5)
-CFLAGS-$(CONFIG_POWER6_CPU) += $(call cc-option,-mcpu=power6)
-CFLAGS-$(CONFIG_POWER7_CPU) += $(call cc-option,-mcpu=power7)
-CFLAGS-$(CONFIG_POWER8_CPU) += $(call cc-option,-mcpu=power8)
-CFLAGS-$(CONFIG_POWER9_CPU) += $(call cc-option,-mcpu=power9)
-CFLAGS-$(CONFIG_PPC_8xx) += $(call cc-option,-mcpu=860)
+CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_TARGET_CPU))
# Altivec option not allowed with e500mc64 in GCC.
ifdef CONFIG_ALTIVEC