Skip to content
Snippets Groups Projects
Commit ebda0cc5 authored by Andre Przywara's avatar Andre Przywara Committed by Jagan Teki
Browse files

armv8: prevent using THUMB


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: default avatarAndre Przywara <andre.przywara@arm.com>
Reviewed-by: default avatarAlexander Graf <agraf@suse.de>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
Acked-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: default avatarJagan Teki <jagan@openedev.com>
parent 2865433a
No related branches found
No related tags found
No related merge requests found
...@@ -77,8 +77,10 @@ ifndef CONFIG_HAS_THUMB2 ...@@ -77,8 +77,10 @@ ifndef CONFIG_HAS_THUMB2
# for C files, just apend -marm, which will override previous -mthumb* # for C files, just apend -marm, which will override previous -mthumb*
ifndef CONFIG_ARM64
CFLAGS_cache.o := -marm CFLAGS_cache.o := -marm
CFLAGS_cache-cp15.o := -marm CFLAGS_cache-cp15.o := -marm
endif
# For .S, drop -mthumb* and other thumb-related options. # For .S, drop -mthumb* and other thumb-related options.
# CFLAGS_REMOVE_* would not have an effet, so AFLAGS_REMOVE_* # CFLAGS_REMOVE_* would not have an effet, so AFLAGS_REMOVE_*
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
/* /*
* High Level Configuration Options * 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 */ #define CONFIG_SYS_THUMB_BUILD /* Thumbs mode to save space in SPL */
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment