binutils: upgrade to 2.21 and add libtool sysroot support
* Upgraded binutils to v2.21 * Incorporated libtool sysroot patches from OE * Removed patches no longer needed or obsoleted by OE patches Signed-off-by: Scott Garman <scott.a.garman@intel.com>
This commit is contained in:
parent
6656381714
commit
c15f20a124
|
@ -1,18 +0,0 @@
|
|||
Adds support for Freescale Power architecture e300c2 and e300c3 cores.
|
||||
http://www.bitshrine.org/gpp/tc-fsl-x86lnx-e300c3-nptl-4.0.2-2.src.rpm
|
||||
|
||||
Leon Woestenberg <leonw@mailcan.com>
|
||||
|
||||
Index: binutils-2.19.51.0.3/opcodes/ppc-dis.c
|
||||
===================================================================
|
||||
--- binutils-2.19.51.0.3.orig/opcodes/ppc-dis.c 2009-04-16 00:38:45.000000000 -0700
|
||||
+++ binutils-2.19.51.0.3/opcodes/ppc-dis.c 2009-04-16 00:43:56.000000000 -0700
|
||||
@@ -132,6 +132,8 @@
|
||||
| PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7 | PPC_OPCODE_ALTIVEC
|
||||
| PPC_OPCODE_VSX),
|
||||
0 },
|
||||
+ { "pmr", (PPC_OPCODE_PMR),
|
||||
+ 0 },
|
||||
{ "ppc", (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | PPC_OPCODE_32),
|
||||
0 },
|
||||
{ "ppc32", (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | PPC_OPCODE_32),
|
|
@ -1,67 +0,0 @@
|
|||
This is because libdir has a trailing slash which breaks the comparision.
|
||||
|
||||
RP 2/1/10
|
||||
|
||||
Index: binutils-2.20.1/ltmain.sh
|
||||
===================================================================
|
||||
--- binutils-2.20.1.orig/ltmain.sh 2009-09-01 00:59:32.000000000 +0800
|
||||
+++ binutils-2.20.1/ltmain.sh 2010-07-29 09:41:14.000000000 +0800
|
||||
@@ -2156,8 +2156,12 @@
|
||||
dir="$dir$objdir"
|
||||
|
||||
if test -n "$relink_command"; then
|
||||
+ # Strip any trailing slash from the destination.
|
||||
+ func_stripname '' '/' "$libdir"
|
||||
+ destlibdir=$func_stripname_result
|
||||
+
|
||||
# Determine the prefix the user has applied to our future dir.
|
||||
- inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
|
||||
+ inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$destlibdir\$%%"`
|
||||
|
||||
# Don't allow the user to place us outside of our expected
|
||||
# location b/c this prevents finding dependent libraries that
|
||||
@@ -5570,8 +5574,14 @@
|
||||
absdir="$abs_ladir"
|
||||
libdir="$abs_ladir"
|
||||
else
|
||||
- dir="$libdir"
|
||||
- absdir="$libdir"
|
||||
+ # Adding 'libdir' from the .la file to our library search paths
|
||||
+ # breaks crosscompilation horribly. We cheat here and don't add
|
||||
+ # it, instead adding the path where we found the .la. -CL
|
||||
+ dir="$abs_ladir"
|
||||
+ absdir="$abs_ladir"
|
||||
+ libdir="$abs_ladir"
|
||||
+ #dir="$libdir"
|
||||
+ #absdir="$libdir"
|
||||
fi
|
||||
test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
|
||||
else
|
||||
@@ -5942,8 +5952,6 @@
|
||||
add="$libdir/$linklib"
|
||||
fi
|
||||
else
|
||||
- # We cannot seem to hardcode it, guess we'll fake it.
|
||||
- add_dir="-L$libdir"
|
||||
# Try looking first in the location we're being installed to.
|
||||
if test -n "$inst_prefix_dir"; then
|
||||
case $libdir in
|
||||
@@ -6089,7 +6097,17 @@
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
- path="-L$absdir/$objdir"
|
||||
+ # OE sets installed=no in staging. We need to look in $objdir and $absdir,
|
||||
+ # preferring $objdir. RP 31/04/2008
|
||||
+ if test -f "$absdir/$objdir/$depdepl" ; then
|
||||
+ depdepl="$absdir/$objdir/$depdepl"
|
||||
+ path="-L$absdir/$objdir"
|
||||
+ elif test -f "$absdir/$depdepl" ; then
|
||||
+ depdepl="$absdir/$depdepl"
|
||||
+ path="-L$absdir"
|
||||
+ else
|
||||
+ path="-L$absdir/$objdir"
|
||||
+ fi
|
||||
;;
|
||||
esac
|
||||
else
|
|
@ -1,29 +0,0 @@
|
|||
# "-fPIE" always triggers segmentation fault in ld.so.1 on mips platform,
|
||||
# which was first saw on dbus-daemon. Below borrow the binutils fix from
|
||||
# binutils bugzilla:
|
||||
#
|
||||
# http://sourceware.org/bugzilla/show_bug.cgi?id=10858
|
||||
#
|
||||
# Its commit message says:
|
||||
# * elfxx-mips.c (mips_elf_create_dynamic_relocation): Use section
|
||||
# sym dynindx for relocs against defined syms in PIEs.
|
||||
#
|
||||
# It's in upstream CVS now (rev 1.267), but not in current release
|
||||
#
|
||||
# By Kevin Tian <kevin.tian@intel.com>, 2010-07-15
|
||||
|
||||
diff --git a/elfxx-mips.c b/elfxx-mips.c
|
||||
index 3a1c8ba..f6c2c1c 100644
|
||||
--- binutils-2.20.1.orig/bfd/elfxx-mips.c
|
||||
+++ binutils-2.20.1/bfd/elfxx-mips.c
|
||||
@@ -5688,9 +5688,7 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd,
|
||||
|
||||
/* We must now calculate the dynamic symbol table index to use
|
||||
in the relocation. */
|
||||
- if (h != NULL
|
||||
- && (!h->root.def_regular
|
||||
- || (info->shared && !info->symbolic && !h->root.forced_local)))
|
||||
+ if (h != NULL && ! SYMBOL_REFERENCES_LOCAL (info, &h->root))
|
||||
{
|
||||
indx = h->root.dynindx;
|
||||
if (SGI_COMPAT (output_bfd))
|
|
@ -0,0 +1,37 @@
|
|||
http://sourceware.org/bugzilla/show_bug.cgi?id=10340
|
||||
|
||||
Signed-off-by: Sven Rebhan <odinshorse@googlemail.com>
|
||||
|
||||
Always try to prepend the sysroot prefix to absolute filenames first.
|
||||
|
||||
Index: binutils-2.21/ld/ldfile.c
|
||||
===================================================================
|
||||
--- binutils-2.21.orig/ld/ldfile.c
|
||||
+++ binutils-2.21/ld/ldfile.c
|
||||
@@ -372,18 +372,24 @@ ldfile_open_file_search (const char *arc
|
||||
directory first. */
|
||||
if (! entry->is_archive)
|
||||
{
|
||||
- if (entry->sysrooted && IS_ABSOLUTE_PATH (entry->filename))
|
||||
+ /* For absolute pathnames, try to always open the file in the
|
||||
+ sysroot first. If this fails, try to open the file at the
|
||||
+ given location. */
|
||||
+ entry->sysrooted = is_sysrooted_pathname(entry->filename, FALSE);
|
||||
+ if (IS_ABSOLUTE_PATH (entry->filename) && ld_sysroot && ! entry->sysrooted)
|
||||
{
|
||||
char *name = concat (ld_sysroot, entry->filename,
|
||||
(const char *) NULL);
|
||||
if (ldfile_try_open_bfd (name, entry))
|
||||
{
|
||||
entry->filename = name;
|
||||
+ entry->sysrooted = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
free (name);
|
||||
}
|
||||
- else if (ldfile_try_open_bfd (entry->filename, entry))
|
||||
+
|
||||
+ if (ldfile_try_open_bfd (entry->filename, entry))
|
||||
{
|
||||
entry->sysrooted = IS_ABSOLUTE_PATH (entry->filename)
|
||||
&& is_sysrooted_pathname (entry->filename, TRUE);
|
|
@ -24,10 +24,11 @@ esac
|
|||
exit 0
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
|
||||
--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
|
||||
+++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
|
||||
@@ -692,6 +692,8 @@
|
||||
Index: src/ld/emultempl/elf32.em
|
||||
===================================================================
|
||||
--- src.orig/ld/emultempl/elf32.em 2009-09-23 06:54:28.000000000 -0700
|
||||
+++ src/ld/emultempl/elf32.em 2009-10-06 10:58:16.883414592 -0700
|
||||
@@ -1237,6 +1237,8 @@ fragment <<EOF
|
||||
&& command_line.rpath == NULL)
|
||||
{
|
||||
lib_path = (const char *) getenv ("LD_RUN_PATH");
|
||||
|
@ -36,12 +37,12 @@ diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/
|
|||
if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
|
||||
force))
|
||||
break;
|
||||
@@ -871,6 +873,8 @@
|
||||
@@ -1463,6 +1465,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;
|
||||
if (! (bfd_elf_size_dynamic_sections
|
||||
(output_bfd, command_line.soname, rpath,
|
||||
command_line.filter_shlib,
|
||||
+ rpath = NULL;
|
||||
|
||||
for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next)
|
||||
{
|
File diff suppressed because it is too large
Load Diff
|
@ -1,3 +1,3 @@
|
|||
require binutils_${PV}.bb
|
||||
require binutils-cross-canadian.inc
|
||||
PR = "r6"
|
||||
PR = "r0"
|
|
@ -1,3 +1,2 @@
|
|||
require binutils_${PV}.bb
|
||||
require binutils-cross.inc
|
||||
|
|
@ -4,7 +4,7 @@ inherit crosssdk
|
|||
|
||||
PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk"
|
||||
|
||||
PR = "r4"
|
||||
PR = "r0"
|
||||
|
||||
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
|
|
@ -1,6 +1,6 @@
|
|||
require binutils.inc
|
||||
|
||||
PR = "r4"
|
||||
PR = "r0"
|
||||
|
||||
LIC_FILES_CHKSUM="\
|
||||
file://src-release;endline=17;md5=4830a9ef968f3b18dd5e9f2c00db2d35\
|
||||
|
@ -16,7 +16,7 @@ LIC_FILES_CHKSUM="\
|
|||
"
|
||||
|
||||
SRC_URI = "\
|
||||
${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2;name=tarball \
|
||||
${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2 \
|
||||
file://binutils-uclibc-100-uclibc-conf.patch \
|
||||
file://110-arm-eabi-conf.patch \
|
||||
file://binutils-uclibc-300-001_ld_makefile_patch.patch \
|
||||
|
@ -24,18 +24,14 @@ SRC_URI = "\
|
|||
file://binutils-uclibc-300-012_check_ldrunpath_length.patch \
|
||||
file://binutils-uclibc-gas-needs-libm.patch \
|
||||
file://binutils-x86_64_i386_biarch.patch \
|
||||
file://binutils-mips-pie.patch \
|
||||
file://binutils-libtool.patch \
|
||||
file://libtool-2.4-update.patch \
|
||||
file://binutils-2.19.1-ld-sysroot.patch \
|
||||
file://libiberty_path_fix.patch \
|
||||
file://binutils-poison.patch \
|
||||
# Need to consult w/ Mark Hatle to get this patch updated:
|
||||
# file://binutils-poison.patch \
|
||||
"
|
||||
|
||||
SRC_URI[tarball.md5sum] = "9cdfb9d6ec0578c166d3beae5e15c4e5"
|
||||
SRC_URI[tarball.sha256sum] = "228b84722d87e88e7fdd36869e590e649ab523a0800a7d53df906498afe6f6f8"
|
||||
|
||||
# powerpc patches
|
||||
SRC_URI += "\
|
||||
file://binutils-2.16.1-e300c2c3.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "c84c5acc9d266f1a7044b51c85a823f5"
|
||||
SRC_URI[sha256sum] = "60abec5bf448eb930a5a15acb8712612377dc8bcfb13dfd5131228f70561d0c7"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
Loading…
Reference in New Issue