1 Add three new blind options to set use of Thumb mode:
2 - COMPILE_IN_THUMB_MODE
3 - if set, CFLAGS will contain -mthumb
4 - if unset, the compiler's default is used
6 - CPUS with Thumb instruction set can select this
7 - use of BX depends on this
9 - CPUs that are Thumb-only must select this
10 - this selects: HAS_THUMB, COMPILE_IN_THUMB_MODE and USE_BX
12 Also, remove leading space in Rules.mak.
14 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
15 Cc: Khem Raj <raj.khem@gmail.com>
16 Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
17 Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
20 extra/Configs/Config.arm | 31 ++++++++++++++++++++++++++++---
21 2 files changed, 32 insertions(+), 6 deletions(-)
25 @@ -351,9 +351,10 @@ ifeq ($(TARGET_ARCH),arm)
26 CPU_CFLAGS-$(CONFIG_ARM_SA1100)+=-mtune=strongarm1100 -march=armv4
27 CPU_CFLAGS-$(CONFIG_ARM_XSCALE)+=$(call check_gcc,-mtune=xscale,-mtune=strongarm110)
28 CPU_CFLAGS-$(CONFIG_ARM_XSCALE)+=-march=armv5te -Wa,-mcpu=xscale
29 - CPU_CFLAGS-$(CONFIG_ARM_IWMMXT)+=-march=iwmmxt -Wa,-mcpu=iwmmxt -mabi=iwmmxt
30 - CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M3)+=-mcpu=cortex-m3 -mthumb
31 - CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M1)+=-mcpu=cortex-m1 -mthumb
32 + CPU_CFLAGS-$(CONFIG_ARM_IWMMXT)+=-march=iwmmxt -Wa,-mcpu=iwmmxt -mabi=iwmmxt
33 + CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M3)+=-mcpu=cortex-m3
34 + CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M1)+=-mcpu=cortex-m1
35 + CPU_CFLAGS-$(COMPILE_IN_THUMB_MODE)+=-mthumb
38 ifeq ($(TARGET_ARCH),mips)
39 --- a/extra/Configs/Config.arm
40 +++ b/extra/Configs/Config.arm
41 @@ -64,70 +64,95 @@ config CONFIG_ARM710
42 config CONFIG_ARM7TDMI
44 select ARCH_HAS_NO_MMU
72 config CONFIG_ARM1136JF_S
77 config CONFIG_ARM1176JZ_S
82 config CONFIG_ARM1176JZF_S
87 config CONFIG_ARM_CORTEX_M3
89 select ARCH_HAS_NO_MMU
93 config CONFIG_ARM_CORTEX_M1
95 select ARCH_HAS_NO_MMU
99 config CONFIG_ARM_SA110
100 bool "Intel StrongArm SA-110"
104 config CONFIG_ARM_SA1100
105 bool "Intel StrongArm SA-1100"
109 config CONFIG_ARM_XSCALE
114 config CONFIG_ARM_IWMMXT
115 bool "Intel Xscale With WMMX PXA27x"
127 + select COMPILE_IN_THUMB_MODE
130 +config COMPILE_IN_THUMB_MODE
134 bool "Use BX in function return"
136 - depends on !CONFIG_GENERIC_ARM && !CONFIG_ARM610 && !CONFIG_ARM710
137 + depends on HAS_THUMB
139 Use BX instruction for THUMB aware architectures.