powerpc/e500: Set -mcpu flag for 32-bit e500
authorScott Wood <scottwood@freescale.com>
Fri, 16 Aug 2013 00:19:10 +0000 (19:19 -0500)
committerScott Wood <scottwood@freescale.com>
Wed, 21 Aug 2013 01:49:56 +0000 (20:49 -0500)
Unlike 64-bit, we don't currently support multiplatform between e500
and non-e500, so the -mcpu is not configurable at this time.

-msoft-float is specified when testing for -mcpu=8540 because otherwise
some older toolchains will fail with "error: E500 and FPRs not
supported".

Signed-off-by: Scott Wood <scottwood@freescale.com>
arch/powerpc/Makefile

index 32dfd5dc2be669524e0bea9dffc68dcc243aa158..51cfb78d4061d30781b916fe7a21a3fd81daec8c 100644 (file)
@@ -104,6 +104,14 @@ E5500_CPU := $(call cc-option,-mcpu=e500mc64,-mcpu=powerpc64)
 CFLAGS-$(CONFIG_E5500_CPU) += $(E5500_CPU)
 CFLAGS-$(CONFIG_E6500_CPU) += $(call cc-option,-mcpu=e6500,$(E5500_CPU))
 
+ifeq ($(CONFIG_PPC32),y)
+ifeq ($(CONFIG_PPC_E500MC),y)
+CFLAGS-y += $(call cc-option,-mcpu=e500mc,-mcpu=powerpc)
+else
+CFLAGS-$(CONFIG_E500) += $(call cc-option,-mcpu=8540 -msoft-float,-mcpu=powerpc)
+endif
+endif
+
 CFLAGS-$(CONFIG_TUNE_CELL) += $(call cc-option,-mtune=cell)
 
 KBUILD_CPPFLAGS        += -Iarch/$(ARCH)