Browse Source

allow to select nds32 to build uClibc-ng toolchain

Waldemar Brodkorb 8 years ago
parent
commit
c99a84fd7c
3 changed files with 16 additions and 1 deletions
  1. 1 1
      scripts/create-menu
  2. 1 0
      target/config/Config.in.libc
  3. 14 0
      toolchain/binutils/patches/2.25.1/nds32.patch

+ 1 - 1
scripts/create-menu

@@ -93,7 +93,7 @@ for arch in $(cat $topdir/target/arch.lst);do
 		alpha|ia64|sh|sparc64|s390|tile|ppc64|mips64|x86_64)
 		  printf "\tdepends on ADK_TARGET_OS_LINUX\n" >> $topdir/target/config/Config.in.arch.choice
 		  ;;
-		nds32|moxie|v850)
+		moxie|v850)
 		  printf "\tdepends on ADK_TARGET_OS_BAREMETAL\n" >> $topdir/target/config/Config.in.arch.choice
 		  ;;
 	esac

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

@@ -25,6 +25,7 @@ config ADK_TARGET_LIB_UCLIBC_NG
 		ADK_TARGET_ARCH_MICROBLAZE || \
 		ADK_TARGET_ARCH_MIPS || \
 		ADK_TARGET_ARCH_MIPS64 || \
+		ADK_TARGET_ARCH_NDS32 || \
 		ADK_TARGET_ARCH_NIOS2 || \
 		ADK_TARGET_ARCH_OR1K || \
 		ADK_TARGET_ARCH_PPC || \

+ 14 - 0
toolchain/binutils/patches/2.25.1/nds32.patch

@@ -0,0 +1,14 @@
+diff -Nur binutils-2.25.1.orig/ld/configure.tgt binutils-2.25.1/ld/configure.tgt
+--- binutils-2.25.1.orig/ld/configure.tgt	2014-10-14 09:32:04.000000000 +0200
++++ binutils-2.25.1/ld/configure.tgt	2016-03-10 00:45:31.000000000 +0100
+@@ -525,8 +525,8 @@
+ nds32*be-*-elf*)	targ_emul=nds32belf
+ 			targ_extra_emuls="nds32elf nds32elf16m nds32belf16m"
+ 			;;
+-nds32*le-*-linux-gnu*)	targ_emul=nds32elf_linux ;;
+-nds32*be-*-linux-gnu*)	targ_emul=nds32belf_linux ;;
++nds32*le-*-linux*)	targ_emul=nds32elf_linux ;;
++nds32*be-*-linux*)	targ_emul=nds32belf_linux ;;
+ nios2*-*-linux*)	targ_emul=nios2linux ;;
+ nios2*-*-*)		targ_emul=nios2elf ;;
+ ns32k-pc532-mach* | ns32k-pc532-ux*)  targ_emul=pc532macha ;;