summaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-05-31 16:01:00 -0500
committerWaldemar Brodkorb <wbx@openadk.org>2015-06-04 03:54:19 -0500
commitb92dc96d7f82727329d9e0939748a57b3e6d402e (patch)
tree79d854cc0c71cadcebf90ed86a4fa5fc4b0c59b1 /toolchain
parent6c70f9e7636910390613f4ff7aa3a605d6656fb1 (diff)
add basic infrastructure for superh toolchains with sh2/sh3/sh4a cpus
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/gcc/Makefile14
-rw-r--r--toolchain/uclibc-ng/Makefile29
2 files changed, 43 insertions, 0 deletions
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index e3974ff31..5aceca03d 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -123,8 +123,22 @@ GCC_CONFOPTS+= --with-endian=little
else
GCC_CONFOPTS+= --with-endian=big
endif
+ifeq ($(ADK_CPU_SH2),y)
+GCC_FINAL_CONFOPTS+= --with-multilib-list=m2
+endif
+ifeq ($(ADK_CPU_SH2A),y)
+GCC_FINAL_CONFOPTS+= --with-multilib-list=m2a
+endif
+ifeq ($(ADK_CPU_SH3),y)
+GCC_FINAL_CONFOPTS+= --with-multilib-list=m3
+endif
+ifeq ($(ADK_CPU_SH4),y)
GCC_FINAL_CONFOPTS+= --with-multilib-list=m4,m4-nofpu
endif
+ifeq ($(ADK_CPU_SH4A),y)
+GCC_FINAL_CONFOPTS+= --with-multilib-list=m4a,m4a-nofpu
+endif
+endif
ifeq ($(ADK_TARGET_ARCH_X86),y)
ifeq ($(ADK_TARGET_KERNEL_64),y)
diff --git a/toolchain/uclibc-ng/Makefile b/toolchain/uclibc-ng/Makefile
index 547f63d15..8647e3d90 100644
--- a/toolchain/uclibc-ng/Makefile
+++ b/toolchain/uclibc-ng/Makefile
@@ -197,6 +197,35 @@ ifeq ($(ADK_CPU_MIPS32R2),y)
endif
endif
+# sh
+ifeq ($(ADK_TARGET_ARCH_SH),y)
+ifeq ($(ADK_CPU_SH4),y)
+ $(SED) 's/.*\(CONFIG_SH2A=\).*/# \1 is not set/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(CONFIG_SH2=\).*/# \1 is not set/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(CONFIG_SH3=\).*/# \1 is not set/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(CONFIG_SH4\).*/\1=y/' ${WRKBUILD}/.config
+endif
+ifeq ($(ADK_CPU_SH3),y)
+ $(SED) 's/.*\(CONFIG_SH2A=\).*/# \1 is not set/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(CONFIG_SH2=\).*/# \1 is not set/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(CONFIG_SH4=\).*/# \1 is not set/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(CONFIG_SH3\).*/\1=y/' ${WRKBUILD}/.config
+endif
+ifeq ($(ADK_CPU_SH2),y)
+ $(SED) 's/.*\(CONFIG_SH2A=\).*/# \1 is not set/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(CONFIG_SH3=\).*/# \1 is not set/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(CONFIG_SH4=\).*/# \1 is not set/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(CONFIG_SH2\).*/\1=y/' ${WRKBUILD}/.config
+endif
+ifeq ($(ADK_CPU_SH2A),y)
+ $(SED) 's/.*\(CONFIG_SH2A=\).*/# \1 is not set/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(CONFIG_SH3=\).*/# \1 is not set/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(CONFIG_SH4=\).*/# \1 is not set/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(CONFIG_SH2A\).*/\1=y/' ${WRKBUILD}/.config
+endif
+endif
+
+# x86
ifeq ($(ADK_TARGET_ARCH_X86),y)
ifeq ($(ADK_CPU_I486),y)
$(SED) 's/.*\(CONFIG_686\).*/# \1 is not set/' ${WRKBUILD}/.config