summaryrefslogtreecommitdiff
path: root/arch/arm/config.mk
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2014-11-18 19:22:55 +0100
committerStefan Agner <stefan.agner@toradex.com>2014-11-19 14:52:32 +0100
commitbc0ae16c20cb6bacb44f5c5b541840366a267f75 (patch)
tree5ecf7c42105308ea764cd4727359f5d2575356f8 /arch/arm/config.mk
parent272736202997407d0d66375fcf95227c005f14ae (diff)
arm: make arch memset/memcpy to work with Thumb2 builds
Resynchronize memcpy/memset with kernel and build them explicitly in Thumb2 mode (unified syntax). Those assembler files can be built and linked in ARM mode too, however when calling them from Thumb2 built code, the stack got corrupted and the copy did not succeed (the exact details have not been traced back). Hoever, the Linux kernel builds those files in Thumb2 mode. Hence U-Boot should build them in Thumb2 mode too when CONFIG_SYS_THUMB_BUILD is set. Also add implicit-it=always to AFLAGS when building for Thumb2. Furthermore add no-warn-deprecated option to AFLAGS to rid of deprecated unified syntax: arch/arm/lib/memcpy.S: Assembler messages: arch/arm/lib/memcpy.S:153: Warning: conditional infixes are deprecated in unified syntax arch/arm/lib/memcpy.S:154: Warning: conditional infixes are deprecated in unified syntax ...
Diffstat (limited to 'arch/arm/config.mk')
-rw-r--r--arch/arm/config.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index f0eafd6307..7336455088 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -26,7 +26,10 @@ PLATFORM_CPPFLAGS += -D__ARM__
# Choose between ARM/Thumb instruction sets
ifeq ($(CONFIG_SYS_THUMB_BUILD),y)
-PF_CPPFLAGS_ARM := $(call cc-option, -mthumb -mthumb-interwork,\
+AFLAGS_AUTOIT := $(call as-option,-Wa$(comma)-mimplicit-it=always,-Wa$(comma)-mauto-it)
+AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W)
+PF_CPPFLAGS_ARM := $(AFLAGS_AUTOIT) $(AFLAGS_NOWARN) \
+ $(call cc-option, -mthumb -mthumb-interwork,\
$(call cc-option,-marm,)\
$(call cc-option,-mno-thumb-interwork,)\
)