[PATCH 6/7] arm: update cpu tunning

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Mon Nov 2 13:51:30 EST 2009


Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 arch/arm/Makefile |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index f6605ab..87783cb 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
-- 
1.6.5





More information about the u-boot-v2 mailing list