ColdFire: Add CPU compile flag for mcf5301x and mcf532x
authorTsiChung Liew <tsicliew@gmail.com>
Wed, 10 Mar 2010 23:32:13 +0000 (17:32 -0600)
committerTsiChung Liew <tsicliew@gmail.com>
Wed, 24 Mar 2010 16:09:18 +0000 (11:09 -0500)
Add CPU compile flag -mcpu=53015 in cpu/config.mk

Signed-off-by: TsiChung Liew <tsicliew@gmail.com>
cpu/mcf532x/config.mk

index 0cb90ac4e2e0ba3ffab2c547ebd74229fca599c4..b783444ae83abe4c863c58fea1d6091f5b0b8a32 100644 (file)
 #
 
 PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
+
+cfg=$(shell grep configs $(OBJTREE)/include/config.h | sed 's/.*<\(configs.*\)>/\1/')
+is5301x:=$(shell grep CONFIG_MCF5301x $(TOPDIR)/include/$(cfg))
+is532x:=$(shell grep CONFIG_MCF532x $(TOPDIR)/include/$(cfg))
+
 ifneq ($(findstring 4.1,$(shell $(CC) --version)),4.1)
+
+ifneq (,$(findstring CONFIG_MCF5301x,$(is5301x)))
+PLATFORM_CPPFLAGS += -mcpu=53015 -fPIC
+endif
+ifneq (,$(findstring CONFIG_MCF532x,$(is532x)))
 PLATFORM_CPPFLAGS += -mcpu=5329 -fPIC
+endif
+
 else
 PLATFORM_CPPFLAGS += -m5307 -fPIC
 endif