Skip to contentSkip to conversation

ColdFire: Add CPU compile flag for mcf5301x and mcf532x

PATCH New TsiChung Liew 1 participant 1 message Mar 18, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 8/13 ColdFire: Add CPU compile flag for mcf5301x and mcf532x

Add CPU compile flag -mcpu=53015 in cpu/config.mk

---
 cpu/mcf532x/config.mk |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
cpu/mcf532x/config.mk +12 -0
index 0cb90ac..b783444 100644
@@ -24,8 +24,20 @@
 #
 
 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
Signature · 1 line
1.6.2.5