]> git.sur5r.net Git - u-boot/commitdiff
armv8: prevent using THUMB
authorAndre Przywara <andre.przywara@arm.com>
Mon, 2 Jan 2017 11:48:26 +0000 (11:48 +0000)
committerJagan Teki <jagan@openedev.com>
Wed, 4 Jan 2017 15:37:40 +0000 (16:37 +0100)
The predominantely 32-bit ARM targets try to compile the SPL in Thumb
mode to reduce code size.
The 64-bit AArch64 instruction set does not know an alternative, concise
encoding, so the Thumb build option should only be set for 32-bit
targets.
Likewise -marm machine options are only valid for ARMv7 targets.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
arch/arm/lib/Makefile
include/configs/sunxi-common.h

index 0051f76db028f41a790e0b3410fe8929b819c012..024139da25fa76a73cd67c81bb4f135ebbc4ce1a 100644 (file)
@@ -77,8 +77,10 @@ ifndef CONFIG_HAS_THUMB2
 
 # for C files, just apend -marm, which will override previous -mthumb*
 
+ifndef CONFIG_ARM64
 CFLAGS_cache.o := -marm
 CFLAGS_cache-cp15.o := -marm
+endif
 
 # For .S, drop -mthumb* and other thumb-related options.
 # CFLAGS_REMOVE_* would not have an effet, so AFLAGS_REMOVE_*
index b0bfc0dfd7daecdf99a09a269e54532fa862833a..e05c31862cce7e3d857ff94cc3ea213fea1897ee 100644 (file)
@@ -35,7 +35,7 @@
 /*
  * High Level Configuration Options
  */
-#ifdef CONFIG_SPL_BUILD
+#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_ARM64)
 #define CONFIG_SYS_THUMB_BUILD /* Thumbs mode to save space in SPL */
 #endif