binutils: Switch to using binutils stable/2.25 branch

We have a lot of patches on top of 2.25 release that we need
its easier/cleaner to use the git src instead of tarball and use
the latest on the 2.25 branch

Additionally, drop binutils-uclibc-300-006_better_file_error.patch
since it has been redone with
https://sourceware.org/ml/binutils/2006-10/msg00337.html upstream

git'ify the patches against upstream repos for better maintainance

Change-Id: I572c9bb49f60853e7ade4e8f63ab77b7e41476c5
(From OE-Core rev: 3c7fe424f850af70989ad682dd9c5be70cd02ca5)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj
2015-03-02 02:06:28 +00:00
committed by Richard Purdie
parent 1cb175fd7b
commit b559d7f81f
24 changed files with 11782 additions and 11748 deletions

View File

@@ -10,22 +10,30 @@ LIC_FILES_CHKSUM="\
file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
"
SRC_URI = "\
${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2 \
file://binutils-uclibc-100-uclibc-conf.patch \
file://binutils-uclibc-300-001_ld_makefile_patch.patch \
file://binutils-uclibc-300-006_better_file_error.patch \
file://binutils-uclibc-300-012_check_ldrunpath_length.patch \
file://binutils-uclibc-gas-needs-libm.patch \
file://libtool-2.4-update.patch \
file://libiberty_path_fix.patch \
file://binutils-poison.patch \
file://libtool-rpath-fix.patch \
file://binutils-armv5e.patch \
file://mips64-default-ld-emulation.patch \
file://binutils-xlp-support.patch \
file://0001-Fix-an-internal-error-in-do_print_to_mapfile-seen-wi.patch \
"
SRC_URI[md5sum] = "d9f3303f802a5b6b0bb73a335ab89d66"
SRC_URI[sha256sum] = "22defc65cfa3ef2a3395faaea75d6331c6e62ea5dfacfed3e2ec17b08c882923"
def binutils_branch_version(d):
pvsplit = d.getVar('PV', True).split('.')
return pvsplit[0] + "_" + pvsplit[1]
BINUPV = "${@binutils_branch_version(d)}"
SRCREV = "f2df1e49400f9e2d8d63a5d0fec9bf8c5c2b3342"
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 \
"
S = "${WORKDIR}/git"
do_configure_prepend () {
rm -rf ${S}/gdb ${S}/libdecnumber ${S}/readline ${S}/sim
}

View File

@@ -6,7 +6,7 @@ PN = "binutils-crosssdk-${TARGET_ARCH}"
PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk"
SRC_URI += "file://relocatable_sdk.patch"
SRC_URI += "file://0001-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

View File

@@ -1,31 +0,0 @@
Upstream-Status: Backport
From 0a09fb4a09e80c36fa3ef763ae276fd13d272a36 Mon Sep 17 00:00:00 2001
From: Hans-Peter Nilsson <hp@bitrange.com>
Date: Sat, 1 Feb 2014 01:11:28 +0100
Subject: [PATCH] Fix MMIX build breakage from bfd_set_section_vma change.
* emultempl/mmix-elfnmmo.em (mmix_after_allocation): Fix typo in
call to bfd_set_section_vma exposed by recent bfd_set_section_vma
change.
---
ld/ChangeLog | 6 ++++++
ld/emultempl/mmix-elfnmmo.em | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ld/emultempl/mmix-elfnmmo.em b/ld/emultempl/mmix-elfnmmo.em
index 0059792..5e9781a 100644
--- a/ld/emultempl/mmix-elfnmmo.em
+++ b/ld/emultempl/mmix-elfnmmo.em
@@ -102,7 +102,7 @@ mmix_after_allocation (void)
This section is only present when there are register symbols. */
sec = bfd_get_section_by_name (link_info.output_bfd, MMIX_REG_SECTION_NAME);
if (sec != NULL)
- bfd_set_section_vma (abfd, sec, 0);
+ bfd_set_section_vma (sec->owner, sec, 0);
if (!_bfd_mmix_after_linker_allocation (link_info.output_bfd, &link_info))
{
--
1.7.10.4

View File

@@ -1,17 +1,27 @@
From f71ecf251f84b4bbc9b7a832d5cd4a8bae95d83b 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
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
will be relocated, at SDK install time, the interpreter path can be easily
changed by the relocating script.
Upstream-Status: Inappropriate [SDK specific]
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 will
be relocated, at SDK install time, the interpreter path can be easily changed
by the relocating script.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
ld/genscripts.sh | 3 +++
ld/scripttempl/elf.sc | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
Index: binutils_git/ld/genscripts.sh
===================================================================
--- binutils_git.orig/ld/genscripts.sh 2012-11-21 11:58:23.325441925 +0200
+++ binutils_git/ld/genscripts.sh 2012-11-21 12:03:42.106815400 +0200
@@ -290,6 +290,7 @@
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
index 499607a..075dd04 100755
--- a/ld/genscripts.sh
+++ b/ld/genscripts.sh
@@ -277,6 +277,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
LD_FLAG=r
DATA_ALIGNMENT=${DATA_ALIGNMENT_r}
DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
@@ -19,7 +29,7 @@ Index: binutils_git/ld/genscripts.sh
( echo "/* Script for ld -r: link without relocation */"
. ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
@@ -298,10 +299,12 @@
@@ -285,10 +286,12 @@ DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
LD_FLAG=u
DATA_ALIGNMENT=${DATA_ALIGNMENT_u}
CONSTRUCTING=" "
@@ -32,11 +42,11 @@ Index: binutils_git/ld/genscripts.sh
LD_FLAG=
DATA_ALIGNMENT=${DATA_ALIGNMENT_}
Index: binutils_git/ld/scripttempl/elf.sc
===================================================================
--- binutils_git.orig/ld/scripttempl/elf.sc 2012-11-21 12:02:26.800377384 +0200
+++ binutils_git/ld/scripttempl/elf.sc 2012-11-21 12:04:16.166109621 +0200
@@ -124,8 +124,8 @@
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index 4368fd9..9f01e8c 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}, .);"
fi
@@ -47,3 +57,6 @@ Index: binutils_git/ld/scripttempl/elf.sc
fi
if test -z "$PLT"; then
IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }"
--
2.1.4

View File

@@ -0,0 +1,56 @@
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

View File

@@ -0,0 +1,42 @@
From dfb1412da67bbfe3e993d107d0b5e392f44141ab 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
Upstream-Status: Inappropriate [debian patch]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
ld/Makefile.am | 2 +-
ld/Makefile.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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
--
2.1.4

View File

@@ -0,0 +1,41 @@
From 3126608b8c95a792ade56cf62a531d935d391c50 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
empty
for cases where -rpath isn't specified. debian (#151024)
Upstream-Status: Pending
Signed-off-by: Chris Chimelis <chris@debian.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
ld/emultempl/elf32.em | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 36dee8e..07bea52 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1198,6 +1198,8 @@ fragment <<EOF
&& command_line.rpath == NULL)
{
lib_path = (const char *) getenv ("LD_RUN_PATH");
+ if ((lib_path) && (strlen (lib_path) == 0))
+ lib_path = NULL;
if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
force))
break;
@@ -1461,6 +1463,8 @@ gld${EMULATION_NAME}_before_allocation (void)
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
+ if ((rpath) && (strlen (rpath) == 0))
+ rpath = NULL;
for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
--
2.1.4

View File

@@ -0,0 +1,52 @@
From f1703bcc7a5c507e471e2630b5a2de129100315a 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
Description:
We do not need to have the libtool patch anymore for binutils after
libtool has been updated upstream it include support for it. However
for building gas natively on uclibc systems we have to link it with
-lm so that it picks up missing symbols.
/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o):
In function `floatformat_from_double':
floatformat.c:(.text+0x1ec): undefined reference to `frexp'
floatformat.c:(.text+0x2f8): undefined reference to `ldexp'
/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o):
In function `floatformat_to_double':
floatformat.c:(.text+0x38a): undefined reference to `ldexp'
floatformat.c:(.text+0x3d2): undefined reference to `ldexp'
floatformat.c:(.text+0x43e): undefined reference to `ldexp'
floatformat.c:(.text+0x4e2): undefined reference to `ldexp'
collect2: ld returned 1 exit status
make[4]: *** [as-new] Error 1
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
gas/configure.tgt | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/gas/configure.tgt b/gas/configure.tgt
index 9abc768..1d92f55 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -477,6 +477,12 @@ case ${generic_target} in
*-*-netware) fmt=elf em=netware ;;
esac
+case ${generic_target} in
+ arm-*-*uclibc*)
+ need_libm=yes
+ ;;
+esac
+
case ${cpu_type} in
aarch64 | alpha | arm | i386 | ia64 | microblaze | mips | ns32k | or1k | or1knd | pdp11 | ppc | sparc | z80 | z8k)
bfd_gas=yes
--
2.1.4

View File

@@ -0,0 +1,35 @@
From 743f42aaecb1ab89eba0eaf5e88ed67bbf3ba304 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:37:10 +0000
Subject: [PATCH 07/13] Add the armv5e architecture to binutils
Binutils has a comment that indicates it is supposed to match gcc for
all of the support "-march=" settings, but it was lacking the armv5e setting.
This was a simple way to add it, as thumb instructions shouldn't be generated
by the compiler anyway.
Upstream-Status: Denied
Upstream maintainer indicated that we should not be using armv5e, even
though it is a legal archicture defined by our gcc.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
gas/config/tc-arm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 2db6c2d..ab48168 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -24463,6 +24463,7 @@ static const struct arm_arch_option_table arm_archs[] =
ARM_ARCH_OPT ("armv4t", ARM_ARCH_V4T, FPU_ARCH_FPA),
ARM_ARCH_OPT ("armv4txm", ARM_ARCH_V4TxM, FPU_ARCH_FPA),
ARM_ARCH_OPT ("armv5", ARM_ARCH_V5, FPU_ARCH_VFP),
+ ARM_ARCH_OPT ("armv5e", ARM_ARCH_V5TE, FPU_ARCH_VFP),
ARM_ARCH_OPT ("armv5t", ARM_ARCH_V5T, FPU_ARCH_VFP),
ARM_ARCH_OPT ("armv5txm", ARM_ARCH_V5TxM, FPU_ARCH_VFP),
ARM_ARCH_OPT ("armv5te", ARM_ARCH_V5TE, FPU_ARCH_VFP),
--
2.1.4

View File

@@ -0,0 +1,35 @@
From 4d3a9f6db604055348332b56889d466c058fa5f3 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:39:01 +0000
Subject: [PATCH 08/13] don't let the distro compiler point to the wrong
installation location
Thanks to RP for helping find the source code causing the issue.
2010/08/13
Nitin A Kamble <nitin.a.kamble@intel.com>
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
libiberty/Makefile.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index 9b87720..ff43f53 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -361,7 +361,8 @@ install-strip: install
# multilib-specific flags, it's overridden by FLAGS_TO_PASS from the
# default multilib, so we have to take CFLAGS into account as well,
# since it will be passed the multilib flags.
-MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
+#MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
+MULTIOSDIR = ""
install_to_libdir: all
if test -n "${target_header_dir}"; then \
${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
--
2.1.4

View File

@@ -1,4 +1,8 @@
Upstream-Status: Inappropriate [distribution: codesourcery]
From e02e119b278c3f404e97669e7180cac944134c91 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:41:04 +0000
Subject: [PATCH 09/13] Upstream-Status: Inappropriate [distribution:
codesourcery]
Patch originally created by Mark Hatle, forward-ported to
binutils 2.21 by Scott Garman.
@@ -51,11 +55,23 @@ 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>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
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 | 16 ++++++++++++++++
9 files changed, 84 insertions(+)
Index: binutils-2.24/ld/config.in
===================================================================
--- binutils-2.24.orig/ld/config.in 2013-12-15 11:46:17.000000000 -0800
+++ binutils-2.24/ld/config.in 2013-12-15 11:46:59.810435651 -0800
diff --git a/ld/config.in b/ld/config.in
index 2ab4844..766d23c 100644
--- a/ld/config.in
+++ b/ld/config.in
@@ -11,6 +11,9 @@
language is requested. */
#undef ENABLE_NLS
@@ -66,11 +82,11 @@ Index: binutils-2.24/ld/config.in
/* Additional extension a shared object might have. */
#undef EXTRA_SHLIB_EXTENSION
Index: binutils-2.24/ld/configure
===================================================================
--- binutils-2.24.orig/ld/configure 2013-12-15 11:46:17.000000000 -0800
+++ binutils-2.24/ld/configure 2013-12-15 11:46:59.810435651 -0800
@@ -777,6 +777,7 @@
diff --git a/ld/configure b/ld/configure
index 2fbaebf..5726a08 100755
--- a/ld/configure
+++ b/ld/configure
@@ -787,6 +787,7 @@ with_lib_path
enable_targets
enable_64_bit_bfd
with_sysroot
@@ -78,8 +94,8 @@ Index: binutils-2.24/ld/configure
enable_gold
enable_got
enable_werror
@@ -1433,6 +1434,8 @@
(and sometimes confusing) to the casual installer
@@ -1443,6 +1444,8 @@ Optional Features:
--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)
+ --enable-poison-system-directories
@@ -87,7 +103,7 @@ Index: binutils-2.24/ld/configure
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
--enable-got=<type> GOT handling scheme (target, single, negative,
multigot)
@@ -4345,7 +4348,18 @@
@@ -16323,7 +16326,18 @@ else
fi
@@ -106,11 +122,11 @@ Index: binutils-2.24/ld/configure
# Check whether --enable-got was given.
if test "${enable_got+set}" = set; then :
Index: binutils-2.24/ld/configure.ac
===================================================================
--- binutils-2.24.orig/ld/configure.ac 2013-12-15 11:46:17.000000000 -0800
+++ binutils-2.24/ld/configure.ac 2013-12-15 11:46:59.810435651 -0800
@@ -87,6 +87,16 @@
diff --git a/ld/configure.ac b/ld/configure.ac
index 1bddfc9..e9edb7f 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -94,6 +94,16 @@ AC_SUBST(use_sysroot)
AC_SUBST(TARGET_SYSTEM_ROOT)
AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
@@ -127,11 +143,53 @@ Index: binutils-2.24/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.
Index: binutils-2.24/ld/ldfile.c
===================================================================
--- binutils-2.24.orig/ld/ldfile.c 2013-12-15 11:46:17.000000000 -0800
+++ binutils-2.24/ld/ldfile.c 2013-12-15 11:46:59.813768989 -0800
@@ -116,6 +116,23 @@
diff --git a/ld/ld.h b/ld/ld.h
index f773ce7..adba0f6 100644
--- a/ld/ld.h
+++ b/ld/ld.h
@@ -161,6 +161,14 @@ typedef struct {
/* If TRUE we'll just print the default output on stdout. */
bfd_boolean print_output_format;
+ /* If TRUE (the default) warn for uses of system directories when
+ cross linking. */
+ bfd_boolean poison_system_directories;
+
+ /* If TRUE (default FALSE) give an error for uses of system
+ directories when cross linking instead of a warning. */
+ bfd_boolean error_poison_system_directories;
+
/* Big or little endian as set on command line. */
enum endian_enum endian;
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index 502582c..dae168a 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -2212,6 +2212,18 @@ string identifying the original linked file does not change.
Passing @code{none} for @var{style} disables the setting from any
@code{--build-id} options earlier on the command line.
+
+@kindex --no-poison-system-directories
+@item --no-poison-system-directories
+Do not warn for @option{-L} options using system directories such as
+@file{/usr/lib} when cross linking. This option is intended for use
+in chroot environments when such directories contain the correct
+libraries for the target system rather than the host.
+
+@kindex --error-poison-system-directories
+@item --error-poison-system-directories
+Give an error instead of a warning for @option{-L} options using
+system directories when cross linking.
@end table
@c man end
diff --git a/ld/ldfile.c b/ld/ldfile.c
index 782ed7f..19a9ab4 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);
else
new_dirs->name = xstrdup (name);
@@ -155,30 +213,24 @@ Index: binutils-2.24/ld/ldfile.c
}
/* Try to open a BFD for a lang_input_statement. */
Index: binutils-2.24/ld/ld.h
===================================================================
--- binutils-2.24.orig/ld/ld.h 2013-12-15 11:46:17.000000000 -0800
+++ binutils-2.24/ld/ld.h 2013-12-15 11:46:59.813768989 -0800
@@ -180,6 +180,14 @@
/* If TRUE we'll just print the default output on stdout. */
bfd_boolean print_output_format;
diff --git a/ld/ldlex.h b/ld/ldlex.h
index e3e9b24..29487a3 100644
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
@@ -140,6 +140,8 @@ enum option_values
OPTION_IGNORE_UNRESOLVED_SYMBOL,
OPTION_PUSH_STATE,
OPTION_POP_STATE,
+ OPTION_NO_POISON_SYSTEM_DIRECTORIES,
+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES,
};
+ /* If TRUE (the default) warn for uses of system directories when
+ cross linking. */
+ bfd_boolean poison_system_directories;
+
+ /* If TRUE (default FALSE) give an error for uses of system
+ directories when cross linking instead of a warning. */
+ bfd_boolean error_poison_system_directories;
+
/* Big or little endian as set on command line. */
enum endian_enum endian;
Index: binutils-2.24/ld/ldmain.c
===================================================================
--- binutils-2.24.orig/ld/ldmain.c 2013-12-15 11:46:17.000000000 -0800
+++ binutils-2.24/ld/ldmain.c 2013-12-15 11:48:12.087101740 -0800
@@ -266,6 +266,8 @@
/* The initial parser states. */
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 818d108..54c49f2 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -266,6 +266,8 @@ main (int argc, char **argv)
command_line.warn_mismatch = TRUE;
command_line.warn_search_mismatch = TRUE;
command_line.check_section_addresses = -1;
@@ -187,33 +239,10 @@ Index: binutils-2.24/ld/ldmain.c
/* We initialize DEMANGLING based on the environment variable
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
Index: binutils-2.24/ld/ld.texinfo
===================================================================
--- binutils-2.24.orig/ld/ld.texinfo 2013-12-15 11:46:17.000000000 -0800
+++ binutils-2.24/ld/ld.texinfo 2013-12-15 11:46:59.813768989 -0800
@@ -2175,6 +2175,18 @@
Passing @code{none} for @var{style} disables the setting from any
@code{--build-id} options earlier on the command line.
+
+@kindex --no-poison-system-directories
+@item --no-poison-system-directories
+Do not warn for @option{-L} options using system directories such as
+@file{/usr/lib} when cross linking. This option is intended for use
+in chroot environments when such directories contain the correct
+libraries for the target system rather than the host.
+
+@kindex --error-poison-system-directories
+@item --error-poison-system-directories
+Give an error instead of a warning for @option{-L} options using
+system directories when cross linking.
@end table
@c man end
Index: binutils-2.24/ld/lexsup.c
===================================================================
--- binutils-2.24.orig/ld/lexsup.c 2013-12-15 11:46:17.000000000 -0800
+++ binutils-2.24/ld/lexsup.c 2013-12-15 11:49:28.950434490 -0800
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 4812c97..21b49df 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -513,6 +513,14 @@ static const struct ld_option ld_options[] =
{ {"pop-state", no_argument, NULL, OPTION_POP_STATE},
'\0', NULL, N_("Pop state of flags governing input file handling"),
@@ -244,16 +273,6 @@ Index: binutils-2.24/ld/lexsup.c
}
}
Index: binutils-2.24/ld/ldlex.h
===================================================================
--- binutils-2.24.orig/ld/ldlex.h 2013-12-15 11:46:17.000000000 -0800
+++ binutils-2.24/ld/ldlex.h 2013-12-15 11:47:43.230435299 -0800
@@ -140,6 +140,8 @@ enum option_values
OPTION_IGNORE_UNRESOLVED_SYMBOL,
OPTION_PUSH_STATE,
OPTION_POP_STATE,
+ OPTION_NO_POISON_SYSTEM_DIRECTORIES,
+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES,
};
/* The initial parser states. */
--
2.1.4

View File

@@ -1,17 +1,27 @@
Upstream-Status: Inappropriate [embedded specific]
From edbee9a68e1c2e11c059668aa1d13001d9f3de06 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:42:38 +0000
Subject: [PATCH 10/13] Fix rpath in libtool when sysroot is enabled
Enabling sysroot support in libtool exposed a bug where the final
library had an RPATH encoded into it which still pointed to the
sysroot. This works around the issue until it gets sorted out
upstream.
Fix suggested by Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Fix suggested by Richard Purdie <richard.purdie@linuxfoundation.org>
Index: binutils-2.22/ltmain.sh
===================================================================
--- binutils-2.22.orig/ltmain.sh
+++ binutils-2.22/ltmain.sh
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
ltmain.sh | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/ltmain.sh b/ltmain.sh
index 70e856e..11ee684 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -8035,9 +8035,11 @@ EOF
test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
for libdir in $rpath; do
@@ -37,3 +47,6 @@ Index: binutils-2.22/ltmain.sh
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
hardcode_libdirs="$libdir"
--
2.1.4

View File

@@ -1,15 +1,22 @@
for mips64*-*-linux we change the default emulations to be
N64 instead of N32
From 2a5e8813d3c5db3e2b7d9dfa2ab27cccd5111e53 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:44:14 +0000
Subject: [PATCH 11/13] Change default emulation for mips64*-*-linux
we change the default emulations to be N64 instead of N32
Upstream-Status: Inappropriate [ OE configuration Specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
bfd/config.bfd | 8 ++++----
ld/configure.tgt | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
Index: binutils-2.24/bfd/config.bfd
===================================================================
--- binutils-2.24.orig/bfd/config.bfd 2013-11-04 07:33:37.000000000 -0800
+++ binutils-2.24/bfd/config.bfd 2013-12-15 11:54:57.113765374 -0800
Index: binutils-2.24/ld/configure.tgt
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 7bcb92a..03d2c6f 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -1062,12 +1062,12 @@ case "${targ}" in
targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
;;
@@ -27,10 +34,11 @@ Index: binutils-2.24/ld/configure.tgt
;;
mips*el-*-linux*)
targ_defvec=mips_elf32_trad_le_vec
===================================================================
--- binutils-2.24.orig/ld/configure.tgt 2013-11-26 03:37:33.000000000 -0800
+++ binutils-2.24/ld/configure.tgt 2013-12-15 11:50:52.273766155 -0800
@@ -471,11 +471,11 @@
diff --git a/ld/configure.tgt b/ld/configure.tgt
index 24e36d1..740b2ea 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -476,11 +476,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
targ_extra_emuls="elf32elmipvxworks" ;;
mips*-*-windiss) targ_emul=elf32mipswindiss ;;
@@ -46,3 +54,6 @@ Index: binutils-2.24/ld/configure.tgt
targ_extra_libpath=$targ_extra_emuls ;;
mips*el-*-linux-*) targ_emul=elf32ltsmip
targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
--
2.1.4

View File

@@ -1,5 +1,7 @@
Upstream-Status: Unknown
Signed-off-by: Khem Raj <raj.khem@gmail.com>
From 448329ea097447aee73d050045295c5a0ae8519e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:51:05 +0000
Subject: [PATCH 12/13] Add XLP instructions support
From 26adb06ce515aadfec08ce13109b4b98287f677b Mon Sep 17 00:00:00 2001
From: Nebu Philips <nphilips@netlogicmicro.com>
@@ -26,6 +28,27 @@ Netlogic. Also, update vendor name to NLM wherever applicable.
opcodes/mips-opc.c | 33 +++++++++++++++++++++------------
15 files changed, 65 insertions(+), 25 deletions(-)
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
bfd/aoutx.h | 1 +
bfd/archures.c | 1 +
bfd/bfd-in2.h | 1 +
bfd/config.bfd | 5 +++++
bfd/cpu-mips.c | 6 ++++--
bfd/elfxx-mips.c | 8 ++++++++
binutils/readelf.c | 1 +
gas/config/tc-mips.c | 4 +++-
gas/configure | 3 +++
gas/configure.tgt | 2 +-
include/elf/mips.h | 1 +
include/opcode/mips.h | 10 ++++++++--
ld/configure.tgt | 2 ++
opcodes/mips-dis.c | 12 +++++-------
opcodes/mips-opc.c | 33 +++++++++++++++++++++------------
15 files changed, 65 insertions(+), 25 deletions(-)
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index 9385a98..a88df99 100644
--- a/bfd/aoutx.h
@@ -63,7 +86,7 @@ index c7a2bb5..413b773 100644
#define bfd_mach_mipsisa32r2 33
#define bfd_mach_mipsisa32r3 34
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 03d2c6f..91cedb8 100644
index 03d2c6f..27086db 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -1041,6 +1041,11 @@ case "${targ}" in
@@ -103,7 +126,7 @@ index b617aaa..19a99d1 100644
/* The default architecture is mips:3000, but with a machine number of
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index a0cc26e..672d5b3 100644
index 0df7abf..d268e86 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -6608,6 +6608,9 @@ _bfd_elf_mips_mach (flagword flags)
@@ -127,7 +150,7 @@ index a0cc26e..672d5b3 100644
case bfd_mach_mipsisa32:
val = E_MIPS_ARCH_32;
break;
@@ -14753,6 +14760,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
@@ -14765,6 +14772,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
{ bfd_mach_mips_octeonp, bfd_mach_mips_octeon },
{ bfd_mach_mips_octeon, bfd_mach_mipsisa64r2 },
{ bfd_mach_mips_loongson_3a, bfd_mach_mipsisa64r2 },
@@ -177,7 +200,7 @@ index c3e3e2a..8d64344 100644
/* End marker */
{ NULL, 0, 0, 0, 0 }
diff --git a/gas/configure b/gas/configure
index 9529f1a..63bba5b 100755
index 074886f..8091f2f 100755
--- a/gas/configure
+++ b/gas/configure
@@ -12808,6 +12808,9 @@ _ACEOF
@@ -191,7 +214,7 @@ index 9529f1a..63bba5b 100755
mips_cpu=r3900
;;
diff --git a/gas/configure.tgt b/gas/configure.tgt
index 05546ca..bb859d6 100644
index 1d92f55..06e8b4f 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -332,7 +332,7 @@ case ${generic_target} in
@@ -204,7 +227,7 @@ index 05546ca..bb859d6 100644
mips-*-openbsd*) fmt=elf em=tmips ;;
diff --git a/include/elf/mips.h b/include/elf/mips.h
index 2ed6acd..899b1e5 100644
index 2ed6acd..e541f50 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -285,6 +285,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
@@ -287,7 +310,7 @@ index 1eb1d45..d6881af 100644
/* This entry, mips16, is here only for ISA/processor selection; do
not print its name. */
diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
index 2c3bbad..86eb95b 100644
index 2c3bbad..9785a7e 100644
--- a/opcodes/mips-opc.c
+++ b/opcodes/mips-opc.c
@@ -319,7 +319,8 @@ decode_mips_operand (const char *p)
@@ -331,8 +354,7 @@ index 2c3bbad..86eb95b 100644
{"dmt", "", 0x41600bc1, 0xffffffff, TRAP, 0, 0, MT32, 0 },
{"dmt", "t", 0x41600bc1, 0xffe0ffff, WR_1|TRAP, 0, 0, MT32, 0 },
{"dmtc0", "t,G", 0x40a00000, 0xffe007ff, RD_1|WR_C0|WR_CC|CM, 0, I3, 0, EE },
@@ -1079,6 +1083,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
/* dmtc2 is at the bottom of the table. */
@@ -1080,6 +1084,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
/* dmfc3 is at the bottom of the table. */
/* dmtc3 is at the bottom of the table. */
{"dmuh", "d,s,t", 0x000000dc, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 },
@@ -340,6 +362,7 @@ index 2c3bbad..86eb95b 100644
+{"dmul", "d,s,t", 0x70000006, 0xfc0007ff, WR_1|RD_2|RD_3, 0, XLP, 0, 0 },
{"dmul", "d,s,t", 0x0000009c, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 },
{"dmul", "d,v,t", 0x70000003, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO, 0, IOCT, 0, 0 },
{"dmul", "d,v,t", 0, (int) M_DMUL, INSN_MACRO, 0, I3, 0, M32|I69 },
@@ -1229,9 +1235,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"ld", "s,-b(+R)", 0xec180000, 0xfc1c0000, WR_1, RD_pc, I69, 0, 0 },
{"ld", "t,A(b)", 0, (int) M_LD_AB, INSN_MACRO, 0, I1, 0, 0 },
@@ -400,3 +423,6 @@ index 2c3bbad..86eb95b 100644
{"swc0", "E,o(b)", 0xe0000000, 0xfc000000, RD_3|RD_C0|SM, 0, I1, 0, IOCT|IOCTP|IOCT2|I37 },
{"swc0", "E,A(b)", 0, (int) M_SWC0_AB, INSN_MACRO, 0, I1, 0, IOCT|IOCTP|IOCT2|I37 },
{"swc1", "T,o(b)", 0xe4000000, 0xfc000000, RD_1|RD_3|SM|FP_S, 0, I1, 0, 0 },
--
2.1.4

View File

@@ -1,8 +1,8 @@
From 54583eb23233b5369372ae41768655693d0584ef Mon Sep 17 00:00:00 2001
From 8e8f77ec2b6262e7d10af54700c340173d957267 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 27 Feb 2015 09:05:49 +0000
Subject: [PATCH] Fix an internal error in do_print_to_mapfile seen with gold
on arm
Subject: [PATCH 13/13] Fix an internal error in do_print_to_mapfile seen with
gold on arm
This is due to missing implementation of do_print_to_mapfile for
atrributea section (ARM.attributes), it started to show up after fix
@@ -12,12 +12,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Submitted
---
gold/ChangeLog | 5 +++++
gold/attributes.h | 4 ++++
2 files changed, 9 insertions(+)
1 file changed, 4 insertions(+)
diff --git a/gold/attributes.h b/gold/attributes.h
index c0b171f..6e3ab8c 100644
index 2aa7a78..3d126e6 100644
--- a/gold/attributes.h
+++ b/gold/attributes.h
@@ -387,6 +387,10 @@ class Output_attributes_section_data : public Output_section_data

View File

@@ -1,25 +0,0 @@
Add the armv5e architecture to binutils
Binutils has a comment that indicates it is supposed to match gcc for all of
the support "-march=" settings, but it was lacking the armv5e setting. This
was a simple way to add it, as thumb instructions shouldn't be generated by
the compiler anyway.
Upstream-Status: Denied
Upstream maintainer indicated that we should not be using armv5e, even though
it is a legal archicture defined by our gcc.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Index: binutils-2.22.90/gas/config/tc-arm.c
===================================================================
--- binutils-2.22.90.orig/gas/config/tc-arm.c 2012-07-24 09:38:32.000000000 -0700
+++ binutils-2.22.90/gas/config/tc-arm.c 2012-08-07 23:41:59.822564075 -0700
@@ -23162,6 +23162,7 @@
ARM_ARCH_OPT ("armv4t", ARM_ARCH_V4T, FPU_ARCH_FPA),
ARM_ARCH_OPT ("armv4txm", ARM_ARCH_V4TxM, FPU_ARCH_FPA),
ARM_ARCH_OPT ("armv5", ARM_ARCH_V5, FPU_ARCH_VFP),
+ ARM_ARCH_OPT ("armv5e", ARM_ARCH_V5TE, FPU_ARCH_VFP),
ARM_ARCH_OPT ("armv5t", ARM_ARCH_V5T, FPU_ARCH_VFP),
ARM_ARCH_OPT ("armv5txm", ARM_ARCH_V5TxM, FPU_ARCH_VFP),
ARM_ARCH_OPT ("armv5te", ARM_ARCH_V5TE, FPU_ARCH_VFP),

View File

@@ -1,40 +0,0 @@
Upstream-Status: Pending
Index: binutils-2.22/configure
===================================================================
--- binutils-2.22.orig/configure
+++ binutils-2.22/configure
@@ -3130,7 +3130,7 @@ case "${target}" in
;;
s390-*-* | s390x-*-*)
;;
- sh-*-* | sh[34]*-*-*)
+ sh*-*-* | sh[34]*-*-*)
;;
sh64-*-* | sh5*-*-*)
;;
@@ -3570,7 +3570,7 @@ case "${target}" in
mips*-*-*)
noconfigdirs="$noconfigdirs gprof"
;;
- sh-*-* | sh64-*-*)
+ sh*-*-* | sh64-*-*)
case "${target}" in
sh*-*-elf)
;;
Index: binutils-2.22/gprof/configure
===================================================================
--- binutils-2.22.orig/gprof/configure
+++ binutils-2.22/gprof/configure
@@ -6103,6 +6103,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)$'

View File

@@ -1,55 +0,0 @@
#!/bin/sh -e
## 001_ld_makefile_patch.dpatch
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Description: correct where ld scripts are installed
## DP: Author: Chris Chimelis <chris@debian.org>
## DP: Upstream status: N/A
## DP: Date: ??
if [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
case "$1" in
-patch) patch $patch_opts -p1 < $0;;
-unpatch) patch $patch_opts -p1 -R < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1;;
esac
exit 0
Upstream-Status: Inappropriate [debian patch]
@DPATCH@
Index: binutils-2.22/ld/Makefile.am
===================================================================
--- binutils-2.22.orig/ld/Makefile.am
+++ binutils-2.22/ld/Makefile.am
@@ -37,7 +37,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@
Index: binutils-2.22/ld/Makefile.in
===================================================================
--- binutils-2.22.orig/ld/Makefile.in
+++ binutils-2.22/ld/Makefile.in
@@ -366,7 +366,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

View File

@@ -1,45 +0,0 @@
#!/bin/sh -e
## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Specify which filename is causing an error if the filename is a
## DP: directory. (#45832)
if [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
case "$1" in
-patch) patch $patch_opts -p1 < $0;;
-unpatch) patch $patch_opts -p1 -R < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1;;
esac
exit 0
Upstream-Status: Inappropriate [debian patch]
@DPATCH@
Index: binutils-2.22/bfd/opncls.c
===================================================================
--- binutils-2.22.orig/bfd/opncls.c
+++ binutils-2.22/bfd/opncls.c
@@ -197,6 +197,13 @@ bfd_fopen (const char *filename, const c
{
bfd *nbfd;
const bfd_target *target_vec;
+ struct stat s;
+
+ if (stat (filename, &s) == 0)
+ if (S_ISDIR(s.st_mode)) {
+ bfd_set_error (bfd_error_file_not_recognized);
+ return NULL;
+ }
nbfd = _bfd_new_bfd ();
if (nbfd == NULL)

View File

@@ -1,49 +0,0 @@
#!/bin/sh -e
## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
## DP: cases where -rpath isn't specified. (#151024)
if [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
case "$1" in
-patch) patch $patch_opts -p1 < $0;;
-unpatch) patch $patch_opts -p1 -R < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1;;
esac
exit 0
Upstream-Status: Inappropriate [debian patch]
@DPATCH@
Index: binutils-2.22/ld/emultempl/elf32.em
===================================================================
--- binutils-2.22.orig/ld/emultempl/elf32.em
+++ binutils-2.22/ld/emultempl/elf32.em
@@ -1273,6 +1273,8 @@ fragment <<EOF
&& command_line.rpath == NULL)
{
lib_path = (const char *) getenv ("LD_RUN_PATH");
+ if ((lib_path) && (strlen (lib_path) == 0))
+ lib_path = NULL;
if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
force))
break;
@@ -1500,6 +1502,8 @@ gld${EMULATION_NAME}_before_allocation (
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
+ if ((rpath) && (strlen (rpath) == 0))
+ rpath = NULL;
for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next)
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)

View File

@@ -1,38 +0,0 @@
Source: Khem Raj <raj.khem@gmail.com>
Disposition: submit upstream.
Upstream-Status: Pending
Description:
We do not need to have the libtool patch anymore for binutils after
libtool has been updated upstream it include support for it. However
for building gas natively on uclibc systems we have to link it with
-lm so that it picks up missing symbols.
/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_from_double':
floatformat.c:(.text+0x1ec): undefined reference to `frexp'
floatformat.c:(.text+0x2f8): undefined reference to `ldexp'
/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_to_double':
floatformat.c:(.text+0x38a): undefined reference to `ldexp'
floatformat.c:(.text+0x3d2): undefined reference to `ldexp'
floatformat.c:(.text+0x43e): undefined reference to `ldexp' floatformat.c:(.text+0x4e2): undefined reference to `ldexp'
collect2: ld returned 1 exit status
make[4]: *** [as-new] Error 1
Index: binutils-2.22/gas/configure.tgt
===================================================================
--- binutils-2.22.orig/gas/configure.tgt
+++ binutils-2.22/gas/configure.tgt
@@ -428,6 +428,12 @@ case ${generic_target} in
*-*-netware) fmt=elf em=netware ;;
esac
+case ${generic_target} in
+ arm-*-*uclibc*)
+ need_libm=yes
+ ;;
+esac
+
case ${cpu_type} in
alpha | arm | i386 | ia64 | microblaze | mips | ns32k | pdp11 | ppc | sparc | z80 | z8k)
bfd_gas=yes

View File

@@ -1,50 +0,0 @@
From f9c316c4d75be236bbaa8464ef803ed2d3859d6d Mon Sep 17 00:00:00 2001
From: H.J. Lu <hjl.tools@gmail.com>
Date: Wed, 15 Jan 2014 07:43:19 -0800
Subject: [PATCH 1/1] Silence uninitialized warning on ehdr_start_save
Older GCC, like 4.1/4.2, will issue an uninitialized warning on
ehdr_start_save. This patch silences by using
struct bfd_link_hash_entry ehdr_start_save = ehdr_start_save;
* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
Silence uninitialized warning on ehdr_start_save with older
GCC.
Upstream-Status: Backport
---
ld/ChangeLog | 6 ++++++
ld/emultempl/elf32.em | 2 +-
2 files changed, 7 insertions(+), 1 deletions(-)
#diff --git a/ld/ChangeLog b/ld/ChangeLog
#index eaa6b93..91055de 100644
#--- a/ld/ChangeLog
#+++ b/ld/ChangeLog
#@@ -1,3 +1,9 @@
#+2014-01-15 H.J. Lu <hongjiu.lu@intel.com>
#+
#+ * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
#+ Silence uninitialized warning on ehdr_start_save with older
#+ GCC.
#+
# 2014-01-15 Alan Modra <amodra@gmail.com>
#
# * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Define
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 13f86f0..569c7f7 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1481,7 +1481,7 @@ gld${EMULATION_NAME}_before_allocation (void)
asection *sinterp;
bfd *abfd;
struct elf_link_hash_entry *ehdr_start = NULL;
- struct bfd_link_hash_entry ehdr_start_save;
+ struct bfd_link_hash_entry ehdr_start_save = ehdr_start_save;
if (is_elf_hash_table (link_info.hash))
{
--
1.7.1

View File

@@ -1,22 +0,0 @@
Upstream-Status: Inappropriate [embedded specific]
don't let the distro compiler point to the wrong installation location
Thanks to RP for helping find the source code causing the issue.
2010/08/13
Nitin A Kamble <nitin.a.kamble@intel.com>
Index: binutils-2.22/libiberty/Makefile.in
===================================================================
--- binutils-2.22.orig/libiberty/Makefile.in
+++ binutils-2.22/libiberty/Makefile.in
@@ -350,7 +350,8 @@ install-strip: install
# multilib-specific flags, it's overridden by FLAGS_TO_PASS from the
# default multilib, so we have to take CFLAGS into account as well,
# since it will be passed the multilib flags.
-MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
+#MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
+MULTIOSDIR = ""
install_to_libdir: all
${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR)
$(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n