From c7aa35971feff8d26379ff63299219b129fcbe5b Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 12 May 2018 15:04:16 +0200 Subject: nds32: use binutils/gcc from github --- .../fls-internal.patch | 29 ++++++++++++++++++++++ .../remove-gnu-suffix.patch | 14 +++++++++++ 2 files changed, 43 insertions(+) create mode 100644 toolchain/binutils/patches/nds32-binutils-2.30-branch-open/fls-internal.patch create mode 100644 toolchain/binutils/patches/nds32-binutils-2.30-branch-open/remove-gnu-suffix.patch (limited to 'toolchain/binutils/patches') 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 ;; -- cgit v1.2.3