summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTiejun Chen2013-11-22 03:49:00 +0100
committerScott Wood2013-11-22 23:56:33 +0100
commitcbf8a358be27ceecea5bd44cf82ab01683fcc90c (patch)
treead05fcc30fd23aeca7ee60d17ac978b3ac5c036c /arch
parentLinux 3.13-rc1 (diff)
downloadkernel-qcow2-linux-cbf8a358be27ceecea5bd44cf82ab01683fcc90c.tar.gz
kernel-qcow2-linux-cbf8a358be27ceecea5bd44cf82ab01683fcc90c.tar.xz
kernel-qcow2-linux-cbf8a358be27ceecea5bd44cf82ab01683fcc90c.zip
powerpc/corenet64: compile with CONFIG_E{5,6}500_CPU well
If CONFIG_ALTIVEC is enabled for CoreNet64, and if we also select CONFIG_E{5,6}500_CPU this may introduce -mcpu=e500mc64 into $CFLAGS. But Altivec option not allowed with e500mc64, then some compiling errors occur like this: CC arch/powerpc/lib/xor_vmx.o arch/powerpc/lib/xor_vmx.c:1:0: error: AltiVec not supported in this target make[1]: *** [arch/powerpc/lib/xor_vmx.o] Error 1 make: *** [arch/powerpc/lib] Error 2 So we should restrict e500mc64 in altivec scenario. Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 8a2463670a5b..a284d7fbc97f 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -128,7 +128,12 @@ 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)
+# Altivec option not allowed with e500mc64 in GCC.
+ifeq ($(CONFIG_ALTIVEC),y)
+E5500_CPU := -mcpu=powerpc64
+else
E5500_CPU := $(call cc-option,-mcpu=e500mc64,-mcpu=powerpc64)
+endif
CFLAGS-$(CONFIG_E5500_CPU) += $(E5500_CPU)
CFLAGS-$(CONFIG_E6500_CPU) += $(call cc-option,-mcpu=e6500,$(E5500_CPU))