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>
This commit is contained in:
Aneesh V 2012-03-08 07:20:20 +00:00 committed by Albert ARIBAUD
parent 5356f5451e
commit f61faeba82
1 changed files with 5 additions and 2 deletions
arch/arm/cpu/armv7

View File

@ -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