summaryrefslogtreecommitdiff
path: root/packages/binutils
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-12-02 20:44:39 (GMT)
committerAlexey Neyman <stilor@att.net>2017-12-02 20:44:39 (GMT)
commit98bc4decdeab1361bdc585c86591718fb08c8ffb (patch)
tree4e048ed57988306696efa3c5b81a80d48030e913 /packages/binutils
parent2a1935f3ad41d360dd3d96a1b0486083293651dd (diff)
Run all patches through renumbering and update
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'packages/binutils')
-rw-r--r--packages/binutils/2.23.2/0000-sh-conf.patch (renamed from packages/binutils/2.23.2/120-sh-conf.patch)9
-rw-r--r--packages/binutils/2.23.2/0001-001_ld_makefile_patch.patch (renamed from packages/binutils/2.26.1/300-001_ld_makefile_patch.patch)13
-rw-r--r--packages/binutils/2.23.2/0002-012_check_ldrunpath_length.patch (renamed from packages/binutils/2.23.2/300-012_check_ldrunpath_length.patch)13
-rw-r--r--packages/binutils/2.23.2/0003-fix-gold-pthreads-typo.patch (renamed from packages/binutils/2.24/310-fix-gold-pthreads-typo.patch)8
-rw-r--r--packages/binutils/2.23.2/0004-sysroot.patch (renamed from packages/binutils/2.23.2/500-sysroot.patch)6
-rw-r--r--packages/binutils/2.23.2/0005-poison-system-directories.patch (renamed from packages/binutils/2.23.2/600-poison-system-directories.patch)30
-rw-r--r--packages/binutils/2.23.2/0006-xtensa-trampolines.patch (renamed from packages/binutils/2.23.2/900-xtensa-trampolines.patch)73
-rw-r--r--packages/binutils/2.23.2/0007-xtensa-gas-first-frag-alignment.patch (renamed from packages/binutils/2.24/901-xtensa-gas-first-frag-alignment.patch)9
-rw-r--r--packages/binutils/2.23.2/0008-xtensa-gas-ld-diff-relocation-signed.patch (renamed from packages/binutils/2.23.2/902-xtensa-gas-ld-diff-relocation-signed.patch)21
-rw-r--r--packages/binutils/2.23.2/0009-xtensa-fix-ld-segfault-when-linking-linux-modules.patch (renamed from packages/binutils/2.24/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch)9
-rw-r--r--packages/binutils/2.23.2/0010-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch (renamed from packages/binutils/2.23.2/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch)9
-rw-r--r--packages/binutils/2.23.2/0011-Fix-trampolines-search-code-for-conditional-branches.patch (renamed from packages/binutils/2.23.2/905-Fix-trampolines-search-code-for-conditional-branches.patch)17
-rw-r--r--packages/binutils/2.23.2/0012-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch (renamed from packages/binutils/2.24/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch)9
-rw-r--r--packages/binutils/2.23.2/0013-xtensa-fix-gas-segfault-with-text-section-literals.patch (renamed from packages/binutils/2.24/912-xtensa-fix-gas-segfault-with-text-section-literals.patch)9
-rw-r--r--packages/binutils/2.23.2/0014-xtensa-fix-signedness-of-gas-relocations.patch (renamed from packages/binutils/2.24/914-xtensa-fix-signedness-of-gas-relocations.patch)9
-rw-r--r--packages/binutils/2.23.2/0015-xtensa-fix-.init-.fini-literals-moving.patch (renamed from packages/binutils/2.23.2/915-xtensa-fix-.init-.fini-literals-moving.patch)12
-rw-r--r--packages/binutils/2.23.2/300-001_ld_makefile_patch.patch24
-rw-r--r--packages/binutils/2.24/0000-fix-enable-install-libiberty-flag.patch (renamed from packages/binutils/2.24/001-fix-enable-install-libiberty-flag.patch)13
-rw-r--r--packages/binutils/2.24/0001-dont-segv-on-initial-instructions-overflow.patch (renamed from packages/binutils/2.24/002-dont-segv-on-initial-instructions-overflow.patch)14
-rw-r--r--packages/binutils/2.24/0002-sh-conf.patch34
-rw-r--r--packages/binutils/2.24/0003-001_ld_makefile_patch.patch (renamed from packages/binutils/2.27/300-001_ld_makefile_patch.patch)13
-rw-r--r--packages/binutils/2.24/0004-012_check_ldrunpath_length.patch (renamed from packages/binutils/2.24/300-012_check_ldrunpath_length.patch)13
-rw-r--r--packages/binutils/2.24/0005-fix-gold-pthreads-typo.patch (renamed from packages/binutils/2.26.1/310-fix-gold-pthreads-typo.patch)8
-rw-r--r--packages/binutils/2.24/0006-sysroot.patch (renamed from packages/binutils/2.25.1/500-sysroot.patch)6
-rw-r--r--packages/binutils/2.24/0007-poison-system-directories.patch (renamed from packages/binutils/2.24/600-poison-system-directories.patch)30
-rw-r--r--packages/binutils/2.24/0008-Fix-library-paths-on-PowerPC.patch (renamed from packages/binutils/2.24/700-Fix-library-paths-on-PowerPC.patch)9
-rw-r--r--packages/binutils/2.24/0009-xtensa-trampolines.patch (renamed from packages/binutils/2.24/900-xtensa-trampolines.patch)73
-rw-r--r--packages/binutils/2.24/0010-xtensa-gas-first-frag-alignment.patch (renamed from packages/binutils/2.23.2/901-xtensa-gas-first-frag-alignment.patch)9
-rw-r--r--packages/binutils/2.24/0011-xtensa-gas-ld-diff-relocation-signed.patch (renamed from packages/binutils/2.24/902-xtensa-gas-ld-diff-relocation-signed.patch)21
-rw-r--r--packages/binutils/2.24/0012-xtensa-fix-ld-segfault-when-linking-linux-modules.patch (renamed from packages/binutils/2.23.2/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch)9
-rw-r--r--packages/binutils/2.24/0013-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch (renamed from packages/binutils/2.24/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch)9
-rw-r--r--packages/binutils/2.24/0014-Fix-trampolines-search-code-for-conditional-branches.patch (renamed from packages/binutils/2.25.1/905-Fix-trampolines-search-code-for-conditional-branches.patch)17
-rw-r--r--packages/binutils/2.24/0015-xtensa-optimize-check_section_ebb_pcrels_fit.patch (renamed from packages/binutils/2.24/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch)29
-rw-r--r--packages/binutils/2.24/0016-xtensa-optimize-removed_by_actions.patch (renamed from packages/binutils/2.25.1/907-xtensa-optimize-removed_by_actions.patch)33
-rw-r--r--packages/binutils/2.24/0017-xtensa-optimize-find_removed_literal.patch (renamed from packages/binutils/2.24/908-xtensa-optimize-find_removed_literal.patch)15
-rw-r--r--packages/binutils/2.24/0018-xtensa-replace-action-list-with-splay-tree.patch (renamed from packages/binutils/2.25.1/909-xtensa-replace-action-list-with-splay-tree.patch)133
-rw-r--r--packages/binutils/2.24/0019-xtensa-optimize-trampolines-relaxation.patch (renamed from packages/binutils/2.24/910-xtensa-optimize-trampolines-relaxation.patch)27
-rw-r--r--packages/binutils/2.24/0020-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch (renamed from packages/binutils/2.25.1/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch)9
-rw-r--r--packages/binutils/2.24/0021-xtensa-fix-gas-segfault-with-text-section-literals.patch (renamed from packages/binutils/2.25.1/912-xtensa-fix-gas-segfault-with-text-section-literals.patch)9
-rw-r--r--packages/binutils/2.24/0022-xtensa-add-auto-litpools-option.patch (renamed from packages/binutils/2.24/913-xtensa-add-auto-litpools-option.patch)64
-rw-r--r--packages/binutils/2.24/0023-xtensa-fix-signedness-of-gas-relocations.patch (renamed from packages/binutils/2.23.2/914-xtensa-fix-signedness-of-gas-relocations.patch)9
-rw-r--r--packages/binutils/2.24/0024-xtensa-fix-.init-.fini-literals-moving.patch (renamed from packages/binutils/2.24/915-xtensa-fix-.init-.fini-literals-moving.patch)11
-rw-r--r--packages/binutils/2.24/120-sh-conf.patch31
-rw-r--r--packages/binutils/2.24/300-001_ld_makefile_patch.patch24
-rw-r--r--packages/binutils/2.25.1/0000-sh-conf.patch (renamed from packages/binutils/2.28.1/120-sh-conf.patch)13
-rw-r--r--packages/binutils/2.25.1/0001-001_ld_makefile_patch.patch (renamed from packages/binutils/2.28.1/300-001_ld_makefile_patch.patch)13
-rw-r--r--packages/binutils/2.25.1/0002-012_check_ldrunpath_length.patch (renamed from packages/binutils/2.25.1/300-012_check_ldrunpath_length.patch)10
-rw-r--r--packages/binutils/2.25.1/0003-fix-gold-pthreads-typo.patch (renamed from packages/binutils/2.25.1/310-fix-gold-pthreads-typo.patch)8
-rw-r--r--packages/binutils/2.25.1/0004-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch (renamed from packages/binutils/2.25.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch)8
-rw-r--r--packages/binutils/2.25.1/0005-Dont-link-to-libfl-as-its-unnecessary.patch105
-rw-r--r--packages/binutils/2.25.1/0006-Darwin-gold-binary-cc-include-string-not-cstring.patch15
-rw-r--r--packages/binutils/2.25.1/0007-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch (renamed from packages/binutils/2.26.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch)23
-rw-r--r--packages/binutils/2.25.1/0008-arm-rotate_left-fix.patch (renamed from packages/binutils/2.25.1/400-arm-rotate_left-fix.patch)11
-rw-r--r--packages/binutils/2.25.1/0009-sysroot.patch (renamed from packages/binutils/2.26.1/500-sysroot.patch)6
-rw-r--r--packages/binutils/2.25.1/0010-poison-system-directories.patch (renamed from packages/binutils/2.25.1/600-poison-system-directories.patch)57
-rw-r--r--packages/binutils/2.25.1/0011-Fix-library-paths-on-PowerPC.patch (renamed from packages/binutils/2.26.1/700-Fix-library-paths-on-PowerPC.patch)9
-rw-r--r--packages/binutils/2.25.1/0012-Fix-trampolines-search-code-for-conditional-branches.patch (renamed from packages/binutils/2.24/905-Fix-trampolines-search-code-for-conditional-branches.patch)17
-rw-r--r--packages/binutils/2.25.1/0013-xtensa-optimize-check_section_ebb_pcrels_fit.patch (renamed from packages/binutils/2.25.1/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch)29
-rw-r--r--packages/binutils/2.25.1/0014-xtensa-optimize-removed_by_actions.patch (renamed from packages/binutils/2.24/907-xtensa-optimize-removed_by_actions.patch)33
-rw-r--r--packages/binutils/2.25.1/0015-xtensa-optimize-find_removed_literal.patch (renamed from packages/binutils/2.25.1/908-xtensa-optimize-find_removed_literal.patch)15
-rw-r--r--packages/binutils/2.25.1/0016-xtensa-replace-action-list-with-splay-tree.patch (renamed from packages/binutils/2.24/909-xtensa-replace-action-list-with-splay-tree.patch)131
-rw-r--r--packages/binutils/2.25.1/0017-xtensa-optimize-trampolines-relaxation.patch (renamed from packages/binutils/2.25.1/910-xtensa-optimize-trampolines-relaxation.patch)27
-rw-r--r--packages/binutils/2.25.1/0018-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch (renamed from packages/binutils/2.23.2/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch)9
-rw-r--r--packages/binutils/2.25.1/0019-xtensa-fix-gas-segfault-with-text-section-literals.patch (renamed from packages/binutils/2.23.2/912-xtensa-fix-gas-segfault-with-text-section-literals.patch)9
-rw-r--r--packages/binutils/2.25.1/0020-xtensa-add-auto-litpools-option.patch (renamed from packages/binutils/2.25.1/913-xtensa-add-auto-litpools-option.patch)63
-rw-r--r--packages/binutils/2.25.1/0021-xtensa-fix-signedness-of-gas-relocations.patch (renamed from packages/binutils/2.25.1/914-xtensa-fix-signedness-of-gas-relocations.patch)25
-rw-r--r--packages/binutils/2.25.1/0022-xtensa-fix-.init-.fini-literals-moving.patch (renamed from packages/binutils/2.26.1/915-xtensa-fix-.init-.fini-literals-moving.patch)27
-rw-r--r--packages/binutils/2.25.1/330-Dont-link-to-libfl-as-its-unnecessary.patch102
-rw-r--r--packages/binutils/2.25.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch11
-rw-r--r--packages/binutils/2.26.1/0000-sh-conf.patch (renamed from packages/binutils/2.27/120-sh-conf.patch)13
-rw-r--r--packages/binutils/2.26.1/0001-001_ld_makefile_patch.patch (renamed from packages/binutils/2.25.1/300-001_ld_makefile_patch.patch)13
-rw-r--r--packages/binutils/2.26.1/0002-012_check_ldrunpath_length.patch (renamed from packages/binutils/2.26.1/300-012_check_ldrunpath_length.patch)10
-rw-r--r--packages/binutils/2.26.1/0003-fix-gold-pthreads-typo.patch (renamed from packages/binutils/2.23.2/310-fix-gold-pthreads-typo.patch)8
-rw-r--r--packages/binutils/2.26.1/0004-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch (renamed from packages/binutils/2.26.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch)8
-rw-r--r--packages/binutils/2.26.1/0005-Dont-link-to-libfl-as-its-unnecessary.patch (renamed from packages/binutils/2.26.1/330-Dont-link-to-libfl-as-its-unnecessary.patch)39
-rw-r--r--packages/binutils/2.26.1/0006-Darwin-gold-binary-cc-include-string-not-cstring.patch (renamed from packages/binutils/2.29.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch)6
-rw-r--r--packages/binutils/2.26.1/0007-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch (renamed from packages/binutils/2.27/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch)23
-rw-r--r--packages/binutils/2.26.1/0008-sysroot.patch (renamed from packages/binutils/2.24/500-sysroot.patch)6
-rw-r--r--packages/binutils/2.26.1/0009-poison-system-directories.patch (renamed from packages/binutils/2.26.1/600-poison-system-directories.patch)56
-rw-r--r--packages/binutils/2.26.1/0010-Fix-library-paths-on-PowerPC.patch (renamed from packages/binutils/2.27/700-Fix-library-paths-on-PowerPC.patch)9
-rw-r--r--packages/binutils/2.26.1/0011-xtensa-fix-signedness-of-gas-relocations.patch (renamed from packages/binutils/2.26.1/914-xtensa-fix-signedness-of-gas-relocations.patch)25
-rw-r--r--packages/binutils/2.26.1/0012-xtensa-fix-.init-.fini-literals-moving.patch (renamed from packages/binutils/2.25.1/915-xtensa-fix-.init-.fini-literals-moving.patch)27
-rw-r--r--packages/binutils/2.27/0000-missing-break.patch (renamed from packages/binutils/2.27/100-missing-break.patch)12
-rw-r--r--packages/binutils/2.27/0001-sh-conf.patch (renamed from packages/binutils/2.26.1/120-sh-conf.patch)13
-rw-r--r--packages/binutils/2.27/0002-001_ld_makefile_patch.patch27
-rw-r--r--packages/binutils/2.27/0003-012_check_ldrunpath_length.patch (renamed from packages/binutils/2.27/300-012_check_ldrunpath_length.patch)10
-rw-r--r--packages/binutils/2.27/0004-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch (renamed from packages/binutils/2.29.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch)8
-rw-r--r--packages/binutils/2.27/0005-Dont-link-to-libfl-as-its-unnecessary.patch (renamed from packages/binutils/2.27/330-Dont-link-to-libfl-as-its-unnecessary.patch)33
-rw-r--r--packages/binutils/2.27/0006-Darwin-gold-binary-cc-include-string-not-cstring.patch (renamed from packages/binutils/2.26.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch)6
-rw-r--r--packages/binutils/2.27/0007-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch (renamed from packages/binutils/2.25.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch)23
-rw-r--r--packages/binutils/2.27/0008-sysroot.patch (renamed from packages/binutils/2.27/500-sysroot.patch)4
-rw-r--r--packages/binutils/2.27/0009-poison-system-directories.patch (renamed from packages/binutils/2.27/600-poison-system-directories.patch)56
-rw-r--r--packages/binutils/2.27/0010-Fix-library-paths-on-PowerPC.patch (renamed from packages/binutils/2.25.1/700-Fix-library-paths-on-PowerPC.patch)9
-rw-r--r--packages/binutils/2.27/0011-xtensa-reverse-shift-count.patch (renamed from packages/binutils/2.27/999-xtensa-reverse-shift-count.patch)12
-rw-r--r--packages/binutils/2.28.1/0000-sh-conf.patch (renamed from packages/binutils/2.25.1/120-sh-conf.patch)13
-rw-r--r--packages/binutils/2.28.1/0001-001_ld_makefile_patch.patch27
-rw-r--r--packages/binutils/2.28.1/0002-012_check_ldrunpath_length.patch (renamed from packages/binutils/2.28.1/300-012_check_ldrunpath_length.patch)10
-rw-r--r--packages/binutils/2.28.1/0003-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch (renamed from packages/binutils/2.27/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch)8
-rw-r--r--packages/binutils/2.28.1/0004-Dont-link-to-libfl-as-its-unnecessary.patch (renamed from packages/binutils/2.28.1/330-Dont-link-to-libfl-as-its-unnecessary.patch)37
-rw-r--r--packages/binutils/2.28.1/0005-Darwin-gold-binary-cc-include-string-not-cstring.patch (renamed from packages/binutils/2.27/340-Darwin-gold-binary-cc-include-string-not-cstring.patch)6
-rw-r--r--packages/binutils/2.28.1/0006-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch (renamed from packages/binutils/2.28.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch)23
-rw-r--r--packages/binutils/2.28.1/0007-sysroot.patch (renamed from packages/binutils/2.28.1/500-sysroot.patch)4
-rw-r--r--packages/binutils/2.28.1/0008-poison-system-directories.patch (renamed from packages/binutils/2.28.1/600-poison-system-directories.patch)56
-rw-r--r--packages/binutils/2.29.1/0000-sh-conf.patch (renamed from packages/binutils/2.29.1/120-sh-conf.patch)13
-rw-r--r--packages/binutils/2.29.1/0001-001_ld_makefile_patch.patch27
-rw-r--r--packages/binutils/2.29.1/0002-012_check_ldrunpath_length.patch (renamed from packages/binutils/2.29.1/300-012_check_ldrunpath_length.patch)10
-rw-r--r--packages/binutils/2.29.1/0003-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch (renamed from packages/binutils/2.28.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch)8
-rw-r--r--packages/binutils/2.29.1/0004-Dont-link-to-libfl-as-its-unnecessary.patch (renamed from packages/binutils/2.29.1/330-Dont-link-to-libfl-as-its-unnecessary.patch)37
-rw-r--r--packages/binutils/2.29.1/0005-Darwin-gold-binary-cc-include-string-not-cstring.patch (renamed from packages/binutils/2.28.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch)6
-rw-r--r--packages/binutils/2.29.1/0006-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch70
-rw-r--r--packages/binutils/2.29.1/0007-sysroot.patch (renamed from packages/binutils/2.29.1/500-sysroot.patch)6
-rw-r--r--packages/binutils/2.29.1/0008-poison-system-directories.patch (renamed from packages/binutils/2.29.1/600-poison-system-directories.patch)60
-rw-r--r--packages/binutils/2.29.1/300-001_ld_makefile_patch.patch26
-rw-r--r--packages/binutils/2.29.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch77
114 files changed, 1208 insertions, 1500 deletions
diff --git a/packages/binutils/2.23.2/120-sh-conf.patch b/packages/binutils/2.23.2/0000-sh-conf.patch
index ea3d1b6..b10d279 100644
--- a/packages/binutils/2.23.2/120-sh-conf.patch
+++ b/packages/binutils/2.23.2/0000-sh-conf.patch
@@ -5,9 +5,14 @@ fix that up too.. now we're able to actually build a real toolchain for
sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more
inept targets than that one, really. Go look, I promise).
+---
+ configure | 2 +-
+ configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
--- a/configure
+++ b/configure
-@@ -1495,7 +1495,7 @@
+@@ -3595,7 +3595,7 @@
mips*-*-*)
noconfigdirs="$noconfigdirs gprof"
;;
@@ -18,7 +23,7 @@ inept targets than that one, really. Go look, I promise).
;;
--- a/configure.ac
+++ b/configure.ac
-@@ -712,7 +712,7 @@
+@@ -1021,7 +1021,7 @@
mips*-*-*)
noconfigdirs="$noconfigdirs gprof"
;;
diff --git a/packages/binutils/2.26.1/300-001_ld_makefile_patch.patch b/packages/binutils/2.23.2/0001-001_ld_makefile_patch.patch
index 2a1320c..3992be3 100644
--- a/packages/binutils/2.26.1/300-001_ld_makefile_patch.patch
+++ b/packages/binutils/2.23.2/0001-001_ld_makefile_patch.patch
@@ -1,8 +1,11 @@
-diff --git a/ld/Makefile.am b/ld/Makefile.am
-index 9575f1f..84df0bf 100644
+---
+ ld/Makefile.am | 2 +-
+ ld/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
-@@ -54,7 +54,7 @@ endif
+@@ -37,7 +37,7 @@
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.
@@ -11,11 +14,9 @@ index 9575f1f..84df0bf 100644
EMUL = @EMUL@
EMULATION_OFILES = @EMULATION_OFILES@
-diff --git a/ld/Makefile.in b/ld/Makefile.in
-index 9f56ca1..272860f 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
-@@ -388,7 +388,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
+@@ -367,7 +367,7 @@
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.
diff --git a/packages/binutils/2.23.2/300-012_check_ldrunpath_length.patch b/packages/binutils/2.23.2/0002-012_check_ldrunpath_length.patch
index df78310..a24df5e 100644
--- a/packages/binutils/2.23.2/300-012_check_ldrunpath_length.patch
+++ b/packages/binutils/2.23.2/0002-012_check_ldrunpath_length.patch
@@ -1,7 +1,10 @@
-diff -Nura binutils-2.21.orig/ld/emultempl/elf32.em binutils-2.21/ld/emultempl/elf32.em
---- binutils-2.21.orig/ld/emultempl/elf32.em 2010-10-29 09:10:36.000000000 -0300
-+++ binutils-2.21/ld/emultempl/elf32.em 2010-12-10 09:26:56.746102724 -0300
-@@ -1270,6 +1270,8 @@
+---
+ ld/emultempl/elf32.em | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/ld/emultempl/elf32.em
++++ b/ld/emultempl/elf32.em
+@@ -1278,6 +1278,8 @@
&& command_line.rpath == NULL)
{
lib_path = (const char *) getenv ("LD_RUN_PATH");
@@ -10,7 +13,7 @@ diff -Nura binutils-2.21.orig/ld/emultempl/elf32.em binutils-2.21/ld/emultempl/e
if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
force))
break;
-@@ -1497,6 +1499,8 @@
+@@ -1505,6 +1507,8 @@
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
diff --git a/packages/binutils/2.24/310-fix-gold-pthreads-typo.patch b/packages/binutils/2.23.2/0003-fix-gold-pthreads-typo.patch
index f2e6ff2..40861f5 100644
--- a/packages/binutils/2.24/310-fix-gold-pthreads-typo.patch
+++ b/packages/binutils/2.23.2/0003-fix-gold-pthreads-typo.patch
@@ -1,5 +1,9 @@
---- binutils-2.25.1/gold/gold-threads.cc.orig 2014-10-14 08:32:04.000000000 +0100
-+++ binutils-2.25.1/gold/gold-threads.cc 2015-10-20 22:38:18.640819300 +0100
+---
+ gold/gold-threads.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/gold/gold-threads.cc
++++ b/gold/gold-threads.cc
@@ -102,9 +102,9 @@
if (err != 0)
gold_fatal(_("pthead_mutextattr_init failed: %s"), strerror(err));
diff --git a/packages/binutils/2.23.2/500-sysroot.patch b/packages/binutils/2.23.2/0004-sysroot.patch
index e49c795..13b5288 100644
--- a/packages/binutils/2.23.2/500-sysroot.patch
+++ b/packages/binutils/2.23.2/0004-sysroot.patch
@@ -5,9 +5,13 @@ Always try to prepend the sysroot prefix to absolute filenames first.
http://bugs.gentoo.org/275666
http://sourceware.org/bugzilla/show_bug.cgi?id=10340
+---
+ ld/ldfile.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
-@@ -308,18 +308,25 @@
+@@ -341,18 +341,25 @@
directory first. */
if (! entry->flags.maybe_archive)
{
diff --git a/packages/binutils/2.23.2/600-poison-system-directories.patch b/packages/binutils/2.23.2/0005-poison-system-directories.patch
index 780e48e..539da41 100644
--- a/packages/binutils/2.23.2/600-poison-system-directories.patch
+++ b/packages/binutils/2.23.2/0005-poison-system-directories.patch
@@ -57,8 +57,18 @@ Code Merged from Sourcery G++ binutils 2.19 - 4.4-277
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-Index: b/ld/config.in
-===================================================================
+---
+ ld/config.in | 3 +++
+ ld/configure | 14 ++++++++++++++
+ ld/configure.in | 10 ++++++++++
+ ld/ld.h | 8 ++++++++
+ ld/ld.texinfo | 12 ++++++++++++
+ ld/ldfile.c | 17 +++++++++++++++++
+ ld/ldlex.h | 2 ++
+ ld/ldmain.c | 2 ++
+ ld/lexsup.c | 21 +++++++++++++++++++++
+ 9 files changed, 89 insertions(+)
+
--- a/ld/config.in
+++ b/ld/config.in
@@ -11,6 +11,9 @@
@@ -71,8 +81,6 @@ Index: b/ld/config.in
/* Additional extension a shared object might have. */
#undef EXTRA_SHLIB_EXTENSION
-Index: b/ld/configure
-===================================================================
--- a/ld/configure
+++ b/ld/configure
@@ -773,6 +773,7 @@
@@ -111,8 +119,6 @@ Index: b/ld/configure
# Check whether --enable-got was given.
if test "${enable_got+set}" = set; then :
-Index: b/ld/configure.in
-===================================================================
--- a/ld/configure.in
+++ b/ld/configure.in
@@ -70,6 +70,16 @@
@@ -132,8 +138,6 @@ Index: b/ld/configure.in
dnl Use --enable-gold to decide if this linker should be the default.
dnl "install_as_default" is set to false if gold is the default linker.
dnl "installed_linker" is the installed BFD linker name.
-Index: b/ld/ldfile.c
-===================================================================
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -116,6 +116,23 @@
@@ -160,8 +164,6 @@ Index: b/ld/ldfile.c
}
/* Try to open a BFD for a lang_input_statement. */
-Index: b/ld/ld.h
-===================================================================
--- a/ld/ld.h
+++ b/ld/ld.h
@@ -203,6 +203,14 @@
@@ -179,8 +181,6 @@ Index: b/ld/ld.h
/* Big or little endian as set on command line. */
enum endian_enum endian;
-Index: b/ld/ldmain.c
-===================================================================
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -265,6 +265,8 @@
@@ -192,8 +192,6 @@ Index: b/ld/ldmain.c
/* We initialize DEMANGLING based on the environment variable
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
-Index: b/ld/ld.texinfo
-===================================================================
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -2154,6 +2154,18 @@
@@ -215,8 +213,6 @@ Index: b/ld/ld.texinfo
@end table
@c man end
-Index: b/ld/lexsup.c
-===================================================================
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -498,6 +498,14 @@
@@ -264,8 +260,6 @@ Index: b/ld/lexsup.c
while (ingroup)
{
lang_leave_group ();
-Index: b/ld/ldlex.h
-===================================================================
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
@@ -136,6 +136,8 @@
diff --git a/packages/binutils/2.23.2/900-xtensa-trampolines.patch b/packages/binutils/2.23.2/0006-xtensa-trampolines.patch
index b5b934f..b4670bc 100644
--- a/packages/binutils/2.23.2/900-xtensa-trampolines.patch
+++ b/packages/binutils/2.23.2/0006-xtensa-trampolines.patch
@@ -35,22 +35,20 @@ Subject: [PATCH] Add support to the Xtensa target for creating trampolines for
Backported from: a82c7d9030b67a6a76a5403d0e1641f9e42141ac
Changes to Changelog files are dropped.
- gas/config/tc-xtensa.c | 558 +++++++++++++++++++++++++++++++++-
- gas/config/tc-xtensa.h | 5 +
- gas/frags.c | 15 +
- gas/frags.h | 3 +
- gas/testsuite/gas/xtensa/all.exp | 1 +
- gas/testsuite/gas/xtensa/trampoline.d | 26 ++
- gas/testsuite/gas/xtensa/trampoline.s | 21 ++
- 11 files changed, 753 insertions(+), 2 deletions(-)
+ gas/config/tc-xtensa.c | 558 +++++++++++++++++++++++++++++++++-
+ gas/config/tc-xtensa.h | 5
+ gas/frags.c | 15
+ gas/frags.h | 3
+ gas/testsuite/gas/xtensa/all.exp | 1
+ gas/testsuite/gas/xtensa/trampoline.d | 26 +
+ gas/testsuite/gas/xtensa/trampoline.s | 21 +
+ 7 files changed, 627 insertions(+), 2 deletions(-)
create mode 100644 gas/testsuite/gas/xtensa/trampoline.d
create mode 100644 gas/testsuite/gas/xtensa/trampoline.s
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index fe8ec0f..ea23c96 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -468,6 +468,12 @@ static void xtensa_set_frag_assembly_state (fragS *);
+@@ -469,6 +469,12 @@
static void finish_vinsn (vliw_insn *);
static bfd_boolean emit_single_op (TInsn *);
static int total_frag_text_expansion (fragS *);
@@ -63,7 +61,7 @@ index fe8ec0f..ea23c96 100644
/* Alignment Functions. */
-@@ -520,6 +526,7 @@ static void tinsn_from_chars (TInsn *, char *, int);
+@@ -521,6 +527,7 @@
static void tinsn_immed_from_frag (TInsn *, fragS *, int);
static int get_num_stack_text_bytes (IStack *);
static int get_num_stack_literal_bytes (IStack *);
@@ -71,7 +69,7 @@ index fe8ec0f..ea23c96 100644
/* vliw_insn functions. */
-@@ -687,7 +694,10 @@ enum
+@@ -688,7 +695,10 @@
option_prefer_l32r,
option_prefer_const16,
@@ -83,7 +81,7 @@ index fe8ec0f..ea23c96 100644
};
const char *md_shortopts = "";
-@@ -760,6 +770,9 @@ struct option md_longopts[] =
+@@ -761,6 +771,9 @@
{ "target-hardware", required_argument, NULL, option_target_hardware },
@@ -93,7 +91,7 @@ index fe8ec0f..ea23c96 100644
{ NULL, no_argument, NULL, 0 }
};
-@@ -940,6 +953,14 @@ md_parse_option (int c, char *arg)
+@@ -941,6 +954,14 @@
directive_state[directive_transform] = FALSE;
return 1;
@@ -108,7 +106,7 @@ index fe8ec0f..ea23c96 100644
default:
return 0;
}
-@@ -963,7 +984,9 @@ Xtensa options:\n\
+@@ -964,7 +985,9 @@
flix bundles\n\
--no-allow-flix neither allow hand-written nor generate\n\
flix bundles\n\
@@ -119,7 +117,7 @@ index fe8ec0f..ea23c96 100644
}
-@@ -5568,6 +5591,8 @@ md_assemble (char *str)
+@@ -5569,6 +5592,8 @@
/* We've just emitted a new instruction so clear the list of labels. */
xtensa_clear_insn_labels ();
@@ -128,7 +126,7 @@ index fe8ec0f..ea23c96 100644
}
-@@ -6372,6 +6397,8 @@ finish_vinsn (vliw_insn *vinsn)
+@@ -6373,6 +6398,8 @@
xg_assemble_vliw_tokens (vinsn);
xg_clear_vinsn (vinsn);
@@ -137,7 +135,7 @@ index fe8ec0f..ea23c96 100644
}
-@@ -7140,6 +7167,7 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn)
+@@ -7141,6 +7168,7 @@
RELAX_UNREACHABLE,
frag_now->fr_symbol, frag_now->fr_offset, NULL);
xtensa_set_frag_assembly_state (frag_now);
@@ -145,7 +143,7 @@ index fe8ec0f..ea23c96 100644
}
else if (is_branch && do_align_targets ())
{
-@@ -7222,9 +7250,164 @@ xtensa_end (void)
+@@ -7223,9 +7251,164 @@
xtensa_sanity_check ();
xtensa_add_config_info ();
@@ -310,7 +308,7 @@ index fe8ec0f..ea23c96 100644
static void
xtensa_cleanup_align_frags (void)
{
-@@ -8708,6 +8891,149 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p)
+@@ -8709,6 +8892,149 @@
new_stretch += relax_frag_for_align (fragP, stretch);
break;
@@ -460,7 +458,7 @@ index fe8ec0f..ea23c96 100644
default:
as_bad (_("bad relaxation state"));
}
-@@ -9146,6 +9472,200 @@ bytes_to_stretch (fragS *this_frag,
+@@ -9147,6 +9473,200 @@
}
@@ -661,7 +659,7 @@ index fe8ec0f..ea23c96 100644
static long
relax_frag_immed (segT segP,
fragS *fragP,
-@@ -9284,6 +9804,37 @@ relax_frag_immed (segT segP,
+@@ -9285,6 +9805,37 @@
if (negatable_branch && istack.ninsn > 1)
update_next_frag_state (fragP);
@@ -699,7 +697,7 @@ index fe8ec0f..ea23c96 100644
return this_text_diff;
}
-@@ -9404,6 +9955,9 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT sec, fragS *fragp)
+@@ -9405,6 +9956,9 @@
else
as_bad (_("invalid relaxation fragment result"));
break;
@@ -709,11 +707,9 @@ index fe8ec0f..ea23c96 100644
}
fragp->fr_var = 0;
-diff --git a/gas/config/tc-xtensa.h b/gas/config/tc-xtensa.h
-index 0bf1240..4672bc6 100644
--- a/gas/config/tc-xtensa.h
+++ b/gas/config/tc-xtensa.h
-@@ -180,6 +180,11 @@ enum xtensa_relax_statesE
+@@ -181,6 +181,11 @@
prevent the linker from changing the size of any frag between the
section start and the org frag. */
@@ -725,11 +721,9 @@ index 0bf1240..4672bc6 100644
RELAX_NONE
};
-diff --git a/gas/frags.c b/gas/frags.c
-index 5f68480..e14099d 100644
--- a/gas/frags.c
+++ b/gas/frags.c
-@@ -24,6 +24,20 @@
+@@ -26,6 +26,20 @@
extern fragS zero_address_frag;
extern fragS predefined_address_frag;
@@ -750,7 +744,7 @@ index 5f68480..e14099d 100644
/* Initialization for frag routines. */
-@@ -70,6 +84,7 @@ frag_alloc (struct obstack *ob)
+@@ -72,6 +86,7 @@
ptr = (fragS *) obstack_alloc (ob, SIZEOF_STRUCT_FRAG);
obstack_alignment_mask (ob) = oalign;
memset (ptr, 0, SIZEOF_STRUCT_FRAG);
@@ -758,11 +752,9 @@ index 5f68480..e14099d 100644
return ptr;
}
-diff --git a/gas/frags.h b/gas/frags.h
-index 319898f..2f9e1b5 100644
--- a/gas/frags.h
+++ b/gas/frags.h
-@@ -155,4 +155,7 @@ char *frag_var (relax_stateT type,
+@@ -157,4 +157,7 @@
bfd_boolean frag_offset_fixed_p (const fragS *, const fragS *, offsetT *);
@@ -770,11 +762,9 @@ index 319898f..2f9e1b5 100644
+void clear_frag_count (void);
+
#endif /* FRAGS_H */
-diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp
-index 2b2c294..3683b78 100644
--- a/gas/testsuite/gas/xtensa/all.exp
+++ b/gas/testsuite/gas/xtensa/all.exp
-@@ -98,6 +98,7 @@ if [istarget xtensa*-*-*] then {
+@@ -82,6 +82,7 @@
run_dump_test "pcrel"
run_dump_test "weak-call"
run_dump_test "jlong"
@@ -782,9 +772,6 @@ index 2b2c294..3683b78 100644
}
if [info exists errorInfo] then {
-diff --git a/gas/testsuite/gas/xtensa/trampoline.d b/gas/testsuite/gas/xtensa/trampoline.d
-new file mode 100644
-index 0000000..b4f65dc
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/trampoline.d
@@ -0,0 +1,26 @@
@@ -814,9 +801,6 @@ index 0000000..b4f65dc
+.*33462:.*j.0x49407
+#...
+.*49407:.*j.0x49407
-diff --git a/gas/testsuite/gas/xtensa/trampoline.s b/gas/testsuite/gas/xtensa/trampoline.s
-new file mode 100644
-index 0000000..259a3bb
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/trampoline.s
@@ -0,0 +1,21 @@
@@ -841,6 +825,3 @@ index 0000000..259a3bb
+ .endr
+3:
+ j 3b
---
-1.8.1.4
-
diff --git a/packages/binutils/2.24/901-xtensa-gas-first-frag-alignment.patch b/packages/binutils/2.23.2/0007-xtensa-gas-first-frag-alignment.patch
index e1c2d85..88e6990 100644
--- a/packages/binutils/2.24/901-xtensa-gas-first-frag-alignment.patch
+++ b/packages/binutils/2.23.2/0007-xtensa-gas-first-frag-alignment.patch
@@ -31,14 +31,12 @@ gas/
Backported from: a35d5e823fdfe8a6e7e05ca8e3fb8bb5697335b1
Changes to Changelog files and tests are dropped.
- gas/config/tc-xtensa.c | 1 -
+ gas/config/tc-xtensa.c | 1 -
1 file changed, 1 deletion(-)
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index ea23c96..58ace38 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -5609,7 +5609,6 @@ xtensa_handle_align (fragS *fragP)
+@@ -5610,7 +5610,6 @@
&& ! fragP->tc_frag_data.is_literal
&& (fragP->fr_type == rs_align
|| fragP->fr_type == rs_align_code)
@@ -46,6 +44,3 @@ index ea23c96..58ace38 100644
&& fragP->fr_offset > 0
&& now_seg != bss_section)
{
---
-1.8.1.4
-
diff --git a/packages/binutils/2.23.2/902-xtensa-gas-ld-diff-relocation-signed.patch b/packages/binutils/2.23.2/0008-xtensa-gas-ld-diff-relocation-signed.patch
index ba24f4e..1989e0a 100644
--- a/packages/binutils/2.23.2/902-xtensa-gas-ld-diff-relocation-signed.patch
+++ b/packages/binutils/2.23.2/0008-xtensa-gas-ld-diff-relocation-signed.patch
@@ -22,15 +22,13 @@ gas/
Backported from: 1058c7532d0b012ac329219264ddad59049fb6e6
Changes to Changelog files and tests are dropped.
- bfd/elf32-xtensa.c | 32 ++++++++++++-----------
- gas/config/tc-xtensa.c | 3 +++
+ bfd/elf32-xtensa.c | 32 +++++++++++++++++---------------
+ gas/config/tc-xtensa.c | 3 +++
2 files changed, 20 insertions(+), 15 deletions(-)
-diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
-index edb04b4..8818d67 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
-@@ -222,11 +222,11 @@ static reloc_howto_type elf_howto_table[] =
+@@ -223,11 +223,11 @@
FALSE, 0, 0, FALSE),
/* Relocations for supporting difference of symbols. */
@@ -45,7 +43,7 @@ index edb04b4..8818d67 100644
bfd_elf_xtensa_reloc, "R_XTENSA_DIFF32", FALSE, 0, 0xffffffff, FALSE),
/* General immediate operand relocations. */
-@@ -9013,7 +9013,8 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9016,7 +9016,8 @@
|| r_type == R_XTENSA_DIFF16
|| r_type == R_XTENSA_DIFF32)
{
@@ -55,7 +53,7 @@ index edb04b4..8818d67 100644
if (bfd_get_section_limit (abfd, sec) < old_source_offset)
{
-@@ -9027,15 +9028,15 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9030,15 +9031,15 @@
{
case R_XTENSA_DIFF8:
diff_value =
@@ -74,7 +72,7 @@ index edb04b4..8818d67 100644
break;
}
-@@ -9047,24 +9048,25 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9050,24 +9051,25 @@
switch (r_type)
{
case R_XTENSA_DIFF8:
@@ -108,11 +106,9 @@ index edb04b4..8818d67 100644
{
(*link_info->callbacks->reloc_dangerous)
(link_info, _("overflow after relaxation"),
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index 58ace38..7547c0a0 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -5867,12 +5867,15 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
+@@ -5868,12 +5868,15 @@
{
case BFD_RELOC_8:
fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8;
@@ -128,6 +124,3 @@ index 58ace38..7547c0a0 100644
break;
default:
break;
---
-1.8.1.4
-
diff --git a/packages/binutils/2.24/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch b/packages/binutils/2.23.2/0009-xtensa-fix-ld-segfault-when-linking-linux-modules.patch
index 6a0846e..57cd0bf 100644
--- a/packages/binutils/2.24/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch
+++ b/packages/binutils/2.23.2/0009-xtensa-fix-ld-segfault-when-linking-linux-modules.patch
@@ -26,14 +26,12 @@ ld/
Backported from: e7d17e71cdc10a2e81e454ce3b9637f1b2a587f2
Changes to ld/ChangeLog file are dropped.
- ld/emultempl/xtensaelf.em | 2 +-
+ ld/emultempl/xtensaelf.em | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/ld/emultempl/xtensaelf.em b/ld/emultempl/xtensaelf.em
-index 151eea4..948d18d 100644
--- a/ld/emultempl/xtensaelf.em
+++ b/ld/emultempl/xtensaelf.em
-@@ -1310,7 +1310,7 @@ is_inconsistent_linkonce_section (asection *sec)
+@@ -1311,7 +1311,7 @@
for Tensilica's XCC compiler. */
name = sec_name + linkonce_len;
if (CONST_STRNEQ (name, "prop."))
@@ -42,6 +40,3 @@ index 151eea4..948d18d 100644
else if (name[1] == '.'
&& (name[0] == 'p' || name[0] == 'e' || name[0] == 'h'))
name += 2;
---
-1.8.1.4
-
diff --git a/packages/binutils/2.23.2/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch b/packages/binutils/2.23.2/0010-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch
index dba7620..5818667 100644
--- a/packages/binutils/2.23.2/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch
+++ b/packages/binutils/2.23.2/0010-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch
@@ -19,14 +19,12 @@ bfd/
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
- bfd/elf32-xtensa.c | 41 +++++++++++++++++++++++++++++++++++++----
+ bfd/elf32-xtensa.c | 41 +++++++++++++++++++++++++++++++++++++----
1 file changed, 37 insertions(+), 4 deletions(-)
-diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
-index 09862e3..e32496a 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
-@@ -7124,10 +7124,43 @@ is_resolvable_asm_expansion (bfd *abfd,
+@@ -7128,10 +7128,43 @@
|| is_reloc_sym_weak (abfd, irel)))
return FALSE;
@@ -74,6 +72,3 @@ index 09862e3..e32496a 100644
*is_reachable_p = pcrel_reloc_fits (direct_call_opcode, 0,
self_address, dest_address);
---
-1.8.1.4
-
diff --git a/packages/binutils/2.23.2/905-Fix-trampolines-search-code-for-conditional-branches.patch b/packages/binutils/2.23.2/0011-Fix-trampolines-search-code-for-conditional-branches.patch
index 8aeb064..a4e7b5c 100644
--- a/packages/binutils/2.23.2/905-Fix-trampolines-search-code-for-conditional-branches.patch
+++ b/packages/binutils/2.23.2/0011-Fix-trampolines-search-code-for-conditional-branches.patch
@@ -28,16 +28,14 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Backported from: d92b6eece424f0ad35d96fdd85bf207295e8c4c3
Changes to ChangeLogs are dropped.
- gas/config/tc-xtensa.c | 8 ++++----
- gas/testsuite/gas/xtensa/trampoline.d | 9 +++++++++
- gas/testsuite/gas/xtensa/trampoline.s | 7 +++++++
+ gas/config/tc-xtensa.c | 8 ++++----
+ gas/testsuite/gas/xtensa/trampoline.d | 9 +++++++++
+ gas/testsuite/gas/xtensa/trampoline.s | 7 +++++++
3 files changed, 20 insertions(+), 4 deletions(-)
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index d11b0c7..f23ccf8 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -9514,11 +9514,11 @@ search_trampolines (TInsn *tinsn, fragS *fragP, bfd_boolean unreachable_only)
+@@ -9515,11 +9515,11 @@
if (next_addr == 0 || addr - next_addr > J_RANGE)
break;
}
@@ -53,8 +51,6 @@ index d11b0c7..f23ccf8 100644
}
for ( ; tf; tf = tf->next)
{
-diff --git a/gas/testsuite/gas/xtensa/trampoline.d b/gas/testsuite/gas/xtensa/trampoline.d
-index b4f65dc..5ae32a6 100644
--- a/gas/testsuite/gas/xtensa/trampoline.d
+++ b/gas/testsuite/gas/xtensa/trampoline.d
@@ -24,3 +24,12 @@
@@ -70,8 +66,6 @@ index b4f65dc..5ae32a6 100644
+#...
+.*927f5:.*j.0x927f5
+#...
-diff --git a/gas/testsuite/gas/xtensa/trampoline.s b/gas/testsuite/gas/xtensa/trampoline.s
-index 259a3bb..4465786 100644
--- a/gas/testsuite/gas/xtensa/trampoline.s
+++ b/gas/testsuite/gas/xtensa/trampoline.s
@@ -19,3 +19,10 @@
@@ -85,6 +79,3 @@ index 259a3bb..4465786 100644
+ .endr
+4:
+ j 4b
---
-1.8.1.4
-
diff --git a/packages/binutils/2.24/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch b/packages/binutils/2.23.2/0012-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
index 9ad6b3b..624ce11 100644
--- a/packages/binutils/2.24/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
+++ b/packages/binutils/2.23.2/0012-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
@@ -29,14 +29,12 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Backported from: e6c9a083ec5ae7a45bd71682b26aae1939849388
Changes to ChangeLog are dropped.
- bfd/elf32-xtensa.c | 6 +++++-
+ bfd/elf32-xtensa.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
-diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
-index 53af1c6..2523670 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
-@@ -1360,10 +1360,14 @@ elf_xtensa_gc_sweep_hook (bfd *abfd,
+@@ -1362,10 +1362,14 @@
{
if (is_plt)
{
@@ -52,6 +50,3 @@ index 53af1c6..2523670 100644
{
if (h->got.refcount > 0)
h->got.refcount--;
---
-1.8.1.4
-
diff --git a/packages/binutils/2.24/912-xtensa-fix-gas-segfault-with-text-section-literals.patch b/packages/binutils/2.23.2/0013-xtensa-fix-gas-segfault-with-text-section-literals.patch
index 4a3de2c..013534a 100644
--- a/packages/binutils/2.24/912-xtensa-fix-gas-segfault-with-text-section-literals.patch
+++ b/packages/binutils/2.23.2/0013-xtensa-fix-gas-segfault-with-text-section-literals.patch
@@ -21,14 +21,12 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Backported from: 4de0562a4c69fef4952aa7e19d7bda359f02e8b4
Changes to ChangeLog are dropped.
- gas/config/tc-xtensa.c | 10 +++++++++-
+ gas/config/tc-xtensa.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index 31c0b6b..18307c1 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -10808,13 +10808,21 @@ xtensa_move_literals (void)
+@@ -10643,13 +10643,21 @@
frchain_to = NULL;
frag_splice = &(frchain_from->frch_root);
@@ -51,6 +49,3 @@ index 31c0b6b..18307c1 100644
gas_assert (search_frag->tc_frag_data.literal_frag->fr_subtype
== RELAX_LITERAL_POOL_BEGIN);
xtensa_switch_section_emit_state (&state, segment->seg, 0);
---
-1.8.1.4
-
diff --git a/packages/binutils/2.24/914-xtensa-fix-signedness-of-gas-relocations.patch b/packages/binutils/2.23.2/0014-xtensa-fix-signedness-of-gas-relocations.patch
index 2955e11..7139f5e 100644
--- a/packages/binutils/2.24/914-xtensa-fix-signedness-of-gas-relocations.patch
+++ b/packages/binutils/2.23.2/0014-xtensa-fix-signedness-of-gas-relocations.patch
@@ -16,14 +16,12 @@ gas/
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
- gas/config/tc-xtensa.c | 6 +++---
+ gas/config/tc-xtensa.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index a119871..36a06cc 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -5961,15 +5961,15 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
+@@ -5868,15 +5868,15 @@
{
case BFD_RELOC_8:
fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8;
@@ -42,6 +40,3 @@ index a119871..36a06cc 100644
break;
default:
break;
---
-2.1.4
-
diff --git a/packages/binutils/2.23.2/915-xtensa-fix-.init-.fini-literals-moving.patch b/packages/binutils/2.23.2/0015-xtensa-fix-.init-.fini-literals-moving.patch
index 62bc4b5..ee41d54 100644
--- a/packages/binutils/2.23.2/915-xtensa-fix-.init-.fini-literals-moving.patch
+++ b/packages/binutils/2.23.2/0015-xtensa-fix-.init-.fini-literals-moving.patch
@@ -32,14 +32,13 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
Backported from: 4111950f363221c4641dc2f33bea61cc94f34906
- gas/config/tc-xtensa.c | 12 ++++++++++--
+ gas/config/tc-xtensa.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index 36a06cc..5773634 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -10625,5 +10625,9 @@ xtensa_move_literals (void)
+@@ -10624,6 +10624,10 @@
+ segT dest_seg;
fixS *fix, *next_fix, **fix_splice;
sym_list *lit;
+ const char *init_name = INIT_SECTION_NAME;
@@ -49,7 +48,7 @@ index 36a06cc..5773634 100644
mark_literal_frags (literal_head->next);
-@@ -10632,9 +10636,13 @@ xtensa_move_literals (void)
+@@ -10632,9 +10636,13 @@
for (segment = literal_head->next; segment; segment = segment->next)
{
@@ -65,6 +64,3 @@ index 36a06cc..5773634 100644
continue;
frchain_from = seg_info (segment->seg)->frchainP;
---
-2.1.4
-
diff --git a/packages/binutils/2.23.2/300-001_ld_makefile_patch.patch b/packages/binutils/2.23.2/300-001_ld_makefile_patch.patch
deleted file mode 100644
index 5cb0f61..0000000
--- a/packages/binutils/2.23.2/300-001_ld_makefile_patch.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -u binutils-2.17.50.0.17.oorig/ld/Makefile.am binutils-2.17.50.0.17/ld/Makefile.am
---- binutils-2.17.50.0.17.oorig/ld/Makefile.am 2007-06-18 19:29:29.000000000 +0200
-+++ binutils-2.17.50.0.17/ld/Makefile.am 2007-06-25 10:00:36.000000000 +0200
-@@ -18,7 +18,7 @@
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
-
- EMUL = @EMUL@
- EMULATION_OFILES = @EMULATION_OFILES@
-diff -u binutils-2.17.50.0.17.oorig/ld/Makefile.in binutils-2.17.50.0.17/ld/Makefile.in
---- binutils-2.17.50.0.17.oorig/ld/Makefile.in 2007-06-18 19:29:29.000000000 +0200
-+++ binutils-2.17.50.0.17/ld/Makefile.in 2007-06-25 10:00:36.000000000 +0200
-@@ -287,7 +287,7 @@
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
- BASEDIR = $(srcdir)/..
- BFDDIR = $(BASEDIR)/bfd
- INCDIR = $(BASEDIR)/include
diff --git a/packages/binutils/2.24/001-fix-enable-install-libiberty-flag.patch b/packages/binutils/2.24/0000-fix-enable-install-libiberty-flag.patch
index e408401..9088d46 100644
--- a/packages/binutils/2.24/001-fix-enable-install-libiberty-flag.patch
+++ b/packages/binutils/2.24/0000-fix-enable-install-libiberty-flag.patch
@@ -15,13 +15,11 @@ git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206367 138bc75d-0d04-0410-961f-8
---
libiberty/configure | 1 -
libiberty/configure.ac | 1 -
- 3 files changed, 6 insertions(+), 2 deletions(-)
+ 2 files changed, 2 deletions(-)
-diff --git a/libiberty/configure b/libiberty/configure
-index 8ea54da..7bde9b3 100755
--- a/libiberty/configure
+++ b/libiberty/configure
-@@ -5507,7 +5507,6 @@ fi
+@@ -5507,7 +5507,6 @@
setobjs=
CHECK=
@@ -29,11 +27,9 @@ index 8ea54da..7bde9b3 100755
if test -n "${with_target_subdir}"; then
# We are being configured as a target library. AC_REPLACE_FUNCS
-diff --git a/libiberty/configure.ac b/libiberty/configure.ac
-index 4ad88a9..d6180bc 100644
--- a/libiberty/configure.ac
+++ b/libiberty/configure.ac
-@@ -405,7 +405,6 @@ fi
+@@ -405,7 +405,6 @@
setobjs=
CHECK=
@@ -41,6 +37,3 @@ index 4ad88a9..d6180bc 100644
if test -n "${with_target_subdir}"; then
# We are being configured as a target library. AC_REPLACE_FUNCS
---
-1.7.1
-
diff --git a/packages/binutils/2.24/002-dont-segv-on-initial-instructions-overflow.patch b/packages/binutils/2.24/0001-dont-segv-on-initial-instructions-overflow.patch
index 7881646..02c56b3 100644
--- a/packages/binutils/2.24/002-dont-segv-on-initial-instructions-overflow.patch
+++ b/packages/binutils/2.24/0001-dont-segv-on-initial-instructions-overflow.patch
@@ -16,11 +16,13 @@ fit in the buffer.
save as much of insns to initial_instructions[] as will fit.
---
-diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
-index 832a991..4b6e8ea 100644
+---
+ bfd/elf-eh-frame.c | 16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
-@@ -235,6 +235,7 @@ cie_eq (const void *e1, const void *e2)
+@@ -235,6 +235,7 @@
&& c1->lsda_encoding == c2->lsda_encoding
&& c1->fde_encoding == c2->fde_encoding
&& c1->initial_insn_length == c2->initial_insn_length
@@ -28,7 +30,7 @@ index 832a991..4b6e8ea 100644
&& memcmp (c1->initial_instructions,
c2->initial_instructions,
c1->initial_insn_length) == 0)
-@@ -254,6 +255,7 @@ static hashval_t
+@@ -254,6 +255,7 @@
cie_compute_hash (struct cie *c)
{
hashval_t h = 0;
@@ -36,7 +38,7 @@ index 832a991..4b6e8ea 100644
h = iterative_hash_object (c->length, h);
h = iterative_hash_object (c->version, h);
h = iterative_hash (c->augmentation, strlen (c->augmentation) + 1, h);
-@@ -267,7 +269,10 @@ cie_compute_hash (struct cie *c)
+@@ -267,7 +269,10 @@
h = iterative_hash_object (c->lsda_encoding, h);
h = iterative_hash_object (c->fde_encoding, h);
h = iterative_hash_object (c->initial_insn_length, h);
@@ -48,7 +50,7 @@ index 832a991..4b6e8ea 100644
c->hash = h;
return h;
}
-@@ -762,11 +767,10 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info,
+@@ -762,11 +767,10 @@
cie->fde_encoding = DW_EH_PE_absptr;
initial_insn_length = end - buf;
diff --git a/packages/binutils/2.24/0002-sh-conf.patch b/packages/binutils/2.24/0002-sh-conf.patch
new file mode 100644
index 0000000..40887dd
--- /dev/null
+++ b/packages/binutils/2.24/0002-sh-conf.patch
@@ -0,0 +1,34 @@
+r10231 | lethal | 2005-05-02 09:58:00 -0400 (Mon, 02 May 2005) | 13 lines
+
+Likewise, binutils has no idea about any of these new targets either, so we
+fix that up too.. now we're able to actually build a real toolchain for
+sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more
+inept targets than that one, really. Go look, I promise).
+
+---
+ configure | 2 +-
+ configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/configure
++++ b/configure
+@@ -3793,7 +3793,7 @@
+ mips*-*-*)
+ noconfigdirs="$noconfigdirs gprof"
+ ;;
+- sh-*-* | sh64-*-*)
++ sh*-*-* | sh64-*-*)
+ case "${target}" in
+ sh*-*-elf)
+ ;;
+--- a/configure.ac
++++ b/configure.ac
+@@ -1129,7 +1129,7 @@
+ mips*-*-*)
+ noconfigdirs="$noconfigdirs gprof"
+ ;;
+- sh-*-* | sh64-*-*)
++ sh*-*-* | sh64-*-*)
+ case "${target}" in
+ sh*-*-elf)
+ ;;
diff --git a/packages/binutils/2.27/300-001_ld_makefile_patch.patch b/packages/binutils/2.24/0003-001_ld_makefile_patch.patch
index 2a1320c..ab6a74f 100644
--- a/packages/binutils/2.27/300-001_ld_makefile_patch.patch
+++ b/packages/binutils/2.24/0003-001_ld_makefile_patch.patch
@@ -1,8 +1,11 @@
-diff --git a/ld/Makefile.am b/ld/Makefile.am
-index 9575f1f..84df0bf 100644
+---
+ ld/Makefile.am | 2 +-
+ ld/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
-@@ -54,7 +54,7 @@ endif
+@@ -54,7 +54,7 @@
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.
@@ -11,11 +14,9 @@ index 9575f1f..84df0bf 100644
EMUL = @EMUL@
EMULATION_OFILES = @EMULATION_OFILES@
-diff --git a/ld/Makefile.in b/ld/Makefile.in
-index 9f56ca1..272860f 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
-@@ -388,7 +388,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
+@@ -386,7 +386,7 @@
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.
diff --git a/packages/binutils/2.24/300-012_check_ldrunpath_length.patch b/packages/binutils/2.24/0004-012_check_ldrunpath_length.patch
index b49cc04..ce28120 100644
--- a/packages/binutils/2.24/300-012_check_ldrunpath_length.patch
+++ b/packages/binutils/2.24/0004-012_check_ldrunpath_length.patch
@@ -1,7 +1,10 @@
-diff -durN binutils-2.22.orig/ld/emultempl/elf32.em binutils-2.22/ld/emultempl/elf32.em
---- binutils-2.22.orig/ld/emultempl/elf32.em 2011-11-21 10:29:39.000000000 +0100
-+++ binutils-2.22/ld/emultempl/elf32.em 2011-12-14 19:52:12.880783238 +0100
-@@ -1273,6 +1273,8 @@
+---
+ ld/emultempl/elf32.em | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/ld/emultempl/elf32.em
++++ b/ld/emultempl/elf32.em
+@@ -1267,6 +1267,8 @@
&& command_line.rpath == NULL)
{
lib_path = (const char *) getenv ("LD_RUN_PATH");
@@ -10,7 +13,7 @@ diff -durN binutils-2.22.orig/ld/emultempl/elf32.em binutils-2.22/ld/emultempl/e
if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
force))
break;
-@@ -1500,6 +1502,8 @@
+@@ -1518,6 +1520,8 @@
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
diff --git a/packages/binutils/2.26.1/310-fix-gold-pthreads-typo.patch b/packages/binutils/2.24/0005-fix-gold-pthreads-typo.patch
index f2e6ff2..40861f5 100644
--- a/packages/binutils/2.26.1/310-fix-gold-pthreads-typo.patch
+++ b/packages/binutils/2.24/0005-fix-gold-pthreads-typo.patch
@@ -1,5 +1,9 @@
---- binutils-2.25.1/gold/gold-threads.cc.orig 2014-10-14 08:32:04.000000000 +0100
-+++ binutils-2.25.1/gold/gold-threads.cc 2015-10-20 22:38:18.640819300 +0100
+---
+ gold/gold-threads.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/gold/gold-threads.cc
++++ b/gold/gold-threads.cc
@@ -102,9 +102,9 @@
if (err != 0)
gold_fatal(_("pthead_mutextattr_init failed: %s"), strerror(err));
diff --git a/packages/binutils/2.25.1/500-sysroot.patch b/packages/binutils/2.24/0006-sysroot.patch
index e49c795..13b5288 100644
--- a/packages/binutils/2.25.1/500-sysroot.patch
+++ b/packages/binutils/2.24/0006-sysroot.patch
@@ -5,9 +5,13 @@ Always try to prepend the sysroot prefix to absolute filenames first.
http://bugs.gentoo.org/275666
http://sourceware.org/bugzilla/show_bug.cgi?id=10340
+---
+ ld/ldfile.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
-@@ -308,18 +308,25 @@
+@@ -341,18 +341,25 @@
directory first. */
if (! entry->flags.maybe_archive)
{
diff --git a/packages/binutils/2.24/600-poison-system-directories.patch b/packages/binutils/2.24/0007-poison-system-directories.patch
index 6a3bf6b..dcd8c5c 100644
--- a/packages/binutils/2.24/600-poison-system-directories.patch
+++ b/packages/binutils/2.24/0007-poison-system-directories.patch
@@ -57,8 +57,18 @@ Code Merged from Sourcery G++ binutils 2.19 - 4.4-277
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-Index: b/ld/config.in
-===================================================================
+---
+ ld/config.in | 3 +++
+ ld/configure | 14 ++++++++++++++
+ ld/configure.in | 10 ++++++++++
+ ld/ld.h | 8 ++++++++
+ ld/ld.texinfo | 12 ++++++++++++
+ ld/ldfile.c | 17 +++++++++++++++++
+ ld/ldlex.h | 2 ++
+ ld/ldmain.c | 2 ++
+ ld/lexsup.c | 21 +++++++++++++++++++++
+ 9 files changed, 89 insertions(+)
+
--- a/ld/config.in
+++ b/ld/config.in
@@ -11,6 +11,9 @@
@@ -71,8 +81,6 @@ Index: b/ld/config.in
/* Additional extension a shared object might have. */
#undef EXTRA_SHLIB_EXTENSION
-Index: b/ld/configure
-===================================================================
--- a/ld/configure
+++ b/ld/configure
@@ -774,6 +774,7 @@
@@ -111,8 +119,6 @@ Index: b/ld/configure
# Check whether --enable-got was given.
if test "${enable_got+set}" = set; then :
-Index: b/ld/configure.in
-===================================================================
--- a/ld/configure.in
+++ b/ld/configure.in
@@ -87,6 +87,16 @@
@@ -132,8 +138,6 @@ Index: b/ld/configure.in
dnl Use --enable-gold to decide if this linker should be the default.
dnl "install_as_default" is set to false if gold is the default linker.
dnl "installed_linker" is the installed BFD linker name.
-Index: b/ld/ldfile.c
-===================================================================
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -116,6 +116,23 @@
@@ -160,8 +164,6 @@ Index: b/ld/ldfile.c
}
/* Try to open a BFD for a lang_input_statement. */
-Index: b/ld/ld.h
-===================================================================
--- a/ld/ld.h
+++ b/ld/ld.h
@@ -180,6 +180,14 @@
@@ -179,8 +181,6 @@ Index: b/ld/ld.h
/* Big or little endian as set on command line. */
enum endian_enum endian;
-Index: b/ld/ldmain.c
-===================================================================
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -266,6 +266,8 @@
@@ -192,8 +192,6 @@ Index: b/ld/ldmain.c
/* We initialize DEMANGLING based on the environment variable
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
-Index: b/ld/ld.texinfo
-===================================================================
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -2175,6 +2175,18 @@
@@ -215,8 +213,6 @@ Index: b/ld/ld.texinfo
@end table
@c man end
-Index: b/ld/lexsup.c
-===================================================================
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -507,6 +507,14 @@
@@ -264,8 +260,6 @@ Index: b/ld/lexsup.c
while (ingroup)
{
lang_leave_group ();
-Index: b/ld/ldlex.h
-===================================================================
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
@@ -138,6 +138,8 @@
diff --git a/packages/binutils/2.24/700-Fix-library-paths-on-PowerPC.patch b/packages/binutils/2.24/0008-Fix-library-paths-on-PowerPC.patch
index cea92f3..887e93a 100644
--- a/packages/binutils/2.24/700-Fix-library-paths-on-PowerPC.patch
+++ b/packages/binutils/2.24/0008-Fix-library-paths-on-PowerPC.patch
@@ -13,14 +13,12 @@ depend on whether it is built on LE or BE machine.
Signed-off-by: Alexey Neyman <stilor@att.net>
---
- ld/emulparams/elf32ppccommon.sh | 10 +++++-----
+ ld/emulparams/elf32ppccommon.sh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
-diff --git a/ld/emulparams/elf32ppccommon.sh b/ld/emulparams/elf32ppccommon.sh
-index 1f54ef8..d00cf68 100644
--- a/ld/emulparams/elf32ppccommon.sh
+++ b/ld/emulparams/elf32ppccommon.sh
-@@ -44,11 +44,11 @@ fi
+@@ -46,11 +46,11 @@
# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
# Similarly, look for 32 bit libraries in /lib32, /usr/lib32 etc.
@@ -37,6 +35,3 @@ index 1f54ef8..d00cf68 100644
*:*64lppc*) LIBPATH_SUFFIX=64le ;;
*:*32lppc*) LIBPATH_SUFFIX=32le ;;
*:*64*) LIBPATH_SUFFIX=64 ;;
---
-2.9.3
-
diff --git a/packages/binutils/2.24/900-xtensa-trampolines.patch b/packages/binutils/2.24/0009-xtensa-trampolines.patch
index b5b934f..c5bfb01 100644
--- a/packages/binutils/2.24/900-xtensa-trampolines.patch
+++ b/packages/binutils/2.24/0009-xtensa-trampolines.patch
@@ -35,22 +35,20 @@ Subject: [PATCH] Add support to the Xtensa target for creating trampolines for
Backported from: a82c7d9030b67a6a76a5403d0e1641f9e42141ac
Changes to Changelog files are dropped.
- gas/config/tc-xtensa.c | 558 +++++++++++++++++++++++++++++++++-
- gas/config/tc-xtensa.h | 5 +
- gas/frags.c | 15 +
- gas/frags.h | 3 +
- gas/testsuite/gas/xtensa/all.exp | 1 +
- gas/testsuite/gas/xtensa/trampoline.d | 26 ++
- gas/testsuite/gas/xtensa/trampoline.s | 21 ++
- 11 files changed, 753 insertions(+), 2 deletions(-)
+ gas/config/tc-xtensa.c | 558 +++++++++++++++++++++++++++++++++-
+ gas/config/tc-xtensa.h | 5
+ gas/frags.c | 15
+ gas/frags.h | 3
+ gas/testsuite/gas/xtensa/all.exp | 1
+ gas/testsuite/gas/xtensa/trampoline.d | 26 +
+ gas/testsuite/gas/xtensa/trampoline.s | 21 +
+ 7 files changed, 627 insertions(+), 2 deletions(-)
create mode 100644 gas/testsuite/gas/xtensa/trampoline.d
create mode 100644 gas/testsuite/gas/xtensa/trampoline.s
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index fe8ec0f..ea23c96 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -468,6 +468,12 @@ static void xtensa_set_frag_assembly_state (fragS *);
+@@ -469,6 +469,12 @@
static void finish_vinsn (vliw_insn *);
static bfd_boolean emit_single_op (TInsn *);
static int total_frag_text_expansion (fragS *);
@@ -63,7 +61,7 @@ index fe8ec0f..ea23c96 100644
/* Alignment Functions. */
-@@ -520,6 +526,7 @@ static void tinsn_from_chars (TInsn *, char *, int);
+@@ -521,6 +527,7 @@
static void tinsn_immed_from_frag (TInsn *, fragS *, int);
static int get_num_stack_text_bytes (IStack *);
static int get_num_stack_literal_bytes (IStack *);
@@ -71,7 +69,7 @@ index fe8ec0f..ea23c96 100644
/* vliw_insn functions. */
-@@ -687,7 +694,10 @@ enum
+@@ -688,7 +695,10 @@
option_prefer_l32r,
option_prefer_const16,
@@ -83,7 +81,7 @@ index fe8ec0f..ea23c96 100644
};
const char *md_shortopts = "";
-@@ -760,6 +770,9 @@ struct option md_longopts[] =
+@@ -761,6 +771,9 @@
{ "target-hardware", required_argument, NULL, option_target_hardware },
@@ -93,7 +91,7 @@ index fe8ec0f..ea23c96 100644
{ NULL, no_argument, NULL, 0 }
};
-@@ -940,6 +953,14 @@ md_parse_option (int c, char *arg)
+@@ -941,6 +954,14 @@
directive_state[directive_transform] = FALSE;
return 1;
@@ -108,7 +106,7 @@ index fe8ec0f..ea23c96 100644
default:
return 0;
}
-@@ -963,7 +984,9 @@ Xtensa options:\n\
+@@ -964,7 +985,9 @@
flix bundles\n\
--no-allow-flix neither allow hand-written nor generate\n\
flix bundles\n\
@@ -119,7 +117,7 @@ index fe8ec0f..ea23c96 100644
}
-@@ -5568,6 +5591,8 @@ md_assemble (char *str)
+@@ -5569,6 +5592,8 @@
/* We've just emitted a new instruction so clear the list of labels. */
xtensa_clear_insn_labels ();
@@ -128,7 +126,7 @@ index fe8ec0f..ea23c96 100644
}
-@@ -6372,6 +6397,8 @@ finish_vinsn (vliw_insn *vinsn)
+@@ -6373,6 +6398,8 @@
xg_assemble_vliw_tokens (vinsn);
xg_clear_vinsn (vinsn);
@@ -137,7 +135,7 @@ index fe8ec0f..ea23c96 100644
}
-@@ -7140,6 +7167,7 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn)
+@@ -7141,6 +7168,7 @@
RELAX_UNREACHABLE,
frag_now->fr_symbol, frag_now->fr_offset, NULL);
xtensa_set_frag_assembly_state (frag_now);
@@ -145,7 +143,7 @@ index fe8ec0f..ea23c96 100644
}
else if (is_branch && do_align_targets ())
{
-@@ -7222,9 +7250,164 @@ xtensa_end (void)
+@@ -7223,9 +7251,164 @@
xtensa_sanity_check ();
xtensa_add_config_info ();
@@ -310,7 +308,7 @@ index fe8ec0f..ea23c96 100644
static void
xtensa_cleanup_align_frags (void)
{
-@@ -8708,6 +8891,149 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p)
+@@ -8709,6 +8892,149 @@
new_stretch += relax_frag_for_align (fragP, stretch);
break;
@@ -460,7 +458,7 @@ index fe8ec0f..ea23c96 100644
default:
as_bad (_("bad relaxation state"));
}
-@@ -9146,6 +9472,200 @@ bytes_to_stretch (fragS *this_frag,
+@@ -9147,6 +9473,200 @@
}
@@ -661,7 +659,7 @@ index fe8ec0f..ea23c96 100644
static long
relax_frag_immed (segT segP,
fragS *fragP,
-@@ -9284,6 +9804,37 @@ relax_frag_immed (segT segP,
+@@ -9285,6 +9805,37 @@
if (negatable_branch && istack.ninsn > 1)
update_next_frag_state (fragP);
@@ -699,7 +697,7 @@ index fe8ec0f..ea23c96 100644
return this_text_diff;
}
-@@ -9404,6 +9955,9 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT sec, fragS *fragp)
+@@ -9405,6 +9956,9 @@
else
as_bad (_("invalid relaxation fragment result"));
break;
@@ -709,11 +707,9 @@ index fe8ec0f..ea23c96 100644
}
fragp->fr_var = 0;
-diff --git a/gas/config/tc-xtensa.h b/gas/config/tc-xtensa.h
-index 0bf1240..4672bc6 100644
--- a/gas/config/tc-xtensa.h
+++ b/gas/config/tc-xtensa.h
-@@ -180,6 +180,11 @@ enum xtensa_relax_statesE
+@@ -181,6 +181,11 @@
prevent the linker from changing the size of any frag between the
section start and the org frag. */
@@ -725,11 +721,9 @@ index 0bf1240..4672bc6 100644
RELAX_NONE
};
-diff --git a/gas/frags.c b/gas/frags.c
-index 5f68480..e14099d 100644
--- a/gas/frags.c
+++ b/gas/frags.c
-@@ -24,6 +24,20 @@
+@@ -26,6 +26,20 @@
extern fragS zero_address_frag;
extern fragS predefined_address_frag;
@@ -750,7 +744,7 @@ index 5f68480..e14099d 100644
/* Initialization for frag routines. */
-@@ -70,6 +84,7 @@ frag_alloc (struct obstack *ob)
+@@ -72,6 +86,7 @@
ptr = (fragS *) obstack_alloc (ob, SIZEOF_STRUCT_FRAG);
obstack_alignment_mask (ob) = oalign;
memset (ptr, 0, SIZEOF_STRUCT_FRAG);
@@ -758,11 +752,9 @@ index 5f68480..e14099d 100644
return ptr;
}
-diff --git a/gas/frags.h b/gas/frags.h
-index 319898f..2f9e1b5 100644
--- a/gas/frags.h
+++ b/gas/frags.h
-@@ -155,4 +155,7 @@ char *frag_var (relax_stateT type,
+@@ -157,4 +157,7 @@
bfd_boolean frag_offset_fixed_p (const fragS *, const fragS *, offsetT *);
@@ -770,11 +762,9 @@ index 319898f..2f9e1b5 100644
+void clear_frag_count (void);
+
#endif /* FRAGS_H */
-diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp
-index 2b2c294..3683b78 100644
--- a/gas/testsuite/gas/xtensa/all.exp
+++ b/gas/testsuite/gas/xtensa/all.exp
-@@ -98,6 +98,7 @@ if [istarget xtensa*-*-*] then {
+@@ -99,6 +99,7 @@
run_dump_test "pcrel"
run_dump_test "weak-call"
run_dump_test "jlong"
@@ -782,9 +772,6 @@ index 2b2c294..3683b78 100644
}
if [info exists errorInfo] then {
-diff --git a/gas/testsuite/gas/xtensa/trampoline.d b/gas/testsuite/gas/xtensa/trampoline.d
-new file mode 100644
-index 0000000..b4f65dc
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/trampoline.d
@@ -0,0 +1,26 @@
@@ -814,9 +801,6 @@ index 0000000..b4f65dc
+.*33462:.*j.0x49407
+#...
+.*49407:.*j.0x49407
-diff --git a/gas/testsuite/gas/xtensa/trampoline.s b/gas/testsuite/gas/xtensa/trampoline.s
-new file mode 100644
-index 0000000..259a3bb
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/trampoline.s
@@ -0,0 +1,21 @@
@@ -841,6 +825,3 @@ index 0000000..259a3bb
+ .endr
+3:
+ j 3b
---
-1.8.1.4
-
diff --git a/packages/binutils/2.23.2/901-xtensa-gas-first-frag-alignment.patch b/packages/binutils/2.24/0010-xtensa-gas-first-frag-alignment.patch
index e1c2d85..88e6990 100644
--- a/packages/binutils/2.23.2/901-xtensa-gas-first-frag-alignment.patch
+++ b/packages/binutils/2.24/0010-xtensa-gas-first-frag-alignment.patch
@@ -31,14 +31,12 @@ gas/
Backported from: a35d5e823fdfe8a6e7e05ca8e3fb8bb5697335b1
Changes to Changelog files and tests are dropped.
- gas/config/tc-xtensa.c | 1 -
+ gas/config/tc-xtensa.c | 1 -
1 file changed, 1 deletion(-)
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index ea23c96..58ace38 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -5609,7 +5609,6 @@ xtensa_handle_align (fragS *fragP)
+@@ -5610,7 +5610,6 @@
&& ! fragP->tc_frag_data.is_literal
&& (fragP->fr_type == rs_align
|| fragP->fr_type == rs_align_code)
@@ -46,6 +44,3 @@ index ea23c96..58ace38 100644
&& fragP->fr_offset > 0
&& now_seg != bss_section)
{
---
-1.8.1.4
-
diff --git a/packages/binutils/2.24/902-xtensa-gas-ld-diff-relocation-signed.patch b/packages/binutils/2.24/0011-xtensa-gas-ld-diff-relocation-signed.patch
index ba24f4e..b4f903d 100644
--- a/packages/binutils/2.24/902-xtensa-gas-ld-diff-relocation-signed.patch
+++ b/packages/binutils/2.24/0011-xtensa-gas-ld-diff-relocation-signed.patch
@@ -22,15 +22,13 @@ gas/
Backported from: 1058c7532d0b012ac329219264ddad59049fb6e6
Changes to Changelog files and tests are dropped.
- bfd/elf32-xtensa.c | 32 ++++++++++++-----------
- gas/config/tc-xtensa.c | 3 +++
+ bfd/elf32-xtensa.c | 32 +++++++++++++++++---------------
+ gas/config/tc-xtensa.c | 3 +++
2 files changed, 20 insertions(+), 15 deletions(-)
-diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
-index edb04b4..8818d67 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
-@@ -222,11 +222,11 @@ static reloc_howto_type elf_howto_table[] =
+@@ -223,11 +223,11 @@
FALSE, 0, 0, FALSE),
/* Relocations for supporting difference of symbols. */
@@ -45,7 +43,7 @@ index edb04b4..8818d67 100644
bfd_elf_xtensa_reloc, "R_XTENSA_DIFF32", FALSE, 0, 0xffffffff, FALSE),
/* General immediate operand relocations. */
-@@ -9013,7 +9013,8 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9012,7 +9012,8 @@
|| r_type == R_XTENSA_DIFF16
|| r_type == R_XTENSA_DIFF32)
{
@@ -55,7 +53,7 @@ index edb04b4..8818d67 100644
if (bfd_get_section_limit (abfd, sec) < old_source_offset)
{
-@@ -9027,15 +9028,15 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9026,15 +9027,15 @@
{
case R_XTENSA_DIFF8:
diff_value =
@@ -74,7 +72,7 @@ index edb04b4..8818d67 100644
break;
}
-@@ -9047,24 +9048,25 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9046,24 +9047,25 @@
switch (r_type)
{
case R_XTENSA_DIFF8:
@@ -108,11 +106,9 @@ index edb04b4..8818d67 100644
{
(*link_info->callbacks->reloc_dangerous)
(link_info, _("overflow after relaxation"),
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index 58ace38..7547c0a0 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -5867,12 +5867,15 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
+@@ -5868,12 +5868,15 @@
{
case BFD_RELOC_8:
fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8;
@@ -128,6 +124,3 @@ index 58ace38..7547c0a0 100644
break;
default:
break;
---
-1.8.1.4
-
diff --git a/packages/binutils/2.23.2/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch b/packages/binutils/2.24/0012-xtensa-fix-ld-segfault-when-linking-linux-modules.patch
index 6a0846e..57cd0bf 100644
--- a/packages/binutils/2.23.2/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch
+++ b/packages/binutils/2.24/0012-xtensa-fix-ld-segfault-when-linking-linux-modules.patch
@@ -26,14 +26,12 @@ ld/
Backported from: e7d17e71cdc10a2e81e454ce3b9637f1b2a587f2
Changes to ld/ChangeLog file are dropped.
- ld/emultempl/xtensaelf.em | 2 +-
+ ld/emultempl/xtensaelf.em | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/ld/emultempl/xtensaelf.em b/ld/emultempl/xtensaelf.em
-index 151eea4..948d18d 100644
--- a/ld/emultempl/xtensaelf.em
+++ b/ld/emultempl/xtensaelf.em
-@@ -1310,7 +1310,7 @@ is_inconsistent_linkonce_section (asection *sec)
+@@ -1311,7 +1311,7 @@
for Tensilica's XCC compiler. */
name = sec_name + linkonce_len;
if (CONST_STRNEQ (name, "prop."))
@@ -42,6 +40,3 @@ index 151eea4..948d18d 100644
else if (name[1] == '.'
&& (name[0] == 'p' || name[0] == 'e' || name[0] == 'h'))
name += 2;
---
-1.8.1.4
-
diff --git a/packages/binutils/2.24/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch b/packages/binutils/2.24/0013-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch
index e4c600e..c31d01c 100644
--- a/packages/binutils/2.24/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch
+++ b/packages/binutils/2.24/0013-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch
@@ -19,14 +19,12 @@ bfd/
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
- bfd/elf32-xtensa.c | 41 +++++++++++++++++++++++++++++++++++++----
+ bfd/elf32-xtensa.c | 41 +++++++++++++++++++++++++++++++++++++----
1 file changed, 37 insertions(+), 4 deletions(-)
-diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
-index 09862e3..e32496a 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
-@@ -7124,10 +7124,43 @@ is_resolvable_asm_expansion (bfd *abfd,
+@@ -7123,10 +7123,43 @@
|| is_reloc_sym_weak (abfd, irel)))
return FALSE;
@@ -74,6 +72,3 @@ index 09862e3..e32496a 100644
*is_reachable_p = pcrel_reloc_fits (direct_call_opcode, 0,
self_address, dest_address);
---
-1.8.1.4
-
diff --git a/packages/binutils/2.25.1/905-Fix-trampolines-search-code-for-conditional-branches.patch b/packages/binutils/2.24/0014-Fix-trampolines-search-code-for-conditional-branches.patch
index 8aeb064..a4e7b5c 100644
--- a/packages/binutils/2.25.1/905-Fix-trampolines-search-code-for-conditional-branches.patch
+++ b/packages/binutils/2.24/0014-Fix-trampolines-search-code-for-conditional-branches.patch
@@ -28,16 +28,14 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Backported from: d92b6eece424f0ad35d96fdd85bf207295e8c4c3
Changes to ChangeLogs are dropped.
- gas/config/tc-xtensa.c | 8 ++++----
- gas/testsuite/gas/xtensa/trampoline.d | 9 +++++++++
- gas/testsuite/gas/xtensa/trampoline.s | 7 +++++++
+ gas/config/tc-xtensa.c | 8 ++++----
+ gas/testsuite/gas/xtensa/trampoline.d | 9 +++++++++
+ gas/testsuite/gas/xtensa/trampoline.s | 7 +++++++
3 files changed, 20 insertions(+), 4 deletions(-)
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index d11b0c7..f23ccf8 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -9514,11 +9514,11 @@ search_trampolines (TInsn *tinsn, fragS *fragP, bfd_boolean unreachable_only)
+@@ -9515,11 +9515,11 @@
if (next_addr == 0 || addr - next_addr > J_RANGE)
break;
}
@@ -53,8 +51,6 @@ index d11b0c7..f23ccf8 100644
}
for ( ; tf; tf = tf->next)
{
-diff --git a/gas/testsuite/gas/xtensa/trampoline.d b/gas/testsuite/gas/xtensa/trampoline.d
-index b4f65dc..5ae32a6 100644
--- a/gas/testsuite/gas/xtensa/trampoline.d
+++ b/gas/testsuite/gas/xtensa/trampoline.d
@@ -24,3 +24,12 @@
@@ -70,8 +66,6 @@ index b4f65dc..5ae32a6 100644
+#...
+.*927f5:.*j.0x927f5
+#...
-diff --git a/gas/testsuite/gas/xtensa/trampoline.s b/gas/testsuite/gas/xtensa/trampoline.s
-index 259a3bb..4465786 100644
--- a/gas/testsuite/gas/xtensa/trampoline.s
+++ b/gas/testsuite/gas/xtensa/trampoline.s
@@ -19,3 +19,10 @@
@@ -85,6 +79,3 @@ index 259a3bb..4465786 100644
+ .endr
+4:
+ j 4b
---
-1.8.1.4
-
diff --git a/packages/binutils/2.24/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch b/packages/binutils/2.24/0015-xtensa-optimize-check_section_ebb_pcrels_fit.patch
index 8a21100..e4af610 100644
--- a/packages/binutils/2.24/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch
+++ b/packages/binutils/2.24/0015-xtensa-optimize-check_section_ebb_pcrels_fit.patch
@@ -76,14 +76,12 @@ bfd/
Backported from: b2b326d246f839ee218192ac88da2384d929a072
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
- bfd/elf32-xtensa.c | 321 +++++++++++++++++++++++++++++++++++++++++++++++++----
+ bfd/elf32-xtensa.c | 321 +++++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 298 insertions(+), 23 deletions(-)
-diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
-index 0b6f584..872370b 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
-@@ -6619,8 +6619,10 @@ static bfd_boolean compute_text_actions
+@@ -6614,8 +6614,10 @@
(bfd *, asection *, struct bfd_link_info *);
static bfd_boolean compute_ebb_proposed_actions (ebb_constraint *);
static bfd_boolean compute_ebb_actions (ebb_constraint *);
@@ -95,7 +93,7 @@ index 0b6f584..872370b 100644
const xtensa_opcode *);
static bfd_boolean check_section_ebb_reduces (const ebb_constraint *);
static void text_action_add_proposed
-@@ -7219,6 +7221,221 @@ build_reloc_opcodes (bfd *abfd,
+@@ -7214,6 +7216,221 @@
return reloc_opcodes;
}
@@ -317,7 +315,7 @@ index 0b6f584..872370b 100644
/* The compute_text_actions function will build a list of potential
transformation actions for code in the extended basic block of each
-@@ -7245,6 +7462,7 @@ compute_text_actions (bfd *abfd,
+@@ -7240,6 +7457,7 @@
property_table_entry *prop_table = 0;
int ptblsize = 0;
bfd_size_type sec_size;
@@ -325,7 +323,7 @@ index 0b6f584..872370b 100644
relax_info = get_xtensa_relax_info (sec);
BFD_ASSERT (relax_info);
-@@ -7277,6 +7495,12 @@ compute_text_actions (bfd *abfd,
+@@ -7272,6 +7490,12 @@
goto error_return;
}
@@ -338,7 +336,7 @@ index 0b6f584..872370b 100644
for (i = 0; i < sec->reloc_count; i++)
{
Elf_Internal_Rela *irel = &internal_relocs[i];
-@@ -7340,17 +7564,13 @@ compute_text_actions (bfd *abfd,
+@@ -7335,17 +7559,13 @@
ebb->start_reloc_idx = i;
ebb->end_reloc_idx = i;
@@ -359,7 +357,7 @@ index 0b6f584..872370b 100644
|| !check_section_ebb_reduces (&ebb_table))
{
/* If anything goes wrong or we get unlucky and something does
-@@ -7372,6 +7592,8 @@ compute_text_actions (bfd *abfd,
+@@ -7367,6 +7587,8 @@
free_ebb_constraint (&ebb_table);
}
@@ -368,7 +366,7 @@ index 0b6f584..872370b 100644
#if DEBUG
if (relax_info->action_list.head)
print_action_list (stderr, &relax_info->action_list);
-@@ -7974,14 +8196,17 @@ check_section_ebb_pcrels_fit (bfd *abfd,
+@@ -7969,14 +8191,17 @@
asection *sec,
bfd_byte *contents,
Elf_Internal_Rela *internal_relocs,
@@ -386,7 +384,7 @@ index 0b6f584..872370b 100644
relax_info = get_xtensa_relax_info (sec);
-@@ -7992,7 +8217,40 @@ check_section_ebb_pcrels_fit (bfd *abfd,
+@@ -7987,7 +8212,40 @@
can still be used. */
}
@@ -428,7 +426,7 @@ index 0b6f584..872370b 100644
{
r_reloc r_rel;
bfd_vma orig_self_offset, orig_target_offset;
-@@ -8001,7 +8259,15 @@ check_section_ebb_pcrels_fit (bfd *abfd,
+@@ -7996,7 +8254,15 @@
reloc_howto_type *howto;
int self_removed_bytes, target_removed_bytes;
@@ -445,7 +443,7 @@ index 0b6f584..872370b 100644
r_type = ELF32_R_TYPE (irel->r_info);
howto = &elf_howto_table[r_type];
-@@ -8067,21 +8333,30 @@ check_section_ebb_pcrels_fit (bfd *abfd,
+@@ -8062,21 +8328,30 @@
xtensa_opcode opcode;
int opnum;
@@ -488,7 +486,7 @@ index 0b6f584..872370b 100644
}
if (!pcrel_reloc_fits (opcode, opnum, self_offset, target_offset))
-@@ -8778,7 +9053,7 @@ move_shared_literal (asection *sec,
+@@ -8773,7 +9048,7 @@
/* Check all of the PC-relative relocations to make sure they still fit. */
relocs_fit = check_section_ebb_pcrels_fit (target_sec->owner, target_sec,
target_sec_cache->contents,
@@ -497,6 +495,3 @@ index 0b6f584..872370b 100644
&ebb_table, NULL);
if (!relocs_fit)
---
-1.8.1.4
-
diff --git a/packages/binutils/2.25.1/907-xtensa-optimize-removed_by_actions.patch b/packages/binutils/2.24/0016-xtensa-optimize-removed_by_actions.patch
index 9df8065..2ce6a19 100644
--- a/packages/binutils/2.25.1/907-xtensa-optimize-removed_by_actions.patch
+++ b/packages/binutils/2.24/0016-xtensa-optimize-removed_by_actions.patch
@@ -50,14 +50,12 @@ bfd/
Backported from: 071aa5c98a31c966f5fbfc573fcee61350fd1936
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
- bfd/elf32-xtensa.c | 181 +++++++++++++++++++++++++++++++++++++++++++++--------
+ bfd/elf32-xtensa.c | 181 +++++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 156 insertions(+), 25 deletions(-)
-diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
-index 872370b..21b2871 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
-@@ -5420,11 +5420,28 @@ struct text_action_struct
+@@ -5415,11 +5415,28 @@
text_action *next;
};
@@ -86,7 +84,7 @@ index 872370b..21b2871 100644
};
-@@ -5636,6 +5653,101 @@ action_list_count (text_action_list *action_list)
+@@ -5631,6 +5648,101 @@
return count;
}
@@ -188,7 +186,7 @@ index 872370b..21b2871 100644
/* The find_insn_action routine will only find non-fill actions. */
-@@ -5909,6 +6021,9 @@ init_xtensa_relax_info (asection *sec)
+@@ -5904,6 +6016,9 @@
relax_info->action_list.head = NULL;
@@ -198,7 +196,7 @@ index 872370b..21b2871 100644
relax_info->fix_list = NULL;
relax_info->fix_array = NULL;
relax_info->fix_array_count = 0;
-@@ -9218,7 +9333,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9213,7 +9328,7 @@
if (elf_hash_table (link_info)->dynamic_sections_created)
shrink_dynamic_reloc_sections (link_info, abfd, sec, irel);
irel->r_info = ELF32_R_INFO (0, R_XTENSA_NONE);
@@ -207,7 +205,7 @@ index 872370b..21b2871 100644
(&relax_info->action_list, irel->r_offset);
continue;
}
-@@ -9255,7 +9370,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9250,7 +9365,7 @@
}
}
@@ -216,7 +214,7 @@ index 872370b..21b2871 100644
(&relax_info->action_list, irel->r_offset);
irel->r_offset = source_offset;
}
-@@ -9352,7 +9467,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9347,7 +9462,7 @@
break;
}
@@ -225,7 +223,7 @@ index 872370b..21b2871 100644
(&target_relax_info->action_list,
r_rel.target_offset + diff_value);
diff_value = new_end_offset - new_reloc.target_offset;
-@@ -9750,7 +9865,6 @@ translate_reloc (const r_reloc *orig_rel, r_reloc *new_rel, asection *sec)
+@@ -9745,7 +9860,6 @@
xtensa_relax_info *relax_info;
removed_literal *removed;
bfd_vma target_offset, base_offset;
@@ -233,7 +231,7 @@ index 872370b..21b2871 100644
*new_rel = *orig_rel;
-@@ -9803,19 +9917,26 @@ translate_reloc (const r_reloc *orig_rel, r_reloc *new_rel, asection *sec)
+@@ -9798,19 +9912,26 @@
offset. */
base_offset = r_reloc_get_target_offset (new_rel) - new_rel->rela.r_addend;
@@ -265,7 +263,7 @@ index 872370b..21b2871 100644
new_rel->target_offset = target_offset - tgt_removed;
new_rel->rela.r_addend += addend_removed;
}
-@@ -10138,9 +10259,10 @@ relax_property_section (bfd *abfd,
+@@ -10133,9 +10254,10 @@
bfd_vma old_offset = val.r_rel.target_offset;
bfd_vma new_offset;
long old_size, new_size;
@@ -279,7 +277,7 @@ index 872370b..21b2871 100644
/* Assert that we are not out of bounds. */
old_size = bfd_get_32 (abfd, size_p);
-@@ -10164,9 +10286,10 @@ relax_property_section (bfd *abfd,
+@@ -10159,9 +10281,10 @@
/* Recompute the new_offset, but this time don't
include any fill inserted by relaxation. */
@@ -293,7 +291,7 @@ index 872370b..21b2871 100644
/* If it is not unreachable and we have not yet
seen an unreachable at this address, place it
-@@ -10182,8 +10305,12 @@ relax_property_section (bfd *abfd,
+@@ -10177,8 +10300,12 @@
}
}
else
@@ -308,7 +306,7 @@ index 872370b..21b2871 100644
if (new_size != old_size)
{
-@@ -10441,14 +10568,16 @@ relax_section_symbols (bfd *abfd, asection *sec)
+@@ -10436,14 +10563,16 @@
if (isym->st_shndx == sec_shndx)
{
@@ -329,7 +327,7 @@ index 872370b..21b2871 100644
}
}
-@@ -10466,15 +10595,17 @@ relax_section_symbols (bfd *abfd, asection *sec)
+@@ -10461,15 +10590,17 @@
|| sym_hash->root.type == bfd_link_hash_defweak)
&& sym_hash->root.u.def.section == sec)
{
@@ -351,6 +349,3 @@ index 872370b..21b2871 100644
}
}
---
-1.8.1.4
-
diff --git a/packages/binutils/2.24/908-xtensa-optimize-find_removed_literal.patch b/packages/binutils/2.24/0017-xtensa-optimize-find_removed_literal.patch
index 96d526f..3b64fd8 100644
--- a/packages/binutils/2.24/908-xtensa-optimize-find_removed_literal.patch
+++ b/packages/binutils/2.24/0017-xtensa-optimize-find_removed_literal.patch
@@ -38,14 +38,12 @@ bfd/
Backported from: 3439c466273378021821473d3fc84990e089ae34
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
- bfd/elf32-xtensa.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++-----
+ bfd/elf32-xtensa.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 58 insertions(+), 6 deletions(-)
-diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
-index 21b2871..51733ad 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
-@@ -5832,6 +5832,7 @@ print_action_list (FILE *fp, text_action_list *action_list)
+@@ -5827,6 +5827,7 @@
by the "from" offset field. */
typedef struct removed_literal_struct removed_literal;
@@ -53,7 +51,7 @@ index 21b2871..51733ad 100644
typedef struct removed_literal_list_struct removed_literal_list;
struct removed_literal_struct
-@@ -5841,10 +5842,19 @@ struct removed_literal_struct
+@@ -5836,10 +5837,19 @@
removed_literal *next;
};
@@ -73,7 +71,7 @@ index 21b2871..51733ad 100644
};
-@@ -5893,6 +5903,39 @@ add_removed_literal (removed_literal_list *removed_list,
+@@ -5888,6 +5898,39 @@
}
}
@@ -113,7 +111,7 @@ index 21b2871..51733ad 100644
/* Check if the list of removed literals contains an entry for the
given address. Return the entry if found. */
-@@ -5900,12 +5943,21 @@ add_removed_literal (removed_literal_list *removed_list,
+@@ -5895,12 +5938,21 @@
static removed_literal *
find_removed_literal (removed_literal_list *removed_list, bfd_vma addr)
{
@@ -141,6 +139,3 @@ index 21b2871..51733ad 100644
}
---
-1.8.1.4
-
diff --git a/packages/binutils/2.25.1/909-xtensa-replace-action-list-with-splay-tree.patch b/packages/binutils/2.24/0018-xtensa-replace-action-list-with-splay-tree.patch
index 3090cc2..dd7ff8f 100644
--- a/packages/binutils/2.25.1/909-xtensa-replace-action-list-with-splay-tree.patch
+++ b/packages/binutils/2.24/0018-xtensa-replace-action-list-with-splay-tree.patch
@@ -73,14 +73,12 @@ bfd/
Backported from: 4c2af04fe8b4452bf51d2debf1bb467fafcd0f08
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
- bfd/elf32-xtensa.c | 488 +++++++++++++++++++++++++++++++----------------------
+ bfd/elf32-xtensa.c | 488 ++++++++++++++++++++++++++++++-----------------------
1 file changed, 282 insertions(+), 206 deletions(-)
-diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
-index 51733ad..53af1c6 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
-@@ -28,6 +28,7 @@
+@@ -29,6 +29,7 @@
#include "libbfd.h"
#include "elf-bfd.h"
#include "elf/xtensa.h"
@@ -88,7 +86,7 @@ index 51733ad..53af1c6 100644
#include "xtensa-isa.h"
#include "xtensa-config.h"
-@@ -5416,8 +5417,6 @@ struct text_action_struct
+@@ -5411,8 +5412,6 @@
bfd_vma virtual_offset; /* Zero except for adding literals. */
int removed_bytes;
literal_value value; /* Only valid when adding literals. */
@@ -97,7 +95,7 @@ index 51733ad..53af1c6 100644
};
struct removal_by_action_entry_struct
-@@ -5440,7 +5439,8 @@ typedef struct removal_by_action_map_struct removal_by_action_map;
+@@ -5435,7 +5434,8 @@
/* List of all of the actions taken on a text section. */
struct text_action_list_struct
{
@@ -107,7 +105,7 @@ index 51733ad..53af1c6 100644
removal_by_action_map map;
};
-@@ -5448,20 +5448,18 @@ struct text_action_list_struct
+@@ -5443,20 +5443,18 @@
static text_action *
find_fill_action (text_action_list *l, asection *sec, bfd_vma offset)
{
@@ -135,7 +133,7 @@ index 51733ad..53af1c6 100644
return NULL;
}
-@@ -5509,6 +5507,49 @@ adjust_fill_action (text_action *ta, int fill_diff)
+@@ -5504,6 +5502,49 @@
}
@@ -185,7 +183,7 @@ index 51733ad..53af1c6 100644
/* Add a modification action to the text. For the case of adding or
removing space, modify any current fill and assume that
"unreachable_space" bytes can be freely contracted. Note that a
-@@ -5521,8 +5562,8 @@ text_action_add (text_action_list *l,
+@@ -5516,8 +5557,8 @@
bfd_vma offset,
int removed)
{
@@ -195,7 +193,7 @@ index 51733ad..53af1c6 100644
/* It is not necessary to fill at the end of a section. */
if (action == ta_fill && sec->size == offset)
-@@ -5532,34 +5573,30 @@ text_action_add (text_action_list *l,
+@@ -5527,34 +5568,30 @@
if (action == ta_fill && removed == 0)
return;
@@ -243,7 +241,7 @@ index 51733ad..53af1c6 100644
}
-@@ -5570,7 +5607,6 @@ text_action_add_literal (text_action_list *l,
+@@ -5565,7 +5602,6 @@
const literal_value *value,
int removed)
{
@@ -251,7 +249,7 @@ index 51733ad..53af1c6 100644
text_action *ta;
asection *sec = r_reloc_get_section (loc);
bfd_vma offset = loc->target_offset;
-@@ -5578,14 +5614,6 @@ text_action_add_literal (text_action_list *l,
+@@ -5573,14 +5609,6 @@
BFD_ASSERT (action == ta_add_literal);
@@ -266,7 +264,7 @@ index 51733ad..53af1c6 100644
/* Create a new record and fill it up. */
ta = (text_action *) bfd_zmalloc (sizeof (text_action));
ta->action = action;
-@@ -5594,8 +5622,10 @@ text_action_add_literal (text_action_list *l,
+@@ -5589,8 +5617,10 @@
ta->virtual_offset = virtual_offset;
ta->value = *value;
ta->removed_bytes = removed;
@@ -279,7 +277,7 @@ index 51733ad..53af1c6 100644
}
-@@ -5606,7 +5636,8 @@ text_action_add_literal (text_action_list *l,
+@@ -5601,7 +5631,8 @@
so that each search may begin where the previous one left off. */
static int
@@ -289,7 +287,7 @@ index 51733ad..53af1c6 100644
bfd_vma offset,
bfd_boolean before_fill)
{
-@@ -5614,6 +5645,13 @@ removed_by_actions (text_action **p_start_action,
+@@ -5609,6 +5640,13 @@
int removed = 0;
r = *p_start_action;
@@ -303,7 +301,7 @@ index 51733ad..53af1c6 100644
while (r)
{
if (r->offset > offset)
-@@ -5625,7 +5663,7 @@ removed_by_actions (text_action **p_start_action,
+@@ -5620,7 +5658,7 @@
removed += r->removed_bytes;
@@ -312,7 +310,7 @@ index 51733ad..53af1c6 100644
}
*p_start_action = r;
-@@ -5636,68 +5674,74 @@ removed_by_actions (text_action **p_start_action,
+@@ -5631,68 +5669,74 @@
static bfd_vma
offset_with_removed_text (text_action_list *action_list, bfd_vma offset)
{
@@ -429,7 +427,7 @@ index 51733ad..53af1c6 100644
}
static int
-@@ -5754,28 +5798,26 @@ offset_with_removed_text_map (text_action_list *action_list, bfd_vma offset)
+@@ -5749,28 +5793,26 @@
static text_action *
find_insn_action (text_action_list *action_list, bfd_vma offset)
{
@@ -477,50 +475,20 @@ index 51733ad..53af1c6 100644
}
return NULL;
}
-@@ -5784,40 +5826,50 @@ find_insn_action (text_action_list *action_list, bfd_vma offset)
+@@ -5779,40 +5821,50 @@
#if DEBUG
static void
-print_action_list (FILE *fp, text_action_list *action_list)
+print_action (FILE *fp, text_action *r)
-+{
-+ const char *t = "unknown";
-+ switch (r->action)
-+ {
-+ case ta_remove_insn:
-+ t = "remove_insn"; break;
-+ case ta_remove_longcall:
-+ t = "remove_longcall"; break;
-+ case ta_convert_longcall:
-+ t = "convert_longcall"; break;
-+ case ta_narrow_insn:
-+ t = "narrow_insn"; break;
-+ case ta_widen_insn:
-+ t = "widen_insn"; break;
-+ case ta_fill:
-+ t = "fill"; break;
-+ case ta_none:
-+ t = "none"; break;
-+ case ta_remove_literal:
-+ t = "remove_literal"; break;
-+ case ta_add_literal:
-+ t = "add_literal"; break;
-+ }
-+
-+ fprintf (fp, "%s: %s[0x%lx] \"%s\" %d\n",
-+ r->sec->owner->filename,
-+ r->sec->name, (unsigned long) r->offset, t, r->removed_bytes);
-+}
-+
-+static int
-+print_action_list_fn (splay_tree_node node, void *p)
{
- text_action *r;
-+ text_action *r = (text_action *)node->value;
-
+-
- fprintf (fp, "Text Action\n");
- for (r = action_list->head; r != NULL; r = r->next)
-- {
++ const char *t = "unknown";
++ switch (r->action)
+ {
- const char *t = "unknown";
- switch (r->action)
- {
@@ -543,14 +511,44 @@ index 51733ad..53af1c6 100644
- case ta_add_literal:
- t = "add_literal"; break;
- }
-+ print_action (p, r);
-+ return 0;
++ case ta_remove_insn:
++ t = "remove_insn"; break;
++ case ta_remove_longcall:
++ t = "remove_longcall"; break;
++ case ta_convert_longcall:
++ t = "convert_longcall"; break;
++ case ta_narrow_insn:
++ t = "narrow_insn"; break;
++ case ta_widen_insn:
++ t = "widen_insn"; break;
++ case ta_fill:
++ t = "fill"; break;
++ case ta_none:
++ t = "none"; break;
++ case ta_remove_literal:
++ t = "remove_literal"; break;
++ case ta_add_literal:
++ t = "add_literal"; break;
++ }
++
++ fprintf (fp, "%s: %s[0x%lx] \"%s\" %d\n",
++ r->sec->owner->filename,
++ r->sec->name, (unsigned long) r->offset, t, r->removed_bytes);
+}
- fprintf (fp, "%s: %s[0x%lx] \"%s\" %d\n",
- r->sec->owner->filename,
- r->sec->name, (unsigned long) r->offset, t, r->removed_bytes);
- }
++static int
++print_action_list_fn (splay_tree_node node, void *p)
++{
++ text_action *r = (text_action *)node->value;
++
++ print_action (p, r);
++ return 0;
++}
++
+static void
+print_action_list (FILE *fp, text_action_list *action_list)
+{
@@ -559,7 +557,7 @@ index 51733ad..53af1c6 100644
}
#endif /* DEBUG */
-@@ -6071,8 +6123,8 @@ init_xtensa_relax_info (asection *sec)
+@@ -6066,8 +6118,8 @@
relax_info->removed_list.head = NULL;
relax_info->removed_list.tail = NULL;
@@ -570,7 +568,7 @@ index 51733ad..53af1c6 100644
relax_info->action_list.map.n_entries = 0;
relax_info->action_list.map.entry = NULL;
-@@ -7762,7 +7814,7 @@ compute_text_actions (bfd *abfd,
+@@ -7757,7 +7809,7 @@
free_reloc_range_list (&relevant_relocs);
#if DEBUG
@@ -579,7 +577,7 @@ index 51733ad..53af1c6 100644
print_action_list (stderr, &relax_info->action_list);
#endif
-@@ -8263,6 +8315,54 @@ xlate_offset_with_removed_text (const xlate_map_t *map,
+@@ -8258,6 +8310,54 @@
return e->new_address - e->orig_address + offset;
}
@@ -634,7 +632,7 @@ index 51733ad..53af1c6 100644
/* Build a binary searchable offset translation map from a section's
action list. */
-@@ -8270,75 +8370,40 @@ xlate_offset_with_removed_text (const xlate_map_t *map,
+@@ -8265,75 +8365,40 @@
static xlate_map_t *
build_xlate_map (asection *sec, xtensa_relax_info *relax_info)
{
@@ -729,7 +727,7 @@ index 51733ad..53af1c6 100644
}
-@@ -9302,6 +9367,16 @@ move_shared_literal (asection *sec,
+@@ -9297,6 +9362,16 @@
/* Second relaxation pass. */
@@ -746,7 +744,7 @@ index 51733ad..53af1c6 100644
/* Modify all of the relocations to point to the right spot, and if this
is a relaxable section, delete the unwanted literals and fix the
section size. */
-@@ -9334,7 +9409,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9329,7 +9404,7 @@
internal_relocs = retrieve_internal_relocs (abfd, sec,
link_info->keep_memory);
@@ -755,7 +753,7 @@ index 51733ad..53af1c6 100644
return TRUE;
contents = retrieve_contents (abfd, sec, link_info->keep_memory);
-@@ -9412,6 +9487,12 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9407,6 +9482,12 @@
}
/* Update the action so that the code that moves
the contents will do the right thing. */
@@ -768,7 +766,7 @@ index 51733ad..53af1c6 100644
if (action->action == ta_remove_longcall)
action->action = ta_remove_insn;
else
-@@ -9584,13 +9665,12 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9579,13 +9660,12 @@
if ((relax_info->is_relaxable_literal_section
|| relax_info->is_relaxable_asm_section)
@@ -783,7 +781,7 @@ index 51733ad..53af1c6 100644
bfd_size_type final_size, copy_size, orig_insn_size;
bfd_byte *scratch = NULL;
bfd_byte *dup_contents = NULL;
-@@ -9601,15 +9681,12 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9596,15 +9676,12 @@
bfd_vma orig_dot_vo = 0; /* Virtual offset from orig_dot. */
bfd_vma dup_dot = 0;
@@ -802,7 +800,7 @@ index 51733ad..53af1c6 100644
scratch = (bfd_byte *) bfd_zmalloc (final_size);
dup_contents = (bfd_byte *) bfd_zmalloc (final_size);
-@@ -9618,8 +9695,8 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9613,8 +9690,8 @@
print_action_list (stderr, &relax_info->action_list);
#endif
@@ -813,7 +811,7 @@ index 51733ad..53af1c6 100644
{
virtual_action = FALSE;
if (action->offset > orig_dot)
-@@ -9748,7 +9825,6 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9743,7 +9820,6 @@
break;
}
@@ -821,6 +819,3 @@ index 51733ad..53af1c6 100644
BFD_ASSERT (dup_dot <= final_size);
BFD_ASSERT (orig_dot <= orig_size);
}
---
-1.8.1.4
-
diff --git a/packages/binutils/2.24/910-xtensa-optimize-trampolines-relaxation.patch b/packages/binutils/2.24/0019-xtensa-optimize-trampolines-relaxation.patch
index 043ff4d..4967b61 100644
--- a/packages/binutils/2.24/910-xtensa-optimize-trampolines-relaxation.patch
+++ b/packages/binutils/2.24/0019-xtensa-optimize-trampolines-relaxation.patch
@@ -64,14 +64,12 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Backported from: b76f99d702c3501ac320396ea06bc7f9237173c3
Changes to ChangeLog are dropped.
- gas/config/tc-xtensa.c | 220 +++++++++++++++++++++++++++++++++++++++++++------
- 1 file changed, 194 insertions(+), 26 deletions(-)
+ gas/config/tc-xtensa.c | 220 ++++++++++++++++++++++++++++++++++++++++++-------
+ 1 file changed, 193 insertions(+), 27 deletions(-)
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index 3e85b69..31c0b6b 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -8785,6 +8785,154 @@ static long relax_frag_for_align (fragS *, long);
+@@ -8786,6 +8786,154 @@
static long relax_frag_immed
(segT, fragS *, long, int, xtensa_format, int, int *, bfd_boolean);
@@ -226,7 +224,7 @@ index 3e85b69..31c0b6b 100644
/* Return the number of bytes added to this fragment, given that the
input has been stretched already by "stretch". */
-@@ -8896,35 +9044,42 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p)
+@@ -8897,35 +9045,42 @@
case RELAX_TRAMPOLINE:
if (fragP->tc_frag_data.relax_seen)
{
@@ -280,21 +278,21 @@ index 3e85b69..31c0b6b 100644
+ trampaddr = fragP->fr_address + fragP->fr_fix;
+
+ if (addr + J_RANGE < trampaddr)
++ continue;
++ if (addr > trampaddr + J_RANGE)
++ break;
++ if (abs (delta) < J_RANGE)
continue;
- target = S_GET_VALUE (s);
- addr = fixP->fx_frag->fr_address;
- delta = target - addr + stretch;
-+ if (addr > trampaddr + J_RANGE)
-+ break;
-+ if (abs (delta) < J_RANGE)
-+ continue;
+
+ slot = fixP->tc_fix_data.slot;
+
if (delta > J_RANGE || delta < -1 * J_RANGE)
{ /* Found an out-of-range jump; scan the list of trampolines for the best match. */
struct trampoline_seg *ts = find_trampoline_seg (now_seg);
-@@ -8978,14 +9133,13 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p)
+@@ -8979,14 +9134,13 @@
}
if (tf->fragP == fragP)
{
@@ -310,7 +308,7 @@ index 3e85b69..31c0b6b 100644
new_stretch += init_trampoline_frag (tf);
offset = fragP->fr_fix; /* Where to assemble the j insn. */
-@@ -9009,10 +9163,20 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p)
+@@ -9010,10 +9164,20 @@
newfixP->tc_fix_data.X_add_symbol = lsym;
newfixP->tc_fix_data.X_add_number = offset;
newfixP->tc_fix_data.slot = slot;
@@ -331,7 +329,7 @@ index 3e85b69..31c0b6b 100644
/* Adjust the jump around this trampoline (if present). */
if (tf->fixP != NULL)
{
-@@ -9027,6 +9191,8 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p)
+@@ -9028,6 +9192,8 @@
fragP->fr_subtype = 0;
/* Remove from the trampoline_list. */
prev->next = tf->next;
@@ -340,6 +338,3 @@ index 3e85b69..31c0b6b 100644
break;
}
}
---
-1.8.1.4
-
diff --git a/packages/binutils/2.25.1/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch b/packages/binutils/2.24/0020-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
index 9ad6b3b..63fc41d 100644
--- a/packages/binutils/2.25.1/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
+++ b/packages/binutils/2.24/0020-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
@@ -29,14 +29,12 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Backported from: e6c9a083ec5ae7a45bd71682b26aae1939849388
Changes to ChangeLog are dropped.
- bfd/elf32-xtensa.c | 6 +++++-
+ bfd/elf32-xtensa.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
-diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
-index 53af1c6..2523670 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
-@@ -1360,10 +1360,14 @@ elf_xtensa_gc_sweep_hook (bfd *abfd,
+@@ -1357,10 +1357,14 @@
{
if (is_plt)
{
@@ -52,6 +50,3 @@ index 53af1c6..2523670 100644
{
if (h->got.refcount > 0)
h->got.refcount--;
---
-1.8.1.4
-
diff --git a/packages/binutils/2.25.1/912-xtensa-fix-gas-segfault-with-text-section-literals.patch b/packages/binutils/2.24/0021-xtensa-fix-gas-segfault-with-text-section-literals.patch
index 4a3de2c..b184987 100644
--- a/packages/binutils/2.25.1/912-xtensa-fix-gas-segfault-with-text-section-literals.patch
+++ b/packages/binutils/2.24/0021-xtensa-fix-gas-segfault-with-text-section-literals.patch
@@ -21,14 +21,12 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Backported from: 4de0562a4c69fef4952aa7e19d7bda359f02e8b4
Changes to ChangeLog are dropped.
- gas/config/tc-xtensa.c | 10 +++++++++-
+ gas/config/tc-xtensa.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index 31c0b6b..18307c1 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -10808,13 +10808,21 @@ xtensa_move_literals (void)
+@@ -10809,13 +10809,21 @@
frchain_to = NULL;
frag_splice = &(frchain_from->frch_root);
@@ -51,6 +49,3 @@ index 31c0b6b..18307c1 100644
gas_assert (search_frag->tc_frag_data.literal_frag->fr_subtype
== RELAX_LITERAL_POOL_BEGIN);
xtensa_switch_section_emit_state (&state, segment->seg, 0);
---
-1.8.1.4
-
diff --git a/packages/binutils/2.24/913-xtensa-add-auto-litpools-option.patch b/packages/binutils/2.24/0022-xtensa-add-auto-litpools-option.patch
index f0199e1..269e9f2 100644
--- a/packages/binutils/2.24/913-xtensa-add-auto-litpools-option.patch
+++ b/packages/binutils/2.24/0022-xtensa-add-auto-litpools-option.patch
@@ -55,20 +55,18 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Backported from: b46824bd49648c575372e6d9bc6a6defeabd6ed5
Changes to ChangeLogs and documentation are dropped.
- gas/config/tc-xtensa.c | 432 ++++++++++++++++++++++++++++++-
- gas/config/tc-xtensa.h | 1 +
- gas/testsuite/gas/xtensa/all.exp | 1 +
- gas/testsuite/gas/xtensa/auto-litpools.d | 12 +
- gas/testsuite/gas/xtensa/auto-litpools.s | 13 +
+ gas/config/tc-xtensa.c | 432 ++++++++++++++++++++++++++++++-
+ gas/config/tc-xtensa.h | 1
+ gas/testsuite/gas/xtensa/all.exp | 1
+ gas/testsuite/gas/xtensa/auto-litpools.d | 12
+ gas/testsuite/gas/xtensa/auto-litpools.s | 13
5 files changed, 454 insertions(+), 5 deletions(-)
create mode 100644 gas/testsuite/gas/xtensa/auto-litpools.d
create mode 100644 gas/testsuite/gas/xtensa/auto-litpools.s
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index 7311a05..b8b1e7d 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -440,6 +440,29 @@ bfd_boolean directive_state[] =
+@@ -441,6 +441,29 @@
#endif
};
@@ -98,7 +96,7 @@ index 7311a05..b8b1e7d 100644
/* Directive functions. */
-@@ -474,6 +497,9 @@ static void xtensa_create_trampoline_frag (bfd_boolean);
+@@ -475,6 +498,9 @@
static void xtensa_maybe_create_trampoline_frag (void);
struct trampoline_frag;
static int init_trampoline_frag (struct trampoline_frag *);
@@ -108,7 +106,7 @@ index 7311a05..b8b1e7d 100644
/* Alignment Functions. */
-@@ -698,6 +724,10 @@ enum
+@@ -699,6 +725,10 @@
option_trampolines,
option_no_trampolines,
@@ -119,7 +117,7 @@ index 7311a05..b8b1e7d 100644
};
const char *md_shortopts = "";
-@@ -773,6 +803,10 @@ struct option md_longopts[] =
+@@ -774,6 +804,10 @@
{ "trampolines", no_argument, NULL, option_trampolines },
{ "no-trampolines", no_argument, NULL, option_no_trampolines },
@@ -130,7 +128,7 @@ index 7311a05..b8b1e7d 100644
{ NULL, no_argument, NULL, 0 }
};
-@@ -961,6 +995,34 @@ md_parse_option (int c, char *arg)
+@@ -962,6 +996,34 @@
use_trampolines = FALSE;
return 1;
@@ -165,7 +163,7 @@ index 7311a05..b8b1e7d 100644
default:
return 0;
}
-@@ -986,7 +1048,12 @@ Xtensa options:\n\
+@@ -987,7 +1049,12 @@
flix bundles\n\
--rename-section old=new Rename section 'old' to 'new'\n\
--[no-]trampolines [Do not] generate trampolines (jumps to jumps)\n\
@@ -179,7 +177,7 @@ index 7311a05..b8b1e7d 100644
}
-@@ -4728,6 +4795,8 @@ xtensa_mark_literal_pool_location (void)
+@@ -4729,6 +4796,8 @@
pool_location = frag_now;
frag_now->tc_frag_data.lit_frchain = frchain_now;
frag_now->tc_frag_data.literal_frag = frag_now;
@@ -188,7 +186,7 @@ index 7311a05..b8b1e7d 100644
frag_variant (rs_machine_dependent, 0, 0,
RELAX_LITERAL_POOL_BEGIN, NULL, 0, NULL);
xtensa_set_frag_assembly_state (frag_now);
-@@ -4832,6 +4901,31 @@ get_expanded_loop_offset (xtensa_opcode opcode)
+@@ -4833,6 +4902,31 @@
static fragS *
get_literal_pool_location (segT seg)
{
@@ -220,7 +218,7 @@ index 7311a05..b8b1e7d 100644
return seg_info (seg)->tc_segment_info_data.literal_pool_loc;
}
-@@ -7098,6 +7192,11 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn)
+@@ -7099,6 +7193,11 @@
frag_now->tc_frag_data.slot_symbols[slot] = tinsn->symbol;
frag_now->tc_frag_data.slot_offsets[slot] = tinsn->offset;
frag_now->tc_frag_data.literal_frags[slot] = tinsn->literal_frag;
@@ -232,7 +230,7 @@ index 7311a05..b8b1e7d 100644
if (tinsn->literal_space != 0)
xg_assemble_literal_space (tinsn->literal_space, slot);
frag_now->tc_frag_data.free_reg[slot] = tinsn->extra_arg;
-@@ -7170,6 +7269,8 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn)
+@@ -7171,6 +7270,8 @@
frag_now->fr_symbol, frag_now->fr_offset, NULL);
xtensa_set_frag_assembly_state (frag_now);
xtensa_maybe_create_trampoline_frag ();
@@ -241,7 +239,7 @@ index 7311a05..b8b1e7d 100644
}
else if (is_branch && do_align_targets ())
{
-@@ -7314,11 +7415,18 @@ xtensa_check_frag_count (void)
+@@ -7315,11 +7416,18 @@
clear_frag_count ();
unreachable_count = 0;
}
@@ -260,7 +258,7 @@ index 7311a05..b8b1e7d 100644
#define TRAMPOLINE_FRAG_SIZE 3000
static void
-@@ -7410,6 +7518,135 @@ dump_trampolines (void)
+@@ -7411,6 +7519,135 @@
}
}
@@ -396,7 +394,7 @@ index 7311a05..b8b1e7d 100644
static void
xtensa_cleanup_align_frags (void)
{
-@@ -9029,7 +9266,41 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p)
+@@ -9030,7 +9267,41 @@
break;
case RELAX_LITERAL_POOL_BEGIN:
@@ -438,7 +436,7 @@ index 7311a05..b8b1e7d 100644
case RELAX_MAYBE_UNREACHABLE:
case RELAX_MAYBE_DESIRE_ALIGN:
/* No relaxation required. */
-@@ -10789,12 +11060,115 @@ xtensa_move_literals (void)
+@@ -10790,12 +11061,115 @@
segT dest_seg;
fixS *fix, *next_fix, **fix_splice;
sym_list *lit;
@@ -554,7 +552,7 @@ index 7311a05..b8b1e7d 100644
for (segment = literal_head->next; segment; segment = segment->next)
{
/* Keep the literals for .init and .fini in separate sections. */
-@@ -10839,9 +11213,6 @@ xtensa_move_literals (void)
+@@ -10840,9 +11214,6 @@
while (search_frag != frag_now)
{
next_frag = search_frag->fr_next;
@@ -564,7 +562,7 @@ index 7311a05..b8b1e7d 100644
if (search_frag->tc_frag_data.literal_frag)
{
literal_pool = search_frag->tc_frag_data.literal_frag;
-@@ -10849,8 +11220,56 @@ xtensa_move_literals (void)
+@@ -10850,8 +11221,56 @@
frchain_to = literal_pool->tc_frag_data.lit_frchain;
gas_assert (frchain_to);
}
@@ -621,7 +619,7 @@ index 7311a05..b8b1e7d 100644
*frag_splice = next_frag;
search_frag->fr_next = insert_after->fr_next;
-@@ -11014,7 +11433,10 @@ xtensa_switch_to_non_abs_literal_fragment (emit_state *result)
+@@ -11015,7 +11434,10 @@
&& !recursive
&& !is_init && ! is_fini)
{
@@ -633,11 +631,9 @@ index 7311a05..b8b1e7d 100644
/* When we mark a literal pool location, we want to put a frag in
the literal pool that points to it. But to do that, we want to
-diff --git a/gas/config/tc-xtensa.h b/gas/config/tc-xtensa.h
-index b2e43fa..290d902 100644
--- a/gas/config/tc-xtensa.h
+++ b/gas/config/tc-xtensa.h
-@@ -124,6 +124,7 @@ enum xtensa_relax_statesE
+@@ -125,6 +125,7 @@
RELAX_LITERAL_POOL_BEGIN,
RELAX_LITERAL_POOL_END,
@@ -645,20 +641,16 @@ index b2e43fa..290d902 100644
/* Technically these are not relaxations at all but mark a location
to store literals later. Note that fr_var stores the frchain for
BEGIN frags and fr_var stores now_seg for END frags. */
-diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp
-index d197ec8..db39629 100644
--- a/gas/testsuite/gas/xtensa/all.exp
+++ b/gas/testsuite/gas/xtensa/all.exp
-@@ -100,5 +100,6 @@ if [istarget xtensa*-*-*] then {
+@@ -100,6 +100,7 @@
+ run_dump_test "weak-call"
run_dump_test "jlong"
run_dump_test "trampoline"
+ run_dump_test "auto-litpools"
}
if [info exists errorInfo] then {
-diff --git a/gas/testsuite/gas/xtensa/auto-litpools.d b/gas/testsuite/gas/xtensa/auto-litpools.d
-new file mode 100644
-index 0000000..4d1a690
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/auto-litpools.d
@@ -0,0 +1,12 @@
@@ -674,9 +666,6 @@ index 0000000..4d1a690
+#...
+.*40750:.*l32r.a2, 3e43c .*
+#...
-diff --git a/gas/testsuite/gas/xtensa/auto-litpools.s b/gas/testsuite/gas/xtensa/auto-litpools.s
-new file mode 100644
-index 0000000..9a5b26b
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/auto-litpools.s
@@ -0,0 +1,13 @@
@@ -693,6 +682,3 @@ index 0000000..9a5b26b
+ .endr
+ l32r a2, .L1
+ ret
---
-1.8.1.4
-
diff --git a/packages/binutils/2.23.2/914-xtensa-fix-signedness-of-gas-relocations.patch b/packages/binutils/2.24/0023-xtensa-fix-signedness-of-gas-relocations.patch
index 2955e11..1d89655 100644
--- a/packages/binutils/2.23.2/914-xtensa-fix-signedness-of-gas-relocations.patch
+++ b/packages/binutils/2.24/0023-xtensa-fix-signedness-of-gas-relocations.patch
@@ -16,14 +16,12 @@ gas/
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
- gas/config/tc-xtensa.c | 6 +++---
+ gas/config/tc-xtensa.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index a119871..36a06cc 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -5961,15 +5961,15 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
+@@ -5962,15 +5962,15 @@
{
case BFD_RELOC_8:
fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8;
@@ -42,6 +40,3 @@ index a119871..36a06cc 100644
break;
default:
break;
---
-2.1.4
-
diff --git a/packages/binutils/2.24/915-xtensa-fix-.init-.fini-literals-moving.patch b/packages/binutils/2.24/0024-xtensa-fix-.init-.fini-literals-moving.patch
index 656373f..cd8a72c 100644
--- a/packages/binutils/2.24/915-xtensa-fix-.init-.fini-literals-moving.patch
+++ b/packages/binutils/2.24/0024-xtensa-fix-.init-.fini-literals-moving.patch
@@ -32,14 +32,12 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
Backported from: 4111950f363221c4641dc2f33bea61cc94f34906
- gas/config/tc-xtensa.c | 12 ++++++++++--
+ gas/config/tc-xtensa.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index 36a06cc..5773634 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -11061,6 +11061,10 @@ xtensa_move_literals (void)
+@@ -11062,6 +11062,10 @@
fixS *fix, *next_fix, **fix_splice;
sym_list *lit;
struct litpool_seg *lps;
@@ -50,7 +48,7 @@ index 36a06cc..5773634 100644
mark_literal_frags (literal_head->next);
-@@ -11171,9 +11175,13 @@ xtensa_move_literals (void)
+@@ -11172,9 +11176,13 @@
for (segment = literal_head->next; segment; segment = segment->next)
{
@@ -66,6 +64,3 @@ index 36a06cc..5773634 100644
continue;
frchain_from = seg_info (segment->seg)->frchainP;
---
-2.1.4
-
diff --git a/packages/binutils/2.24/120-sh-conf.patch b/packages/binutils/2.24/120-sh-conf.patch
deleted file mode 100644
index d5913e8..0000000
--- a/packages/binutils/2.24/120-sh-conf.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-r10231 | lethal | 2005-05-02 09:58:00 -0400 (Mon, 02 May 2005) | 13 lines
-
-Likewise, binutils has no idea about any of these new targets either, so we
-fix that up too.. now we're able to actually build a real toolchain for
-sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more
-inept targets than that one, really. Go look, I promise).
-
-diff -durN binutils-2.22.orig/configure binutils-2.22/configure
---- binutils-2.22.orig/configure 2011-08-14 14:28:15.000000000 +0200
-+++ binutils-2.22/configure 2011-12-14 19:49:40.284777434 +0100
-@@ -3570,7 +3570,7 @@
- mips*-*-*)
- noconfigdirs="$noconfigdirs gprof"
- ;;
-- sh-*-* | sh64-*-*)
-+ sh*-*-* | sh64-*-*)
- case "${target}" in
- sh*-*-elf)
- ;;
-diff -durN binutils-2.22.orig/configure.ac binutils-2.22/configure.ac
---- binutils-2.22.orig/configure.ac 2011-11-21 12:58:27.000000000 +0100
-+++ binutils-2.22/configure.ac 2011-12-14 19:49:40.316777436 +0100
-@@ -1006,7 +1006,7 @@
- mips*-*-*)
- noconfigdirs="$noconfigdirs gprof"
- ;;
-- sh-*-* | sh64-*-*)
-+ sh*-*-* | sh64-*-*)
- case "${target}" in
- sh*-*-elf)
- ;;
diff --git a/packages/binutils/2.24/300-001_ld_makefile_patch.patch b/packages/binutils/2.24/300-001_ld_makefile_patch.patch
deleted file mode 100644
index 4b5888a..0000000
--- a/packages/binutils/2.24/300-001_ld_makefile_patch.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -durN binutils-2.22.orig/ld/Makefile.am binutils-2.22/ld/Makefile.am
---- binutils-2.22.orig/ld/Makefile.am 2011-07-22 22:22:37.000000000 +0200
-+++ binutils-2.22/ld/Makefile.am 2011-12-14 19:50:25.760779164 +0100
-@@ -37,7 +37,7 @@
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
-
- EMUL = @EMUL@
- EMULATION_OFILES = @EMULATION_OFILES@
-diff -durN binutils-2.22.orig/ld/Makefile.in binutils-2.22/ld/Makefile.in
---- binutils-2.22.orig/ld/Makefile.in 2011-07-22 22:22:37.000000000 +0200
-+++ binutils-2.22/ld/Makefile.in 2011-12-14 19:50:25.784779163 +0100
-@@ -366,7 +366,7 @@
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
- BASEDIR = $(srcdir)/..
- BFDDIR = $(BASEDIR)/bfd
- INCDIR = $(BASEDIR)/include
diff --git a/packages/binutils/2.28.1/120-sh-conf.patch b/packages/binutils/2.25.1/0000-sh-conf.patch
index c12a023..88024bf 100644
--- a/packages/binutils/2.28.1/120-sh-conf.patch
+++ b/packages/binutils/2.25.1/0000-sh-conf.patch
@@ -5,11 +5,14 @@ fix that up too.. now we're able to actually build a real toolchain for
sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more
inept targets than that one, really. Go look, I promise).
-diff --git a/configure b/configure
-index 87677bc..2d916f1 100755
+---
+ configure | 2 +-
+ configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
--- a/configure
+++ b/configure
-@@ -3812,7 +3812,7 @@ case "${target}" in
+@@ -3812,7 +3812,7 @@
or1k*-*-*)
noconfigdirs="$noconfigdirs gdb"
;;
@@ -18,11 +21,9 @@ index 87677bc..2d916f1 100755
case "${target}" in
sh*-*-elf)
;;
-diff --git a/configure.ac b/configure.ac
-index 8fe0eca..b10a99f 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1140,7 +1140,7 @@ case "${target}" in
+@@ -1140,7 +1140,7 @@
or1k*-*-*)
noconfigdirs="$noconfigdirs gdb"
;;
diff --git a/packages/binutils/2.28.1/300-001_ld_makefile_patch.patch b/packages/binutils/2.25.1/0001-001_ld_makefile_patch.patch
index 2a1320c..c47d7d1 100644
--- a/packages/binutils/2.28.1/300-001_ld_makefile_patch.patch
+++ b/packages/binutils/2.25.1/0001-001_ld_makefile_patch.patch
@@ -1,8 +1,11 @@
-diff --git a/ld/Makefile.am b/ld/Makefile.am
-index 9575f1f..84df0bf 100644
+---
+ ld/Makefile.am | 2 +-
+ ld/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
-@@ -54,7 +54,7 @@ endif
+@@ -54,7 +54,7 @@
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.
@@ -11,11 +14,9 @@ index 9575f1f..84df0bf 100644
EMUL = @EMUL@
EMULATION_OFILES = @EMULATION_OFILES@
-diff --git a/ld/Makefile.in b/ld/Makefile.in
-index 9f56ca1..272860f 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
-@@ -388,7 +388,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
+@@ -388,7 +388,7 @@
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.
diff --git a/packages/binutils/2.25.1/300-012_check_ldrunpath_length.patch b/packages/binutils/2.25.1/0002-012_check_ldrunpath_length.patch
index f1f31af..712eb19 100644
--- a/packages/binutils/2.25.1/300-012_check_ldrunpath_length.patch
+++ b/packages/binutils/2.25.1/0002-012_check_ldrunpath_length.patch
@@ -1,8 +1,10 @@
-diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
-index 137446f..bb8391a 100644
+---
+ ld/emultempl/elf32.em | 4 ++++
+ 1 file changed, 4 insertions(+)
+
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
-@@ -1195,6 +1195,8 @@ fragment <<EOF
+@@ -1198,6 +1198,8 @@
&& command_line.rpath == NULL)
{
lib_path = (const char *) getenv ("LD_RUN_PATH");
@@ -11,7 +13,7 @@ index 137446f..bb8391a 100644
if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
force))
break;
-@@ -1458,6 +1460,8 @@ gld${EMULATION_NAME}_before_allocation (void)
+@@ -1461,6 +1463,8 @@
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
diff --git a/packages/binutils/2.25.1/310-fix-gold-pthreads-typo.patch b/packages/binutils/2.25.1/0003-fix-gold-pthreads-typo.patch
index f2e6ff2..40861f5 100644
--- a/packages/binutils/2.25.1/310-fix-gold-pthreads-typo.patch
+++ b/packages/binutils/2.25.1/0003-fix-gold-pthreads-typo.patch
@@ -1,5 +1,9 @@
---- binutils-2.25.1/gold/gold-threads.cc.orig 2014-10-14 08:32:04.000000000 +0100
-+++ binutils-2.25.1/gold/gold-threads.cc 2015-10-20 22:38:18.640819300 +0100
+---
+ gold/gold-threads.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/gold/gold-threads.cc
++++ b/gold/gold-threads.cc
@@ -102,9 +102,9 @@
if (err != 0)
gold_fatal(_("pthead_mutextattr_init failed: %s"), strerror(err));
diff --git a/packages/binutils/2.25.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch b/packages/binutils/2.25.1/0004-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
index f9a8af6..c086798 100644
--- a/packages/binutils/2.25.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
+++ b/packages/binutils/2.25.1/0004-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
@@ -1,5 +1,9 @@
---- binutils-2.25.1/gold/gold-threads.cc.orig 2015-10-20 22:39:36.371169400 +0100
-+++ binutils-2.25.1/gold/gold-threads.cc 2015-10-20 22:39:38.182772700 +0100
+---
+ gold/gold-threads.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/gold/gold-threads.cc
++++ b/gold/gold-threads.cc
@@ -101,7 +101,7 @@
int err = pthread_mutexattr_init(&attr);
if (err != 0)
diff --git a/packages/binutils/2.25.1/0005-Dont-link-to-libfl-as-its-unnecessary.patch b/packages/binutils/2.25.1/0005-Dont-link-to-libfl-as-its-unnecessary.patch
new file mode 100644
index 0000000..bf7906d
--- /dev/null
+++ b/packages/binutils/2.25.1/0005-Dont-link-to-libfl-as-its-unnecessary.patch
@@ -0,0 +1,105 @@
+---
+ binutils/configure | 3 +++
+ binutils/configure.ac | 3 +++
+ gas/configure | 3 +++
+ gas/configure.ac | 3 +++
+ ld/configure | 3 +++
+ ld/configure.ac | 3 +++
+ 6 files changed, 18 insertions(+)
+
+--- a/binutils/configure
++++ b/binutils/configure
+@@ -12067,6 +12067,7 @@
+ done
+ test -n "$YACC" || YACC="yacc"
+
++save_LIBS=$LIBS
+ for ac_prog in flex lex
+ do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+@@ -12227,6 +12228,8 @@
+ if test "$LEX" = :; then
+ LEX=${am_missing_run}flex
+ fi
++LIBS=$save_LIBS
++LEXLIB=
+
+ ALL_LINGUAS="bg da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr"
+ # If we haven't got the data from the intl directory,
+--- a/binutils/configure.ac
++++ b/binutils/configure.ac
+@@ -87,7 +87,10 @@
+ fi
+
+ AC_PROG_YACC
++save_LIBS=$LIBS
+ AM_PROG_LEX
++LIBS=$save_LIBS
++LEXLIB=
+
+ ALL_LINGUAS="bg da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr"
+ ZW_GNU_GETTEXT_SISTER_DIR
+--- a/gas/configure
++++ b/gas/configure
+@@ -12795,6 +12795,7 @@
+ done
+ test -n "$YACC" || YACC="yacc"
+
++save_LIBS=$LIBS
+ for ac_prog in flex lex
+ do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+@@ -12955,6 +12956,8 @@
+ if test "$LEX" = :; then
+ LEX=${am_missing_run}flex
+ fi
++LIBS=$save_LIBS
++LEXLIB=
+
+ ALL_LINGUAS="fr tr es rw id ru fi ja"
+ # If we haven't got the data from the intl directory,
+--- a/gas/configure.ac
++++ b/gas/configure.ac
+@@ -717,7 +717,10 @@
+ AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}", [Target OS.])
+
+ AC_PROG_YACC
++save_LIBS=$LIBS
+ AM_PROG_LEX
++LIBS=$save_LIBS
++LEXLIB=
+
+ ALL_LINGUAS="fr tr es rw id ru fi ja"
+ ZW_GNU_GETTEXT_SISTER_DIR
+--- a/ld/configure
++++ b/ld/configure
+@@ -16071,6 +16071,7 @@
+ done
+ test -n "$YACC" || YACC="yacc"
+
++save_LIBS=$LIBS
+ for ac_prog in flex lex
+ do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+@@ -16231,6 +16232,8 @@
+ if test "$LEX" = :; then
+ LEX=${am_missing_run}flex
+ fi
++LIBS=$save_LIBS
++LEXLIB=
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+--- a/ld/configure.ac
++++ b/ld/configure.ac
+@@ -173,7 +173,10 @@
+ AC_EXEEXT
+
+ AC_PROG_YACC
++save_LIBS=$LIBS
+ AM_PROG_LEX
++LIBS=$save_LIBS
++LEXLIB=
+
+ AM_MAINTAINER_MODE
+ AM_CONDITIONAL(GENINSRC_NEVER, false)
diff --git a/packages/binutils/2.25.1/0006-Darwin-gold-binary-cc-include-string-not-cstring.patch b/packages/binutils/2.25.1/0006-Darwin-gold-binary-cc-include-string-not-cstring.patch
new file mode 100644
index 0000000..73cfde8
--- /dev/null
+++ b/packages/binutils/2.25.1/0006-Darwin-gold-binary-cc-include-string-not-cstring.patch
@@ -0,0 +1,15 @@
+---
+ gold/binary.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/gold/binary.cc
++++ b/gold/binary.cc
+@@ -23,7 +23,7 @@
+ #include "gold.h"
+
+ #include <cerrno>
+-#include <cstring>
++#include <string>
+ #include "safe-ctype.h"
+
+ #include "elfcpp.h"
diff --git a/packages/binutils/2.26.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch b/packages/binutils/2.25.1/0007-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
index 6168b31..d40f95d 100644
--- a/packages/binutils/2.26.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
+++ b/packages/binutils/2.25.1/0007-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
@@ -9,15 +9,13 @@ Subject: [PATCH] Fix darwin build
Change-Id: I69204a72f853f5263dffedc448379d75ed4eca2e
---
- binutils-2.25/bfd/peXXigen.c | 22 ++++++++++++++++++++++
- binutils-2.25/gold/gold-threads.cc | 15 ++++++++++++---
+ bfd/peXXigen.c | 22 ++++++++++++++++++++++
+ gold/gold-threads.cc | 15 ++++++++++++---
2 files changed, 34 insertions(+), 3 deletions(-)
-diff --git binutils-2.25.orig/bfd/peXXigen.c binutils-2.25/bfd/peXXigen.c
-index 13e39e4..7a98306 100644
---- binutils-2.25.orig/bfd/peXXigen.c
-+++ binutils-2.25/bfd/peXXigen.c
-@@ -3522,6 +3522,28 @@ u16_mbtouc (wchar_t * puc, const unsigned short * s, unsigned int n)
+--- a/bfd/peXXigen.c
++++ b/bfd/peXXigen.c
+@@ -3570,6 +3570,28 @@
}
#endif /* HAVE_WCHAR_H and not Cygwin/Mingw */
@@ -46,11 +44,9 @@ index 13e39e4..7a98306 100644
/* Perform a comparison of two entries. */
static signed int
rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b)
-diff --git binutils-2.25.orig/gold/gold-threads.cc binutils-2.25/gold/gold-threads.cc
-index ff5a8ac..45140e0 100644
---- binutils-2.25.orig/gold/gold-threads.cc
-+++ binutils-2.25/gold/gold-threads.cc
-@@ -284,9 +284,18 @@ Condvar::~Condvar()
+--- a/gold/gold-threads.cc
++++ b/gold/gold-threads.cc
+@@ -284,9 +284,18 @@
class Once_initialize
{
public:
@@ -72,6 +68,3 @@ index ff5a8ac..45140e0 100644
// Return a pointer to the pthread_once_t variable.
pthread_once_t*
---
-2.1.3
-
diff --git a/packages/binutils/2.25.1/400-arm-rotate_left-fix.patch b/packages/binutils/2.25.1/0008-arm-rotate_left-fix.patch
index 4149597..0a40611 100644
--- a/packages/binutils/2.25.1/400-arm-rotate_left-fix.patch
+++ b/packages/binutils/2.25.1/0008-arm-rotate_left-fix.patch
@@ -5,14 +5,12 @@ Subject: [PATCH] * config/tc-arm.c (rotate_left): Avoid undefined behaviour
when N = 0.
---
- gas/config/tc-arm.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletion(-)
+ gas/config/tc-arm.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
-index 5077f87..9100fb2 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
-@@ -7251,7 +7251,7 @@ parse_operands (char *str, const unsigned int *pattern, bfd_boolean thumb)
+@@ -7261,7 +7261,7 @@
/* Functions for operand encoding. ARM, then Thumb. */
@@ -21,6 +19,3 @@ index 5077f87..9100fb2 100644
/* If VAL can be encoded in the immediate field of an ARM instruction,
return the encoded form. Otherwise, return FAIL. */
---
-1.9.4
-
diff --git a/packages/binutils/2.26.1/500-sysroot.patch b/packages/binutils/2.25.1/0009-sysroot.patch
index e49c795..9377e4e 100644
--- a/packages/binutils/2.26.1/500-sysroot.patch
+++ b/packages/binutils/2.25.1/0009-sysroot.patch
@@ -5,9 +5,13 @@ Always try to prepend the sysroot prefix to absolute filenames first.
http://bugs.gentoo.org/275666
http://sourceware.org/bugzilla/show_bug.cgi?id=10340
+---
+ ld/ldfile.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
-@@ -308,18 +308,25 @@
+@@ -339,18 +339,25 @@
directory first. */
if (! entry->flags.maybe_archive)
{
diff --git a/packages/binutils/2.25.1/600-poison-system-directories.patch b/packages/binutils/2.25.1/0010-poison-system-directories.patch
index ec3622b..e3affcd 100644
--- a/packages/binutils/2.25.1/600-poison-system-directories.patch
+++ b/packages/binutils/2.25.1/0010-poison-system-directories.patch
@@ -59,9 +59,20 @@ Code Merged from Sourcery G++ binutils 2.19 - 4.4-277
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-diff -Nura a/ld/config.in b/ld/config.in
---- a/ld/config.in 2014-10-14 04:32:04.000000000 -0300
-+++ b/ld/config.in 2014-12-24 08:07:28.997918918 -0300
+---
+ ld/config.in | 3 +++
+ ld/configure | 14 ++++++++++++++
+ ld/configure.ac | 10 ++++++++++
+ ld/ld.h | 8 ++++++++
+ ld/ld.texinfo | 12 ++++++++++++
+ ld/ldfile.c | 17 +++++++++++++++++
+ ld/ldlex.h | 2 ++
+ ld/ldmain.c | 2 ++
+ ld/lexsup.c | 21 +++++++++++++++++++++
+ 9 files changed, 89 insertions(+)
+
+--- a/ld/config.in
++++ b/ld/config.in
@@ -11,6 +11,9 @@
language is requested. */
#undef ENABLE_NLS
@@ -72,9 +83,8 @@ diff -Nura a/ld/config.in b/ld/config.in
/* Additional extension a shared object might have. */
#undef EXTRA_SHLIB_EXTENSION
-diff -Nura a/ld/configure b/ld/configure
---- a/ld/configure 2014-12-23 11:22:07.000000000 -0300
-+++ b/ld/configure 2014-12-24 08:07:29.002919088 -0300
+--- a/ld/configure
++++ b/ld/configure
@@ -783,6 +783,7 @@
enable_targets
enable_64_bit_bfd
@@ -111,9 +121,8 @@ diff -Nura a/ld/configure b/ld/configure
# Check whether --enable-got was given.
if test "${enable_got+set}" = set; then :
-diff -Nura a/ld/configure.ac b/ld/configure.ac
---- a/ld/configure.ac 2014-10-14 04:32:04.000000000 -0300
-+++ b/ld/configure.ac 2014-12-24 08:07:29.002919088 -0300
+--- a/ld/configure.ac
++++ b/ld/configure.ac
@@ -94,6 +94,16 @@
AC_SUBST(TARGET_SYSTEM_ROOT)
AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
@@ -131,9 +140,8 @@ diff -Nura a/ld/configure.ac b/ld/configure.ac
dnl Use --enable-gold to decide if this linker should be the default.
dnl "install_as_default" is set to false if gold is the default linker.
dnl "installed_linker" is the installed BFD linker name.
-diff -Nura a/ld/ldfile.c b/ld/ldfile.c
---- a/ld/ldfile.c 2014-10-14 04:32:04.000000000 -0300
-+++ b/ld/ldfile.c 2014-12-24 08:07:29.002919088 -0300
+--- a/ld/ldfile.c
++++ b/ld/ldfile.c
@@ -114,6 +114,23 @@
new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL);
else
@@ -158,9 +166,8 @@ diff -Nura a/ld/ldfile.c b/ld/ldfile.c
}
/* Try to open a BFD for a lang_input_statement. */
-diff -Nura a/ld/ld.h b/ld/ld.h
---- a/ld/ld.h 2014-10-14 04:32:04.000000000 -0300
-+++ b/ld/ld.h 2014-12-24 08:07:29.003919122 -0300
+--- a/ld/ld.h
++++ b/ld/ld.h
@@ -161,6 +161,14 @@
/* If TRUE we'll just print the default output on stdout. */
bfd_boolean print_output_format;
@@ -176,9 +183,8 @@ diff -Nura a/ld/ld.h b/ld/ld.h
/* Big or little endian as set on command line. */
enum endian_enum endian;
-diff -Nura a/ld/ldlex.h b/ld/ldlex.h
---- a/ld/ldlex.h 2014-11-04 06:54:41.000000000 -0300
-+++ b/ld/ldlex.h 2014-12-24 08:09:47.477644294 -0300
+--- a/ld/ldlex.h
++++ b/ld/ldlex.h
@@ -140,6 +140,8 @@
OPTION_IGNORE_UNRESOLVED_SYMBOL,
OPTION_PUSH_STATE,
@@ -188,9 +194,8 @@ diff -Nura a/ld/ldlex.h b/ld/ldlex.h
};
/* The initial parser states. */
-diff -Nura a/ld/ldmain.c b/ld/ldmain.c
---- a/ld/ldmain.c 2014-10-14 04:32:04.000000000 -0300
-+++ b/ld/ldmain.c 2014-12-24 08:07:29.003919122 -0300
+--- a/ld/ldmain.c
++++ b/ld/ldmain.c
@@ -266,6 +266,8 @@
command_line.warn_mismatch = TRUE;
command_line.warn_search_mismatch = TRUE;
@@ -200,9 +205,8 @@ diff -Nura a/ld/ldmain.c b/ld/ldmain.c
/* We initialize DEMANGLING based on the environment variable
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
-diff -Nura a/ld/ld.texinfo b/ld/ld.texinfo
---- a/ld/ld.texinfo 2014-12-23 05:47:10.000000000 -0300
-+++ b/ld/ld.texinfo 2014-12-24 08:07:29.005919191 -0300
+--- a/ld/ld.texinfo
++++ b/ld/ld.texinfo
@@ -2212,6 +2212,18 @@
Passing @code{none} for @var{style} disables the setting from any
@@ -222,9 +226,8 @@ diff -Nura a/ld/ld.texinfo b/ld/ld.texinfo
@end table
@c man end
-diff -Nura a/ld/lexsup.c b/ld/lexsup.c
---- a/ld/lexsup.c 2014-11-04 06:54:41.000000000 -0300
-+++ b/ld/lexsup.c 2014-12-24 08:48:50.136583414 -0300
+--- a/ld/lexsup.c
++++ b/ld/lexsup.c
@@ -513,6 +513,14 @@
{ {"pop-state", no_argument, NULL, OPTION_POP_STATE},
'\0', NULL, N_("Pop state of flags governing input file handling"),
diff --git a/packages/binutils/2.26.1/700-Fix-library-paths-on-PowerPC.patch b/packages/binutils/2.25.1/0011-Fix-library-paths-on-PowerPC.patch
index cea92f3..4bcc748 100644
--- a/packages/binutils/2.26.1/700-Fix-library-paths-on-PowerPC.patch
+++ b/packages/binutils/2.25.1/0011-Fix-library-paths-on-PowerPC.patch
@@ -13,14 +13,12 @@ depend on whether it is built on LE or BE machine.
Signed-off-by: Alexey Neyman <stilor@att.net>
---
- ld/emulparams/elf32ppccommon.sh | 10 +++++-----
+ ld/emulparams/elf32ppccommon.sh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
-diff --git a/ld/emulparams/elf32ppccommon.sh b/ld/emulparams/elf32ppccommon.sh
-index 1f54ef8..d00cf68 100644
--- a/ld/emulparams/elf32ppccommon.sh
+++ b/ld/emulparams/elf32ppccommon.sh
-@@ -44,11 +44,11 @@ fi
+@@ -44,11 +44,11 @@
# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
# Similarly, look for 32 bit libraries in /lib32, /usr/lib32 etc.
@@ -37,6 +35,3 @@ index 1f54ef8..d00cf68 100644
*:*64lppc*) LIBPATH_SUFFIX=64le ;;
*:*32lppc*) LIBPATH_SUFFIX=32le ;;
*:*64*) LIBPATH_SUFFIX=64 ;;
---
-2.9.3
-
diff --git a/packages/binutils/2.24/905-Fix-trampolines-search-code-for-conditional-branches.patch b/packages/binutils/2.25.1/0012-Fix-trampolines-search-code-for-conditional-branches.patch
index 8aeb064..ec96a36 100644
--- a/packages/binutils/2.24/905-Fix-trampolines-search-code-for-conditional-branches.patch
+++ b/packages/binutils/2.25.1/0012-Fix-trampolines-search-code-for-conditional-branches.patch
@@ -28,16 +28,14 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Backported from: d92b6eece424f0ad35d96fdd85bf207295e8c4c3
Changes to ChangeLogs are dropped.
- gas/config/tc-xtensa.c | 8 ++++----
- gas/testsuite/gas/xtensa/trampoline.d | 9 +++++++++
- gas/testsuite/gas/xtensa/trampoline.s | 7 +++++++
+ gas/config/tc-xtensa.c | 8 ++++----
+ gas/testsuite/gas/xtensa/trampoline.d | 9 +++++++++
+ gas/testsuite/gas/xtensa/trampoline.s | 7 +++++++
3 files changed, 20 insertions(+), 4 deletions(-)
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index d11b0c7..f23ccf8 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -9514,11 +9514,11 @@ search_trampolines (TInsn *tinsn, fragS *fragP, bfd_boolean unreachable_only)
+@@ -9514,11 +9514,11 @@
if (next_addr == 0 || addr - next_addr > J_RANGE)
break;
}
@@ -53,8 +51,6 @@ index d11b0c7..f23ccf8 100644
}
for ( ; tf; tf = tf->next)
{
-diff --git a/gas/testsuite/gas/xtensa/trampoline.d b/gas/testsuite/gas/xtensa/trampoline.d
-index b4f65dc..5ae32a6 100644
--- a/gas/testsuite/gas/xtensa/trampoline.d
+++ b/gas/testsuite/gas/xtensa/trampoline.d
@@ -24,3 +24,12 @@
@@ -70,8 +66,6 @@ index b4f65dc..5ae32a6 100644
+#...
+.*927f5:.*j.0x927f5
+#...
-diff --git a/gas/testsuite/gas/xtensa/trampoline.s b/gas/testsuite/gas/xtensa/trampoline.s
-index 259a3bb..4465786 100644
--- a/gas/testsuite/gas/xtensa/trampoline.s
+++ b/gas/testsuite/gas/xtensa/trampoline.s
@@ -19,3 +19,10 @@
@@ -85,6 +79,3 @@ index 259a3bb..4465786 100644
+ .endr
+4:
+ j 4b
---
-1.8.1.4
-
diff --git a/packages/binutils/2.25.1/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch b/packages/binutils/2.25.1/0013-xtensa-optimize-check_section_ebb_pcrels_fit.patch
index 8a21100..19435b5 100644
--- a/packages/binutils/2.25.1/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch
+++ b/packages/binutils/2.25.1/0013-xtensa-optimize-check_section_ebb_pcrels_fit.patch
@@ -76,14 +76,12 @@ bfd/
Backported from: b2b326d246f839ee218192ac88da2384d929a072
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
- bfd/elf32-xtensa.c | 321 +++++++++++++++++++++++++++++++++++++++++++++++++----
+ bfd/elf32-xtensa.c | 321 +++++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 298 insertions(+), 23 deletions(-)
-diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
-index 0b6f584..872370b 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
-@@ -6619,8 +6619,10 @@ static bfd_boolean compute_text_actions
+@@ -6619,8 +6619,10 @@
(bfd *, asection *, struct bfd_link_info *);
static bfd_boolean compute_ebb_proposed_actions (ebb_constraint *);
static bfd_boolean compute_ebb_actions (ebb_constraint *);
@@ -95,7 +93,7 @@ index 0b6f584..872370b 100644
const xtensa_opcode *);
static bfd_boolean check_section_ebb_reduces (const ebb_constraint *);
static void text_action_add_proposed
-@@ -7219,6 +7221,221 @@ build_reloc_opcodes (bfd *abfd,
+@@ -7219,6 +7221,221 @@
return reloc_opcodes;
}
@@ -317,7 +315,7 @@ index 0b6f584..872370b 100644
/* The compute_text_actions function will build a list of potential
transformation actions for code in the extended basic block of each
-@@ -7245,6 +7462,7 @@ compute_text_actions (bfd *abfd,
+@@ -7245,6 +7462,7 @@
property_table_entry *prop_table = 0;
int ptblsize = 0;
bfd_size_type sec_size;
@@ -325,7 +323,7 @@ index 0b6f584..872370b 100644
relax_info = get_xtensa_relax_info (sec);
BFD_ASSERT (relax_info);
-@@ -7277,6 +7495,12 @@ compute_text_actions (bfd *abfd,
+@@ -7277,6 +7495,12 @@
goto error_return;
}
@@ -338,7 +336,7 @@ index 0b6f584..872370b 100644
for (i = 0; i < sec->reloc_count; i++)
{
Elf_Internal_Rela *irel = &internal_relocs[i];
-@@ -7340,17 +7564,13 @@ compute_text_actions (bfd *abfd,
+@@ -7340,17 +7564,13 @@
ebb->start_reloc_idx = i;
ebb->end_reloc_idx = i;
@@ -359,7 +357,7 @@ index 0b6f584..872370b 100644
|| !check_section_ebb_reduces (&ebb_table))
{
/* If anything goes wrong or we get unlucky and something does
-@@ -7372,6 +7592,8 @@ compute_text_actions (bfd *abfd,
+@@ -7372,6 +7592,8 @@
free_ebb_constraint (&ebb_table);
}
@@ -368,7 +366,7 @@ index 0b6f584..872370b 100644
#if DEBUG
if (relax_info->action_list.head)
print_action_list (stderr, &relax_info->action_list);
-@@ -7974,14 +8196,17 @@ check_section_ebb_pcrels_fit (bfd *abfd,
+@@ -7974,14 +8196,17 @@
asection *sec,
bfd_byte *contents,
Elf_Internal_Rela *internal_relocs,
@@ -386,7 +384,7 @@ index 0b6f584..872370b 100644
relax_info = get_xtensa_relax_info (sec);
-@@ -7992,7 +8217,40 @@ check_section_ebb_pcrels_fit (bfd *abfd,
+@@ -7992,7 +8217,40 @@
can still be used. */
}
@@ -428,7 +426,7 @@ index 0b6f584..872370b 100644
{
r_reloc r_rel;
bfd_vma orig_self_offset, orig_target_offset;
-@@ -8001,7 +8259,15 @@ check_section_ebb_pcrels_fit (bfd *abfd,
+@@ -8001,7 +8259,15 @@
reloc_howto_type *howto;
int self_removed_bytes, target_removed_bytes;
@@ -445,7 +443,7 @@ index 0b6f584..872370b 100644
r_type = ELF32_R_TYPE (irel->r_info);
howto = &elf_howto_table[r_type];
-@@ -8067,21 +8333,30 @@ check_section_ebb_pcrels_fit (bfd *abfd,
+@@ -8067,21 +8333,30 @@
xtensa_opcode opcode;
int opnum;
@@ -488,7 +486,7 @@ index 0b6f584..872370b 100644
}
if (!pcrel_reloc_fits (opcode, opnum, self_offset, target_offset))
-@@ -8778,7 +9053,7 @@ move_shared_literal (asection *sec,
+@@ -8778,7 +9053,7 @@
/* Check all of the PC-relative relocations to make sure they still fit. */
relocs_fit = check_section_ebb_pcrels_fit (target_sec->owner, target_sec,
target_sec_cache->contents,
@@ -497,6 +495,3 @@ index 0b6f584..872370b 100644
&ebb_table, NULL);
if (!relocs_fit)
---
-1.8.1.4
-
diff --git a/packages/binutils/2.24/907-xtensa-optimize-removed_by_actions.patch b/packages/binutils/2.25.1/0014-xtensa-optimize-removed_by_actions.patch
index 9df8065..0a0f4c5 100644
--- a/packages/binutils/2.24/907-xtensa-optimize-removed_by_actions.patch
+++ b/packages/binutils/2.25.1/0014-xtensa-optimize-removed_by_actions.patch
@@ -50,14 +50,12 @@ bfd/
Backported from: 071aa5c98a31c966f5fbfc573fcee61350fd1936
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
- bfd/elf32-xtensa.c | 181 +++++++++++++++++++++++++++++++++++++++++++++--------
+ bfd/elf32-xtensa.c | 181 +++++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 156 insertions(+), 25 deletions(-)
-diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
-index 872370b..21b2871 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
-@@ -5420,11 +5420,28 @@ struct text_action_struct
+@@ -5420,11 +5420,28 @@
text_action *next;
};
@@ -86,7 +84,7 @@ index 872370b..21b2871 100644
};
-@@ -5636,6 +5653,101 @@ action_list_count (text_action_list *action_list)
+@@ -5636,6 +5653,101 @@
return count;
}
@@ -188,7 +186,7 @@ index 872370b..21b2871 100644
/* The find_insn_action routine will only find non-fill actions. */
-@@ -5909,6 +6021,9 @@ init_xtensa_relax_info (asection *sec)
+@@ -5909,6 +6021,9 @@
relax_info->action_list.head = NULL;
@@ -198,7 +196,7 @@ index 872370b..21b2871 100644
relax_info->fix_list = NULL;
relax_info->fix_array = NULL;
relax_info->fix_array_count = 0;
-@@ -9218,7 +9333,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9218,7 +9333,7 @@
if (elf_hash_table (link_info)->dynamic_sections_created)
shrink_dynamic_reloc_sections (link_info, abfd, sec, irel);
irel->r_info = ELF32_R_INFO (0, R_XTENSA_NONE);
@@ -207,7 +205,7 @@ index 872370b..21b2871 100644
(&relax_info->action_list, irel->r_offset);
continue;
}
-@@ -9255,7 +9370,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9255,7 +9370,7 @@
}
}
@@ -216,7 +214,7 @@ index 872370b..21b2871 100644
(&relax_info->action_list, irel->r_offset);
irel->r_offset = source_offset;
}
-@@ -9352,7 +9467,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9352,7 +9467,7 @@
break;
}
@@ -225,7 +223,7 @@ index 872370b..21b2871 100644
(&target_relax_info->action_list,
r_rel.target_offset + diff_value);
diff_value = new_end_offset - new_reloc.target_offset;
-@@ -9750,7 +9865,6 @@ translate_reloc (const r_reloc *orig_rel, r_reloc *new_rel, asection *sec)
+@@ -9750,7 +9865,6 @@
xtensa_relax_info *relax_info;
removed_literal *removed;
bfd_vma target_offset, base_offset;
@@ -233,7 +231,7 @@ index 872370b..21b2871 100644
*new_rel = *orig_rel;
-@@ -9803,19 +9917,26 @@ translate_reloc (const r_reloc *orig_rel, r_reloc *new_rel, asection *sec)
+@@ -9803,19 +9917,26 @@
offset. */
base_offset = r_reloc_get_target_offset (new_rel) - new_rel->rela.r_addend;
@@ -265,7 +263,7 @@ index 872370b..21b2871 100644
new_rel->target_offset = target_offset - tgt_removed;
new_rel->rela.r_addend += addend_removed;
}
-@@ -10138,9 +10259,10 @@ relax_property_section (bfd *abfd,
+@@ -10138,9 +10259,10 @@
bfd_vma old_offset = val.r_rel.target_offset;
bfd_vma new_offset;
long old_size, new_size;
@@ -279,7 +277,7 @@ index 872370b..21b2871 100644
/* Assert that we are not out of bounds. */
old_size = bfd_get_32 (abfd, size_p);
-@@ -10164,9 +10286,10 @@ relax_property_section (bfd *abfd,
+@@ -10164,9 +10286,10 @@
/* Recompute the new_offset, but this time don't
include any fill inserted by relaxation. */
@@ -293,7 +291,7 @@ index 872370b..21b2871 100644
/* If it is not unreachable and we have not yet
seen an unreachable at this address, place it
-@@ -10182,8 +10305,12 @@ relax_property_section (bfd *abfd,
+@@ -10182,8 +10305,12 @@
}
}
else
@@ -308,7 +306,7 @@ index 872370b..21b2871 100644
if (new_size != old_size)
{
-@@ -10441,14 +10568,16 @@ relax_section_symbols (bfd *abfd, asection *sec)
+@@ -10441,14 +10568,16 @@
if (isym->st_shndx == sec_shndx)
{
@@ -329,7 +327,7 @@ index 872370b..21b2871 100644
}
}
-@@ -10466,15 +10595,17 @@ relax_section_symbols (bfd *abfd, asection *sec)
+@@ -10466,15 +10595,17 @@
|| sym_hash->root.type == bfd_link_hash_defweak)
&& sym_hash->root.u.def.section == sec)
{
@@ -351,6 +349,3 @@ index 872370b..21b2871 100644
}
}
---
-1.8.1.4
-
diff --git a/packages/binutils/2.25.1/908-xtensa-optimize-find_removed_literal.patch b/packages/binutils/2.25.1/0015-xtensa-optimize-find_removed_literal.patch
index 96d526f..e734658 100644
--- a/packages/binutils/2.25.1/908-xtensa-optimize-find_removed_literal.patch
+++ b/packages/binutils/2.25.1/0015-xtensa-optimize-find_removed_literal.patch
@@ -38,14 +38,12 @@ bfd/
Backported from: 3439c466273378021821473d3fc84990e089ae34
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
- bfd/elf32-xtensa.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++-----
+ bfd/elf32-xtensa.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 58 insertions(+), 6 deletions(-)
-diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
-index 21b2871..51733ad 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
-@@ -5832,6 +5832,7 @@ print_action_list (FILE *fp, text_action_list *action_list)
+@@ -5832,6 +5832,7 @@
by the "from" offset field. */
typedef struct removed_literal_struct removed_literal;
@@ -53,7 +51,7 @@ index 21b2871..51733ad 100644
typedef struct removed_literal_list_struct removed_literal_list;
struct removed_literal_struct
-@@ -5841,10 +5842,19 @@ struct removed_literal_struct
+@@ -5841,10 +5842,19 @@
removed_literal *next;
};
@@ -73,7 +71,7 @@ index 21b2871..51733ad 100644
};
-@@ -5893,6 +5903,39 @@ add_removed_literal (removed_literal_list *removed_list,
+@@ -5893,6 +5903,39 @@
}
}
@@ -113,7 +111,7 @@ index 21b2871..51733ad 100644
/* Check if the list of removed literals contains an entry for the
given address. Return the entry if found. */
-@@ -5900,12 +5943,21 @@ add_removed_literal (removed_literal_list *removed_list,
+@@ -5900,12 +5943,21 @@
static removed_literal *
find_removed_literal (removed_literal_list *removed_list, bfd_vma addr)
{
@@ -141,6 +139,3 @@ index 21b2871..51733ad 100644
}
---
-1.8.1.4
-
diff --git a/packages/binutils/2.24/909-xtensa-replace-action-list-with-splay-tree.patch b/packages/binutils/2.25.1/0016-xtensa-replace-action-list-with-splay-tree.patch
index 3090cc2..669c8b0 100644
--- a/packages/binutils/2.24/909-xtensa-replace-action-list-with-splay-tree.patch
+++ b/packages/binutils/2.25.1/0016-xtensa-replace-action-list-with-splay-tree.patch
@@ -73,11 +73,9 @@ bfd/
Backported from: 4c2af04fe8b4452bf51d2debf1bb467fafcd0f08
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
- bfd/elf32-xtensa.c | 488 +++++++++++++++++++++++++++++++----------------------
+ bfd/elf32-xtensa.c | 488 ++++++++++++++++++++++++++++++-----------------------
1 file changed, 282 insertions(+), 206 deletions(-)
-diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
-index 51733ad..53af1c6 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -28,6 +28,7 @@
@@ -88,7 +86,7 @@ index 51733ad..53af1c6 100644
#include "xtensa-isa.h"
#include "xtensa-config.h"
-@@ -5416,8 +5417,6 @@ struct text_action_struct
+@@ -5416,8 +5417,6 @@
bfd_vma virtual_offset; /* Zero except for adding literals. */
int removed_bytes;
literal_value value; /* Only valid when adding literals. */
@@ -97,7 +95,7 @@ index 51733ad..53af1c6 100644
};
struct removal_by_action_entry_struct
-@@ -5440,7 +5439,8 @@ typedef struct removal_by_action_map_struct removal_by_action_map;
+@@ -5440,7 +5439,8 @@
/* List of all of the actions taken on a text section. */
struct text_action_list_struct
{
@@ -107,7 +105,7 @@ index 51733ad..53af1c6 100644
removal_by_action_map map;
};
-@@ -5448,20 +5448,18 @@ struct text_action_list_struct
+@@ -5448,20 +5448,18 @@
static text_action *
find_fill_action (text_action_list *l, asection *sec, bfd_vma offset)
{
@@ -135,7 +133,7 @@ index 51733ad..53af1c6 100644
return NULL;
}
-@@ -5509,6 +5507,49 @@ adjust_fill_action (text_action *ta, int fill_diff)
+@@ -5509,6 +5507,49 @@
}
@@ -185,7 +183,7 @@ index 51733ad..53af1c6 100644
/* Add a modification action to the text. For the case of adding or
removing space, modify any current fill and assume that
"unreachable_space" bytes can be freely contracted. Note that a
-@@ -5521,8 +5562,8 @@ text_action_add (text_action_list *l,
+@@ -5521,8 +5562,8 @@
bfd_vma offset,
int removed)
{
@@ -195,7 +193,7 @@ index 51733ad..53af1c6 100644
/* It is not necessary to fill at the end of a section. */
if (action == ta_fill && sec->size == offset)
-@@ -5532,34 +5573,30 @@ text_action_add (text_action_list *l,
+@@ -5532,34 +5573,30 @@
if (action == ta_fill && removed == 0)
return;
@@ -243,7 +241,7 @@ index 51733ad..53af1c6 100644
}
-@@ -5570,7 +5607,6 @@ text_action_add_literal (text_action_list *l,
+@@ -5570,7 +5607,6 @@
const literal_value *value,
int removed)
{
@@ -251,7 +249,7 @@ index 51733ad..53af1c6 100644
text_action *ta;
asection *sec = r_reloc_get_section (loc);
bfd_vma offset = loc->target_offset;
-@@ -5578,14 +5614,6 @@ text_action_add_literal (text_action_list *l,
+@@ -5578,14 +5614,6 @@
BFD_ASSERT (action == ta_add_literal);
@@ -266,7 +264,7 @@ index 51733ad..53af1c6 100644
/* Create a new record and fill it up. */
ta = (text_action *) bfd_zmalloc (sizeof (text_action));
ta->action = action;
-@@ -5594,8 +5622,10 @@ text_action_add_literal (text_action_list *l,
+@@ -5594,8 +5622,10 @@
ta->virtual_offset = virtual_offset;
ta->value = *value;
ta->removed_bytes = removed;
@@ -279,7 +277,7 @@ index 51733ad..53af1c6 100644
}
-@@ -5606,7 +5636,8 @@ text_action_add_literal (text_action_list *l,
+@@ -5606,7 +5636,8 @@
so that each search may begin where the previous one left off. */
static int
@@ -289,7 +287,7 @@ index 51733ad..53af1c6 100644
bfd_vma offset,
bfd_boolean before_fill)
{
-@@ -5614,6 +5645,13 @@ removed_by_actions (text_action **p_start_action,
+@@ -5614,6 +5645,13 @@
int removed = 0;
r = *p_start_action;
@@ -303,7 +301,7 @@ index 51733ad..53af1c6 100644
while (r)
{
if (r->offset > offset)
-@@ -5625,7 +5663,7 @@ removed_by_actions (text_action **p_start_action,
+@@ -5625,7 +5663,7 @@
removed += r->removed_bytes;
@@ -312,7 +310,7 @@ index 51733ad..53af1c6 100644
}
*p_start_action = r;
-@@ -5636,68 +5674,74 @@ removed_by_actions (text_action **p_start_action,
+@@ -5636,68 +5674,74 @@
static bfd_vma
offset_with_removed_text (text_action_list *action_list, bfd_vma offset)
{
@@ -429,7 +427,7 @@ index 51733ad..53af1c6 100644
}
static int
-@@ -5754,28 +5798,26 @@ offset_with_removed_text_map (text_action_list *action_list, bfd_vma offset)
+@@ -5754,28 +5798,26 @@
static text_action *
find_insn_action (text_action_list *action_list, bfd_vma offset)
{
@@ -477,50 +475,20 @@ index 51733ad..53af1c6 100644
}
return NULL;
}
-@@ -5784,40 +5826,50 @@ find_insn_action (text_action_list *action_list, bfd_vma offset)
+@@ -5784,40 +5826,50 @@
#if DEBUG
static void
-print_action_list (FILE *fp, text_action_list *action_list)
+print_action (FILE *fp, text_action *r)
-+{
-+ const char *t = "unknown";
-+ switch (r->action)
-+ {
-+ case ta_remove_insn:
-+ t = "remove_insn"; break;
-+ case ta_remove_longcall:
-+ t = "remove_longcall"; break;
-+ case ta_convert_longcall:
-+ t = "convert_longcall"; break;
-+ case ta_narrow_insn:
-+ t = "narrow_insn"; break;
-+ case ta_widen_insn:
-+ t = "widen_insn"; break;
-+ case ta_fill:
-+ t = "fill"; break;
-+ case ta_none:
-+ t = "none"; break;
-+ case ta_remove_literal:
-+ t = "remove_literal"; break;
-+ case ta_add_literal:
-+ t = "add_literal"; break;
-+ }
-+
-+ fprintf (fp, "%s: %s[0x%lx] \"%s\" %d\n",
-+ r->sec->owner->filename,
-+ r->sec->name, (unsigned long) r->offset, t, r->removed_bytes);
-+}
-+
-+static int
-+print_action_list_fn (splay_tree_node node, void *p)
{
- text_action *r;
-+ text_action *r = (text_action *)node->value;
-
+-
- fprintf (fp, "Text Action\n");
- for (r = action_list->head; r != NULL; r = r->next)
-- {
++ const char *t = "unknown";
++ switch (r->action)
+ {
- const char *t = "unknown";
- switch (r->action)
- {
@@ -543,14 +511,44 @@ index 51733ad..53af1c6 100644
- case ta_add_literal:
- t = "add_literal"; break;
- }
-+ print_action (p, r);
-+ return 0;
++ case ta_remove_insn:
++ t = "remove_insn"; break;
++ case ta_remove_longcall:
++ t = "remove_longcall"; break;
++ case ta_convert_longcall:
++ t = "convert_longcall"; break;
++ case ta_narrow_insn:
++ t = "narrow_insn"; break;
++ case ta_widen_insn:
++ t = "widen_insn"; break;
++ case ta_fill:
++ t = "fill"; break;
++ case ta_none:
++ t = "none"; break;
++ case ta_remove_literal:
++ t = "remove_literal"; break;
++ case ta_add_literal:
++ t = "add_literal"; break;
++ }
++
++ fprintf (fp, "%s: %s[0x%lx] \"%s\" %d\n",
++ r->sec->owner->filename,
++ r->sec->name, (unsigned long) r->offset, t, r->removed_bytes);
+}
- fprintf (fp, "%s: %s[0x%lx] \"%s\" %d\n",
- r->sec->owner->filename,
- r->sec->name, (unsigned long) r->offset, t, r->removed_bytes);
- }
++static int
++print_action_list_fn (splay_tree_node node, void *p)
++{
++ text_action *r = (text_action *)node->value;
++
++ print_action (p, r);
++ return 0;
++}
++
+static void
+print_action_list (FILE *fp, text_action_list *action_list)
+{
@@ -559,7 +557,7 @@ index 51733ad..53af1c6 100644
}
#endif /* DEBUG */
-@@ -6071,8 +6123,8 @@ init_xtensa_relax_info (asection *sec)
+@@ -6071,8 +6123,8 @@
relax_info->removed_list.head = NULL;
relax_info->removed_list.tail = NULL;
@@ -570,7 +568,7 @@ index 51733ad..53af1c6 100644
relax_info->action_list.map.n_entries = 0;
relax_info->action_list.map.entry = NULL;
-@@ -7762,7 +7814,7 @@ compute_text_actions (bfd *abfd,
+@@ -7762,7 +7814,7 @@
free_reloc_range_list (&relevant_relocs);
#if DEBUG
@@ -579,7 +577,7 @@ index 51733ad..53af1c6 100644
print_action_list (stderr, &relax_info->action_list);
#endif
-@@ -8263,6 +8315,54 @@ xlate_offset_with_removed_text (const xlate_map_t *map,
+@@ -8263,6 +8315,54 @@
return e->new_address - e->orig_address + offset;
}
@@ -634,7 +632,7 @@ index 51733ad..53af1c6 100644
/* Build a binary searchable offset translation map from a section's
action list. */
-@@ -8270,75 +8370,40 @@ xlate_offset_with_removed_text (const xlate_map_t *map,
+@@ -8270,75 +8370,40 @@
static xlate_map_t *
build_xlate_map (asection *sec, xtensa_relax_info *relax_info)
{
@@ -729,7 +727,7 @@ index 51733ad..53af1c6 100644
}
-@@ -9302,6 +9367,16 @@ move_shared_literal (asection *sec,
+@@ -9302,6 +9367,16 @@
/* Second relaxation pass. */
@@ -746,7 +744,7 @@ index 51733ad..53af1c6 100644
/* Modify all of the relocations to point to the right spot, and if this
is a relaxable section, delete the unwanted literals and fix the
section size. */
-@@ -9334,7 +9409,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9334,7 +9409,7 @@
internal_relocs = retrieve_internal_relocs (abfd, sec,
link_info->keep_memory);
@@ -755,7 +753,7 @@ index 51733ad..53af1c6 100644
return TRUE;
contents = retrieve_contents (abfd, sec, link_info->keep_memory);
-@@ -9412,6 +9487,12 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9412,6 +9487,12 @@
}
/* Update the action so that the code that moves
the contents will do the right thing. */
@@ -768,7 +766,7 @@ index 51733ad..53af1c6 100644
if (action->action == ta_remove_longcall)
action->action = ta_remove_insn;
else
-@@ -9584,13 +9665,12 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9584,13 +9665,12 @@
if ((relax_info->is_relaxable_literal_section
|| relax_info->is_relaxable_asm_section)
@@ -783,7 +781,7 @@ index 51733ad..53af1c6 100644
bfd_size_type final_size, copy_size, orig_insn_size;
bfd_byte *scratch = NULL;
bfd_byte *dup_contents = NULL;
-@@ -9601,15 +9681,12 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9601,15 +9681,12 @@
bfd_vma orig_dot_vo = 0; /* Virtual offset from orig_dot. */
bfd_vma dup_dot = 0;
@@ -802,7 +800,7 @@ index 51733ad..53af1c6 100644
scratch = (bfd_byte *) bfd_zmalloc (final_size);
dup_contents = (bfd_byte *) bfd_zmalloc (final_size);
-@@ -9618,8 +9695,8 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9618,8 +9695,8 @@
print_action_list (stderr, &relax_info->action_list);
#endif
@@ -813,7 +811,7 @@ index 51733ad..53af1c6 100644
{
virtual_action = FALSE;
if (action->offset > orig_dot)
-@@ -9748,7 +9825,6 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
+@@ -9748,7 +9825,6 @@
break;
}
@@ -821,6 +819,3 @@ index 51733ad..53af1c6 100644
BFD_ASSERT (dup_dot <= final_size);
BFD_ASSERT (orig_dot <= orig_size);
}
---
-1.8.1.4
-
diff --git a/packages/binutils/2.25.1/910-xtensa-optimize-trampolines-relaxation.patch b/packages/binutils/2.25.1/0017-xtensa-optimize-trampolines-relaxation.patch
index 043ff4d..3c11e3d 100644
--- a/packages/binutils/2.25.1/910-xtensa-optimize-trampolines-relaxation.patch
+++ b/packages/binutils/2.25.1/0017-xtensa-optimize-trampolines-relaxation.patch
@@ -64,14 +64,12 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Backported from: b76f99d702c3501ac320396ea06bc7f9237173c3
Changes to ChangeLog are dropped.
- gas/config/tc-xtensa.c | 220 +++++++++++++++++++++++++++++++++++++++++++------
- 1 file changed, 194 insertions(+), 26 deletions(-)
+ gas/config/tc-xtensa.c | 220 ++++++++++++++++++++++++++++++++++++++++++-------
+ 1 file changed, 193 insertions(+), 27 deletions(-)
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index 3e85b69..31c0b6b 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -8785,6 +8785,154 @@ static long relax_frag_for_align (fragS *, long);
+@@ -8785,6 +8785,154 @@
static long relax_frag_immed
(segT, fragS *, long, int, xtensa_format, int, int *, bfd_boolean);
@@ -226,7 +224,7 @@ index 3e85b69..31c0b6b 100644
/* Return the number of bytes added to this fragment, given that the
input has been stretched already by "stretch". */
-@@ -8896,35 +9044,42 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p)
+@@ -8896,35 +9044,42 @@
case RELAX_TRAMPOLINE:
if (fragP->tc_frag_data.relax_seen)
{
@@ -280,21 +278,21 @@ index 3e85b69..31c0b6b 100644
+ trampaddr = fragP->fr_address + fragP->fr_fix;
+
+ if (addr + J_RANGE < trampaddr)
++ continue;
++ if (addr > trampaddr + J_RANGE)
++ break;
++ if (abs (delta) < J_RANGE)
continue;
- target = S_GET_VALUE (s);
- addr = fixP->fx_frag->fr_address;
- delta = target - addr + stretch;
-+ if (addr > trampaddr + J_RANGE)
-+ break;
-+ if (abs (delta) < J_RANGE)
-+ continue;
+
+ slot = fixP->tc_fix_data.slot;
+
if (delta > J_RANGE || delta < -1 * J_RANGE)
{ /* Found an out-of-range jump; scan the list of trampolines for the best match. */
struct trampoline_seg *ts = find_trampoline_seg (now_seg);
-@@ -8978,14 +9133,13 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p)
+@@ -8978,14 +9133,13 @@
}
if (tf->fragP == fragP)
{
@@ -310,7 +308,7 @@ index 3e85b69..31c0b6b 100644
new_stretch += init_trampoline_frag (tf);
offset = fragP->fr_fix; /* Where to assemble the j insn. */
-@@ -9009,10 +9163,20 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p)
+@@ -9009,10 +9163,20 @@
newfixP->tc_fix_data.X_add_symbol = lsym;
newfixP->tc_fix_data.X_add_number = offset;
newfixP->tc_fix_data.slot = slot;
@@ -331,7 +329,7 @@ index 3e85b69..31c0b6b 100644
/* Adjust the jump around this trampoline (if present). */
if (tf->fixP != NULL)
{
-@@ -9027,6 +9191,8 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p)
+@@ -9027,6 +9191,8 @@
fragP->fr_subtype = 0;
/* Remove from the trampoline_list. */
prev->next = tf->next;
@@ -340,6 +338,3 @@ index 3e85b69..31c0b6b 100644
break;
}
}
---
-1.8.1.4
-
diff --git a/packages/binutils/2.23.2/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch b/packages/binutils/2.25.1/0018-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
index 9ad6b3b..3e8490a 100644
--- a/packages/binutils/2.23.2/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
+++ b/packages/binutils/2.25.1/0018-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
@@ -29,14 +29,12 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Backported from: e6c9a083ec5ae7a45bd71682b26aae1939849388
Changes to ChangeLog are dropped.
- bfd/elf32-xtensa.c | 6 +++++-
+ bfd/elf32-xtensa.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
-diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
-index 53af1c6..2523670 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
-@@ -1360,10 +1360,14 @@ elf_xtensa_gc_sweep_hook (bfd *abfd,
+@@ -1360,10 +1360,14 @@
{
if (is_plt)
{
@@ -52,6 +50,3 @@ index 53af1c6..2523670 100644
{
if (h->got.refcount > 0)
h->got.refcount--;
---
-1.8.1.4
-
diff --git a/packages/binutils/2.23.2/912-xtensa-fix-gas-segfault-with-text-section-literals.patch b/packages/binutils/2.25.1/0019-xtensa-fix-gas-segfault-with-text-section-literals.patch
index 4a3de2c..b1874cb 100644
--- a/packages/binutils/2.23.2/912-xtensa-fix-gas-segfault-with-text-section-literals.patch
+++ b/packages/binutils/2.25.1/0019-xtensa-fix-gas-segfault-with-text-section-literals.patch
@@ -21,14 +21,12 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Backported from: 4de0562a4c69fef4952aa7e19d7bda359f02e8b4
Changes to ChangeLog are dropped.
- gas/config/tc-xtensa.c | 10 +++++++++-
+ gas/config/tc-xtensa.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index 31c0b6b..18307c1 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -10808,13 +10808,21 @@ xtensa_move_literals (void)
+@@ -10808,13 +10808,21 @@
frchain_to = NULL;
frag_splice = &(frchain_from->frch_root);
@@ -51,6 +49,3 @@ index 31c0b6b..18307c1 100644
gas_assert (search_frag->tc_frag_data.literal_frag->fr_subtype
== RELAX_LITERAL_POOL_BEGIN);
xtensa_switch_section_emit_state (&state, segment->seg, 0);
---
-1.8.1.4
-
diff --git a/packages/binutils/2.25.1/913-xtensa-add-auto-litpools-option.patch b/packages/binutils/2.25.1/0020-xtensa-add-auto-litpools-option.patch
index 3ed9af1..9ed61ea 100644
--- a/packages/binutils/2.25.1/913-xtensa-add-auto-litpools-option.patch
+++ b/packages/binutils/2.25.1/0020-xtensa-add-auto-litpools-option.patch
@@ -55,20 +55,18 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Backported from: b46824bd49648c575372e6d9bc6a6defeabd6ed5
Changes to ChangeLogs and documentation are dropped.
- gas/config/tc-xtensa.c | 432 ++++++++++++++++++++++++++++++-
- gas/config/tc-xtensa.h | 1 +
- gas/testsuite/gas/xtensa/all.exp | 1 +
- gas/testsuite/gas/xtensa/auto-litpools.d | 12 +
- gas/testsuite/gas/xtensa/auto-litpools.s | 13 +
+ gas/config/tc-xtensa.c | 432 ++++++++++++++++++++++++++++++-
+ gas/config/tc-xtensa.h | 1
+ gas/testsuite/gas/xtensa/all.exp | 1
+ gas/testsuite/gas/xtensa/auto-litpools.d | 12
+ gas/testsuite/gas/xtensa/auto-litpools.s | 13
5 files changed, 454 insertions(+), 5 deletions(-)
create mode 100644 gas/testsuite/gas/xtensa/auto-litpools.d
create mode 100644 gas/testsuite/gas/xtensa/auto-litpools.s
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index 7311a05..b8b1e7d 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -440,6 +440,29 @@ bfd_boolean directive_state[] =
+@@ -440,6 +440,29 @@
#endif
};
@@ -98,7 +96,7 @@ index 7311a05..b8b1e7d 100644
/* Directive functions. */
-@@ -474,6 +497,9 @@ static void xtensa_create_trampoline_frag (bfd_boolean);
+@@ -474,6 +497,9 @@
static void xtensa_maybe_create_trampoline_frag (void);
struct trampoline_frag;
static int init_trampoline_frag (struct trampoline_frag *);
@@ -108,7 +106,7 @@ index 7311a05..b8b1e7d 100644
/* Alignment Functions. */
-@@ -698,6 +724,10 @@ enum
+@@ -698,6 +724,10 @@
option_trampolines,
option_no_trampolines,
@@ -119,7 +117,7 @@ index 7311a05..b8b1e7d 100644
};
const char *md_shortopts = "";
-@@ -773,6 +803,10 @@ struct option md_longopts[] =
+@@ -773,6 +803,10 @@
{ "trampolines", no_argument, NULL, option_trampolines },
{ "no-trampolines", no_argument, NULL, option_no_trampolines },
@@ -130,7 +128,7 @@ index 7311a05..b8b1e7d 100644
{ NULL, no_argument, NULL, 0 }
};
-@@ -961,6 +995,34 @@ md_parse_option (int c, char *arg)
+@@ -961,6 +995,34 @@
use_trampolines = FALSE;
return 1;
@@ -165,7 +163,7 @@ index 7311a05..b8b1e7d 100644
default:
return 0;
}
-@@ -986,7 +1048,12 @@ Xtensa options:\n\
+@@ -986,7 +1048,12 @@
flix bundles\n\
--rename-section old=new Rename section 'old' to 'new'\n\
--[no-]trampolines [Do not] generate trampolines (jumps to jumps)\n\
@@ -179,7 +177,7 @@ index 7311a05..b8b1e7d 100644
}
-@@ -4728,6 +4795,8 @@ xtensa_mark_literal_pool_location (void)
+@@ -4728,6 +4795,8 @@
pool_location = frag_now;
frag_now->tc_frag_data.lit_frchain = frchain_now;
frag_now->tc_frag_data.literal_frag = frag_now;
@@ -188,7 +186,7 @@ index 7311a05..b8b1e7d 100644
frag_variant (rs_machine_dependent, 0, 0,
RELAX_LITERAL_POOL_BEGIN, NULL, 0, NULL);
xtensa_set_frag_assembly_state (frag_now);
-@@ -4832,6 +4901,31 @@ get_expanded_loop_offset (xtensa_opcode opcode)
+@@ -4832,6 +4901,31 @@
static fragS *
get_literal_pool_location (segT seg)
{
@@ -220,7 +218,7 @@ index 7311a05..b8b1e7d 100644
return seg_info (seg)->tc_segment_info_data.literal_pool_loc;
}
-@@ -7098,6 +7192,11 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn)
+@@ -7098,6 +7192,11 @@
frag_now->tc_frag_data.slot_symbols[slot] = tinsn->symbol;
frag_now->tc_frag_data.slot_offsets[slot] = tinsn->offset;
frag_now->tc_frag_data.literal_frags[slot] = tinsn->literal_frag;
@@ -232,7 +230,7 @@ index 7311a05..b8b1e7d 100644
if (tinsn->literal_space != 0)
xg_assemble_literal_space (tinsn->literal_space, slot);
frag_now->tc_frag_data.free_reg[slot] = tinsn->extra_arg;
-@@ -7170,6 +7269,8 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn)
+@@ -7170,6 +7269,8 @@
frag_now->fr_symbol, frag_now->fr_offset, NULL);
xtensa_set_frag_assembly_state (frag_now);
xtensa_maybe_create_trampoline_frag ();
@@ -241,7 +239,7 @@ index 7311a05..b8b1e7d 100644
}
else if (is_branch && do_align_targets ())
{
-@@ -7314,11 +7415,18 @@ xtensa_check_frag_count (void)
+@@ -7314,11 +7415,18 @@
clear_frag_count ();
unreachable_count = 0;
}
@@ -260,7 +258,7 @@ index 7311a05..b8b1e7d 100644
#define TRAMPOLINE_FRAG_SIZE 3000
static void
-@@ -7410,6 +7518,135 @@ dump_trampolines (void)
+@@ -7410,6 +7518,135 @@
}
}
@@ -396,7 +394,7 @@ index 7311a05..b8b1e7d 100644
static void
xtensa_cleanup_align_frags (void)
{
-@@ -9029,7 +9266,41 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p)
+@@ -9029,7 +9266,41 @@
break;
case RELAX_LITERAL_POOL_BEGIN:
@@ -438,7 +436,7 @@ index 7311a05..b8b1e7d 100644
case RELAX_MAYBE_UNREACHABLE:
case RELAX_MAYBE_DESIRE_ALIGN:
/* No relaxation required. */
-@@ -10789,12 +11060,115 @@ xtensa_move_literals (void)
+@@ -10789,12 +11060,115 @@
segT dest_seg;
fixS *fix, *next_fix, **fix_splice;
sym_list *lit;
@@ -554,7 +552,7 @@ index 7311a05..b8b1e7d 100644
for (segment = literal_head->next; segment; segment = segment->next)
{
/* Keep the literals for .init and .fini in separate sections. */
-@@ -10839,9 +11213,6 @@ xtensa_move_literals (void)
+@@ -10839,9 +11213,6 @@
while (search_frag != frag_now)
{
next_frag = search_frag->fr_next;
@@ -564,7 +562,7 @@ index 7311a05..b8b1e7d 100644
if (search_frag->tc_frag_data.literal_frag)
{
literal_pool = search_frag->tc_frag_data.literal_frag;
-@@ -10849,8 +11220,56 @@ xtensa_move_literals (void)
+@@ -10849,8 +11220,56 @@
frchain_to = literal_pool->tc_frag_data.lit_frchain;
gas_assert (frchain_to);
}
@@ -621,7 +619,7 @@ index 7311a05..b8b1e7d 100644
*frag_splice = next_frag;
search_frag->fr_next = insert_after->fr_next;
-@@ -11014,7 +11433,10 @@ xtensa_switch_to_non_abs_literal_fragment (emit_state *result)
+@@ -11014,7 +11433,10 @@
&& !recursive
&& !is_init && ! is_fini)
{
@@ -633,11 +631,9 @@ index 7311a05..b8b1e7d 100644
/* When we mark a literal pool location, we want to put a frag in
the literal pool that points to it. But to do that, we want to
-diff --git a/gas/config/tc-xtensa.h b/gas/config/tc-xtensa.h
-index b2e43fa..290d902 100644
--- a/gas/config/tc-xtensa.h
+++ b/gas/config/tc-xtensa.h
-@@ -124,6 +124,7 @@ enum xtensa_relax_statesE
+@@ -124,6 +124,7 @@
RELAX_LITERAL_POOL_BEGIN,
RELAX_LITERAL_POOL_END,
@@ -645,11 +641,9 @@ index b2e43fa..290d902 100644
/* Technically these are not relaxations at all but mark a location
to store literals later. Note that fr_var stores the frchain for
BEGIN frags and fr_var stores now_seg for END frags. */
-diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp
-index d197ec8..db39629 100644
--- a/gas/testsuite/gas/xtensa/all.exp
+++ b/gas/testsuite/gas/xtensa/all.exp
-@@ -100,6 +100,7 @@ if [istarget xtensa*-*-*] then {
+@@ -100,6 +100,7 @@
run_dump_test "jlong"
run_dump_test "trampoline"
run_dump_test "first_frag_align"
@@ -657,9 +651,6 @@ index d197ec8..db39629 100644
}
if [info exists errorInfo] then {
-diff --git a/gas/testsuite/gas/xtensa/auto-litpools.d b/gas/testsuite/gas/xtensa/auto-litpools.d
-new file mode 100644
-index 0000000..4d1a690
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/auto-litpools.d
@@ -0,0 +1,12 @@
@@ -675,9 +666,6 @@ index 0000000..4d1a690
+#...
+.*40750:.*l32r.a2, 3e43c .*
+#...
-diff --git a/gas/testsuite/gas/xtensa/auto-litpools.s b/gas/testsuite/gas/xtensa/auto-litpools.s
-new file mode 100644
-index 0000000..9a5b26b
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/auto-litpools.s
@@ -0,0 +1,13 @@
@@ -694,6 +682,3 @@ index 0000000..9a5b26b
+ .endr
+ l32r a2, .L1
+ ret
---
-1.8.1.4
-
diff --git a/packages/binutils/2.25.1/914-xtensa-fix-signedness-of-gas-relocations.patch b/packages/binutils/2.25.1/0021-xtensa-fix-signedness-of-gas-relocations.patch
index 66d4e60..77b4af3 100644
--- a/packages/binutils/2.25.1/914-xtensa-fix-signedness-of-gas-relocations.patch
+++ b/packages/binutils/2.25.1/0021-xtensa-fix-signedness-of-gas-relocations.patch
@@ -21,19 +21,17 @@ gas/
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
- gas/config/tc-xtensa.c | 6 +++---
- gas/testsuite/gas/xtensa/all.exp | 1 +
- gas/testsuite/gas/xtensa/loc.d | 10 ++++++++++
- gas/testsuite/gas/xtensa/loc.s | 7 +++++++
+ gas/config/tc-xtensa.c | 6 +++---
+ gas/testsuite/gas/xtensa/all.exp | 1 +
+ gas/testsuite/gas/xtensa/loc.d | 10 ++++++++++
+ gas/testsuite/gas/xtensa/loc.s | 7 +++++++
4 files changed, 21 insertions(+), 3 deletions(-)
create mode 100644 gas/testsuite/gas/xtensa/loc.d
create mode 100644 gas/testsuite/gas/xtensa/loc.s
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index a119871..36a06cc 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -5961,15 +5961,15 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
+@@ -5961,15 +5961,15 @@
{
case BFD_RELOC_8:
fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8;
@@ -52,11 +50,9 @@ index a119871..36a06cc 100644
break;
default:
break;
-diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp
-index 31b725b..7ff7bd7 100644
--- a/gas/testsuite/gas/xtensa/all.exp
+++ b/gas/testsuite/gas/xtensa/all.exp
-@@ -101,6 +101,7 @@ if [istarget xtensa*-*-*] then {
+@@ -101,6 +101,7 @@
run_dump_test "trampoline"
run_dump_test "first_frag_align"
run_dump_test "auto-litpools"
@@ -64,9 +60,6 @@ index 31b725b..7ff7bd7 100644
}
if [info exists errorInfo] then {
-diff --git a/gas/testsuite/gas/xtensa/loc.d b/gas/testsuite/gas/xtensa/loc.d
-new file mode 100644
-index 0000000..71983cc
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/loc.d
@@ -0,0 +1,10 @@
@@ -80,9 +73,6 @@ index 0000000..71983cc
+#...
+.*R_XTENSA_DIFF16.*\.text\+0x00009c42
+#...
-diff --git a/gas/testsuite/gas/xtensa/loc.s b/gas/testsuite/gas/xtensa/loc.s
-new file mode 100644
-index 0000000..029e14e
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/loc.s
@@ -0,0 +1,7 @@
@@ -93,6 +83,3 @@ index 0000000..029e14e
+ .space 40000
+ .loc 1 5
+ nop
---
-2.1.4
-
diff --git a/packages/binutils/2.26.1/915-xtensa-fix-.init-.fini-literals-moving.patch b/packages/binutils/2.25.1/0022-xtensa-fix-.init-.fini-literals-moving.patch
index ead3e42..0b2b3fa 100644
--- a/packages/binutils/2.26.1/915-xtensa-fix-.init-.fini-literals-moving.patch
+++ b/packages/binutils/2.25.1/0022-xtensa-fix-.init-.fini-literals-moving.patch
@@ -38,19 +38,17 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
Backported from: 4111950f363221c4641dc2f33bea61cc94f34906
- gas/config/tc-xtensa.c | 12 ++++++++++--
- gas/testsuite/gas/xtensa/all.exp | 1 +
- gas/testsuite/gas/xtensa/init-fini-literals.d | 24 ++++++++++++++++++++++++
- gas/testsuite/gas/xtensa/init-fini-literals.s | 19 +++++++++++++++++++
+ gas/config/tc-xtensa.c | 12 ++++++++++--
+ gas/testsuite/gas/xtensa/all.exp | 1 +
+ gas/testsuite/gas/xtensa/init-fini-literals.d | 24 ++++++++++++++++++++++++
+ gas/testsuite/gas/xtensa/init-fini-literals.s | 19 +++++++++++++++++++
4 files changed, 54 insertions(+), 2 deletions(-)
create mode 100644 gas/testsuite/gas/xtensa/init-fini-literals.d
create mode 100644 gas/testsuite/gas/xtensa/init-fini-literals.s
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index 36a06cc..5773634 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -11061,6 +11061,10 @@ xtensa_move_literals (void)
+@@ -11061,6 +11061,10 @@
fixS *fix, *next_fix, **fix_splice;
sym_list *lit;
struct litpool_seg *lps;
@@ -61,7 +59,7 @@ index 36a06cc..5773634 100644
mark_literal_frags (literal_head->next);
-@@ -11171,9 +11175,13 @@ xtensa_move_literals (void)
+@@ -11171,9 +11175,13 @@
for (segment = literal_head->next; segment; segment = segment->next)
{
@@ -77,11 +75,9 @@ index 36a06cc..5773634 100644
continue;
frchain_from = seg_info (segment->seg)->frchainP;
-diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp
-index 7ff7bd7..6b67320 100644
--- a/gas/testsuite/gas/xtensa/all.exp
+++ b/gas/testsuite/gas/xtensa/all.exp
-@@ -102,6 +102,7 @@ if [istarget xtensa*-*-*] then {
+@@ -102,6 +102,7 @@
run_dump_test "first_frag_align"
run_dump_test "auto-litpools"
run_dump_test "loc"
@@ -89,9 +85,6 @@ index 7ff7bd7..6b67320 100644
}
if [info exists errorInfo] then {
-diff --git a/gas/testsuite/gas/xtensa/init-fini-literals.d b/gas/testsuite/gas/xtensa/init-fini-literals.d
-new file mode 100644
-index 0000000..19ed121
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/init-fini-literals.d
@@ -0,0 +1,24 @@
@@ -119,9 +112,6 @@ index 0000000..19ed121
+.* R_XTENSA_SLOT0_OP \.fini\.literal
+.* R_XTENSA_SLOT0_OP \.fini\.literal\+0x00000004
+#...
-diff --git a/gas/testsuite/gas/xtensa/init-fini-literals.s b/gas/testsuite/gas/xtensa/init-fini-literals.s
-new file mode 100644
-index 0000000..7c9ec17
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/init-fini-literals.s
@@ -0,0 +1,19 @@
@@ -144,6 +134,3 @@ index 0000000..7c9ec17
+
+ l32r a2, .LC2
+ l32r a2, .LC3
---
-2.1.4
-
diff --git a/packages/binutils/2.25.1/330-Dont-link-to-libfl-as-its-unnecessary.patch b/packages/binutils/2.25.1/330-Dont-link-to-libfl-as-its-unnecessary.patch
deleted file mode 100644
index af4032a..0000000
--- a/packages/binutils/2.25.1/330-Dont-link-to-libfl-as-its-unnecessary.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-diff -urN binutils-2.25.1.orig/binutils/configure binutils-2.25.1/binutils/configure
---- binutils-2.25.1.orig/binutils/configure 2015-10-25 13:18:46.249052806 +0000
-+++ binutils-2.25.1/binutils/configure 2015-10-25 13:39:21.339034801 +0000
-@@ -12067,6 +12067,7 @@
- done
- test -n "$YACC" || YACC="yacc"
-
-+save_LIBS=$LIBS
- for ac_prog in flex lex
- do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-@@ -12227,6 +12228,8 @@
- if test "$LEX" = :; then
- LEX=${am_missing_run}flex
- fi
-+LIBS=$save_LIBS
-+LEXLIB=
-
- ALL_LINGUAS="bg da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr"
- # If we haven't got the data from the intl directory,
-diff -urN binutils-2.25.1.orig/binutils/configure.ac binutils-2.25.1/binutils/configure.ac
---- binutils-2.25.1.orig/binutils/configure.ac 2015-10-25 13:18:46.249052806 +0000
-+++ binutils-2.25.1/binutils/configure.ac 2015-10-25 13:38:52.969035216 +0000
-@@ -87,7 +87,10 @@
- fi
-
- AC_PROG_YACC
-+save_LIBS=$LIBS
- AM_PROG_LEX
-+LIBS=$save_LIBS
-+LEXLIB=
-
- ALL_LINGUAS="bg da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr"
- ZW_GNU_GETTEXT_SISTER_DIR
-diff -urN binutils-2.25.1.orig/gas/configure binutils-2.25.1/gas/configure
---- binutils-2.25.1.orig/gas/configure 2015-10-25 13:18:46.389052803 +0000
-+++ binutils-2.25.1/gas/configure 2015-10-25 15:16:55.988949456 +0000
-@@ -12795,6 +12795,7 @@
- done
- test -n "$YACC" || YACC="yacc"
-
-+save_LIBS=$LIBS
- for ac_prog in flex lex
- do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-@@ -12955,6 +12956,8 @@
- if test "$LEX" = :; then
- LEX=${am_missing_run}flex
- fi
-+LIBS=$save_LIBS
-+LEXLIB=
-
- ALL_LINGUAS="fr tr es rw id ru fi ja"
- # If we haven't got the data from the intl directory,
-diff -urN binutils-2.25.1.orig/gas/configure.ac binutils-2.25.1/gas/configure.ac
---- binutils-2.25.1.orig/gas/configure.ac 2015-10-25 15:15:06.000000000 +0000
-+++ binutils-2.25.1/gas/configure.ac 2015-10-25 14:45:32.000000000 +0000
-@@ -717,7 +717,10 @@
- AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}", [Target OS.])
-
- AC_PROG_YACC
-+save_LIBS=$LIBS
- AM_PROG_LEX
-+LIBS=$save_LIBS
-+LEXLIB=
-
- ALL_LINGUAS="fr tr es rw id ru fi ja"
- ZW_GNU_GETTEXT_SISTER_DIR
-diff -urN binutils-2.25.1.orig/ld/configure binutils-2.25.1/ld/configure
---- binutils-2.25.1.orig/ld/configure 2015-10-25 13:18:47.399052788 +0000
-+++ binutils-2.25.1/ld/configure 2015-10-25 15:17:06.472282637 +0000
-@@ -16071,6 +16071,7 @@
- done
- test -n "$YACC" || YACC="yacc"
-
-+save_LIBS=$LIBS
- for ac_prog in flex lex
- do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-@@ -16231,6 +16232,8 @@
- if test "$LEX" = :; then
- LEX=${am_missing_run}flex
- fi
-+LIBS=$save_LIBS
-+LEXLIB=
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
-diff -urN binutils-2.25.1.orig/ld/configure.ac binutils-2.25.1/ld/configure.ac
---- binutils-2.25.1.orig/ld/configure.ac 2015-10-25 13:18:47.415719456 +0000
-+++ binutils-2.25.1/ld/configure.ac 2015-10-25 15:14:43.000000000 +0000
-@@ -173,7 +173,10 @@
- AC_EXEEXT
-
- AC_PROG_YACC
-+save_LIBS=$LIBS
- AM_PROG_LEX
-+LIBS=$save_LIBS
-+LEXLIB=
-
- AM_MAINTAINER_MODE
- AM_CONDITIONAL(GENINSRC_NEVER, false)
diff --git a/packages/binutils/2.25.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch b/packages/binutils/2.25.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch
deleted file mode 100644
index 33441cc..0000000
--- a/packages/binutils/2.25.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- binutils-2.25.orig/gold/binary.cc 2015-06-09 10:48:32.000000000 +0100
-+++ binutils-2.25/gold/binary.cc 2015-06-09 10:49:23.000000000 +0100
-@@ -23,7 +23,7 @@
- #include "gold.h"
-
- #include <cerrno>
--#include <cstring>
-+#include <string>
- #include "safe-ctype.h"
-
- #include "elfcpp.h"
diff --git a/packages/binutils/2.27/120-sh-conf.patch b/packages/binutils/2.26.1/0000-sh-conf.patch
index c12a023..a41d630 100644
--- a/packages/binutils/2.27/120-sh-conf.patch
+++ b/packages/binutils/2.26.1/0000-sh-conf.patch
@@ -5,11 +5,14 @@ fix that up too.. now we're able to actually build a real toolchain for
sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more
inept targets than that one, really. Go look, I promise).
-diff --git a/configure b/configure
-index 87677bc..2d916f1 100755
+---
+ configure | 2 +-
+ configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
--- a/configure
+++ b/configure
-@@ -3812,7 +3812,7 @@ case "${target}" in
+@@ -3939,7 +3939,7 @@
or1k*-*-*)
noconfigdirs="$noconfigdirs gdb"
;;
@@ -18,11 +21,9 @@ index 87677bc..2d916f1 100755
case "${target}" in
sh*-*-elf)
;;
-diff --git a/configure.ac b/configure.ac
-index 8fe0eca..b10a99f 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1140,7 +1140,7 @@ case "${target}" in
+@@ -1276,7 +1276,7 @@
or1k*-*-*)
noconfigdirs="$noconfigdirs gdb"
;;
diff --git a/packages/binutils/2.25.1/300-001_ld_makefile_patch.patch b/packages/binutils/2.26.1/0001-001_ld_makefile_patch.patch
index 2a1320c..d2e1cd9 100644
--- a/packages/binutils/2.25.1/300-001_ld_makefile_patch.patch
+++ b/packages/binutils/2.26.1/0001-001_ld_makefile_patch.patch
@@ -1,8 +1,11 @@
-diff --git a/ld/Makefile.am b/ld/Makefile.am
-index 9575f1f..84df0bf 100644
+---
+ ld/Makefile.am | 2 +-
+ ld/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
-@@ -54,7 +54,7 @@ endif
+@@ -57,7 +57,7 @@
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.
@@ -11,11 +14,9 @@ index 9575f1f..84df0bf 100644
EMUL = @EMUL@
EMULATION_OFILES = @EMULATION_OFILES@
-diff --git a/ld/Makefile.in b/ld/Makefile.in
-index 9f56ca1..272860f 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
-@@ -388,7 +388,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
+@@ -413,7 +413,7 @@
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.
diff --git a/packages/binutils/2.26.1/300-012_check_ldrunpath_length.patch b/packages/binutils/2.26.1/0002-012_check_ldrunpath_length.patch
index f1f31af..e3d6508 100644
--- a/packages/binutils/2.26.1/300-012_check_ldrunpath_length.patch
+++ b/packages/binutils/2.26.1/0002-012_check_ldrunpath_length.patch
@@ -1,8 +1,10 @@
-diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
-index 137446f..bb8391a 100644
+---
+ ld/emultempl/elf32.em | 4 ++++
+ 1 file changed, 4 insertions(+)
+
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
-@@ -1195,6 +1195,8 @@ fragment <<EOF
+@@ -1242,6 +1242,8 @@
&& command_line.rpath == NULL)
{
lib_path = (const char *) getenv ("LD_RUN_PATH");
@@ -11,7 +13,7 @@ index 137446f..bb8391a 100644
if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
force))
break;
-@@ -1458,6 +1460,8 @@ gld${EMULATION_NAME}_before_allocation (void)
+@@ -1523,6 +1525,8 @@
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
diff --git a/packages/binutils/2.23.2/310-fix-gold-pthreads-typo.patch b/packages/binutils/2.26.1/0003-fix-gold-pthreads-typo.patch
index f2e6ff2..40861f5 100644
--- a/packages/binutils/2.23.2/310-fix-gold-pthreads-typo.patch
+++ b/packages/binutils/2.26.1/0003-fix-gold-pthreads-typo.patch
@@ -1,5 +1,9 @@
---- binutils-2.25.1/gold/gold-threads.cc.orig 2014-10-14 08:32:04.000000000 +0100
-+++ binutils-2.25.1/gold/gold-threads.cc 2015-10-20 22:38:18.640819300 +0100
+---
+ gold/gold-threads.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/gold/gold-threads.cc
++++ b/gold/gold-threads.cc
@@ -102,9 +102,9 @@
if (err != 0)
gold_fatal(_("pthead_mutextattr_init failed: %s"), strerror(err));
diff --git a/packages/binutils/2.26.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch b/packages/binutils/2.26.1/0004-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
index f9a8af6..c086798 100644
--- a/packages/binutils/2.26.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
+++ b/packages/binutils/2.26.1/0004-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
@@ -1,5 +1,9 @@
---- binutils-2.25.1/gold/gold-threads.cc.orig 2015-10-20 22:39:36.371169400 +0100
-+++ binutils-2.25.1/gold/gold-threads.cc 2015-10-20 22:39:38.182772700 +0100
+---
+ gold/gold-threads.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/gold/gold-threads.cc
++++ b/gold/gold-threads.cc
@@ -101,7 +101,7 @@
int err = pthread_mutexattr_init(&attr);
if (err != 0)
diff --git a/packages/binutils/2.26.1/330-Dont-link-to-libfl-as-its-unnecessary.patch b/packages/binutils/2.26.1/0005-Dont-link-to-libfl-as-its-unnecessary.patch
index 334ee3e..afe9bc5 100644
--- a/packages/binutils/2.26.1/330-Dont-link-to-libfl-as-its-unnecessary.patch
+++ b/packages/binutils/2.26.1/0005-Dont-link-to-libfl-as-its-unnecessary.patch
@@ -1,8 +1,15 @@
-diff --git a/binutils/configure b/binutils/configure
-index 6e1f21e..78bf4ae 100755
+---
+ binutils/configure | 3 +++
+ binutils/configure.ac | 3 +++
+ gas/configure | 3 +++
+ gas/configure.ac | 3 +++
+ ld/configure | 3 +++
+ ld/configure.ac | 3 +++
+ 6 files changed, 18 insertions(+)
+
--- a/binutils/configure
+++ b/binutils/configure
-@@ -12069,6 +12069,7 @@ fi
+@@ -12069,6 +12069,7 @@
done
test -n "$YACC" || YACC="yacc"
@@ -10,7 +17,7 @@ index 6e1f21e..78bf4ae 100755
for ac_prog in flex lex
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
-@@ -12230,6 +12231,8 @@ esac
+@@ -12230,6 +12231,8 @@
if test "$LEX" = :; then
LEX=${am_missing_run}flex
fi
@@ -19,11 +26,9 @@ index 6e1f21e..78bf4ae 100755
ALL_LINGUAS="bg ca da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr"
# If we haven't got the data from the intl directory,
-diff --git a/binutils/configure.ac b/binutils/configure.ac
-index defe781..8fd236a 100644
--- a/binutils/configure.ac
+++ b/binutils/configure.ac
-@@ -87,7 +87,10 @@ if test -z "$host" ; then
+@@ -87,7 +87,10 @@
fi
AC_PROG_YACC
@@ -34,11 +39,9 @@ index defe781..8fd236a 100644
ALL_LINGUAS="bg ca da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr"
ZW_GNU_GETTEXT_SISTER_DIR
-diff --git a/gas/configure b/gas/configure
-index f959e95..9bb4043 100755
--- a/gas/configure
+++ b/gas/configure
-@@ -12819,6 +12819,7 @@ fi
+@@ -12853,6 +12853,7 @@
done
test -n "$YACC" || YACC="yacc"
@@ -46,7 +49,7 @@ index f959e95..9bb4043 100755
for ac_prog in flex lex
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
-@@ -12980,6 +12981,8 @@ esac
+@@ -13014,6 +13015,8 @@
if test "$LEX" = :; then
LEX=${am_missing_run}flex
fi
@@ -55,11 +58,9 @@ index f959e95..9bb4043 100755
ALL_LINGUAS="fr tr es rw id ru fi ja zh_CN"
# If we haven't got the data from the intl directory,
-diff --git a/gas/configure.ac b/gas/configure.ac
-index 07f825d..c552b7e 100644
--- a/gas/configure.ac
+++ b/gas/configure.ac
-@@ -734,7 +734,10 @@ AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}", [Target vendor.])
+@@ -763,7 +763,10 @@
AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}", [Target OS.])
AC_PROG_YACC
@@ -70,11 +71,9 @@ index 07f825d..c552b7e 100644
ALL_LINGUAS="fr tr es rw id ru fi ja zh_CN"
ZW_GNU_GETTEXT_SISTER_DIR
-diff --git a/ld/configure b/ld/configure
-index a446283..1a6bf81 100755
--- a/ld/configure
+++ b/ld/configure
-@@ -16087,6 +16087,7 @@ fi
+@@ -16087,6 +16087,7 @@
done
test -n "$YACC" || YACC="yacc"
@@ -82,7 +81,7 @@ index a446283..1a6bf81 100755
for ac_prog in flex lex
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
-@@ -16248,6 +16249,8 @@ esac
+@@ -16248,6 +16249,8 @@
if test "$LEX" = :; then
LEX=${am_missing_run}flex
fi
@@ -91,11 +90,9 @@ index a446283..1a6bf81 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
-diff --git a/ld/configure.ac b/ld/configure.ac
-index 188172d..45eec53 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
-@@ -186,7 +186,10 @@ AM_PO_SUBDIRS
+@@ -186,7 +186,10 @@
AC_EXEEXT
AC_PROG_YACC
diff --git a/packages/binutils/2.29.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch b/packages/binutils/2.26.1/0006-Darwin-gold-binary-cc-include-string-not-cstring.patch
index e4f235b..fbc4041 100644
--- a/packages/binutils/2.29.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch
+++ b/packages/binutils/2.26.1/0006-Darwin-gold-binary-cc-include-string-not-cstring.patch
@@ -1,5 +1,7 @@
-diff --git a/gold/binary.cc b/gold/binary.cc
-index 52df81a..03a8f20 100644
+---
+ gold/binary.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
--- a/gold/binary.cc
+++ b/gold/binary.cc
@@ -23,7 +23,7 @@
diff --git a/packages/binutils/2.27/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch b/packages/binutils/2.26.1/0007-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
index 6168b31..bfb2258 100644
--- a/packages/binutils/2.27/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
+++ b/packages/binutils/2.26.1/0007-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
@@ -9,15 +9,13 @@ Subject: [PATCH] Fix darwin build
Change-Id: I69204a72f853f5263dffedc448379d75ed4eca2e
---
- binutils-2.25/bfd/peXXigen.c | 22 ++++++++++++++++++++++
- binutils-2.25/gold/gold-threads.cc | 15 ++++++++++++---
+ bfd/peXXigen.c | 22 ++++++++++++++++++++++
+ gold/gold-threads.cc | 15 ++++++++++++---
2 files changed, 34 insertions(+), 3 deletions(-)
-diff --git binutils-2.25.orig/bfd/peXXigen.c binutils-2.25/bfd/peXXigen.c
-index 13e39e4..7a98306 100644
---- binutils-2.25.orig/bfd/peXXigen.c
-+++ binutils-2.25/bfd/peXXigen.c
-@@ -3522,6 +3522,28 @@ u16_mbtouc (wchar_t * puc, const unsigned short * s, unsigned int n)
+--- a/bfd/peXXigen.c
++++ b/bfd/peXXigen.c
+@@ -3578,6 +3578,28 @@
}
#endif /* HAVE_WCHAR_H and not Cygwin/Mingw */
@@ -46,11 +44,9 @@ index 13e39e4..7a98306 100644
/* Perform a comparison of two entries. */
static signed int
rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b)
-diff --git binutils-2.25.orig/gold/gold-threads.cc binutils-2.25/gold/gold-threads.cc
-index ff5a8ac..45140e0 100644
---- binutils-2.25.orig/gold/gold-threads.cc
-+++ binutils-2.25/gold/gold-threads.cc
-@@ -284,9 +284,18 @@ Condvar::~Condvar()
+--- a/gold/gold-threads.cc
++++ b/gold/gold-threads.cc
+@@ -284,9 +284,18 @@
class Once_initialize
{
public:
@@ -72,6 +68,3 @@ index ff5a8ac..45140e0 100644
// Return a pointer to the pthread_once_t variable.
pthread_once_t*
---
-2.1.3
-
diff --git a/packages/binutils/2.24/500-sysroot.patch b/packages/binutils/2.26.1/0008-sysroot.patch
index e49c795..636234b 100644
--- a/packages/binutils/2.24/500-sysroot.patch
+++ b/packages/binutils/2.26.1/0008-sysroot.patch
@@ -5,9 +5,13 @@ Always try to prepend the sysroot prefix to absolute filenames first.
http://bugs.gentoo.org/275666
http://sourceware.org/bugzilla/show_bug.cgi?id=10340
+---
+ ld/ldfile.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
-@@ -308,18 +308,25 @@
+@@ -335,18 +335,25 @@
directory first. */
if (! entry->flags.maybe_archive)
{
diff --git a/packages/binutils/2.26.1/600-poison-system-directories.patch b/packages/binutils/2.26.1/0009-poison-system-directories.patch
index aa04082..ad59414 100644
--- a/packages/binutils/2.26.1/600-poison-system-directories.patch
+++ b/packages/binutils/2.26.1/0009-poison-system-directories.patch
@@ -59,8 +59,18 @@ Code Merged from Sourcery G++ binutils 2.19 - 4.4-277
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-diff --git a/ld/config.in b/ld/config.in
-index 276fb77..35c58eb 100644
+---
+ ld/config.in | 3 +++
+ ld/configure | 14 ++++++++++++++
+ ld/configure.ac | 10 ++++++++++
+ ld/ld.h | 8 ++++++++
+ ld/ld.texinfo | 12 ++++++++++++
+ ld/ldfile.c | 17 +++++++++++++++++
+ ld/ldlex.h | 2 ++
+ ld/ldmain.c | 2 ++
+ ld/lexsup.c | 21 +++++++++++++++++++++
+ 9 files changed, 89 insertions(+)
+
--- a/ld/config.in
+++ b/ld/config.in
@@ -14,6 +14,9 @@
@@ -73,11 +83,9 @@ index 276fb77..35c58eb 100644
/* Additional extension a shared object might have. */
#undef EXTRA_SHLIB_EXTENSION
-diff --git a/ld/configure b/ld/configure
-index a446283..d1f9504 100755
--- a/ld/configure
+++ b/ld/configure
-@@ -786,6 +786,7 @@ with_lib_path
+@@ -786,6 +786,7 @@
enable_targets
enable_64_bit_bfd
with_sysroot
@@ -85,7 +93,7 @@ index a446283..d1f9504 100755
enable_gold
enable_got
enable_compressed_debug_sections
-@@ -1442,6 +1443,8 @@ Optional Features:
+@@ -1442,6 +1443,8 @@
--disable-largefile omit support for large files
--enable-targets alternative target configurations
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
@@ -94,7 +102,7 @@ index a446283..d1f9504 100755
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
--enable-got=<type> GOT handling scheme (target, single, negative,
multigot)
-@@ -15491,7 +15494,18 @@ else
+@@ -15491,7 +15494,18 @@
fi
@@ -113,11 +121,9 @@ index a446283..d1f9504 100755
# Check whether --enable-got was given.
if test "${enable_got+set}" = set; then :
-diff --git a/ld/configure.ac b/ld/configure.ac
-index 188172d..2cd8443 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
-@@ -95,6 +95,16 @@ AC_SUBST(use_sysroot)
+@@ -95,6 +95,16 @@
AC_SUBST(TARGET_SYSTEM_ROOT)
AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
@@ -134,11 +140,9 @@ index 188172d..2cd8443 100644
dnl Use --enable-gold to decide if this linker should be the default.
dnl "install_as_default" is set to false if gold is the default linker.
dnl "installed_linker" is the installed BFD linker name.
-diff --git a/ld/ld.h b/ld/ld.h
-index d84ec4e..3476b26 100644
--- a/ld/ld.h
+++ b/ld/ld.h
-@@ -164,6 +164,14 @@ typedef struct {
+@@ -164,6 +164,14 @@
/* If set, display the target memory usage (per memory region). */
bfd_boolean print_memory_usage;
@@ -153,11 +157,9 @@ index d84ec4e..3476b26 100644
/* Big or little endian as set on command line. */
enum endian_enum endian;
-diff --git a/ld/ld.texinfo b/ld/ld.texinfo
-index 1dd7492..fb1438e 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
-@@ -2332,6 +2332,18 @@ string identifying the original linked file does not change.
+@@ -2338,6 +2338,18 @@
Passing @code{none} for @var{style} disables the setting from any
@code{--build-id} options earlier on the command line.
@@ -176,11 +178,9 @@ index 1dd7492..fb1438e 100644
@end table
@c man end
-diff --git a/ld/ldfile.c b/ld/ldfile.c
-index 96f9ecc..af231c0 100644
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
-@@ -114,6 +114,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
+@@ -114,6 +114,23 @@
new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL);
else
new_dirs->name = xstrdup (name);
@@ -204,11 +204,9 @@ index 96f9ecc..af231c0 100644
}
/* Try to open a BFD for a lang_input_statement. */
-diff --git a/ld/ldlex.h b/ld/ldlex.h
-index 6f11e7b..0ca3110 100644
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
-@@ -144,6 +144,8 @@ enum option_values
+@@ -144,6 +144,8 @@
OPTION_PRINT_MEMORY_USAGE,
OPTION_REQUIRE_DEFINED_SYMBOL,
OPTION_ORPHAN_HANDLING,
@@ -217,11 +215,9 @@ index 6f11e7b..0ca3110 100644
};
/* The initial parser states. */
-diff --git a/ld/ldmain.c b/ld/ldmain.c
-index bb0b9cc..a23c56c 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
-@@ -257,6 +257,8 @@ main (int argc, char **argv)
+@@ -257,6 +257,8 @@
command_line.warn_mismatch = TRUE;
command_line.warn_search_mismatch = TRUE;
command_line.check_section_addresses = -1;
@@ -230,11 +226,9 @@ index bb0b9cc..a23c56c 100644
/* We initialize DEMANGLING based on the environment variable
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
-diff --git a/ld/lexsup.c b/ld/lexsup.c
-index 4cad209..be7d584 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
-@@ -530,6 +530,14 @@ static const struct ld_option ld_options[] =
+@@ -530,6 +530,14 @@
{ {"orphan-handling", required_argument, NULL, OPTION_ORPHAN_HANDLING},
'\0', N_("=MODE"), N_("Control how orphan sections are handled."),
TWO_DASHES },
@@ -249,7 +243,7 @@ index 4cad209..be7d584 100644
};
#define OPTION_COUNT ARRAY_SIZE (ld_options)
-@@ -542,6 +550,7 @@ parse_args (unsigned argc, char **argv)
+@@ -542,6 +550,7 @@
int ingroup = 0;
char *default_dirlist = NULL;
char *shortopts;
@@ -257,7 +251,7 @@ index 4cad209..be7d584 100644
struct option *longopts;
struct option *really_longopts;
int last_optind;
-@@ -1516,6 +1525,14 @@ parse_args (unsigned argc, char **argv)
+@@ -1516,6 +1525,14 @@
}
break;
@@ -272,7 +266,7 @@ index 4cad209..be7d584 100644
case OPTION_PUSH_STATE:
input_flags.pushed = xmemdup (&input_flags,
sizeof (input_flags),
-@@ -1559,6 +1576,10 @@ parse_args (unsigned argc, char **argv)
+@@ -1559,6 +1576,10 @@
command_line.soname = NULL;
}
diff --git a/packages/binutils/2.27/700-Fix-library-paths-on-PowerPC.patch b/packages/binutils/2.26.1/0010-Fix-library-paths-on-PowerPC.patch
index cea92f3..4bcc748 100644
--- a/packages/binutils/2.27/700-Fix-library-paths-on-PowerPC.patch
+++ b/packages/binutils/2.26.1/0010-Fix-library-paths-on-PowerPC.patch
@@ -13,14 +13,12 @@ depend on whether it is built on LE or BE machine.
Signed-off-by: Alexey Neyman <stilor@att.net>
---
- ld/emulparams/elf32ppccommon.sh | 10 +++++-----
+ ld/emulparams/elf32ppccommon.sh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
-diff --git a/ld/emulparams/elf32ppccommon.sh b/ld/emulparams/elf32ppccommon.sh
-index 1f54ef8..d00cf68 100644
--- a/ld/emulparams/elf32ppccommon.sh
+++ b/ld/emulparams/elf32ppccommon.sh
-@@ -44,11 +44,11 @@ fi
+@@ -44,11 +44,11 @@
# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
# Similarly, look for 32 bit libraries in /lib32, /usr/lib32 etc.
@@ -37,6 +35,3 @@ index 1f54ef8..d00cf68 100644
*:*64lppc*) LIBPATH_SUFFIX=64le ;;
*:*32lppc*) LIBPATH_SUFFIX=32le ;;
*:*64*) LIBPATH_SUFFIX=64 ;;
---
-2.9.3
-
diff --git a/packages/binutils/2.26.1/914-xtensa-fix-signedness-of-gas-relocations.patch b/packages/binutils/2.26.1/0011-xtensa-fix-signedness-of-gas-relocations.patch
index 66d4e60..77b4af3 100644
--- a/packages/binutils/2.26.1/914-xtensa-fix-signedness-of-gas-relocations.patch
+++ b/packages/binutils/2.26.1/0011-xtensa-fix-signedness-of-gas-relocations.patch
@@ -21,19 +21,17 @@ gas/
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
- gas/config/tc-xtensa.c | 6 +++---
- gas/testsuite/gas/xtensa/all.exp | 1 +
- gas/testsuite/gas/xtensa/loc.d | 10 ++++++++++
- gas/testsuite/gas/xtensa/loc.s | 7 +++++++
+ gas/config/tc-xtensa.c | 6 +++---
+ gas/testsuite/gas/xtensa/all.exp | 1 +
+ gas/testsuite/gas/xtensa/loc.d | 10 ++++++++++
+ gas/testsuite/gas/xtensa/loc.s | 7 +++++++
4 files changed, 21 insertions(+), 3 deletions(-)
create mode 100644 gas/testsuite/gas/xtensa/loc.d
create mode 100644 gas/testsuite/gas/xtensa/loc.s
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index a119871..36a06cc 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -5961,15 +5961,15 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
+@@ -5961,15 +5961,15 @@
{
case BFD_RELOC_8:
fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8;
@@ -52,11 +50,9 @@ index a119871..36a06cc 100644
break;
default:
break;
-diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp
-index 31b725b..7ff7bd7 100644
--- a/gas/testsuite/gas/xtensa/all.exp
+++ b/gas/testsuite/gas/xtensa/all.exp
-@@ -101,6 +101,7 @@ if [istarget xtensa*-*-*] then {
+@@ -101,6 +101,7 @@
run_dump_test "trampoline"
run_dump_test "first_frag_align"
run_dump_test "auto-litpools"
@@ -64,9 +60,6 @@ index 31b725b..7ff7bd7 100644
}
if [info exists errorInfo] then {
-diff --git a/gas/testsuite/gas/xtensa/loc.d b/gas/testsuite/gas/xtensa/loc.d
-new file mode 100644
-index 0000000..71983cc
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/loc.d
@@ -0,0 +1,10 @@
@@ -80,9 +73,6 @@ index 0000000..71983cc
+#...
+.*R_XTENSA_DIFF16.*\.text\+0x00009c42
+#...
-diff --git a/gas/testsuite/gas/xtensa/loc.s b/gas/testsuite/gas/xtensa/loc.s
-new file mode 100644
-index 0000000..029e14e
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/loc.s
@@ -0,0 +1,7 @@
@@ -93,6 +83,3 @@ index 0000000..029e14e
+ .space 40000
+ .loc 1 5
+ nop
---
-2.1.4
-
diff --git a/packages/binutils/2.25.1/915-xtensa-fix-.init-.fini-literals-moving.patch b/packages/binutils/2.26.1/0012-xtensa-fix-.init-.fini-literals-moving.patch
index ead3e42..0b2b3fa 100644
--- a/packages/binutils/2.25.1/915-xtensa-fix-.init-.fini-literals-moving.patch
+++ b/packages/binutils/2.26.1/0012-xtensa-fix-.init-.fini-literals-moving.patch
@@ -38,19 +38,17 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
Backported from: 4111950f363221c4641dc2f33bea61cc94f34906
- gas/config/tc-xtensa.c | 12 ++++++++++--
- gas/testsuite/gas/xtensa/all.exp | 1 +
- gas/testsuite/gas/xtensa/init-fini-literals.d | 24 ++++++++++++++++++++++++
- gas/testsuite/gas/xtensa/init-fini-literals.s | 19 +++++++++++++++++++
+ gas/config/tc-xtensa.c | 12 ++++++++++--
+ gas/testsuite/gas/xtensa/all.exp | 1 +
+ gas/testsuite/gas/xtensa/init-fini-literals.d | 24 ++++++++++++++++++++++++
+ gas/testsuite/gas/xtensa/init-fini-literals.s | 19 +++++++++++++++++++
4 files changed, 54 insertions(+), 2 deletions(-)
create mode 100644 gas/testsuite/gas/xtensa/init-fini-literals.d
create mode 100644 gas/testsuite/gas/xtensa/init-fini-literals.s
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index 36a06cc..5773634 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -11061,6 +11061,10 @@ xtensa_move_literals (void)
+@@ -11061,6 +11061,10 @@
fixS *fix, *next_fix, **fix_splice;
sym_list *lit;
struct litpool_seg *lps;
@@ -61,7 +59,7 @@ index 36a06cc..5773634 100644
mark_literal_frags (literal_head->next);
-@@ -11171,9 +11175,13 @@ xtensa_move_literals (void)
+@@ -11171,9 +11175,13 @@
for (segment = literal_head->next; segment; segment = segment->next)
{
@@ -77,11 +75,9 @@ index 36a06cc..5773634 100644
continue;
frchain_from = seg_info (segment->seg)->frchainP;
-diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp
-index 7ff7bd7..6b67320 100644
--- a/gas/testsuite/gas/xtensa/all.exp
+++ b/gas/testsuite/gas/xtensa/all.exp
-@@ -102,6 +102,7 @@ if [istarget xtensa*-*-*] then {
+@@ -102,6 +102,7 @@
run_dump_test "first_frag_align"
run_dump_test "auto-litpools"
run_dump_test "loc"
@@ -89,9 +85,6 @@ index 7ff7bd7..6b67320 100644
}
if [info exists errorInfo] then {
-diff --git a/gas/testsuite/gas/xtensa/init-fini-literals.d b/gas/testsuite/gas/xtensa/init-fini-literals.d
-new file mode 100644
-index 0000000..19ed121
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/init-fini-literals.d
@@ -0,0 +1,24 @@
@@ -119,9 +112,6 @@ index 0000000..19ed121
+.* R_XTENSA_SLOT0_OP \.fini\.literal
+.* R_XTENSA_SLOT0_OP \.fini\.literal\+0x00000004
+#...
-diff --git a/gas/testsuite/gas/xtensa/init-fini-literals.s b/gas/testsuite/gas/xtensa/init-fini-literals.s
-new file mode 100644
-index 0000000..7c9ec17
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/init-fini-literals.s
@@ -0,0 +1,19 @@
@@ -144,6 +134,3 @@ index 0000000..7c9ec17
+
+ l32r a2, .LC2
+ l32r a2, .LC3
---
-2.1.4
-
diff --git a/packages/binutils/2.27/100-missing-break.patch b/packages/binutils/2.27/0000-missing-break.patch
index 6f9d67c..3f9230d 100644
--- a/packages/binutils/2.27/100-missing-break.patch
+++ b/packages/binutils/2.27/0000-missing-break.patch
@@ -9,15 +9,12 @@ missing break.
PR 20531
* elf32-ppc.c (_bfd_elf_ppc_set_arch): Add missing "break".
---
- bfd/ChangeLog | 5 +++++
- bfd/elf32-ppc.c | 1 +
- 2 files changed, 6 insertions(+)
+ bfd/elf32-ppc.c | 1 +
+ 1 file changed, 1 insertion(+)
-diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
-index 92299bc..1dd6d78 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
-@@ -2246,6 +2246,7 @@ _bfd_elf_ppc_set_arch (bfd *abfd)
+@@ -2246,6 +2246,7 @@
case PPC_APUINFO_BRLOCK:
if (mach != bfd_mach_ppc_vle)
mach = bfd_mach_ppc_e500;
@@ -25,6 +22,3 @@ index 92299bc..1dd6d78 100644
case PPC_APUINFO_VLE:
mach = bfd_mach_ppc_vle;
---
-2.9.3
-
diff --git a/packages/binutils/2.26.1/120-sh-conf.patch b/packages/binutils/2.27/0001-sh-conf.patch
index c12a023..63a3543 100644
--- a/packages/binutils/2.26.1/120-sh-conf.patch
+++ b/packages/binutils/2.27/0001-sh-conf.patch
@@ -5,11 +5,14 @@ fix that up too.. now we're able to actually build a real toolchain for
sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more
inept targets than that one, really. Go look, I promise).
-diff --git a/configure b/configure
-index 87677bc..2d916f1 100755
+---
+ configure | 2 +-
+ configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
--- a/configure
+++ b/configure
-@@ -3812,7 +3812,7 @@ case "${target}" in
+@@ -3946,7 +3946,7 @@
or1k*-*-*)
noconfigdirs="$noconfigdirs gdb"
;;
@@ -18,11 +21,9 @@ index 87677bc..2d916f1 100755
case "${target}" in
sh*-*-elf)
;;
-diff --git a/configure.ac b/configure.ac
-index 8fe0eca..b10a99f 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1140,7 +1140,7 @@ case "${target}" in
+@@ -1282,7 +1282,7 @@
or1k*-*-*)
noconfigdirs="$noconfigdirs gdb"
;;
diff --git a/packages/binutils/2.27/0002-001_ld_makefile_patch.patch b/packages/binutils/2.27/0002-001_ld_makefile_patch.patch
new file mode 100644
index 0000000..79c4719
--- /dev/null
+++ b/packages/binutils/2.27/0002-001_ld_makefile_patch.patch
@@ -0,0 +1,27 @@
+---
+ ld/Makefile.am | 2 +-
+ ld/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/ld/Makefile.am
++++ b/ld/Makefile.am
+@@ -57,7 +57,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- a/ld/Makefile.in
++++ b/ld/Makefile.in
+@@ -451,7 +451,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/packages/binutils/2.27/300-012_check_ldrunpath_length.patch b/packages/binutils/2.27/0003-012_check_ldrunpath_length.patch
index f1f31af..7433351 100644
--- a/packages/binutils/2.27/300-012_check_ldrunpath_length.patch
+++ b/packages/binutils/2.27/0003-012_check_ldrunpath_length.patch
@@ -1,8 +1,10 @@
-diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
-index 137446f..bb8391a 100644
+---
+ ld/emultempl/elf32.em | 4 ++++
+ 1 file changed, 4 insertions(+)
+
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
-@@ -1195,6 +1195,8 @@ fragment <<EOF
+@@ -1244,6 +1244,8 @@
&& command_line.rpath == NULL)
{
lib_path = (const char *) getenv ("LD_RUN_PATH");
@@ -11,7 +13,7 @@ index 137446f..bb8391a 100644
if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
force))
break;
-@@ -1458,6 +1460,8 @@ gld${EMULATION_NAME}_before_allocation (void)
+@@ -1525,6 +1527,8 @@
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
diff --git a/packages/binutils/2.29.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch b/packages/binutils/2.27/0004-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
index 2956385..99dee96 100644
--- a/packages/binutils/2.29.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
+++ b/packages/binutils/2.27/0004-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
@@ -1,5 +1,9 @@
---- binutils-2.27/gold/gold-threads.cc.orig 2016-12-26 16:44:23.691075600 +1100
-+++ binutils-2.27/gold/gold-threads.cc 2016-12-26 16:46:21.071855200 +1100
+---
+ gold/gold-threads.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/gold/gold-threads.cc
++++ b/gold/gold-threads.cc
@@ -101,7 +101,7 @@
int err = pthread_mutexattr_init(&attr);
if (err != 0)
diff --git a/packages/binutils/2.27/330-Dont-link-to-libfl-as-its-unnecessary.patch b/packages/binutils/2.27/0005-Dont-link-to-libfl-as-its-unnecessary.patch
index c52af05..ada911f 100644
--- a/packages/binutils/2.27/330-Dont-link-to-libfl-as-its-unnecessary.patch
+++ b/packages/binutils/2.27/0005-Dont-link-to-libfl-as-its-unnecessary.patch
@@ -1,5 +1,12 @@
-diff --git a/binutils/configure b/binutils/configure
-index 6e1f21e..78bf4ae 100755
+---
+ binutils/configure | 3 +++
+ binutils/configure.ac | 3 +++
+ gas/configure | 3 +++
+ gas/configure.ac | 3 +++
+ ld/configure | 3 +++
+ ld/configure.ac | 3 +++
+ 6 files changed, 18 insertions(+)
+
--- a/binutils/configure
+++ b/binutils/configure
@@ -12106,6 +12106,7 @@
@@ -19,8 +26,6 @@ index 6e1f21e..78bf4ae 100755
ALL_LINGUAS="bg da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr ca"
# If we haven't got the data from the intl directory,
-diff --git a/binutils/configure.ac b/binutils/configure.ac
-index defe781..8fd236a 100644
--- a/binutils/configure.ac
+++ b/binutils/configure.ac
@@ -87,7 +87,10 @@
@@ -34,11 +39,9 @@ index defe781..8fd236a 100644
ALL_LINGUAS="bg da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr ca"
ZW_GNU_GETTEXT_SISTER_DIR
-diff --git a/gas/configure b/gas/configure
-index f959e95..9bb4043 100755
--- a/gas/configure
+++ b/gas/configure
-@@ -12819,6 +12819,7 @@ fi
+@@ -12927,6 +12927,7 @@
done
test -n "$YACC" || YACC="yacc"
@@ -46,7 +49,7 @@ index f959e95..9bb4043 100755
for ac_prog in flex lex
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
-@@ -12980,6 +12981,8 @@ esac
+@@ -13088,6 +13089,8 @@
if test "$LEX" = :; then
LEX=${am_missing_run}flex
fi
@@ -55,11 +58,9 @@ index f959e95..9bb4043 100755
ALL_LINGUAS="fr tr es rw id ru fi ja zh_CN"
# If we haven't got the data from the intl directory,
-diff --git a/gas/configure.ac b/gas/configure.ac
-index 07f825d..c552b7e 100644
--- a/gas/configure.ac
+++ b/gas/configure.ac
-@@ -734,7 +734,10 @@ AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}", [Target vendor.])
+@@ -793,7 +793,10 @@
AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}", [Target OS.])
AC_PROG_YACC
@@ -70,11 +71,9 @@ index 07f825d..c552b7e 100644
ALL_LINGUAS="fr tr es rw id ru fi ja zh_CN"
ZW_GNU_GETTEXT_SISTER_DIR
-diff --git a/ld/configure b/ld/configure
-index a446283..1a6bf81 100755
--- a/ld/configure
+++ b/ld/configure
-@@ -16087,6 +16087,7 @@ fi
+@@ -16138,6 +16138,7 @@
done
test -n "$YACC" || YACC="yacc"
@@ -82,7 +81,7 @@ index a446283..1a6bf81 100755
for ac_prog in flex lex
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
-@@ -16248,6 +16249,8 @@ esac
+@@ -16299,6 +16300,8 @@
if test "$LEX" = :; then
LEX=${am_missing_run}flex
fi
@@ -91,11 +90,9 @@ index a446283..1a6bf81 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
-diff --git a/ld/configure.ac b/ld/configure.ac
-index 188172d..45eec53 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
-@@ -186,7 +186,10 @@ AM_PO_SUBDIRS
+@@ -197,7 +197,10 @@
AC_EXEEXT
AC_PROG_YACC
diff --git a/packages/binutils/2.26.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch b/packages/binutils/2.27/0006-Darwin-gold-binary-cc-include-string-not-cstring.patch
index e4f235b..fbc4041 100644
--- a/packages/binutils/2.26.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch
+++ b/packages/binutils/2.27/0006-Darwin-gold-binary-cc-include-string-not-cstring.patch
@@ -1,5 +1,7 @@
-diff --git a/gold/binary.cc b/gold/binary.cc
-index 52df81a..03a8f20 100644
+---
+ gold/binary.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
--- a/gold/binary.cc
+++ b/gold/binary.cc
@@ -23,7 +23,7 @@
diff --git a/packages/binutils/2.25.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch b/packages/binutils/2.27/0007-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
index 6168b31..ab83bcc 100644
--- a/packages/binutils/2.25.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
+++ b/packages/binutils/2.27/0007-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
@@ -9,15 +9,13 @@ Subject: [PATCH] Fix darwin build
Change-Id: I69204a72f853f5263dffedc448379d75ed4eca2e
---
- binutils-2.25/bfd/peXXigen.c | 22 ++++++++++++++++++++++
- binutils-2.25/gold/gold-threads.cc | 15 ++++++++++++---
+ bfd/peXXigen.c | 22 ++++++++++++++++++++++
+ gold/gold-threads.cc | 15 ++++++++++++---
2 files changed, 34 insertions(+), 3 deletions(-)
-diff --git binutils-2.25.orig/bfd/peXXigen.c binutils-2.25/bfd/peXXigen.c
-index 13e39e4..7a98306 100644
---- binutils-2.25.orig/bfd/peXXigen.c
-+++ binutils-2.25/bfd/peXXigen.c
-@@ -3522,6 +3522,28 @@ u16_mbtouc (wchar_t * puc, const unsigned short * s, unsigned int n)
+--- a/bfd/peXXigen.c
++++ b/bfd/peXXigen.c
+@@ -3582,6 +3582,28 @@
}
#endif /* HAVE_WCHAR_H and not Cygwin/Mingw */
@@ -46,11 +44,9 @@ index 13e39e4..7a98306 100644
/* Perform a comparison of two entries. */
static signed int
rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b)
-diff --git binutils-2.25.orig/gold/gold-threads.cc binutils-2.25/gold/gold-threads.cc
-index ff5a8ac..45140e0 100644
---- binutils-2.25.orig/gold/gold-threads.cc
-+++ binutils-2.25/gold/gold-threads.cc
-@@ -284,9 +284,18 @@ Condvar::~Condvar()
+--- a/gold/gold-threads.cc
++++ b/gold/gold-threads.cc
+@@ -284,9 +284,18 @@
class Once_initialize
{
public:
@@ -72,6 +68,3 @@ index ff5a8ac..45140e0 100644
// Return a pointer to the pthread_once_t variable.
pthread_once_t*
---
-2.1.3
-
diff --git a/packages/binutils/2.27/500-sysroot.patch b/packages/binutils/2.27/0008-sysroot.patch
index 4cb9bc7..22d2cb5 100644
--- a/packages/binutils/2.27/500-sysroot.patch
+++ b/packages/binutils/2.27/0008-sysroot.patch
@@ -5,6 +5,10 @@ Always try to prepend the sysroot prefix to absolute filenames first.
http://bugs.gentoo.org/275666
http://sourceware.org/bugzilla/show_bug.cgi?id=10340
+---
+ ld/ldfile.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -336,18 +336,25 @@
diff --git a/packages/binutils/2.27/600-poison-system-directories.patch b/packages/binutils/2.27/0009-poison-system-directories.patch
index ff235e3..027377e 100644
--- a/packages/binutils/2.27/600-poison-system-directories.patch
+++ b/packages/binutils/2.27/0009-poison-system-directories.patch
@@ -59,8 +59,18 @@ Code Merged from Sourcery G++ binutils 2.19 - 4.4-277
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-diff --git a/ld/config.in b/ld/config.in
-index 276fb77..35c58eb 100644
+---
+ ld/config.in | 3 +++
+ ld/configure | 14 ++++++++++++++
+ ld/configure.ac | 10 ++++++++++
+ ld/ld.h | 8 ++++++++
+ ld/ld.texinfo | 12 ++++++++++++
+ ld/ldfile.c | 17 +++++++++++++++++
+ ld/ldlex.h | 2 ++
+ ld/ldmain.c | 2 ++
+ ld/lexsup.c | 21 +++++++++++++++++++++
+ 9 files changed, 89 insertions(+)
+
--- a/ld/config.in
+++ b/ld/config.in
@@ -17,6 +17,9 @@
@@ -73,11 +83,9 @@ index 276fb77..35c58eb 100644
/* Additional extension a shared object might have. */
#undef EXTRA_SHLIB_EXTENSION
-diff --git a/ld/configure b/ld/configure
-index a446283..d1f9504 100755
--- a/ld/configure
+++ b/ld/configure
-@@ -788,6 +788,7 @@ with_lib_path
+@@ -788,6 +788,7 @@
enable_targets
enable_64_bit_bfd
with_sysroot
@@ -85,7 +93,7 @@ index a446283..d1f9504 100755
enable_gold
enable_got
enable_compressed_debug_sections
-@@ -1445,6 +1446,8 @@ Optional Features:
+@@ -1445,6 +1446,8 @@
--disable-largefile omit support for large files
--enable-targets alternative target configurations
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
@@ -94,7 +102,7 @@ index a446283..d1f9504 100755
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
--enable-got=<type> GOT handling scheme (target, single, negative,
multigot)
-@@ -15498,7 +15501,18 @@ else
+@@ -15498,7 +15501,18 @@
fi
@@ -113,11 +121,9 @@ index a446283..d1f9504 100755
# Check whether --enable-got was given.
if test "${enable_got+set}" = set; then :
-diff --git a/ld/configure.ac b/ld/configure.ac
-index 188172d..2cd8443 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
-@@ -95,6 +95,16 @@ AC_SUBST(use_sysroot)
+@@ -95,6 +95,16 @@
AC_SUBST(TARGET_SYSTEM_ROOT)
AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
@@ -134,11 +140,9 @@ index 188172d..2cd8443 100644
dnl Use --enable-gold to decide if this linker should be the default.
dnl "install_as_default" is set to false if gold is the default linker.
dnl "installed_linker" is the installed BFD linker name.
-diff --git a/ld/ld.h b/ld/ld.h
-index d84ec4e..3476b26 100644
--- a/ld/ld.h
+++ b/ld/ld.h
-@@ -169,6 +169,14 @@ typedef struct {
+@@ -169,6 +169,14 @@
/* If set, display the target memory usage (per memory region). */
bfd_boolean print_memory_usage;
@@ -153,11 +157,9 @@ index d84ec4e..3476b26 100644
/* Big or little endian as set on command line. */
enum endian_enum endian;
-diff --git a/ld/ld.texinfo b/ld/ld.texinfo
-index 1dd7492..fb1438e 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
-@@ -2357,6 +2357,18 @@ string identifying the original linked file does not change.
+@@ -2357,6 +2357,18 @@
Passing @code{none} for @var{style} disables the setting from any
@code{--build-id} options earlier on the command line.
@@ -176,11 +178,9 @@ index 1dd7492..fb1438e 100644
@end table
@c man end
-diff --git a/ld/ldfile.c b/ld/ldfile.c
-index 96f9ecc..af231c0 100644
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
-@@ -114,6 +114,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
+@@ -114,6 +114,23 @@
new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL);
else
new_dirs->name = xstrdup (name);
@@ -204,11 +204,9 @@ index 96f9ecc..af231c0 100644
}
/* Try to open a BFD for a lang_input_statement. */
-diff --git a/ld/ldlex.h b/ld/ldlex.h
-index 6f11e7b..0ca3110 100644
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
-@@ -144,6 +144,8 @@ enum option_values
+@@ -144,6 +144,8 @@
OPTION_PRINT_MEMORY_USAGE,
OPTION_REQUIRE_DEFINED_SYMBOL,
OPTION_ORPHAN_HANDLING,
@@ -217,11 +215,9 @@ index 6f11e7b..0ca3110 100644
};
/* The initial parser states. */
-diff --git a/ld/ldmain.c b/ld/ldmain.c
-index bb0b9cc..a23c56c 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
-@@ -257,6 +257,8 @@ main (int argc, char **argv)
+@@ -257,6 +257,8 @@
command_line.warn_mismatch = TRUE;
command_line.warn_search_mismatch = TRUE;
command_line.check_section_addresses = -1;
@@ -230,11 +226,9 @@ index bb0b9cc..a23c56c 100644
/* We initialize DEMANGLING based on the environment variable
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
-diff --git a/ld/lexsup.c b/ld/lexsup.c
-index 4cad209..be7d584 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
-@@ -530,6 +530,14 @@ static const struct ld_option ld_options[] =
+@@ -530,6 +530,14 @@
{ {"orphan-handling", required_argument, NULL, OPTION_ORPHAN_HANDLING},
'\0', N_("=MODE"), N_("Control how orphan sections are handled."),
TWO_DASHES },
@@ -249,7 +243,7 @@ index 4cad209..be7d584 100644
};
#define OPTION_COUNT ARRAY_SIZE (ld_options)
-@@ -542,6 +550,7 @@ parse_args (unsigned argc, char **argv)
+@@ -542,6 +550,7 @@
int ingroup = 0;
char *default_dirlist = NULL;
char *shortopts;
@@ -257,7 +251,7 @@ index 4cad209..be7d584 100644
struct option *longopts;
struct option *really_longopts;
int last_optind;
-@@ -1516,6 +1525,14 @@ parse_args (unsigned argc, char **argv)
+@@ -1516,6 +1525,14 @@
}
break;
@@ -272,7 +266,7 @@ index 4cad209..be7d584 100644
case OPTION_PUSH_STATE:
input_flags.pushed = xmemdup (&input_flags,
sizeof (input_flags),
-@@ -1559,6 +1576,10 @@ parse_args (unsigned argc, char **argv)
+@@ -1559,6 +1576,10 @@
command_line.soname = NULL;
}
diff --git a/packages/binutils/2.25.1/700-Fix-library-paths-on-PowerPC.patch b/packages/binutils/2.27/0010-Fix-library-paths-on-PowerPC.patch
index cea92f3..4bcc748 100644
--- a/packages/binutils/2.25.1/700-Fix-library-paths-on-PowerPC.patch
+++ b/packages/binutils/2.27/0010-Fix-library-paths-on-PowerPC.patch
@@ -13,14 +13,12 @@ depend on whether it is built on LE or BE machine.
Signed-off-by: Alexey Neyman <stilor@att.net>
---
- ld/emulparams/elf32ppccommon.sh | 10 +++++-----
+ ld/emulparams/elf32ppccommon.sh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
-diff --git a/ld/emulparams/elf32ppccommon.sh b/ld/emulparams/elf32ppccommon.sh
-index 1f54ef8..d00cf68 100644
--- a/ld/emulparams/elf32ppccommon.sh
+++ b/ld/emulparams/elf32ppccommon.sh
-@@ -44,11 +44,11 @@ fi
+@@ -44,11 +44,11 @@
# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
# Similarly, look for 32 bit libraries in /lib32, /usr/lib32 etc.
@@ -37,6 +35,3 @@ index 1f54ef8..d00cf68 100644
*:*64lppc*) LIBPATH_SUFFIX=64le ;;
*:*32lppc*) LIBPATH_SUFFIX=32le ;;
*:*64*) LIBPATH_SUFFIX=64 ;;
---
-2.9.3
-
diff --git a/packages/binutils/2.27/999-xtensa-reverse-shift-count.patch b/packages/binutils/2.27/0011-xtensa-reverse-shift-count.patch
index f8bb9c1..1fc8652 100644
--- a/packages/binutils/2.27/999-xtensa-reverse-shift-count.patch
+++ b/packages/binutils/2.27/0011-xtensa-reverse-shift-count.patch
@@ -10,16 +10,13 @@ gas/ChangeLog:
* config/tc-xtensa.c (xg_reverse_shift_count): Pass cnt_arg instead of
cnt_argp to concat.
---
- gas/ChangeLog | 5 +++++
- gas/config/tc-xtensa.c | 2 +-
- 2 files changed, 6 insertions(+), 1 deletion(-)
+ gas/config/tc-xtensa.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
[[ ChangeLog skipped, fails to apply on 2.27 ]]
-diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
-index d062044..ca261ae 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
-@@ -2228,7 +2228,7 @@ xg_reverse_shift_count (char **cnt_argp)
+@@ -2228,7 +2228,7 @@
cnt_arg = *cnt_argp;
/* replace the argument with "31-(argument)" */
@@ -28,6 +25,3 @@ index d062044..ca261ae 100644
free (cnt_arg);
*cnt_argp = new_arg;
---
-2.9.3
-
diff --git a/packages/binutils/2.25.1/120-sh-conf.patch b/packages/binutils/2.28.1/0000-sh-conf.patch
index c12a023..67e7c7a 100644
--- a/packages/binutils/2.25.1/120-sh-conf.patch
+++ b/packages/binutils/2.28.1/0000-sh-conf.patch
@@ -5,11 +5,14 @@ fix that up too.. now we're able to actually build a real toolchain for
sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more
inept targets than that one, really. Go look, I promise).
-diff --git a/configure b/configure
-index 87677bc..2d916f1 100755
+---
+ configure | 2 +-
+ configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
--- a/configure
+++ b/configure
-@@ -3812,7 +3812,7 @@ case "${target}" in
+@@ -3943,7 +3943,7 @@
or1k*-*-*)
noconfigdirs="$noconfigdirs gdb"
;;
@@ -18,11 +21,9 @@ index 87677bc..2d916f1 100755
case "${target}" in
sh*-*-elf)
;;
-diff --git a/configure.ac b/configure.ac
-index 8fe0eca..b10a99f 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1140,7 +1140,7 @@ case "${target}" in
+@@ -1279,7 +1279,7 @@
or1k*-*-*)
noconfigdirs="$noconfigdirs gdb"
;;
diff --git a/packages/binutils/2.28.1/0001-001_ld_makefile_patch.patch b/packages/binutils/2.28.1/0001-001_ld_makefile_patch.patch
new file mode 100644
index 0000000..36940de
--- /dev/null
+++ b/packages/binutils/2.28.1/0001-001_ld_makefile_patch.patch
@@ -0,0 +1,27 @@
+---
+ ld/Makefile.am | 2 +-
+ ld/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/ld/Makefile.am
++++ b/ld/Makefile.am
+@@ -57,7 +57,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- a/ld/Makefile.in
++++ b/ld/Makefile.in
+@@ -452,7 +452,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/packages/binutils/2.28.1/300-012_check_ldrunpath_length.patch b/packages/binutils/2.28.1/0002-012_check_ldrunpath_length.patch
index f1f31af..78f05ae 100644
--- a/packages/binutils/2.28.1/300-012_check_ldrunpath_length.patch
+++ b/packages/binutils/2.28.1/0002-012_check_ldrunpath_length.patch
@@ -1,8 +1,10 @@
-diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
-index 137446f..bb8391a 100644
+---
+ ld/emultempl/elf32.em | 4 ++++
+ 1 file changed, 4 insertions(+)
+
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
-@@ -1195,6 +1195,8 @@ fragment <<EOF
+@@ -1411,6 +1411,8 @@
&& command_line.rpath == NULL)
{
lib_path = (const char *) getenv ("LD_RUN_PATH");
@@ -11,7 +13,7 @@ index 137446f..bb8391a 100644
if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
force))
break;
-@@ -1458,6 +1460,8 @@ gld${EMULATION_NAME}_before_allocation (void)
+@@ -1692,6 +1694,8 @@
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
diff --git a/packages/binutils/2.27/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch b/packages/binutils/2.28.1/0003-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
index 2956385..99dee96 100644
--- a/packages/binutils/2.27/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
+++ b/packages/binutils/2.28.1/0003-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
@@ -1,5 +1,9 @@
---- binutils-2.27/gold/gold-threads.cc.orig 2016-12-26 16:44:23.691075600 +1100
-+++ binutils-2.27/gold/gold-threads.cc 2016-12-26 16:46:21.071855200 +1100
+---
+ gold/gold-threads.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/gold/gold-threads.cc
++++ b/gold/gold-threads.cc
@@ -101,7 +101,7 @@
int err = pthread_mutexattr_init(&attr);
if (err != 0)
diff --git a/packages/binutils/2.28.1/330-Dont-link-to-libfl-as-its-unnecessary.patch b/packages/binutils/2.28.1/0004-Dont-link-to-libfl-as-its-unnecessary.patch
index c52af05..c687f74 100644
--- a/packages/binutils/2.28.1/330-Dont-link-to-libfl-as-its-unnecessary.patch
+++ b/packages/binutils/2.28.1/0004-Dont-link-to-libfl-as-its-unnecessary.patch
@@ -1,8 +1,15 @@
-diff --git a/binutils/configure b/binutils/configure
-index 6e1f21e..78bf4ae 100755
+---
+ binutils/configure | 3 +++
+ binutils/configure.ac | 3 +++
+ gas/configure | 3 +++
+ gas/configure.ac | 3 +++
+ ld/configure | 3 +++
+ ld/configure.ac | 3 +++
+ 6 files changed, 18 insertions(+)
+
--- a/binutils/configure
+++ b/binutils/configure
-@@ -12106,6 +12106,7 @@
+@@ -12150,6 +12150,7 @@
done
test -n "$YACC" || YACC="yacc"
@@ -10,7 +17,7 @@ index 6e1f21e..78bf4ae 100755
for ac_prog in flex lex
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
-@@ -12267,6 +12268,8 @@
+@@ -12311,6 +12312,8 @@
if test "$LEX" = :; then
LEX=${am_missing_run}flex
fi
@@ -19,8 +26,6 @@ index 6e1f21e..78bf4ae 100755
ALL_LINGUAS="bg da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr ca"
# If we haven't got the data from the intl directory,
-diff --git a/binutils/configure.ac b/binutils/configure.ac
-index defe781..8fd236a 100644
--- a/binutils/configure.ac
+++ b/binutils/configure.ac
@@ -87,7 +87,10 @@
@@ -34,11 +39,9 @@ index defe781..8fd236a 100644
ALL_LINGUAS="bg da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr ca"
ZW_GNU_GETTEXT_SISTER_DIR
-diff --git a/gas/configure b/gas/configure
-index f959e95..9bb4043 100755
--- a/gas/configure
+++ b/gas/configure
-@@ -12819,6 +12819,7 @@ fi
+@@ -13002,6 +13002,7 @@
done
test -n "$YACC" || YACC="yacc"
@@ -46,7 +49,7 @@ index f959e95..9bb4043 100755
for ac_prog in flex lex
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
-@@ -12980,6 +12981,8 @@ esac
+@@ -13163,6 +13164,8 @@
if test "$LEX" = :; then
LEX=${am_missing_run}flex
fi
@@ -55,11 +58,9 @@ index f959e95..9bb4043 100755
ALL_LINGUAS="fr tr es rw id ru fi ja zh_CN"
# If we haven't got the data from the intl directory,
-diff --git a/gas/configure.ac b/gas/configure.ac
-index 07f825d..c552b7e 100644
--- a/gas/configure.ac
+++ b/gas/configure.ac
-@@ -734,7 +734,10 @@ AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}", [Target vendor.])
+@@ -794,7 +794,10 @@
AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}", [Target OS.])
AC_PROG_YACC
@@ -70,11 +71,9 @@ index 07f825d..c552b7e 100644
ALL_LINGUAS="fr tr es rw id ru fi ja zh_CN"
ZW_GNU_GETTEXT_SISTER_DIR
-diff --git a/ld/configure b/ld/configure
-index a446283..1a6bf81 100755
--- a/ld/configure
+++ b/ld/configure
-@@ -16087,6 +16087,7 @@ fi
+@@ -16182,6 +16182,7 @@
done
test -n "$YACC" || YACC="yacc"
@@ -82,7 +81,7 @@ index a446283..1a6bf81 100755
for ac_prog in flex lex
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
-@@ -16248,6 +16249,8 @@ esac
+@@ -16343,6 +16344,8 @@
if test "$LEX" = :; then
LEX=${am_missing_run}flex
fi
@@ -91,11 +90,9 @@ index a446283..1a6bf81 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
-diff --git a/ld/configure.ac b/ld/configure.ac
-index 188172d..45eec53 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
-@@ -186,7 +186,10 @@ AM_PO_SUBDIRS
+@@ -197,7 +197,10 @@
AC_EXEEXT
AC_PROG_YACC
diff --git a/packages/binutils/2.27/340-Darwin-gold-binary-cc-include-string-not-cstring.patch b/packages/binutils/2.28.1/0005-Darwin-gold-binary-cc-include-string-not-cstring.patch
index e4f235b..fbc4041 100644
--- a/packages/binutils/2.27/340-Darwin-gold-binary-cc-include-string-not-cstring.patch
+++ b/packages/binutils/2.28.1/0005-Darwin-gold-binary-cc-include-string-not-cstring.patch
@@ -1,5 +1,7 @@
-diff --git a/gold/binary.cc b/gold/binary.cc
-index 52df81a..03a8f20 100644
+---
+ gold/binary.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
--- a/gold/binary.cc
+++ b/gold/binary.cc
@@ -23,7 +23,7 @@
diff --git a/packages/binutils/2.28.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch b/packages/binutils/2.28.1/0006-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
index 6168b31..4192e1d 100644
--- a/packages/binutils/2.28.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
+++ b/packages/binutils/2.28.1/0006-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
@@ -9,15 +9,13 @@ Subject: [PATCH] Fix darwin build
Change-Id: I69204a72f853f5263dffedc448379d75ed4eca2e
---
- binutils-2.25/bfd/peXXigen.c | 22 ++++++++++++++++++++++
- binutils-2.25/gold/gold-threads.cc | 15 ++++++++++++---
+ bfd/peXXigen.c | 22 ++++++++++++++++++++++
+ gold/gold-threads.cc | 15 ++++++++++++---
2 files changed, 34 insertions(+), 3 deletions(-)
-diff --git binutils-2.25.orig/bfd/peXXigen.c binutils-2.25/bfd/peXXigen.c
-index 13e39e4..7a98306 100644
---- binutils-2.25.orig/bfd/peXXigen.c
-+++ binutils-2.25/bfd/peXXigen.c
-@@ -3522,6 +3522,28 @@ u16_mbtouc (wchar_t * puc, const unsigned short * s, unsigned int n)
+--- a/bfd/peXXigen.c
++++ b/bfd/peXXigen.c
+@@ -3604,6 +3604,28 @@
}
#endif /* HAVE_WCHAR_H and not Cygwin/Mingw */
@@ -46,11 +44,9 @@ index 13e39e4..7a98306 100644
/* Perform a comparison of two entries. */
static signed int
rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b)
-diff --git binutils-2.25.orig/gold/gold-threads.cc binutils-2.25/gold/gold-threads.cc
-index ff5a8ac..45140e0 100644
---- binutils-2.25.orig/gold/gold-threads.cc
-+++ binutils-2.25/gold/gold-threads.cc
-@@ -284,9 +284,18 @@ Condvar::~Condvar()
+--- a/gold/gold-threads.cc
++++ b/gold/gold-threads.cc
+@@ -284,9 +284,18 @@
class Once_initialize
{
public:
@@ -72,6 +68,3 @@ index ff5a8ac..45140e0 100644
// Return a pointer to the pthread_once_t variable.
pthread_once_t*
---
-2.1.3
-
diff --git a/packages/binutils/2.28.1/500-sysroot.patch b/packages/binutils/2.28.1/0007-sysroot.patch
index 4cb9bc7..22d2cb5 100644
--- a/packages/binutils/2.28.1/500-sysroot.patch
+++ b/packages/binutils/2.28.1/0007-sysroot.patch
@@ -5,6 +5,10 @@ Always try to prepend the sysroot prefix to absolute filenames first.
http://bugs.gentoo.org/275666
http://sourceware.org/bugzilla/show_bug.cgi?id=10340
+---
+ ld/ldfile.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -336,18 +336,25 @@
diff --git a/packages/binutils/2.28.1/600-poison-system-directories.patch b/packages/binutils/2.28.1/0008-poison-system-directories.patch
index ff235e3..4348162 100644
--- a/packages/binutils/2.28.1/600-poison-system-directories.patch
+++ b/packages/binutils/2.28.1/0008-poison-system-directories.patch
@@ -59,8 +59,18 @@ Code Merged from Sourcery G++ binutils 2.19 - 4.4-277
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-diff --git a/ld/config.in b/ld/config.in
-index 276fb77..35c58eb 100644
+---
+ ld/config.in | 3 +++
+ ld/configure | 14 ++++++++++++++
+ ld/configure.ac | 10 ++++++++++
+ ld/ld.h | 8 ++++++++
+ ld/ld.texinfo | 12 ++++++++++++
+ ld/ldfile.c | 17 +++++++++++++++++
+ ld/ldlex.h | 2 ++
+ ld/ldmain.c | 2 ++
+ ld/lexsup.c | 21 +++++++++++++++++++++
+ 9 files changed, 89 insertions(+)
+
--- a/ld/config.in
+++ b/ld/config.in
@@ -17,6 +17,9 @@
@@ -73,11 +83,9 @@ index 276fb77..35c58eb 100644
/* Additional extension a shared object might have. */
#undef EXTRA_SHLIB_EXTENSION
-diff --git a/ld/configure b/ld/configure
-index a446283..d1f9504 100755
--- a/ld/configure
+++ b/ld/configure
-@@ -788,6 +788,7 @@ with_lib_path
+@@ -789,6 +789,7 @@
enable_targets
enable_64_bit_bfd
with_sysroot
@@ -85,7 +93,7 @@ index a446283..d1f9504 100755
enable_gold
enable_got
enable_compressed_debug_sections
-@@ -1445,6 +1446,8 @@ Optional Features:
+@@ -1446,6 +1447,8 @@
--disable-largefile omit support for large files
--enable-targets alternative target configurations
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
@@ -94,7 +102,7 @@ index a446283..d1f9504 100755
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
--enable-got=<type> GOT handling scheme (target, single, negative,
multigot)
-@@ -15498,7 +15501,18 @@ else
+@@ -15499,7 +15502,18 @@
fi
@@ -113,11 +121,9 @@ index a446283..d1f9504 100755
# Check whether --enable-got was given.
if test "${enable_got+set}" = set; then :
-diff --git a/ld/configure.ac b/ld/configure.ac
-index 188172d..2cd8443 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
-@@ -95,6 +95,16 @@ AC_SUBST(use_sysroot)
+@@ -95,6 +95,16 @@
AC_SUBST(TARGET_SYSTEM_ROOT)
AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
@@ -134,11 +140,9 @@ index 188172d..2cd8443 100644
dnl Use --enable-gold to decide if this linker should be the default.
dnl "install_as_default" is set to false if gold is the default linker.
dnl "installed_linker" is the installed BFD linker name.
-diff --git a/ld/ld.h b/ld/ld.h
-index d84ec4e..3476b26 100644
--- a/ld/ld.h
+++ b/ld/ld.h
-@@ -169,6 +169,14 @@ typedef struct {
+@@ -172,6 +172,14 @@
/* If set, display the target memory usage (per memory region). */
bfd_boolean print_memory_usage;
@@ -153,11 +157,9 @@ index d84ec4e..3476b26 100644
/* Big or little endian as set on command line. */
enum endian_enum endian;
-diff --git a/ld/ld.texinfo b/ld/ld.texinfo
-index 1dd7492..fb1438e 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
-@@ -2357,6 +2357,18 @@ string identifying the original linked file does not change.
+@@ -2401,6 +2401,18 @@
Passing @code{none} for @var{style} disables the setting from any
@code{--build-id} options earlier on the command line.
@@ -176,11 +178,9 @@ index 1dd7492..fb1438e 100644
@end table
@c man end
-diff --git a/ld/ldfile.c b/ld/ldfile.c
-index 96f9ecc..af231c0 100644
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
-@@ -114,6 +114,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
+@@ -114,6 +114,23 @@
new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL);
else
new_dirs->name = xstrdup (name);
@@ -204,11 +204,9 @@ index 96f9ecc..af231c0 100644
}
/* Try to open a BFD for a lang_input_statement. */
-diff --git a/ld/ldlex.h b/ld/ldlex.h
-index 6f11e7b..0ca3110 100644
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
-@@ -144,6 +144,8 @@ enum option_values
+@@ -146,6 +146,8 @@
OPTION_PRINT_MEMORY_USAGE,
OPTION_REQUIRE_DEFINED_SYMBOL,
OPTION_ORPHAN_HANDLING,
@@ -217,11 +215,9 @@ index 6f11e7b..0ca3110 100644
};
/* The initial parser states. */
-diff --git a/ld/ldmain.c b/ld/ldmain.c
-index bb0b9cc..a23c56c 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
-@@ -257,6 +257,8 @@ main (int argc, char **argv)
+@@ -270,6 +270,8 @@
command_line.warn_mismatch = TRUE;
command_line.warn_search_mismatch = TRUE;
command_line.check_section_addresses = -1;
@@ -230,11 +226,9 @@ index bb0b9cc..a23c56c 100644
/* We initialize DEMANGLING based on the environment variable
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
-diff --git a/ld/lexsup.c b/ld/lexsup.c
-index 4cad209..be7d584 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
-@@ -530,6 +530,14 @@ static const struct ld_option ld_options[] =
+@@ -535,6 +535,14 @@
{ {"orphan-handling", required_argument, NULL, OPTION_ORPHAN_HANDLING},
'\0', N_("=MODE"), N_("Control how orphan sections are handled."),
TWO_DASHES },
@@ -249,7 +243,7 @@ index 4cad209..be7d584 100644
};
#define OPTION_COUNT ARRAY_SIZE (ld_options)
-@@ -542,6 +550,7 @@ parse_args (unsigned argc, char **argv)
+@@ -547,6 +555,7 @@
int ingroup = 0;
char *default_dirlist = NULL;
char *shortopts;
@@ -257,7 +251,7 @@ index 4cad209..be7d584 100644
struct option *longopts;
struct option *really_longopts;
int last_optind;
-@@ -1516,6 +1525,14 @@ parse_args (unsigned argc, char **argv)
+@@ -1528,6 +1537,14 @@
}
break;
@@ -272,7 +266,7 @@ index 4cad209..be7d584 100644
case OPTION_PUSH_STATE:
input_flags.pushed = xmemdup (&input_flags,
sizeof (input_flags),
-@@ -1559,6 +1576,10 @@ parse_args (unsigned argc, char **argv)
+@@ -1571,6 +1588,10 @@
command_line.soname = NULL;
}
diff --git a/packages/binutils/2.29.1/120-sh-conf.patch b/packages/binutils/2.29.1/0000-sh-conf.patch
index 65fbcb0..fd814d2 100644
--- a/packages/binutils/2.29.1/120-sh-conf.patch
+++ b/packages/binutils/2.29.1/0000-sh-conf.patch
@@ -5,11 +5,14 @@ fix that up too.. now we're able to actually build a real toolchain for
sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more
inept targets than that one, really. Go look, I promise).
-diff --git a/configure b/configure
-index 87677bc..2d916f1 100755
+---
+ configure | 2 +-
+ configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
--- a/configure
+++ b/configure
-@@ -3812,7 +3812,7 @@ case "${target}" in
+@@ -3844,7 +3844,7 @@
or1k*-*-*)
noconfigdirs="$noconfigdirs gdb"
;;
@@ -18,11 +21,9 @@ index 87677bc..2d916f1 100755
case "${target}" in
sh*-*-elf)
;;
-diff --git a/configure.ac b/configure.ac
-index 8fe0eca..b10a99f 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1140,7 +1140,7 @@ case "${target}" in
+@@ -1178,7 +1178,7 @@
or1k*-*-*)
noconfigdirs="$noconfigdirs gdb"
;;
diff --git a/packages/binutils/2.29.1/0001-001_ld_makefile_patch.patch b/packages/binutils/2.29.1/0001-001_ld_makefile_patch.patch
new file mode 100644
index 0000000..4623653
--- /dev/null
+++ b/packages/binutils/2.29.1/0001-001_ld_makefile_patch.patch
@@ -0,0 +1,27 @@
+---
+ ld/Makefile.am | 2 +-
+ ld/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/ld/Makefile.am
++++ b/ld/Makefile.am
+@@ -57,7 +57,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- a/ld/Makefile.in
++++ b/ld/Makefile.in
+@@ -446,7 +446,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/packages/binutils/2.29.1/300-012_check_ldrunpath_length.patch b/packages/binutils/2.29.1/0002-012_check_ldrunpath_length.patch
index c1d5a97..9bdc413 100644
--- a/packages/binutils/2.29.1/300-012_check_ldrunpath_length.patch
+++ b/packages/binutils/2.29.1/0002-012_check_ldrunpath_length.patch
@@ -1,8 +1,10 @@
-diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
-index 137446f..bb8391a 100644
+---
+ ld/emultempl/elf32.em | 4 ++++
+ 1 file changed, 4 insertions(+)
+
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
-@@ -1195,6 +1195,8 @@ fragment <<EOF
+@@ -1463,6 +1463,8 @@
&& command_line.rpath == NULL)
{
path = (const char *) getenv ("LD_RUN_PATH");
@@ -11,7 +13,7 @@ index 137446f..bb8391a 100644
if (path
&& gld${EMULATION_NAME}_search_needed (path, &n, force))
break;
-@@ -1458,6 +1460,8 @@ gld${EMULATION_NAME}_before_allocation (void)
+@@ -1740,6 +1742,8 @@
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
diff --git a/packages/binutils/2.28.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch b/packages/binutils/2.29.1/0003-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
index 2956385..99dee96 100644
--- a/packages/binutils/2.28.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
+++ b/packages/binutils/2.29.1/0003-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
@@ -1,5 +1,9 @@
---- binutils-2.27/gold/gold-threads.cc.orig 2016-12-26 16:44:23.691075600 +1100
-+++ binutils-2.27/gold/gold-threads.cc 2016-12-26 16:46:21.071855200 +1100
+---
+ gold/gold-threads.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/gold/gold-threads.cc
++++ b/gold/gold-threads.cc
@@ -101,7 +101,7 @@
int err = pthread_mutexattr_init(&attr);
if (err != 0)
diff --git a/packages/binutils/2.29.1/330-Dont-link-to-libfl-as-its-unnecessary.patch b/packages/binutils/2.29.1/0004-Dont-link-to-libfl-as-its-unnecessary.patch
index 4eaa700..cb7af68 100644
--- a/packages/binutils/2.29.1/330-Dont-link-to-libfl-as-its-unnecessary.patch
+++ b/packages/binutils/2.29.1/0004-Dont-link-to-libfl-as-its-unnecessary.patch
@@ -1,8 +1,15 @@
-diff --git a/binutils/configure b/binutils/configure
-index 6e1f21e..78bf4ae 100755
+---
+ binutils/configure | 3 +++
+ binutils/configure.ac | 3 +++
+ gas/configure | 3 +++
+ gas/configure.ac | 3 +++
+ ld/configure | 3 +++
+ ld/configure.ac | 3 +++
+ 6 files changed, 18 insertions(+)
+
--- a/binutils/configure
+++ b/binutils/configure
-@@ -12106,6 +12106,7 @@
+@@ -12150,6 +12150,7 @@
done
test -n "$YACC" || YACC="yacc"
@@ -10,7 +17,7 @@ index 6e1f21e..78bf4ae 100755
for ac_prog in flex lex
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
-@@ -12267,6 +12268,8 @@
+@@ -12311,6 +12312,8 @@
if test "$LEX" = :; then
LEX=${am_missing_run}flex
fi
@@ -19,8 +26,6 @@ index 6e1f21e..78bf4ae 100755
ALL_LINGUAS="bg da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr ca"
# If we haven't got the data from the intl directory,
-diff --git a/binutils/configure.ac b/binutils/configure.ac
-index defe781..8fd236a 100644
--- a/binutils/configure.ac
+++ b/binutils/configure.ac
@@ -87,7 +87,10 @@
@@ -34,11 +39,9 @@ index defe781..8fd236a 100644
ALL_LINGUAS="bg da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr ca"
ZW_GNU_GETTEXT_SISTER_DIR
-diff --git a/gas/configure b/gas/configure
-index f959e95..9bb4043 100755
--- a/gas/configure
+++ b/gas/configure
-@@ -12819,6 +12819,7 @@ fi
+@@ -13002,6 +13002,7 @@
done
test -n "$YACC" || YACC="yacc"
@@ -46,7 +49,7 @@ index f959e95..9bb4043 100755
for ac_prog in flex lex
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
-@@ -12980,6 +12981,8 @@ esac
+@@ -13163,6 +13164,8 @@
if test "$LEX" = :; then
LEX=${am_missing_run}flex
fi
@@ -55,11 +58,9 @@ index f959e95..9bb4043 100755
ALL_LINGUAS="fr tr es rw id ru fi ja zh_CN sv"
# If we haven't got the data from the intl directory,
-diff --git a/gas/configure.ac b/gas/configure.ac
-index 07f825d..c552b7e 100644
--- a/gas/configure.ac
+++ b/gas/configure.ac
-@@ -734,7 +734,10 @@ AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}", [Target vendor.])
+@@ -794,7 +794,10 @@
AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}", [Target OS.])
AC_PROG_YACC
@@ -70,11 +71,9 @@ index 07f825d..c552b7e 100644
ALL_LINGUAS="fr tr es rw id ru fi ja zh_CN sv"
ZW_GNU_GETTEXT_SISTER_DIR
-diff --git a/ld/configure b/ld/configure
-index a446283..1a6bf81 100755
--- a/ld/configure
+++ b/ld/configure
-@@ -16087,6 +16087,7 @@ fi
+@@ -16191,6 +16191,7 @@
done
test -n "$YACC" || YACC="yacc"
@@ -82,7 +81,7 @@ index a446283..1a6bf81 100755
for ac_prog in flex lex
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
-@@ -16248,6 +16249,8 @@ esac
+@@ -16352,6 +16353,8 @@
if test "$LEX" = :; then
LEX=${am_missing_run}flex
fi
@@ -91,11 +90,9 @@ index a446283..1a6bf81 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
-diff --git a/ld/configure.ac b/ld/configure.ac
-index 188172d..45eec53 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
-@@ -186,7 +186,10 @@ AM_PO_SUBDIRS
+@@ -208,7 +208,10 @@
AC_EXEEXT
AC_PROG_YACC
diff --git a/packages/binutils/2.28.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch b/packages/binutils/2.29.1/0005-Darwin-gold-binary-cc-include-string-not-cstring.patch
index e4f235b..fbc4041 100644
--- a/packages/binutils/2.28.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch
+++ b/packages/binutils/2.29.1/0005-Darwin-gold-binary-cc-include-string-not-cstring.patch
@@ -1,5 +1,7 @@
-diff --git a/gold/binary.cc b/gold/binary.cc
-index 52df81a..03a8f20 100644
+---
+ gold/binary.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
--- a/gold/binary.cc
+++ b/gold/binary.cc
@@ -23,7 +23,7 @@
diff --git a/packages/binutils/2.29.1/0006-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch b/packages/binutils/2.29.1/0006-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
new file mode 100644
index 0000000..f4dc91a
--- /dev/null
+++ b/packages/binutils/2.29.1/0006-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
@@ -0,0 +1,70 @@
+From c39479f4ab4d372b518957871e1f205a03e7c3d6 Mon Sep 17 00:00:00 2001
+From: Andrew Hsieh <andrewhsieh@google.com>
+Date: Wed, 18 Mar 2015 10:57:24 +0800
+Subject: [PATCH] Fix darwin build
+
+1. In Drawin PTHREAD_ONCE_INIT is {0x30B1BCBA, {0}} and the GCC < 4.4
+ doesn't support ended initializer list
+2. wcsncasecmp doesn't exist in MacSDK10.6.x
+
+Change-Id: I69204a72f853f5263dffedc448379d75ed4eca2e
+---
+ bfd/peXXigen.c | 22 ++++++++++++++++++++++
+ gold/gold-threads.cc | 15 ++++++++++++---
+ 2 files changed, 34 insertions(+), 3 deletions(-)
+
+--- a/bfd/peXXigen.c
++++ b/bfd/peXXigen.c
+@@ -3609,6 +3609,28 @@
+ }
+ #endif /* HAVE_WCHAR_H and not Cygwin/Mingw */
+
++#if defined __APPLE__ && __DARWIN_C_LEVEL < 200809L
++/* wcsncasecmp isn't always defined in Mac SDK */
++static int
++wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n)
++{
++ wchar_t c1, c2;
++
++ if (n == 0)
++ return (0);
++ for (; *s1; s1++, s2++)
++ {
++ c1 = towlower(*s1);
++ c2 = towlower(*s2);
++ if (c1 != c2)
++ return ((int)c1 - c2);
++ if (--n == 0)
++ return (0);
++ }
++ return (-*s2);
++}
++#endif
++
+ /* Perform a comparison of two entries. */
+ static signed int
+ rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b)
+--- a/gold/gold-threads.cc
++++ b/gold/gold-threads.cc
+@@ -284,9 +284,18 @@
+ class Once_initialize
+ {
+ public:
+- Once_initialize()
+- : once_(PTHREAD_ONCE_INIT)
+- { }
++ Once_initialize()
++#if !defined(__APPLE__)
++ : once_(PTHREAD_ONCE_INIT)
++ { }
++#else
++// In Drawin PTHREAD_ONCE_INIT is {0x30B1BCBA, {0}} and the GCC < 4.4 doesn't support
++// extended initializer list as above */
++ {
++ pthread_once_t once_2 = PTHREAD_ONCE_INIT;
++ once_ = once_2;
++ }
++#endif
+
+ // Return a pointer to the pthread_once_t variable.
+ pthread_once_t*
diff --git a/packages/binutils/2.29.1/500-sysroot.patch b/packages/binutils/2.29.1/0007-sysroot.patch
index 4cb9bc7..ba7940a 100644
--- a/packages/binutils/2.29.1/500-sysroot.patch
+++ b/packages/binutils/2.29.1/0007-sysroot.patch
@@ -5,9 +5,13 @@ Always try to prepend the sysroot prefix to absolute filenames first.
http://bugs.gentoo.org/275666
http://sourceware.org/bugzilla/show_bug.cgi?id=10340
+---
+ ld/ldfile.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
-@@ -336,18 +336,25 @@
+@@ -338,18 +338,25 @@
directory first. */
if (!entry->flags.maybe_archive)
{
diff --git a/packages/binutils/2.29.1/600-poison-system-directories.patch b/packages/binutils/2.29.1/0008-poison-system-directories.patch
index a0a4a30..242b8ba 100644
--- a/packages/binutils/2.29.1/600-poison-system-directories.patch
+++ b/packages/binutils/2.29.1/0008-poison-system-directories.patch
@@ -59,11 +59,21 @@ Code Merged from Sourcery G++ binutils 2.19 - 4.4-277
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-diff --git a/ld/config.in b/ld/config.in
-index 276fb77..35c58eb 100644
+---
+ ld/config.in | 3 +++
+ ld/configure | 14 ++++++++++++++
+ ld/configure.ac | 10 ++++++++++
+ ld/ld.h | 8 ++++++++
+ ld/ld.texinfo | 12 ++++++++++++
+ ld/ldfile.c | 17 +++++++++++++++++
+ ld/ldlex.h | 2 ++
+ ld/ldmain.c | 2 ++
+ ld/lexsup.c | 21 +++++++++++++++++++++
+ 9 files changed, 89 insertions(+)
+
--- a/ld/config.in
+++ b/ld/config.in
-@@ -17,6 +17,9 @@
+@@ -21,6 +21,9 @@
language is requested. */
#undef ENABLE_NLS
@@ -73,11 +83,9 @@ index 276fb77..35c58eb 100644
/* Additional extension a shared object might have. */
#undef EXTRA_SHLIB_EXTENSION
-diff --git a/ld/configure b/ld/configure
-index a446283..d1f9504 100755
--- a/ld/configure
+++ b/ld/configure
-@@ -788,6 +788,7 @@ with_lib_path
+@@ -785,6 +785,7 @@
enable_targets
enable_64_bit_bfd
with_sysroot
@@ -85,7 +93,7 @@ index a446283..d1f9504 100755
enable_gold
enable_got
enable_compressed_debug_sections
-@@ -1445,6 +1446,8 @@ Optional Features:
+@@ -1443,6 +1444,8 @@
--disable-largefile omit support for large files
--enable-targets alternative target configurations
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
@@ -94,7 +102,7 @@ index a446283..d1f9504 100755
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
--enable-got=<type> GOT handling scheme (target, single, negative,
multigot)
-@@ -15498,7 +15501,18 @@ else
+@@ -15497,7 +15500,18 @@
fi
@@ -113,11 +121,9 @@ index a446283..d1f9504 100755
# Check whether --enable-got was given.
if test "${enable_got+set}" = set; then :
-diff --git a/ld/configure.ac b/ld/configure.ac
-index 188172d..2cd8443 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
-@@ -95,6 +95,16 @@ AC_SUBST(use_sysroot)
+@@ -95,6 +95,16 @@
AC_SUBST(TARGET_SYSTEM_ROOT)
AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
@@ -134,11 +140,9 @@ index 188172d..2cd8443 100644
dnl Use --enable-gold to decide if this linker should be the default.
dnl "install_as_default" is set to false if gold is the default linker.
dnl "installed_linker" is the installed BFD linker name.
-diff --git a/ld/ld.h b/ld/ld.h
-index d84ec4e..3476b26 100644
--- a/ld/ld.h
+++ b/ld/ld.h
-@@ -169,6 +169,14 @@ typedef struct {
+@@ -172,6 +172,14 @@
/* If set, display the target memory usage (per memory region). */
bfd_boolean print_memory_usage;
@@ -153,11 +157,9 @@ index d84ec4e..3476b26 100644
/* Should we force section groups to be resolved? Controlled with
--force-group-allocation on the command line or FORCE_GROUP_ALLOCATION
in the linker script. */
-diff --git a/ld/ld.texinfo b/ld/ld.texinfo
-index 1dd7492..fb1438e 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
-@@ -2357,6 +2357,18 @@ string identifying the original linked file does not change.
+@@ -2480,6 +2480,18 @@
Passing @code{none} for @var{style} disables the setting from any
@code{--build-id} options earlier on the command line.
@@ -176,12 +178,10 @@ index 1dd7492..fb1438e 100644
@end table
@c man end
-diff --git a/ld/ldfile.c b/ld/ldfile.c
-index 96f9ecc..af231c0 100644
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
-@@ -114,6 +114,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
- new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL);
+@@ -116,6 +116,23 @@
+ new_dirs->name = concat (ld_sysroot, name + strlen ("$SYSROOT"), (const char *) NULL);
else
new_dirs->name = xstrdup (name);
+
@@ -204,11 +204,9 @@ index 96f9ecc..af231c0 100644
}
/* Try to open a BFD for a lang_input_statement. */
-diff --git a/ld/ldlex.h b/ld/ldlex.h
-index 6f11e7b..0ca3110 100644
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
-@@ -144,6 +144,8 @@ enum option_values
+@@ -147,6 +147,8 @@
OPTION_REQUIRE_DEFINED_SYMBOL,
OPTION_ORPHAN_HANDLING,
OPTION_FORCE_GROUP_ALLOCATION,
@@ -217,11 +215,9 @@ index 6f11e7b..0ca3110 100644
};
/* The initial parser states. */
-diff --git a/ld/ldmain.c b/ld/ldmain.c
-index bb0b9cc..a23c56c 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
-@@ -257,6 +257,8 @@ main (int argc, char **argv)
+@@ -270,6 +270,8 @@
command_line.warn_mismatch = TRUE;
command_line.warn_search_mismatch = TRUE;
command_line.check_section_addresses = -1;
@@ -230,11 +226,9 @@ index bb0b9cc..a23c56c 100644
/* We initialize DEMANGLING based on the environment variable
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
-diff --git a/ld/lexsup.c b/ld/lexsup.c
-index 4cad209..be7d584 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
-@@ -530,6 +530,14 @@ static const struct ld_option ld_options[] =
+@@ -538,6 +538,14 @@
{ {"orphan-handling", required_argument, NULL, OPTION_ORPHAN_HANDLING},
'\0', N_("=MODE"), N_("Control how orphan sections are handled."),
TWO_DASHES },
@@ -249,7 +243,7 @@ index 4cad209..be7d584 100644
};
#define OPTION_COUNT ARRAY_SIZE (ld_options)
-@@ -542,6 +550,7 @@ parse_args (unsigned argc, char **argv)
+@@ -550,6 +558,7 @@
int ingroup = 0;
char *default_dirlist = NULL;
char *shortopts;
@@ -257,7 +251,7 @@ index 4cad209..be7d584 100644
struct option *longopts;
struct option *really_longopts;
int last_optind;
-@@ -1516,6 +1525,14 @@ parse_args (unsigned argc, char **argv)
+@@ -1534,6 +1543,14 @@
}
break;
@@ -272,7 +266,7 @@ index 4cad209..be7d584 100644
case OPTION_PUSH_STATE:
input_flags.pushed = xmemdup (&input_flags,
sizeof (input_flags),
-@@ -1559,6 +1576,10 @@ parse_args (unsigned argc, char **argv)
+@@ -1577,6 +1594,10 @@
command_line.soname = NULL;
}
diff --git a/packages/binutils/2.29.1/300-001_ld_makefile_patch.patch b/packages/binutils/2.29.1/300-001_ld_makefile_patch.patch
deleted file mode 100644
index 2a1320c..0000000
--- a/packages/binutils/2.29.1/300-001_ld_makefile_patch.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/ld/Makefile.am b/ld/Makefile.am
-index 9575f1f..84df0bf 100644
---- a/ld/Makefile.am
-+++ b/ld/Makefile.am
-@@ -54,7 +54,7 @@ endif
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
-
- EMUL = @EMUL@
- EMULATION_OFILES = @EMULATION_OFILES@
-diff --git a/ld/Makefile.in b/ld/Makefile.in
-index 9f56ca1..272860f 100644
---- a/ld/Makefile.in
-+++ b/ld/Makefile.in
-@@ -388,7 +388,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
- BASEDIR = $(srcdir)/..
- BFDDIR = $(BASEDIR)/bfd
- INCDIR = $(BASEDIR)/include
diff --git a/packages/binutils/2.29.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch b/packages/binutils/2.29.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
deleted file mode 100644
index 6168b31..0000000
--- a/packages/binutils/2.29.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From c39479f4ab4d372b518957871e1f205a03e7c3d6 Mon Sep 17 00:00:00 2001
-From: Andrew Hsieh <andrewhsieh@google.com>
-Date: Wed, 18 Mar 2015 10:57:24 +0800
-Subject: [PATCH] Fix darwin build
-
-1. In Drawin PTHREAD_ONCE_INIT is {0x30B1BCBA, {0}} and the GCC < 4.4
- doesn't support ended initializer list
-2. wcsncasecmp doesn't exist in MacSDK10.6.x
-
-Change-Id: I69204a72f853f5263dffedc448379d75ed4eca2e
----
- binutils-2.25/bfd/peXXigen.c | 22 ++++++++++++++++++++++
- binutils-2.25/gold/gold-threads.cc | 15 ++++++++++++---
- 2 files changed, 34 insertions(+), 3 deletions(-)
-
-diff --git binutils-2.25.orig/bfd/peXXigen.c binutils-2.25/bfd/peXXigen.c
-index 13e39e4..7a98306 100644
---- binutils-2.25.orig/bfd/peXXigen.c
-+++ binutils-2.25/bfd/peXXigen.c
-@@ -3522,6 +3522,28 @@ u16_mbtouc (wchar_t * puc, const unsigned short * s, unsigned int n)
- }
- #endif /* HAVE_WCHAR_H and not Cygwin/Mingw */
-
-+#if defined __APPLE__ && __DARWIN_C_LEVEL < 200809L
-+/* wcsncasecmp isn't always defined in Mac SDK */
-+static int
-+wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n)
-+{
-+ wchar_t c1, c2;
-+
-+ if (n == 0)
-+ return (0);
-+ for (; *s1; s1++, s2++)
-+ {
-+ c1 = towlower(*s1);
-+ c2 = towlower(*s2);
-+ if (c1 != c2)
-+ return ((int)c1 - c2);
-+ if (--n == 0)
-+ return (0);
-+ }
-+ return (-*s2);
-+}
-+#endif
-+
- /* Perform a comparison of two entries. */
- static signed int
- rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b)
-diff --git binutils-2.25.orig/gold/gold-threads.cc binutils-2.25/gold/gold-threads.cc
-index ff5a8ac..45140e0 100644
---- binutils-2.25.orig/gold/gold-threads.cc
-+++ binutils-2.25/gold/gold-threads.cc
-@@ -284,9 +284,18 @@ Condvar::~Condvar()
- class Once_initialize
- {
- public:
-- Once_initialize()
-- : once_(PTHREAD_ONCE_INIT)
-- { }
-+ Once_initialize()
-+#if !defined(__APPLE__)
-+ : once_(PTHREAD_ONCE_INIT)
-+ { }
-+#else
-+// In Drawin PTHREAD_ONCE_INIT is {0x30B1BCBA, {0}} and the GCC < 4.4 doesn't support
-+// extended initializer list as above */
-+ {
-+ pthread_once_t once_2 = PTHREAD_ONCE_INIT;
-+ once_ = once_2;
-+ }
-+#endif
-
- // Return a pointer to the pthread_once_t variable.
- pthread_once_t*
---
-2.1.3
-