Browse Source

nds32: use binutils/gcc from github

Waldemar Brodkorb 6 years ago
parent
commit
c7aa35971f

+ 1 - 1
target/config/Config.in.binutils

@@ -38,7 +38,7 @@ config ADK_TOOLCHAIN_BINUTILS_ARC
 	depends on ADK_TARGET_ARCH_ARC
 
 config ADK_TOOLCHAIN_BINUTILS_NDS32
-	bool "2.24-nds32"
+	bool "nds32-2.30-open"
 	depends on ADK_TARGET_ARCH_NDS32
 
 config ADK_TOOLCHAIN_BINUTILS_CSKY

+ 1 - 1
target/config/Config.in.compiler

@@ -88,7 +88,7 @@ config ADK_TOOLCHAIN_GCC_METAG
 	depends on ADK_TARGET_ARCH_METAG
 
 config ADK_TOOLCHAIN_GCC_NDS32
-	bool "4.9.4-nds32"
+	bool "nds32-6.3.0-open"
 	depends on ADK_TARGET_ARCH_NDS32
 
 config ADK_TOOLCHAIN_GCC_OR1K

+ 3 - 3
toolchain/binutils/Makefile.inc

@@ -38,10 +38,10 @@ PKG_SITES:=		https://github.com/c-sky/binutils-gdb.git
 DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.xz
 endif
 ifeq ($(ADK_TOOLCHAIN_BINUTILS_NDS32),y)
-PKG_VERSION:=		2.24-nds32
+PKG_VERSION:=		nds32-binutils-2.30-branch-open
+PKG_GIT:=		branch
 PKG_RELEASE:=		1
-PKG_HASH:=		ab1c72aeed2d50403bdf67914e60d936279d065943d83d1c19c20462a7b82cda
-PKG_SITES:=		http://distfiles.openadk.org/
+PKG_SITES:=		https://github.com/andestech/binutils.git
 DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.xz
 endif
 ifeq ($(ADK_TOOLCHAIN_BINUTILS_AVR32),y)

+ 29 - 0
toolchain/binutils/patches/nds32-binutils-2.30-branch-open/fls-internal.patch

@@ -0,0 +1,29 @@
+diff -Nur binutils-nds32-binutils-2.30-branch-open.orig/bfd/elf32-nds32.c binutils-nds32-binutils-2.30-branch-open/bfd/elf32-nds32.c
+--- binutils-nds32-binutils-2.30-branch-open.orig/bfd/elf32-nds32.c	2018-05-10 22:01:57.000000000 +0200
++++ binutils-nds32-binutils-2.30-branch-open/bfd/elf32-nds32.c	2018-05-12 09:01:10.000000000 +0200
+@@ -5286,7 +5286,7 @@
+ }
+ 
+ static unsigned int
+-fls (register unsigned int x)
++fls_internal (register unsigned int x)
+ {
+   return ffs (x & (-x));
+ }
+@@ -6189,14 +6189,14 @@
+ 
+ 	    if (1 < ones32 (tls_type))
+ 	      {
+-		eff_tls_type = 1 << (fls (tls_type) - 1);
++		eff_tls_type = 1 << (fls_internal (tls_type) - 1);
+ 		/* TLS model shall be handled in nds32_elf_unify_tls_model ()  */
+ 
+ 		/* TLS model X -> LE is not implement yet!
+ 		 * workaround here!  */
+ 		if (eff_tls_type == GOT_TLS_LE)
+ 		  {
+-		    eff_tls_type = 1 << (fls (tls_type ^ eff_tls_type) - 1);
++		    eff_tls_type = 1 << (fls_internal (tls_type ^ eff_tls_type) - 1);
+ 		  }
+ 	      }
+ 

+ 14 - 0
toolchain/binutils/patches/nds32-binutils-2.30-branch-open/remove-gnu-suffix.patch

@@ -0,0 +1,14 @@
+diff -Nur binutils-nds32-binutils-2.30-branch-open.orig/ld/configure.tgt binutils-nds32-binutils-2.30-branch-open/ld/configure.tgt
+--- binutils-nds32-binutils-2.30-branch-open.orig/ld/configure.tgt	2018-05-10 22:03:15.000000000 +0200
++++ binutils-nds32-binutils-2.30-branch-open/ld/configure.tgt	2018-05-12 08:44:24.000000000 +0200
+@@ -583,8 +583,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 ;;

+ 2 - 2
toolchain/gcc/Makefile.inc

@@ -57,9 +57,9 @@ DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.gz
 LIBSTDCXXVER:=		19
 endif
 ifeq ($(ADK_TOOLCHAIN_GCC_NDS32),y)
-PKG_VERSION:=		4.9.4-nds32
+PKG_VERSION:=		nds32-6.3.0-open
 PKG_HASH:=		b23ce96df25dfdd5526496a3c2cd7ee1da4ed4094971a2e0c47c73ad7e1ad30a
-PKG_SITES:=		http://distfiles.openadk.org/
+PKG_SITES:=		https://github.com/andestech/gcc.git
 PKG_RELEASE:=		1
 DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.xz
 endif