summaryrefslogtreecommitdiff
path: root/config/arch/sh.in
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-08-29 22:36:52 (GMT)
committerAlexey Neyman <stilor@att.net>2017-09-03 19:11:23 (GMT)
commit413f5f610012ea24db9910084ea3b40db808147b (patch)
tree75e9c879151cfa7cd476fc43b1182ca63655813f /config/arch/sh.in
parent1da3cc59df185144cb01fdd32a0dc1ca417d9106 (diff)
Super-H multilib toolchain fixes
1. On SuperH, configuring GCC with explicit variant of the CPU (like "sh4") limits the default set of multilibs to just that CPU and requires --with-multilib-list to change. Allow for "unspecified" variant, so that we can defer to GCC to determine the list. 2. Support toolchains with both endiannesses at the same time. 3. Add a SuperH/newlib sample 4. Add more flags processing for uClibc Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'config/arch/sh.in')
-rw-r--r--config/arch/sh.in43
1 files changed, 41 insertions, 2 deletions
diff --git a/config/arch/sh.in b/config/arch/sh.in
index be525b4..bda660c 100644
--- a/config/arch/sh.in
+++ b/config/arch/sh.in
@@ -3,9 +3,11 @@
## select ARCH_SUPPORTS_32
## select ARCH_DEFAULT_32
## select ARCH_USE_MMU
-## select ARCH_SUPPORTS_BOTH_ENDIAN
-## select ARCH_DEFAULT_LE
+## select ARCH_SUPPORTS_EITHER_ENDIAN
+## select ARCH_DEFAULT_LE_BE
## select ARCH_REQUIRES_MULTILIB
+## select ARCH_SUPPORTS_WITH_ENDIAN
+## select ARCH_SUPPORTS_WITH_CPU
##
## help The Super-H architecture, as defined by:
## help http://www.renesas.com/fmwk.jsp?cnt=superh_family_landing.jsp&fp=/products/mpumcu/superh_family/
@@ -14,10 +16,41 @@ choice
bool
prompt "Variant"
+# GCC supports both endiannesses even if a specific CPU is selected (so long
+# as that CPU can be both BE/LE), but the binutils (or specifically, ld)
+# configures for both endiannesses only if sh-*-linux target is selected.
+config ARCH_SH_SH
+ bool
+ prompt "unspecified"
+ select ARCH_SUPPORTS_BOTH_ENDIAN
+ help
+ If left unspecified, GCC will determine the set of multilibs to compile automatically
+ based on selected endianness, FPU mode and OS.
+
+config ARCH_SH_SH1
+ bool
+ prompt "sh1"
+
+config ARCH_SH_SH2
+ bool
+ prompt "sh2"
+
+config ARCH_SH_SH2E
+ bool
+ prompt "sh2e"
+
+config ARCH_SH_SH2A
+ bool
+ prompt "sh2a"
+
config ARCH_SH_SH3
bool
prompt "sh3"
+config ARCH_SH_SH3E
+ bool
+ prompt "sh3e"
+
config ARCH_SH_SH4
bool
prompt "sh4"
@@ -30,6 +63,12 @@ endchoice
config ARCH_SH_VARIANT
string
+ default "sh" if ARCH_SH_SH
+ default "sh1" if ARCH_SH_SH1
+ default "sh2" if ARCH_SH_SH2
+ default "sh2e" if ARCH_SH_SH2E
+ default "sh2a" if ARCH_SH_SH2A
default "sh3" if ARCH_SH_SH3
+ default "sh3e" if ARCH_SH_SH3E
default "sh4" if ARCH_SH_SH4
default "sh4a" if ARCH_SH_SH4A