summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorAneesh V <aneesh@ti.com>2012-03-08 07:20:19 (GMT)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-05-15 06:31:26 (GMT)
commit5356f5451e85695cf8f9782dee54cc8dfa5445e5 (patch)
tree17ec91695ba5ed4845801b66fa5de31f46d3d868 /arch/arm
parent74236acacc27168102b2e3fbcac3a80e5ed82fe4 (diff)
downloadu-boot-5356f5451e85695cf8f9782dee54cc8dfa5445e5.tar.xz
ARM: enable Thumb build
Enable Thumb build and ARM-Thumb interworking based on the new config flag CONFIG_SYS_THUMB_BUILD Signed-off-by: Aneesh V <aneesh@ti.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/config.mk22
1 files changed, 15 insertions, 7 deletions
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 3c5f987..4cc99e7 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -33,25 +33,33 @@ endif
PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
-# Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
-PF_CPPFLAGS_ARM := $(call cc-option,-marm,)
+# Choose between ARM/Thumb instruction sets
+ifeq ($(CONFIG_SYS_THUMB_BUILD),y)
+PF_CPPFLAGS_ARM := $(call cc-option, -mthumb -mthumb-interwork,\
+ $(call cc-option,-marm,)\
+ $(call cc-option,-mno-thumb-interwork,)\
+ )
+else
+PF_CPPFLAGS_ARM := $(call cc-option,-marm,) \
+ $(call cc-option,-mno-thumb-interwork,)
+endif
# Try if EABI is supported, else fall back to old API,
# i. e. for example:
# - with ELDK 4.2 (EABI supported), use:
-# -mabi=aapcs-linux -mno-thumb-interwork
+# -mabi=aapcs-linux
# - with ELDK 4.1 (gcc 4.x, no EABI), use:
-# -mabi=apcs-gnu -mno-thumb-interwork
+# -mabi=apcs-gnu
# - with ELDK 3.1 (gcc 3.x), use:
-# -mapcs-32 -mno-thumb-interwork
+# -mapcs-32
PF_CPPFLAGS_ABI := $(call cc-option,\
- -mabi=aapcs-linux -mno-thumb-interwork,\
+ -mabi=aapcs-linux,\
$(call cc-option,\
-mapcs-32,\
$(call cc-option,\
-mabi=apcs-gnu,\
)\
- ) $(call cc-option,-mno-thumb-interwork,)\
+ )\
)
PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_ARM) $(PF_CPPFLAGS_ABI)