From b92dc96d7f82727329d9e0939748a57b3e6d402e Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 31 May 2015 16:01:00 -0500 Subject: add basic infrastructure for superh toolchains with sh2/sh3/sh4a cpus --- target/config/Config.in.cpu | 28 ++++++++++++++++++++++++++-- target/config/Config.in.tc | 26 ++++++++++++++++++++++++++ target/sh/systems/toolchain-sh | 1 - 3 files changed, 52 insertions(+), 3 deletions(-) (limited to 'target') diff --git a/target/config/Config.in.cpu b/target/config/Config.in.cpu index 5371e9b54..020a26887 100644 --- a/target/config/Config.in.cpu +++ b/target/config/Config.in.cpu @@ -499,11 +499,25 @@ config ADK_CPU_PPC64 select ADK_TARGET_WITH_NPTL select ADK_TARGET_WITH_MMU +config ADK_CPU_SH2 + bool + +config ADK_CPU_SH2A + bool + +config ADK_CPU_SH3 + bool + config ADK_CPU_SH4 bool select ADK_TARGET_WITH_NPTL select ADK_TARGET_WITH_MMU +config ADK_CPU_SH4A + bool + select ADK_TARGET_WITH_NPTL + select ADK_TARGET_WITH_MMU + config ADK_CPU_SPARC_V8 bool select ADK_TARGET_WITH_NPTL @@ -676,6 +690,11 @@ config ADK_TARGET_CPU_FLAGS default "-mcpu=v10" if ADK_CPU_CRIS_V10 default "-mcpu=v32" if ADK_CPU_CRIS_V32 default "-mcpu=v7.10.d" if ADK_CPU_MICROBLAZE + default "-m2" if ADK_CPU_SH2 + default "-m2a" if ADK_CPU_SH2A + default "-m3" if ADK_CPU_SH3 + default "-m4" if ADK_CPU_SH4 + default "-m4a" if ADK_CPU_SH4A config ADK_TARGET_CPU_TYPE string @@ -784,8 +803,13 @@ config ADK_TARGET_CPU_ARCH default "ppc" if ADK_CPU_PPC default "ppc" if ADK_CPU_PPC_440 default "ppc64" if ADK_CPU_PPC64 - default "sh4" if ADK_TARGET_ARCH_SH && ADK_TARGET_LITTLE_ENDIAN - default "sh4eb" if ADK_TARGET_ARCH_SH && ADK_TARGET_BIG_ENDIAN + default "sh2" if ADK_CPU_SH2 + default "sh2a" if ADK_CPU_SH2A + default "sh3" if ADK_CPU_SH3 + default "sh4" if ADK_CPU_SH4 && ADK_TARGET_LITTLE_ENDIAN + default "sh4eb" if ADK_CPU_SH4 && ADK_TARGET_BIG_ENDIAN + default "sh4a" if ADK_CPU_SH4A && ADK_TARGET_LITTLE_ENDIAN + default "sh4aeb" if ADK_CPU_SH4A && ADK_TARGET_BIG_ENDIAN default "sparc" if ADK_TARGET_ARCH_SPARC default "sparc64" if ADK_TARGET_ARCH_SPARC64 default "tilegx" if ADK_CPU_TILE diff --git a/target/config/Config.in.tc b/target/config/Config.in.tc index bb914585c..32743d0d0 100644 --- a/target/config/Config.in.tc +++ b/target/config/Config.in.tc @@ -10,6 +10,7 @@ depends on ADK_TARGET_TOOLCHAIN && \ || ADK_TARGET_ARCH_ARM \ || ADK_TARGET_ARCH_BFIN \ || ADK_TARGET_ARCH_M68K \ + || ADK_TARGET_ARCH_SH \ || ADK_TARGET_ARCH_X86 ) config ADK_TARGET_CPU_ARC_ARC700 @@ -408,6 +409,31 @@ config ADK_TARGET_CPU_M68K_68060 select ADK_CPU_68060 depends on ADK_TARGET_ARCH_M68K +config ADK_TARGET_CPU_SH_SH2 + bool "sh2" + select ADK_CPU_SH2 + depends on ADK_TARGET_ARCH_SH + +config ADK_TARGET_CPU_SH_SH2A + bool "sh2a" + select ADK_CPU_SH2A + depends on ADK_TARGET_ARCH_SH + +config ADK_TARGET_CPU_SH_SH3 + bool "sh3" + select ADK_CPU_SH3 + depends on ADK_TARGET_ARCH_SH + +config ADK_TARGET_CPU_SH_SH4 + bool "sh4" + select ADK_CPU_SH4 + depends on ADK_TARGET_ARCH_SH + +config ADK_TARGET_CPU_SH_SH4A + bool "sh4a" + select ADK_CPU_SH4A + depends on ADK_TARGET_ARCH_SH + config ADK_TARGET_CPU_X86_I486 bool "i486" select ADK_CPU_I486 diff --git a/target/sh/systems/toolchain-sh b/target/sh/systems/toolchain-sh index 2b59b132b..3db0fcb1c 100644 --- a/target/sh/systems/toolchain-sh +++ b/target/sh/systems/toolchain-sh @@ -1,6 +1,5 @@ config ADK_TARGET_SYSTEM_TOOLCHAIN_SH bool "Toolchain only" - select ADK_CPU_SH4 select ADK_TARGET_TOOLCHAIN select ADK_TARGET_PACKAGE_TXZ help -- cgit v1.2.3