summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Config.in2
-rw-r--r--target/config/Config.in.archopts21
-rw-r--r--target/config/Config.in.cpu14
-rw-r--r--toolchain/gcc/Makefile4
4 files changed, 32 insertions, 9 deletions
diff --git a/Config.in b/Config.in
index 14efbc4dc..87099706e 100644
--- a/Config.in
+++ b/Config.in
@@ -19,7 +19,6 @@ source "target/config/Config.in.boards"
source "target/config/Config.in.kernelfmt"
source "target/config/Config.in.arch"
source "target/config/Config.in.endian"
-source "target/config/Config.in.archopts"
source "target/config/Config.in.system"
@@ -64,6 +63,7 @@ config ADK_VENDOR
help
Vendor string is used for toolchain.
+source "target/config/Config.in.archopts"
source "target/config/Config.in.fpu"
source "target/config/Config.in.float"
source "target/config/Config.in.binfmt"
diff --git a/target/config/Config.in.archopts b/target/config/Config.in.archopts
index 03de1768b..fd16981bf 100644
--- a/target/config/Config.in.archopts
+++ b/target/config/Config.in.archopts
@@ -1,9 +1,22 @@
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
+choice
+prompt "Instruction set"
+
+config ADK_TARGET_ARCH_ARM_WITH_ARM
+ bool "arm"
+ depends on ADK_TARGET_WITH_MMU
+
config ADK_TARGET_ARCH_ARM_WITH_THUMB
- bool
- select ADK_KERNEL_ARM_THUMB
- select ADK_KERNEL_THUMB2_KERNEL
- depends on ADK_TARGET_ARCH_ARM
+ bool "thumb"
+ select ADK_KERNEL_ARM_THUMB
+ select ADK_KERNEL_THUMB2_KERNEL
+ depends on ADK_TARGET_CPU_WITH_THUMB || ADK_TARGET_CPU_WITH_THUMB2
+
+endchoice
+config ADK_TARGET_INSTRUCTION_SET
+ string
+ default "arm" if ADK_TARGET_ARCH_ARM_WITH_ARM
+ default "thumb" if ADK_TARGET_ARCH_ARM_WITH_THUMB
diff --git a/target/config/Config.in.cpu b/target/config/Config.in.cpu
index 57016d99e..db1bee0c2 100644
--- a/target/config/Config.in.cpu
+++ b/target/config/Config.in.cpu
@@ -69,6 +69,7 @@ config ADK_TARGET_CPU_ARM_CORTEX_A5
select ADK_TARGET_WITH_MMU
select ADK_TARGET_CPU_WITH_FPU_VFPV3
select ADK_TARGET_CPU_WITH_NEON
+ select ADK_TARGET_CPU_WITH_THUMB2
depends on ADK_TARGET_ARCH_ARM
config ADK_TARGET_CPU_ARM_CORTEX_A7
@@ -77,6 +78,7 @@ config ADK_TARGET_CPU_ARM_CORTEX_A7
select ADK_TARGET_WITH_MMU
select ADK_TARGET_CPU_WITH_FPU_VFPV4
select ADK_TARGET_CPU_WITH_NEON
+ select ADK_TARGET_CPU_WITH_THUMB2
depends on ADK_TARGET_ARCH_ARM
config ADK_TARGET_CPU_ARM_CORTEX_A8
@@ -85,6 +87,7 @@ config ADK_TARGET_CPU_ARM_CORTEX_A8
select ADK_TARGET_WITH_MMU
select ADK_TARGET_CPU_WITH_FPU_VFPV3
select ADK_TARGET_CPU_WITH_NEON
+ select ADK_TARGET_CPU_WITH_THUMB2
depends on ADK_TARGET_ARCH_ARM
config ADK_TARGET_CPU_ARM_CORTEX_A9
@@ -93,6 +96,7 @@ config ADK_TARGET_CPU_ARM_CORTEX_A9
select ADK_TARGET_WITH_MMU
select ADK_TARGET_CPU_WITH_FPU_VFPV3
select ADK_TARGET_CPU_WITH_NEON
+ select ADK_TARGET_CPU_WITH_THUMB2
depends on ADK_TARGET_ARCH_ARM
config ADK_TARGET_CPU_ARM_CORTEX_A15
@@ -132,7 +136,7 @@ config ADK_TARGET_CPU_ARM_CORTEX_M4
select ADK_TARGET_UCLINUX
select ADK_TARGET_WITH_LT
select ADK_TARGET_WITHOUT_MMU
- select ADK_TARGET_ARCH_ARM_WITH_THUMB
+ select ADK_TARGET_CPU_WITH_THUMB2
depends on ADK_TARGET_ARCH_ARM
config ADK_TARGET_CPU_ARM_CORTEX_M3
@@ -140,7 +144,7 @@ config ADK_TARGET_CPU_ARM_CORTEX_M3
select ADK_TARGET_UCLINUX
select ADK_TARGET_WITH_LT
select ADK_TARGET_WITHOUT_MMU
- select ADK_TARGET_ARCH_ARM_WITH_THUMB
+ select ADK_TARGET_CPU_WITH_THUMB2
depends on ADK_TARGET_ARCH_ARM
config ADK_TARGET_CPU_ARM_XSCALE
@@ -1344,6 +1348,12 @@ config ADK_TARGET_CPU_WITH_FPU_VFPV4
bool
select ADK_TARGET_CPU_WITH_FPU
+config ADK_TARGET_CPU_WITH_THUMB
+ bool
+
+config ADK_TARGET_CPU_WITH_THUMB2
+ bool
+
config ADK_TARGET_CPU_WITH_VT
bool
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index 91c32b509..3176831e9 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -111,8 +111,8 @@ ifneq ($(ADK_TARGET_FPU),)
GCC_CONFOPTS+= --with-fpu=$(ADK_TARGET_FPU)
endif
-ifeq ($(ADK_TARGET_ARCH_ARM_WITH_THUMB),y)
-GCC_CONFOPTS+= --with-mode=thumb
+ifneq ($(ADK_TARGET_INSTRUCTION_SET),)
+GCC_CONFOPTS+= --with-mode=$(ADK_TARGET_INSTRUCTION_SET)
endif
ifeq ($(ADK_TARGET_ARCH_METAG),y)