Browse Source

v850: add basic newlib toolchain support

Waldemar Brodkorb 9 years ago
parent
commit
54c391836b

+ 1 - 0
target/arch.lst

@@ -25,6 +25,7 @@ sparc
 sparc64
 sh
 tile
+v850
 x86
 x86_64
 xtensa

+ 1 - 0
target/config/Config.in.binfmt

@@ -3,6 +3,7 @@
 
 choice
 prompt "Binary Format"
+depends on !ADK_TARGET_LIB_NEWLIB
 
 config ADK_TARGET_BINFMT_ELF
 	bool "ELF"

+ 7 - 0
target/config/Config.in.cpu

@@ -669,6 +669,12 @@ config ADK_CPU_TILE
 	select ADK_TARGET_WITH_NPTL
 	select ADK_TARGET_WITH_MMU
 
+config ADK_CPU_V850
+	bool
+	select ADK_TARGET_WITHOUT_MMU
+	select ADK_TARGET_WITHOUT_THREADS
+	select ADK_TARGET_WITHOUT_CXX
+
 config ADK_CPU_X86
 	bool
 	select ADK_TARGET_WITH_NPTL
@@ -995,5 +1001,6 @@ config ADK_TARGET_CPU_ARCH
 	default "sparc" if ADK_TARGET_ARCH_SPARC
 	default "sparc64" if ADK_TARGET_ARCH_SPARC64
 	default "tilegx" if ADK_TARGET_ARCH_TILE
+	default "v850" if ADK_TARGET_ARCH_V850
 	default "x86_64" if ADK_TARGET_ARCH_X86_64
 	default "xtensa" if ADK_TARGET_ARCH_XTENSA

+ 3 - 1
target/config/Config.in.libc

@@ -13,7 +13,8 @@ config ADK_TARGET_LIB_UCLIBC_NG
 		   !ADK_TARGET_ARCH_S390 && \
 		   !ADK_TARGET_ARCH_SPARC64 && \
 		   !ADK_TARGET_ARCH_PPC64 && \
-		   !ADK_TARGET_ARCH_TILE
+		   !ADK_TARGET_ARCH_TILE && \
+		   !ADK_TARGET_ARCH_V850
 	help
 	  http://uclibc-ng.org
 
@@ -62,6 +63,7 @@ config ADK_TARGET_LIB_NEWLIB
 		ADK_TARGET_ARCH_OR1K || \
 		ADK_TARGET_ARCH_PPC || \
 		ADK_TARGET_ARCH_SPARC || \
+		ADK_TARGET_ARCH_V850 || \
 		ADK_TARGET_ARCH_X86
 	help
 	  https://sourceware.org/newlib/

+ 7 - 0
target/v850/Makefile

@@ -0,0 +1,7 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+include $(ADK_TOPDIR)/mk/kernel-build.mk
+include $(ADK_TOPDIR)/mk/image.mk
+

+ 8 - 0
target/v850/systems/toolchain-v850

@@ -0,0 +1,8 @@
+config ADK_TARGET_SYSTEM_TOOLCHAIN_V850
+	bool "Toolchain only"
+	select ADK_CPU_V850
+	select ADK_TARGET_TOOLCHAIN
+	select ADK_TARGET_PACKAGE_TXZ
+	help
+	  V850 toolchain.
+

+ 4 - 0
toolchain/Makefile

@@ -56,7 +56,11 @@ download: $(DOWNLOAD)
 final: $(FINAL)
 
 gcc-configure: binutils-install gmp-install mpfr-install mpc-install libelf-install
+ifeq ($(ADK_TARGET_LIB_NEWLIB),y)
+$(CLIB)-install: gcc-configure
+else
 $(CLIB)-install: gcc-configure kernel-headers-configure
+endif
 gcc-install: $(ELF2FLT) $(CLIB)-install
 gcc-final: gcc-install $(GDB)