summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu/armv7/config.mk
diff options
context:
space:
mode:
authorAneesh V <aneesh@ti.com>2012-03-08 07:20:20 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-05-15 08:31:26 +0200
commitf61faeba822d6db72ade5fb6fe04b4db122a0874 (patch)
treee0b215c700c4c2b1519c11f0e381511fcd045033 /arch/arm/cpu/armv7/config.mk
parent5356f5451e85695cf8f9782dee54cc8dfa5445e5 (diff)
downloadblackbird-obmc-uboot-f61faeba822d6db72ade5fb6fe04b4db122a0874.tar.gz
blackbird-obmc-uboot-f61faeba822d6db72ade5fb6fe04b4db122a0874.zip
armv7: Use -march=armv7-a and thereby enable Thumb-2
Enable -march=armv7-a for armv7 platforms if the tool-chain supports it. This in turn results in Thumb-2 code generated for these platforms if CONFIG_SYS_THUMB_BUILD is enabled. Signed-off-by: Aneesh V <aneesh@ti.com>
Diffstat (limited to 'arch/arm/cpu/armv7/config.mk')
-rw-r--r--arch/arm/cpu/armv7/config.mk7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/cpu/armv7/config.mk b/arch/arm/cpu/armv7/config.mk
index f532d62e57..5407cb68a8 100644
--- a/arch/arm/cpu/armv7/config.mk
+++ b/arch/arm/cpu/armv7/config.mk
@@ -22,8 +22,11 @@
#
PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
-# Make ARMv5 to allow more compilers to work, even though its v7a.
-PLATFORM_CPPFLAGS += -march=armv5
+# If armv7-a is not supported by GCC fall-back to armv5, which is
+# supported by more tool-chains
+PF_CPPFLAGS_ARMV7 := $(call cc-option, -march=armv7-a, -march=armv5)
+PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_ARMV7)
+
# =========================================================================
#
# Supply options according to compiler version
OpenPOWER on IntegriCloud