summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2009-11-02 19:51:30 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2009-11-03 09:47:39 +0100
commit7dcef1bb2096a2392b6e4ac3e98c2403e9b59f8e (patch)
tree80105b28b83feb0bfd1fc2b0a855fee98178bf9e
parenta4292fe7cfddd567296596b3ecfe96eec5a10120 (diff)
downloadbarebox-7dcef1bb2096a2392b6e4ac3e98c2403e9b59f8e.tar.gz
barebox-7dcef1bb2096a2392b6e4ac3e98c2403e9b59f8e.tar.xz
arm: update cpu tunning
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/Makefile21
1 files changed, 16 insertions, 5 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index f6605abcf2..87783cb5ed 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -13,6 +13,22 @@ AS += -EL
LD += -EL
endif
+comma = ,
+
+# This selects which instruction set is used.
+# Note that GCC does not numerically define an architecture version
+# macro, but instead defines a whole series of macros which makes
+# testing for a specific architecture or later rather impossible.
+arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)
+arch-$(CONFIG_CPU_32v5) :=-D__LINUX_ARM_ARCH__=5 $(call cc-option,-march=armv5te,-march=armv4t)
+arch-$(CONFIG_CPU_32v4T) :=-D__LINUX_ARM_ARCH__=4 -march=armv4t
+
+# This selects how we optimise for the processor.
+tune-$(CONFIG_CPU_ARM920T) :=-mtune=arm9tdmi
+tune-$(CONFIG_CPU_ARM926T) :=-mtune=arm9tdmi
+
+CPPFLAGS += $(arch-y) $(tune-y)
+
# Machine directory name. This list is sorted alphanumerically
# by CONFIG_* macro name.
machine-$(CONFIG_ARCH_AT91) := at91
@@ -81,11 +97,6 @@ archprepare: maketools
PHONY += maketools
-# Add architecture specific flags
-ifeq ($(CONFIG_CPU_V7),y)
-CPPFLAGS += -march=armv7a
-endif
-
ifneq ($(board-y),)
BOARD := board/$(board-y)/
else