summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/binutils')
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.25.1.inc43
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.28.inc45
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross-canadian.inc1
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross-canadian_2.28.bb (renamed from meta/recipes-devtools/binutils/binutils-cross-canadian_2.25.1.bb)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross.inc8
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross_2.28.bb (renamed from meta/recipes-devtools/binutils/binutils-cross_2.25.1.bb)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-crosssdk_2.28.bb (renamed from meta/recipes-devtools/binutils/binutils-crosssdk_2.25.1.bb)4
-rw-r--r--meta/recipes-devtools/binutils/binutils.inc22
-rw-r--r--meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch (renamed from meta/recipes-devtools/binutils/binutils/0001-Generate-relocatable-SDKs.patch)16
-rw-r--r--meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch61
-rw-r--r--meta/recipes-devtools/binutils/binutils/0002-configure-widen-the-regexp-for-SH-architectures.patch56
-rw-r--r--meta/recipes-devtools/binutils/binutils/0003-gprof-add-uclibc-support-to-configure.patch31
-rw-r--r--meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch (renamed from meta/recipes-devtools/binutils/binutils/0003-Point-scripts-location-to-libdir.patch)14
-rw-r--r--meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch (renamed from meta/recipes-devtools/binutils/binutils/0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch)12
-rw-r--r--meta/recipes-devtools/binutils/binutils/0006-Explicitly-link-with-libm-on-uclibc.patch (renamed from meta/recipes-devtools/binutils/binutils/0005-Explicitly-link-with-libm-on-uclibc.patch)12
-rw-r--r--meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch (renamed from meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch)3068
-rw-r--r--meta/recipes-devtools/binutils/binutils/0008-Add-the-armv5e-architecture-to-binutils.patch (renamed from meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch)10
-rw-r--r--meta/recipes-devtools/binutils/binutils/0009-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch (renamed from meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch)10
-rw-r--r--meta/recipes-devtools/binutils/binutils/0010-warn-for-uses-of-system-directories-when-cross-linki.patch (renamed from meta/recipes-devtools/binutils/binutils/0009-Upstream-Status-Inappropriate-distribution-codesourc.patch)93
-rw-r--r--meta/recipes-devtools/binutils/binutils/0011-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch (renamed from meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch)8
-rw-r--r--meta/recipes-devtools/binutils/binutils/0012-Change-default-emulation-for-mips64-linux.patch (renamed from meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch)14
-rw-r--r--meta/recipes-devtools/binutils/binutils/0013-Add-support-for-Netlogic-XLP.patch (renamed from meta/recipes-devtools/binutils/binutils/0012-Add-XLP-instructions-support.patch)169
-rw-r--r--meta/recipes-devtools/binutils/binutils/0013-Fix-an-internal-error-in-do_print_to_mapfile-seen-wi.patch35
-rw-r--r--meta/recipes-devtools/binutils/binutils/0014-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch36
-rw-r--r--meta/recipes-devtools/binutils/binutils/0014-gold-arm-Skip-pic-check-for-R_ARM_REL32.patch25
-rw-r--r--meta/recipes-devtools/binutils/binutils/0015-Fix-dynamic-list-so-that-symbols-not-in-the-list-are.patch131
-rw-r--r--meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch89
-rw-r--r--meta/recipes-devtools/binutils/binutils/0016-Detect-64-bit-MIPS-targets.patch50
-rw-r--r--meta/recipes-devtools/binutils/binutils/CVE-2017-6965.patch124
-rw-r--r--meta/recipes-devtools/binutils/binutils/CVE-2017-6966.patch241
-rw-r--r--meta/recipes-devtools/binutils/binutils/add-thunderx-support-for-gas.patch33
-rw-r--r--meta/recipes-devtools/binutils/binutils/binutils-octeon3.patch272
-rw-r--r--meta/recipes-devtools/binutils/binutils_2.28.bb (renamed from meta/recipes-devtools/binutils/binutils_2.25.1.bb)8
33 files changed, 3292 insertions, 1449 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.25.1.inc b/meta/recipes-devtools/binutils/binutils-2.25.1.inc
deleted file mode 100644
index f3817fafb6..0000000000
--- a/meta/recipes-devtools/binutils/binutils-2.25.1.inc
+++ /dev/null
@@ -1,43 +0,0 @@
-LIC_FILES_CHKSUM="\
- file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
- file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
- file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
- file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
- file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
- file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
- file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
- file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
- file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
- "
-
-def binutils_branch_version(d):
- pvsplit = d.getVar('PV', True).split('.')
- return pvsplit[0] + "_" + pvsplit[1]
-
-BINUPV = "${@binutils_branch_version(d)}"
-
-SRCREV = "2bd25930221dea4bf33c13a89c111514491440e2"
-SRC_URI = "\
- git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git \
- file://0002-configure-widen-the-regexp-for-SH-architectures.patch \
- file://0003-Point-scripts-location-to-libdir.patch \
- file://0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
- file://0005-Explicitly-link-with-libm-on-uclibc.patch \
- file://0006-Use-libtool-2.4.patch \
- file://0007-Add-the-armv5e-architecture-to-binutils.patch \
- file://0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
- file://0009-Upstream-Status-Inappropriate-distribution-codesourc.patch \
- file://0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
- file://0011-Change-default-emulation-for-mips64-linux.patch \
- file://0012-Add-XLP-instructions-support.patch \
- file://0013-Fix-an-internal-error-in-do_print_to_mapfile-seen-wi.patch \
- file://0014-gold-arm-Skip-pic-check-for-R_ARM_REL32.patch \
- file://0015-Fix-dynamic-list-so-that-symbols-not-in-the-list-are.patch \
- file://binutils-octeon3.patch \
- file://add-thunderx-support-for-gas.patch \
- "
-S = "${WORKDIR}/git"
-
-do_configure_prepend () {
- rm -rf ${S}/gdb ${S}/libdecnumber ${S}/readline ${S}/sim
-}
diff --git a/meta/recipes-devtools/binutils/binutils-2.28.inc b/meta/recipes-devtools/binutils/binutils-2.28.inc
new file mode 100644
index 0000000000..7585da1ca9
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.28.inc
@@ -0,0 +1,45 @@
+LIC_FILES_CHKSUM="\
+ file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+ file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
+ file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+ file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
+ file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+ file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+ file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+ file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
+ file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+ "
+
+def binutils_branch_version(d):
+ pvsplit = d.getVar('PV').split('.')
+ return pvsplit[0] + "_" + pvsplit[1]
+
+BINUPV = "${@binutils_branch_version(d)}"
+
+UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
+
+SRCREV = "354199c7692c1bed53a2a15f0e4d531457e95f17"
+SRC_URI = "\
+ git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git \
+ file://0003-gprof-add-uclibc-support-to-configure.patch \
+ file://0004-Point-scripts-location-to-libdir.patch \
+ file://0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
+ file://0006-Explicitly-link-with-libm-on-uclibc.patch \
+ file://0007-Use-libtool-2.4.patch \
+ file://0008-Add-the-armv5e-architecture-to-binutils.patch \
+ file://0009-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
+ file://0010-warn-for-uses-of-system-directories-when-cross-linki.patch \
+ file://0011-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
+ file://0012-Change-default-emulation-for-mips64-linux.patch \
+ file://0013-Add-support-for-Netlogic-XLP.patch \
+ file://0014-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
+ file://0015-sync-with-OE-libtool-changes.patch \
+ file://0016-Detect-64-bit-MIPS-targets.patch \
+ file://CVE-2017-6965.patch \
+ file://CVE-2017-6966.patch \
+"
+S = "${WORKDIR}/git"
+
+do_configure_prepend () {
+ rm -rf ${S}/gdb ${S}/libdecnumber ${S}/readline ${S}/sim
+}
diff --git a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
index ae14642272..b3d591e658 100644
--- a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
+++ b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
@@ -6,6 +6,7 @@ BPN = "binutils"
DEPENDS = "flex-native bison-native virtual/${HOST_PREFIX}gcc-crosssdk virtual/nativesdk-libc nativesdk-zlib nativesdk-gettext nativesdk-flex"
EXTRA_OECONF += "--with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \
+ --enable-poison-system-directories \
"
# We have to point binutils at a sysroot but we don't need to rebuild if this changes
diff --git a/meta/recipes-devtools/binutils/binutils-cross-canadian_2.25.1.bb b/meta/recipes-devtools/binutils/binutils-cross-canadian_2.28.bb
index 5dbaa03017..5dbaa03017 100644
--- a/meta/recipes-devtools/binutils/binutils-cross-canadian_2.25.1.bb
+++ b/meta/recipes-devtools/binutils/binutils-cross-canadian_2.28.bb
diff --git a/meta/recipes-devtools/binutils/binutils-cross.inc b/meta/recipes-devtools/binutils/binutils-cross.inc
index fd3d801491..02ec891606 100644
--- a/meta/recipes-devtools/binutils/binutils-cross.inc
+++ b/meta/recipes-devtools/binutils/binutils-cross.inc
@@ -4,12 +4,20 @@ PROVIDES = "virtual/${TARGET_PREFIX}binutils"
PN = "binutils-cross-${TARGET_ARCH}"
BPN = "binutils"
+# Ignore how TARGET_ARCH is computed.
+TARGET_ARCH[vardepvalue] = "${TARGET_ARCH}"
+
INHIBIT_DEFAULT_DEPS = "1"
INHIBIT_AUTOTOOLS_DEPS = "1"
+SRC_URI += "file://0002-binutils-cross-Do-not-generate-linker-script-directo.patch"
+
+# Specify lib-path else we use a load of search dirs which we don't use
+# and mean the linker scripts have to be relocated.
EXTRA_OECONF += "--with-sysroot=${STAGING_DIR_TARGET} \
--disable-install-libbfd \
--enable-poison-system-directories \
+ --with-lib-path==${target_base_libdir}:=${target_libdir} \
"
do_install () {
oe_runmake 'DESTDIR=${D}' install
diff --git a/meta/recipes-devtools/binutils/binutils-cross_2.25.1.bb b/meta/recipes-devtools/binutils/binutils-cross_2.28.bb
index fbd1f7d25a..fbd1f7d25a 100644
--- a/meta/recipes-devtools/binutils/binutils-cross_2.25.1.bb
+++ b/meta/recipes-devtools/binutils/binutils-cross_2.28.bb
diff --git a/meta/recipes-devtools/binutils/binutils-crosssdk_2.25.1.bb b/meta/recipes-devtools/binutils/binutils-crosssdk_2.28.bb
index 788106f9e7..37f4d6d2e9 100644
--- a/meta/recipes-devtools/binutils/binutils-crosssdk_2.25.1.bb
+++ b/meta/recipes-devtools/binutils/binutils-crosssdk_2.28.bb
@@ -2,11 +2,11 @@ require binutils-cross_${PV}.bb
inherit crosssdk
-PN = "binutils-crosssdk-${TARGET_ARCH}"
+PN = "binutils-crosssdk-${SDK_SYS}"
PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk"
-SRC_URI += "file://0001-Generate-relocatable-SDKs.patch"
+SRC_URI += "file://0001-binutils-crosssdk-Generate-relocatable-SDKs.patch"
do_configure_prepend () {
sed -i 's#/usr/local/lib /lib /usr/lib#${SDKPATHNATIVE}/lib ${SDKPATHNATIVE}/usr/lib /usr/local/lib /lib /usr/lib#' ${S}/ld/configure.tgt
diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
index a304867d2c..7efe13fdf6 100644
--- a/meta/recipes-devtools/binutils/binutils.inc
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -13,6 +13,12 @@ LICENSE = "GPLv3"
DEPENDS = "flex-native bison-native zlib-native gnu-config-native autoconf-native"
+#
+# we need chrpath > 0.14 and some distros like centos 7 still have older chrpath
+#
+DEPENDS_append_class-target = " chrpath-replacement-native"
+EXTRANATIVEPATH_append_class-target = " chrpath-native"
+
inherit autotools gettext multilib_header texinfo
FILES_${PN} = " \
@@ -53,27 +59,27 @@ USE_ALTERNATIVES_FOR = " \
"
python do_package_prepend() {
- make_alts = d.getVar("USE_ALTERNATIVES_FOR", True) or ""
- prefix = d.getVar("TARGET_PREFIX", True)
- bindir = d.getVar("bindir", True)
+ make_alts = d.getVar("USE_ALTERNATIVES_FOR") or ""
+ prefix = d.getVar("TARGET_PREFIX")
+ bindir = d.getVar("bindir")
for alt in make_alts.split():
d.setVarFlag('ALTERNATIVE_TARGET', alt, bindir + "/" + prefix + alt)
d.setVarFlag('ALTERNATIVE_LINK_NAME', alt, bindir + "/" + alt)
}
-# FILES_${PN}-dbg = "${prefix}/${TARGET_SYS}/bin/.debug ${prefix}/${libdir}/.debug"
-
B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
--disable-werror \
+ --enable-deterministic-archives \
--enable-plugins \
${LDGOLD} \
${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}"
LDGOLD_class-native = ""
LDGOLD_class-crosssdk = ""
-LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default', d)}"
+LDGOLD_sdkmingw32 = ""
+LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default --enable-threads', d)}"
# This is necessary due to a bug in the binutils Makefiles
# EXTRA_OEMAKE = "configure-build-libiberty all"
@@ -113,6 +119,10 @@ do_configure () {
done
}
+do_compile_append_class-target() {
+ chrpath -d ${B}/binutils/elfedit
+ chrpath -d ${B}/binutils/readelf
+}
do_install () {
autotools_do_install
diff --git a/meta/recipes-devtools/binutils/binutils/0001-Generate-relocatable-SDKs.patch b/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
index 1e80c1f791..8fb1b4edea 100644
--- a/meta/recipes-devtools/binutils/binutils/0001-Generate-relocatable-SDKs.patch
+++ b/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
@@ -1,7 +1,7 @@
-From f71ecf251f84b4bbc9b7a832d5cd4a8bae95d83b Mon Sep 17 00:00:00 2001
+From 689d011688b5ff9481d4367bef3dea7a7b2867fb Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:58:54 +0000
-Subject: [PATCH 01/13] Generate relocatable SDKs
+Subject: [PATCH 01/15] binutils-crosssdk: Generate relocatable SDKs
This patch will modify the ELF linker scripts so that the crosssdk
linker will generate binaries with a 4096 bytes PT_INTERP section. When the binaries
@@ -18,7 +18,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
-index 499607a..075dd04 100755
+index b6940d376d..a42c4d7a4b 100755
--- a/ld/genscripts.sh
+++ b/ld/genscripts.sh
@@ -277,6 +277,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
@@ -43,12 +43,12 @@ index 499607a..075dd04 100755
LD_FLAG=
DATA_ALIGNMENT=${DATA_ALIGNMENT_}
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
-index 4368fd9..9f01e8c 100644
+index e65f9a3ccf..d99d2c1d2a 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
-@@ -131,8 +131,8 @@ if test -n "${COMMONPAGESIZE}"; then
- DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
- DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
+@@ -138,8 +138,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then
+ DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
+ fi
fi
-if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}"; then
- INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
@@ -58,5 +58,5 @@ index 4368fd9..9f01e8c 100644
if test -z "$PLT"; then
IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }"
--
-2.1.4
+2.12.0
diff --git a/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch b/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
new file mode 100644
index 0000000000..14299fd1ae
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
@@ -0,0 +1,61 @@
+From 7c7de107b4b0a507d2aeca3e3a86d01cb4b51360 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 6 Mar 2017 23:37:05 -0800
+Subject: [PATCH 02/15] binutils-cross: Do not generate linker script
+ directories
+
+We don't place target libraries within ${exec_prefix}, we'd always place these
+within the target sysroot within the standard library directories. Worse, the
+append_to_lib_path code prefixes these paths with the sysroot which makes even
+less sense.
+
+These directories therefore don't make sense in our case and mean we have to
+relocate all the linker scripts if they're present. Dropping them
+gives a reasonable performance improvement/simplification.
+
+Upstream-Status: Inappropriate
+
+RP 2017/01/30
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ld/genscripts.sh | 23 -----------------------
+ 1 file changed, 23 deletions(-)
+
+diff --git a/ld/genscripts.sh b/ld/genscripts.sh
+index a42c4d7a4b..d727b4d07e 100755
+--- a/ld/genscripts.sh
++++ b/ld/genscripts.sh
+@@ -189,29 +189,6 @@ append_to_lib_path()
+ fi
+ }
+
+-# Always search $(tooldir)/lib, aka /usr/local/TARGET/lib when native
+-# except when LIBPATH=":".
+-if [ "${LIB_PATH}" != ":" ] ; then
+- libs=
+- if [ "x${TOOL_LIB}" = "x" ] ; then
+- if [ "x${NATIVE}" = "xyes" ] ; then
+- libs="${exec_prefix}/${target_alias}/lib"
+- fi
+- else
+- # For multilib'ed targets, ensure both ${target_alias}/lib${LIBPATH_SUFFIX}
+- # and ${TOOL_LIB}/lib${LIBPATH_SUFFIX} are in the default search path,
+- # because 64bit libraries may be in both places, depending on
+- # cross-development setup method (e.g.: /usr/s390x-linux/lib64
+- # vs. /usr/s390-linux/lib64)
+- case "${NATIVE}:${LIBPATH_SUFFIX}:${TOOL_LIB}" in
+- :* | *::* | *:*:*${LIBPATH_SUFFIX}) ;;
+- *) libs="${exec_prefix}/${target_alias}/lib${LIBPATH_SUFFIX}" ;;
+- esac
+- libs="${exec_prefix}/${TOOL_LIB}/lib ${libs}"
+- fi
+- append_to_lib_path ${libs}
+-fi
+-
+ if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes ] ; then
+ libs=${NATIVE_LIB_DIRS}
+ if [ "x${NATIVE}" = "xyes" ] ; then
+--
+2.12.0
+
diff --git a/meta/recipes-devtools/binutils/binutils/0002-configure-widen-the-regexp-for-SH-architectures.patch b/meta/recipes-devtools/binutils/binutils/0002-configure-widen-the-regexp-for-SH-architectures.patch
deleted file mode 100644
index 34e21d144d..0000000000
--- a/meta/recipes-devtools/binutils/binutils/0002-configure-widen-the-regexp-for-SH-architectures.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From dfbcfb0d71765b337e63562299a943043928d2d2 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 01:07:33 +0000
-Subject: [PATCH 02/13] configure: widen the regexp for SH architectures
-
-gprof needs to know about uclibc
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure | 4 ++--
- gprof/configure | 5 +++++
- 2 files changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index 87677bc..e9f2f13 100755
---- a/configure
-+++ b/configure
-@@ -3341,7 +3341,7 @@ case "${target}" in
- ;;
- s390-*-* | s390x-*-*)
- ;;
-- sh-*-* | sh[34]*-*-*)
-+ sh*-*-* | sh[34]*-*-*)
- ;;
- sh64-*-* | sh5*-*-*)
- ;;
-@@ -3812,7 +3812,7 @@ case "${target}" in
- or1k*-*-*)
- noconfigdirs="$noconfigdirs gdb"
- ;;
-- sh-*-* | sh64-*-*)
-+ sh*-*-* | sh64-*-*)
- case "${target}" in
- sh*-*-elf)
- ;;
-diff --git a/gprof/configure b/gprof/configure
-index b09c8fb..79961c5 100755
---- a/gprof/configure
-+++ b/gprof/configure
-@@ -5869,6 +5869,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-+linux-uclibc*)
-+ lt_cv_deplibs_check_method=pass_all
-+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
-+ ;;
-+
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
---
-2.1.4
-
diff --git a/meta/recipes-devtools/binutils/binutils/0003-gprof-add-uclibc-support-to-configure.patch b/meta/recipes-devtools/binutils/binutils/0003-gprof-add-uclibc-support-to-configure.patch
new file mode 100644
index 0000000000..eddb42b4e3
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0003-gprof-add-uclibc-support-to-configure.patch
@@ -0,0 +1,31 @@
+From 7893d2b24d0303bda3a0049846489619ffd1387b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 2 Mar 2015 01:07:33 +0000
+Subject: [PATCH 03/15] gprof: add uclibc support to configure
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gprof/configure | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/gprof/configure b/gprof/configure
+index 9e6b8f3525..38a4c0b0e5 100755
+--- a/gprof/configure
++++ b/gprof/configure
+@@ -5874,6 +5874,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
++linux-uclibc*)
++ lt_cv_deplibs_check_method=pass_all
++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++ ;;
++
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+--
+2.12.0
+
diff --git a/meta/recipes-devtools/binutils/binutils/0003-Point-scripts-location-to-libdir.patch b/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch
index f5ce7674d4..c6b9de7991 100644
--- a/meta/recipes-devtools/binutils/binutils/0003-Point-scripts-location-to-libdir.patch
+++ b/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch
@@ -1,7 +1,7 @@
-From dfb1412da67bbfe3e993d107d0b5e392f44141ab Mon Sep 17 00:00:00 2001
+From e34650c50574a8a39d694567ed607a63006b6f99 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:09:58 +0000
-Subject: [PATCH 03/13] Point scripts location to libdir
+Subject: [PATCH 04/15] Point scripts location to libdir
Upstream-Status: Inappropriate [debian patch]
@@ -12,10 +12,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ld/Makefile.am b/ld/Makefile.am
-index 9575f1f..84df0bf 100644
+index 15beaa7021..bbf9c671d8 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
-@@ -54,7 +54,7 @@ endif
+@@ -57,7 +57,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.
@@ -25,10 +25,10 @@ index 9575f1f..84df0bf 100644
EMUL = @EMUL@
EMULATION_OFILES = @EMULATION_OFILES@
diff --git a/ld/Makefile.in b/ld/Makefile.in
-index 9f56ca1..272860f 100644
+index 042b690ed6..37e7b25e9a 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
-@@ -388,7 +388,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
+@@ -452,7 +452,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
# 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.
@@ -38,5 +38,5 @@ index 9f56ca1..272860f 100644
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
--
-2.1.4
+2.12.0
diff --git a/meta/recipes-devtools/binutils/binutils/0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch b/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
index e3cd2a4d64..726f7020dd 100644
--- a/meta/recipes-devtools/binutils/binutils/0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
+++ b/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
@@ -1,7 +1,7 @@
-From 3126608b8c95a792ade56cf62a531d935d391c50 Mon Sep 17 00:00:00 2001
+From 42292f5533bca904f230a8e03ceee1f84ef0c4ec Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:27:17 +0000
-Subject: [PATCH 04/13] Only generate an RPATH entry if LD_RUN_PATH is not
+Subject: [PATCH 05/15] Only generate an RPATH entry if LD_RUN_PATH is not
empty
for cases where -rpath isn't specified. debian (#151024)
@@ -15,10 +15,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 4 insertions(+)
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
-index 36dee8e..07bea52 100644
+index 84adaef6df..ab8c74257e 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
-@@ -1198,6 +1198,8 @@ fragment <<EOF
+@@ -1411,6 +1411,8 @@ fragment <<EOF
&& command_line.rpath == NULL)
{
lib_path = (const char *) getenv ("LD_RUN_PATH");
@@ -27,7 +27,7 @@ index 36dee8e..07bea52 100644
if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
force))
break;
-@@ -1461,6 +1463,8 @@ gld${EMULATION_NAME}_before_allocation (void)
+@@ -1692,6 +1694,8 @@ gld${EMULATION_NAME}_before_allocation (void)
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
@@ -37,5 +37,5 @@ index 36dee8e..07bea52 100644
for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
--
-2.1.4
+2.12.0
diff --git a/meta/recipes-devtools/binutils/binutils/0005-Explicitly-link-with-libm-on-uclibc.patch b/meta/recipes-devtools/binutils/binutils/0006-Explicitly-link-with-libm-on-uclibc.patch
index 9bbd93e972..9770ca7f0f 100644
--- a/meta/recipes-devtools/binutils/binutils/0005-Explicitly-link-with-libm-on-uclibc.patch
+++ b/meta/recipes-devtools/binutils/binutils/0006-Explicitly-link-with-libm-on-uclibc.patch
@@ -1,7 +1,7 @@
-From f1703bcc7a5c507e471e2630b5a2de129100315a Mon Sep 17 00:00:00 2001
+From 6a46bf151d7e53df8b5e7645a2d241967688368a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:32:49 +0000
-Subject: [PATCH 05/13] Explicitly link with libm on uclibc
+Subject: [PATCH 06/15] Explicitly link with libm on uclibc
Description:
@@ -31,10 +31,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 6 insertions(+)
diff --git a/gas/configure.tgt b/gas/configure.tgt
-index 9abc768..1d92f55 100644
+index 711d537e95..7cd2dc176a 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
-@@ -477,6 +477,12 @@ case ${generic_target} in
+@@ -494,6 +494,12 @@ case ${generic_target} in
*-*-netware) fmt=elf em=netware ;;
esac
@@ -45,8 +45,8 @@ index 9abc768..1d92f55 100644
+esac
+
case ${cpu_type} in
- aarch64 | alpha | arm | i386 | ia64 | microblaze | mips | ns32k | or1k | or1knd | pdp11 | ppc | sparc | z80 | z8k)
+ aarch64 | alpha | arm | i386 | ia64 | microblaze | mips | ns32k | or1k | or1knd | pdp11 | ppc | riscv | sparc | z80 | z8k)
bfd_gas=yes
--
-2.1.4
+2.12.0
diff --git a/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch b/meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch
index 62967efb19..6b7f753891 100644
--- a/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch
+++ b/meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch
@@ -1,35 +1,35 @@
-From 03eb9b4fe583e88a22fd8c25b43fbd9bafe21af6 Mon Sep 17 00:00:00 2001
+From 9a3651e120261c72090689ad770ad048b0baf506 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 01:34:41 +0000
-Subject: [PATCH 06/13] Use libtool 2.4
+Date: Mon, 6 Mar 2017 23:28:33 -0800
+Subject: [PATCH 07/15] Use libtool 2.4
-So we can get libtool sysroot support
-
-Upstream-Status: Pending
+get libtool sysroot support
Sig