diff options
author | Stefan Agner <stefan@agner.ch> | 2014-12-18 18:10:33 +0100 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2015-01-09 10:20:22 -0500 |
commit | 75d7a0d7f11ef66dcd3c27ae141f6b59f2ffd00d (patch) | |
tree | c2360a77c2293119a0ff1e23c73ef1dc4c7a2e56 /arch/arm/config.mk | |
parent | f10d86d3fff9f53723a404b3794cca98a785ce6a (diff) |
arm: build arch memset/memcpy in Thumb2 mode
Resynchronize memcpy/memset with kernel 3.17 and build them 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). However, 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.
To build the files without warning, some assembler instructions
had to be replaced with their UAL compliant variant (thanks
Jeroen for this input).
To build the file in Thumb2 mode the implicit-it=always option need
to be set to generate Thumb2 compliant IT instructions where needed.
We add this option to the general AFLAGS when building for Thumb2.
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Diffstat (limited to 'arch/arm/config.mk')
-rw-r--r-- | arch/arm/config.mk | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/config.mk b/arch/arm/config.mk index c339e6dc8cf..0667984b697 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -26,7 +26,9 @@ 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_IMPLICIT_IT := $(call as-option,-Wa$(comma)-mimplicit-it=always) +PF_CPPFLAGS_ARM := $(AFLAGS_IMPLICIT_IT) \ + $(call cc-option, -mthumb -mthumb-interwork,\ $(call cc-option,-marm,)\ $(call cc-option,-mno-thumb-interwork,)\ ) |