summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--target/config/Config.in.arm.choice21
-rw-r--r--target/config/Config.in.arm.default15
-rw-r--r--target/config/Config.in.target3
-rw-r--r--target/config/Config.in.toolchain6
-rw-r--r--target/config/Config.in.x86.choice2
-rw-r--r--toolchain/gcc/Makefile12
6 files changed, 57 insertions, 2 deletions
diff --git a/target/config/Config.in.arm.choice b/target/config/Config.in.arm.choice
index a232c7008..5c834c0e9 100644
--- a/target/config/Config.in.arm.choice
+++ b/target/config/Config.in.arm.choice
@@ -1,6 +1,25 @@
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
+choice ADK_TARGET_ARM_CPU_MODEL
+prompt "CPU model"
+depends on ADK_TARGET_TOOLCHAIN && ADK_LINUX_ARM
+default ADK_CPU_ARMV7
+
+config ADK_CPU_ARMV5TE
+ boolean "armv5te"
+ select ADK_armv5te
+
+config ADK_CPU_ARMV6
+ boolean "armv6"
+ select ADK_armv6
+
+config ADK_CPU_ARMV7A
+ boolean "armv7-a"
+ select ADK_armv7a
+
+endchoice
+
choice
prompt "Cubox-i model"
depends on ADK_TARGET_SYSTEM_CUBOX_I
@@ -21,7 +40,7 @@ endchoice
choice ADK_TARGET_ARM_FLOAT
prompt "Target float type"
-depends on ADK_TARGET_CPU_WITH_FPU || ADK_TARGET_SYSTEM_QEMU_ARM
+depends on ADK_TARGET_CPU_WITH_FPU || ADK_TARGET_SYSTEM_QEMU_ARM || ADK_TARGET_TOOLCHAIN
config ADK_TARGET_ARM_HARD_FLOAT
boolean "Use hard-float for system with FPU"
diff --git a/target/config/Config.in.arm.default b/target/config/Config.in.arm.default
index a2d486512..59513ff8c 100644
--- a/target/config/Config.in.arm.default
+++ b/target/config/Config.in.arm.default
@@ -1,6 +1,21 @@
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
+config ADK_armv5te
+ boolean
+
+config ADK_armv6
+ boolean
+
+config ADK_armv7a
+ boolean
+
+config ADK_TARGET_ARM_CPU
+ string
+ default "armv5te" if ADK_armv5te
+ default "armv6" if ADK_armv6
+ default "armv7-a" if ADK_armv7a
+
config ADK_soft_float
boolean
diff --git a/target/config/Config.in.target b/target/config/Config.in.target
index c203b8a13..1e4e5d178 100644
--- a/target/config/Config.in.target
+++ b/target/config/Config.in.target
@@ -30,6 +30,9 @@ config ADK_TARGET_CFLAGS
default "-march=armv6 -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard" if ADK_CPU_ARM1176JZF_S && ADK_hard_float
default "-march=armv7-a -mtune=cortex-a9 -mfloat-abi=soft" if ADK_CPU_CORTEX_A9 && ADK_soft_float
default "-march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=hard" if ADK_CPU_CORTEX_A9 && ADK_hard_float
+ default "-march=armv5te" if ADK_CPU_ARMV5TE
+ default "-march=armv6" if ADK_CPU_ARMV6
+ default "-march=armv7-a" if ADK_CPU_ARMV7A
config ADK_TARGET_CMDLINE
string
diff --git a/target/config/Config.in.toolchain b/target/config/Config.in.toolchain
index 344638081..b75718142 100644
--- a/target/config/Config.in.toolchain
+++ b/target/config/Config.in.toolchain
@@ -134,4 +134,10 @@ config ADK_TARGET_USE_STATIC_LIBS
still requires libgcc_so.so.1 for pthread_cancel. Glibc also requires libnss_*.so libraries
at runtime. Full static builds are only supported for musl libc.
+config ADK_STATIC_TOOLCHAIN
+ boolean "Build the toolchain components statically"
+ default n
+ help
+ If you want to create more portable toolchains, build them static.
+
endmenu
diff --git a/target/config/Config.in.x86.choice b/target/config/Config.in.x86.choice
index e49d27686..ee1d5815b 100644
--- a/target/config/Config.in.x86.choice
+++ b/target/config/Config.in.x86.choice
@@ -3,7 +3,7 @@
choice ADK_TARGET_X86_CPU_MODEL
prompt "CPU model"
-depends on ADK_TARGET_SYSTEM_QEMU_X86 || ADK_TARGET_SYSTEM_GENERIC_PC || ADK_TARGET_SYSTEM_VBOX_X86
+depends on (ADK_TARGET_SYSTEM_QEMU_X86 || ADK_TARGET_SYSTEM_GENERIC_PC || ADK_TARGET_SYSTEM_VBOX_X86 || ADK_TARGET_TOOLCHAIN) && ADK_LINUX_X86
default ADK_CPU_I686
config ADK_CPU_I486
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index 17b83f41f..10afc0422 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -114,6 +114,18 @@ GCC_CONFOPTS+= --with-fpu=$(ADK_TARGET_FPU)
endif
endif
+ifeq ($(ADK_CPU_ARMV5TE),y)
+GCC_CONFOPTS+= --with-arch=armv5te
+endif
+
+ifeq ($(ADK_CPU_ARMV6),y)
+GCC_CONFOPTS+= --with-arch=armv6
+endif
+
+ifeq ($(ADK_CPU_ARMV7A),y)
+GCC_CONFOPTS+= --with-arch=armv7-a
+endif
+
ifeq ($(ADK_CPU_ARM926EJ_S),y)
GCC_CONFOPTS+= --with-arch=armv5te --with-tune=arm926ej-s
endif