summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--target/config/Config.in.binutils2
-rw-r--r--target/config/Config.in.compiler2
-rw-r--r--toolchain/binutils/Makefile.inc6
-rw-r--r--toolchain/binutils/patches/nds32-binutils-2.30-branch-open/fls-internal.patch29
-rw-r--r--toolchain/binutils/patches/nds32-binutils-2.30-branch-open/remove-gnu-suffix.patch14
-rw-r--r--toolchain/gcc/Makefile.inc4
6 files changed, 50 insertions, 7 deletions
diff --git a/target/config/Config.in.binutils b/target/config/Config.in.binutils
index 6e3d3383c..7f9455f2f 100644
--- a/target/config/Config.in.binutils
+++ b/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
diff --git a/target/config/Config.in.compiler b/target/config/Config.in.compiler
index aa692157c..6d0924398 100644
--- a/target/config/Config.in.compiler
+++ b/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
diff --git a/toolchain/binutils/Makefile.inc b/toolchain/binutils/Makefile.inc
index 1f72612a4..c2ad2076e 100644
--- a/toolchain/binutils/Makefile.inc
+++ b/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)
diff --git a/toolchain/binutils/patches/nds32-binutils-2.30-branch-open/fls-internal.patch b/toolchain/binutils/patches/nds32-binutils-2.30-branch-open/fls-internal.patch
new file mode 100644
index 000000000..33c78ac36
--- /dev/null
+++ b/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);
+ }
+ }
+
diff --git a/toolchain/binutils/patches/nds32-binutils-2.30-branch-open/remove-gnu-suffix.patch b/toolchain/binutils/patches/nds32-binutils-2.30-branch-open/remove-gnu-suffix.patch
new file mode 100644
index 000000000..3afa794c4
--- /dev/null
+++ b/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 ;;
diff --git a/toolchain/gcc/Makefile.inc b/toolchain/gcc/Makefile.inc
index e9c48aa9c..4c2f06db8 100644
--- a/toolchain/gcc/Makefile.inc
+++ b/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