Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Tiejun Chen and committed by
Scott Wood
cbf8a358 6ce4eac1

+5
+5
arch/powerpc/Makefile
··· 128 128 CFLAGS-$(CONFIG_POWER6_CPU) += $(call cc-option,-mcpu=power6) 129 129 CFLAGS-$(CONFIG_POWER7_CPU) += $(call cc-option,-mcpu=power7) 130 130 131 + # Altivec option not allowed with e500mc64 in GCC. 132 + ifeq ($(CONFIG_ALTIVEC),y) 133 + E5500_CPU := -mcpu=powerpc64 134 + else 131 135 E5500_CPU := $(call cc-option,-mcpu=e500mc64,-mcpu=powerpc64) 136 + endif 132 137 CFLAGS-$(CONFIG_E5500_CPU) += $(E5500_CPU) 133 138 CFLAGS-$(CONFIG_E6500_CPU) += $(call cc-option,-mcpu=e6500,$(E5500_CPU)) 134 139