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>utp
parent
74236acacc
commit
5356f5451e
8
README
8
README
|
@ -432,6 +432,14 @@ The following options need to be configured:
|
||||||
Select high exception vectors of the ARM core, e.g., do not
|
Select high exception vectors of the ARM core, e.g., do not
|
||||||
clear the V bit of the c1 register of CP15.
|
clear the V bit of the c1 register of CP15.
|
||||||
|
|
||||||
|
CONFIG_SYS_THUMB_BUILD
|
||||||
|
|
||||||
|
Use this flag to build U-Boot using the Thumb instruction
|
||||||
|
set for ARM architectures. Thumb instruction set provides
|
||||||
|
better code density. For ARM architectures that support
|
||||||
|
Thumb2 this flag will result in Thumb2 code generated by
|
||||||
|
GCC.
|
||||||
|
|
||||||
- Linux Kernel Interface:
|
- Linux Kernel Interface:
|
||||||
CONFIG_CLOCKS_IN_MHZ
|
CONFIG_CLOCKS_IN_MHZ
|
||||||
|
|
||||||
|
|
|
@ -33,25 +33,33 @@ endif
|
||||||
|
|
||||||
PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
|
PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
|
||||||
|
|
||||||
# Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
|
# Choose between ARM/Thumb instruction sets
|
||||||
PF_CPPFLAGS_ARM := $(call cc-option,-marm,)
|
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,
|
# Try if EABI is supported, else fall back to old API,
|
||||||
# i. e. for example:
|
# i. e. for example:
|
||||||
# - with ELDK 4.2 (EABI supported), use:
|
# - 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:
|
# - 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:
|
# - with ELDK 3.1 (gcc 3.x), use:
|
||||||
# -mapcs-32 -mno-thumb-interwork
|
# -mapcs-32
|
||||||
PF_CPPFLAGS_ABI := $(call cc-option,\
|
PF_CPPFLAGS_ABI := $(call cc-option,\
|
||||||
-mabi=aapcs-linux -mno-thumb-interwork,\
|
-mabi=aapcs-linux,\
|
||||||
$(call cc-option,\
|
$(call cc-option,\
|
||||||
-mapcs-32,\
|
-mapcs-32,\
|
||||||
$(call cc-option,\
|
$(call cc-option,\
|
||||||
-mabi=apcs-gnu,\
|
-mabi=apcs-gnu,\
|
||||||
)\
|
)\
|
||||||
) $(call cc-option,-mno-thumb-interwork,)\
|
)\
|
||||||
)
|
)
|
||||||
PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_ARM) $(PF_CPPFLAGS_ABI)
|
PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_ARM) $(PF_CPPFLAGS_ABI)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue