Skip to contentSkip to conversation

libtool 2.4 sysroot support

PATCH In review Scott Garman 3 participants 15 messages Jan 19, 2011

lore
Share & tools
lore
#0 lore raw

cover libtool 2.4 sysroot support

Hi Saul,

This patch series enables sysroot support in libtool, a new feature that was added in libtool 2.4. Countless thanks to Khem Raj, who got this working in OpenEmbedded recently - just about everything here is based on his work, with a couple of additional tweaks courtesy of Richard Purdie.

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: sgarman/libtool-sysroot-rebased
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=sgarman/libtool-sysroot-rebased

Thanks,
Scott Garman <[email protected]>
---

Scott Garman (9):
libtool: changes to enable sysroot support
libtool: fix library RPATHs
autotools.bbclass: libtool sysroot support changes staging.bbclass, utils.bbclass: remove la mangling code insane.bbclass: skip checks on .la installed status
binutils: upgrade to 2.21 and add libtool sysroot support
binutils: Fix QA staging errors for target binutils
binutils: fix library RPATHs
poky-default.inc: bump binutils preferred version to 2.21

 meta/classes/autotools.bbclass                     |   25 +-
 meta/classes/insane.bbclass                        |    5 -
 meta/classes/staging.bbclass                       |   14 -
 meta/classes/utils.bbclass                         |   15 +-
 meta/conf/distro/include/poky-default.inc          |    2 +-
 .../binutils-2.20.1/binutils-2.16.1-e300c2c3.patch |   18 -
 .../binutils-2.20.1/binutils-libtool.patch         |   67 -
 .../binutils-2.20.1/binutils-mips-pie.patch        |   29 -
 .../110-arm-eabi-conf.patch                        |    0
 .../binutils-2.21/binutils-2.19.1-ld-sysroot.patch |   37 +
 .../binutils-poison.patch                          |    0
 .../binutils-uclibc-100-uclibc-conf.patch          |    0
 ...binutils-uclibc-300-001_ld_makefile_patch.patch |    0
 ...binutils-uclibc-300-006_better_file_error.patch |    0
 ...ils-uclibc-300-012_check_ldrunpath_length.patch |   19 +-
 .../binutils-uclibc-gas-needs-libm.patch           |    0
 .../binutils-x86_64_i386_biarch.patch              |    0
 .../libiberty_path_fix.patch                       |    0
 .../binutils-2.21/libtool-2.4-update.patch         |18719 ++++++++++++++++++++
 .../binutils/binutils-2.21/libtool-rpath-fix.patch |   36 +
 ...n_2.20.1.bb => binutils-cross-canadian_2.21.bb} |    2 +-
 ...tils-cross_2.20.1.bb => binutils-cross_2.21.bb} |    1 -
 ...rosssdk_2.20.1.bb => binutils-crosssdk_2.21.bb} |    2 +-
 .../{binutils_2.20.1.bb => binutils_2.21.bb}       |   21 +-
 meta/recipes-devtools/libtool/libtool-cross_2.4.bb |   18 +-
 .../recipes-devtools/libtool/libtool-native_2.4.bb |   14 +-
 .../libtool/libtool-nativesdk_2.4.bb               |   10 +-
 meta/recipes-devtools/libtool/libtool.inc          |   22 +-
 .../libtool/libtool/cross_compile.patch            |   38 -
 .../libtool/libtool/fix-final-rpath.patch          |   36 +
 .../libtool/libtool/rename-with-sysroot.patch      |  824 +
 .../libtool/libtool/resolve-sysroot.patch          |   40 +
 .../libtool/libtool/use-sysroot-in-libpath.patch   |   20 +
 meta/recipes-devtools/libtool/libtool_2.4.bb       |   12 +-
 34 files changed, 19789 insertions(+), 257 deletions(-)
 delete mode 100644 meta/recipes-devtools/binutils/binutils-2.20.1/binutils-2.16.1-e300c2c3.patch
 delete mode 100644 meta/recipes-devtools/binutils/binutils-2.20.1/binutils-libtool.patch
 delete mode 100644 meta/recipes-devtools/binutils/binutils-2.20.1/binutils-mips-pie.patch
 rename meta/recipes-devtools/binutils/{binutils-2.20.1 => binutils-2.21}/110-arm-eabi-conf.patch (100%)
 create mode 100644 meta/recipes-devtools/binutils/binutils-2.21/binutils-2.19.1-ld-sysroot.patch
 rename meta/recipes-devtools/binutils/{binutils-2.20.1 => binutils-2.21}/binutils-poison.patch (100%)
 rename meta/recipes-devtools/binutils/{binutils-2.20.1 => binutils-2.21}/binutils-uclibc-100-uclibc-conf.patch (100%)
 rename meta/recipes-devtools/binutils/{binutils-2.20.1 => binutils-2.21}/binutils-uclibc-300-001_ld_makefile_patch.patch (100%)
 rename meta/recipes-devtools/binutils/{binutils-2.20.1 => binutils-2.21}/binutils-uclibc-300-006_better_file_error.patch (100%)
 rename meta/recipes-devtools/binutils/{binutils-2.20.1 => binutils-2.21}/binutils-uclibc-300-012_check_ldrunpath_length.patch (70%)
 rename meta/recipes-devtools/binutils/{binutils-2.20.1 => binutils-2.21}/binutils-uclibc-gas-needs-libm.patch (100%)
 rename meta/recipes-devtools/binutils/{binutils-2.20.1 => binutils-2.21}/binutils-x86_64_i386_biarch.patch (100%)
 rename meta/recipes-devtools/binutils/{binutils-2.20.1 => binutils-2.21}/libiberty_path_fix.patch (100%)
 create mode 100644 meta/recipes-devtools/binutils/binutils-2.21/libtool-2.4-update.patch
 create mode 100644 meta/recipes-devtools/binutils/binutils-2.21/libtool-rpath-fix.patch
 rename meta/recipes-devtools/binutils/{binutils-cross-canadian_2.20.1.bb => binutils-cross-canadian_2.21.bb} (86%)
 rename meta/recipes-devtools/binutils/{binutils-cross_2.20.1.bb => binutils-cross_2.21.bb} (98%)
 rename meta/recipes-devtools/binutils/{binutils-crosssdk_2.20.1.bb => binutils-crosssdk_2.21.bb} (96%)
 rename meta/recipes-devtools/binutils/{binutils_2.20.1.bb => binutils_2.21.bb} (72%)
 delete mode 100644 meta/recipes-devtools/libtool/libtool/cross_compile.patch
 create mode 100644 meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch
 create mode 100644 meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch
 create mode 100644 meta/recipes-devtools/libtool/libtool/resolve-sysroot.patch
 create mode 100644 meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch
#1 lore raw

PATCH 1/9 libtool: changes to enable sysroot support

* Added OE patches by Khem Raj which enable sysroot support and rename the command line option --with-sysroot to --with-libtool-sysroot to avoid conflicts with binutils and gcc
* Stage the -cross and -native libtool in the same relative path so it can be accessed equally well from recipes using BBCLASSEXTEND = "native"
* Removed obsolete cross_compile.patch
* Reorganized common things to libtool.inc
* Changed SRC_URI_append to SRC_URI +=
* PR bump for all recipes

---
 meta/recipes-devtools/libtool/libtool-cross_2.4.bb |   18 +-
 .../recipes-devtools/libtool/libtool-native_2.4.bb |   14 +-
 .../libtool/libtool-nativesdk_2.4.bb               |   10 +-
 meta/recipes-devtools/libtool/libtool.inc          |   21 +-
 .../libtool/libtool/cross_compile.patch            |   38 -
 .../libtool/libtool/rename-with-sysroot.patch      |  824 ++++++++++++++++++++
 .../libtool/libtool/resolve-sysroot.patch          |   40 +
 .../libtool/libtool/use-sysroot-in-libpath.patch   |   20 +
 meta/recipes-devtools/libtool/libtool_2.4.bb       |   12 +-
 9 files changed, 927 insertions(+), 70 deletions(-)
 delete mode 100644 meta/recipes-devtools/libtool/libtool/cross_compile.patch
 create mode 100644 meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch
 create mode 100644 meta/recipes-devtools/libtool/libtool/resolve-sysroot.patch
 create mode 100644 meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch
meta/recipes-devtools/libtool/libtool-cross_2.4.bb +10 -8
index 6ea96a5..91ab64b 100644
@@ -1,9 +1,10 @@
-require libtool_${PV}.bb
+require libtool.inc
 
-PR = "r0"
-PACKAGES = ""
-SRC_URI_append = " file://cross_compile.patch \
-		   file://prefix.patch "
+PR = "r1"
+SRC_URI += "file://prefix.patch"
+
+SRC_URI[md5sum] = "b32b04148ecdd7344abc6fe8bd1bb021"
+SRC_URI[sha256sum] = "13df57ab63a94e196c5d6e95d64e53262834fe780d5e82c28f177f9f71ddf62e"
 
 DEPENDS += "libtool-native"
 
@@ -18,10 +19,11 @@ do_install () {
 	install -d ${D}${bindir}/
 	install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/${HOST_SYS}-libtool
 	install -d ${D}${datadir}/libtool/
+	install -d ${D}${datadir}/libtool/config
 	install -d ${D}${datadir}/aclocal/
-	install -c ${S}/libltdl/config/config.guess ${D}${datadir}/libtool/
-	install -c ${S}/libltdl/config/config.sub ${D}${datadir}/libtool/
-	install -c -m 0644 ${S}/libltdl/config/ltmain.sh ${D}${datadir}/libtool/
+	install -c ${S}/libltdl/config/config.guess ${D}${datadir}/libtool/config/
+	install -c ${S}/libltdl/config/config.sub ${D}${datadir}/libtool/config/
+	install -c -m 0644 ${S}/libltdl/config/ltmain.sh ${D}${datadir}/libtool/config/
 	install -c -m 0644 ${S}/libltdl/m4/libtool.m4 ${D}${datadir}/aclocal/
 	install -c -m 0644 ${S}/libltdl/m4/ltdl.m4 ${D}${datadir}/aclocal/
 }
meta/recipes-devtools/libtool/libtool-native_2.4.bb +8 -6
index 4ad660b..014c9fa 100644
@@ -1,13 +1,17 @@
-require libtool_${PV}.bb
+require libtool.inc
 
 DEPENDS = ""
 
-PR = "r0"
-SRC_URI_append = " file://cross_compile.patch \
-		   file://prefix.patch "
+PR = "r1"
+SRC_URI += "file://prefix.patch"
+
+SRC_URI[md5sum] = "b32b04148ecdd7344abc6fe8bd1bb021"
+SRC_URI[sha256sum] = "13df57ab63a94e196c5d6e95d64e53262834fe780d5e82c28f177f9f71ddf62e"
 
 inherit native
 
+EXTRA_OECONF = " --with-libtool-sysroot=${STAGING_DIR_NATIVE}"
+
 do_configure_prepend () {
 	# Remove any existing libtool m4 since old stale versions would break
 	# any upgrade
@@ -21,5 +25,3 @@ do_install () {
 	install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/${HOST_SYS}-libtool
 }
 
-SRC_URI[md5sum] = "b32b04148ecdd7344abc6fe8bd1bb021"
-SRC_URI[sha256sum] = "13df57ab63a94e196c5d6e95d64e53262834fe780d5e82c28f177f9f71ddf62e"
meta/recipes-devtools/libtool/libtool-nativesdk_2.4.bb +7 -3
index c9f24a9..d4d075f 100644
@@ -1,8 +1,12 @@
 require libtool_${PV}.bb
 
-PR = "r0"
-SRC_URI_append = " file://cross_compile.patch \
-		   file://prefix.patch "
+# Let nativesdk recipe not provide PACKAGES provided by libtool.
+# Otherwise when an image wants say libltdl-dev, it picks up
+# libtool-nativesdk instead of libtool recipe to provide it.
+PACKAGES = ""
+
+PR = "r1"
+SRC_URI += "file://prefix.patch"
 
 inherit nativesdk
 
meta/recipes-devtools/libtool/libtool.inc +16 -5
index 9690e3b..bccb769 100644
@@ -1,14 +1,25 @@
 SUMMARY = "Generic library support script"
-DESCRIPTION = "This is GNU libtool, a generic library support script.  Libtool hides \
-the complexity of generating special library types (such as shared \
-libraries) behind a consistent interface."
+DESCRIPTION = "This is GNU libtool, a generic library support script. \
+Libtool hides the complexity of generating special library types \
+(such as shared libraries) behind a consistent interface."
 HOMEPAGE = "http://www.gnu.org/software/libtool/libtool.html"
 SECTION = "devel"
 LICENSE = "GPLv2, LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
-    file://libltdl/COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06 "
+    file://libltdl/COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
 
 SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
            file://trailingslash.patch \
-           file://prefix-manpage-fix.patch "
+           file://prefix-manpage-fix.patch \
+           file://rename-with-sysroot.patch \
+           file://resolve-sysroot.patch \
+           file://use-sysroot-in-libpath.patch"
 
+do_compile_prepend () {
+	# Sometimes this file doesn't get rebuilt, force the issue
+	rm -f ${S}/libltdl/config/ltmain.sh
+	make libltdl/config/ltmain.sh
+}
+
+inherit autotools
+EXTRA_AUTORECONF = "--exclude=libtoolize"
meta/recipes-devtools/libtool/libtool/cross_compile.patch deleted +0 -38
deleted file mode 100644
index 28539ff..0000000
@@ -1,38 +0,0 @@
-Tweaks to make cross-compiling work combined and updated from various
-older patches, some by Chris Larson.
-Not upstreable in this form.
-
-RP - 01/05/2008
-
-Index: libtool-2.4/libltdl/config/ltmain.m4sh
-===================================================================
---- libtool-2.4.orig/libltdl/config/ltmain.m4sh
-+++ libtool-2.4/libltdl/config/ltmain.m4sh
-@@ -6121,8 +6121,6 @@ func_mode_link ()
- 		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
-@@ -6277,7 +6275,17 @@ func_mode_link ()
- 		  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
meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch new file +824 -0

824 lines not on this page · raw message

meta/recipes-devtools/libtool/libtool/resolve-sysroot.patch new file +40 -0
new file mode 100644
index 0000000..54f7f5b
@@ -0,0 +1,40 @@
+Sometimes .las have =/a/b/c.la in dependency_libs. This should be
+resolved to sysroot.
+
+-Khem Raj <[email protected]>
+
+Index: libtool-2.4/libltdl/config/ltmain.m4sh
+===================================================================
+--- libtool-2.4.orig/libltdl/config/ltmain.m4sh
++++ libtool-2.4/libltdl/config/ltmain.m4sh
+@@ -8479,7 +8479,8 @@ EOF
+ 	      *.la)
+ 		func_basename "$deplib"
+ 		name="$func_basename_result"
+-		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
++		func_resolve_sysroot "$deplib"
++		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
+ 		test -z "$libdir" && \
+ 		  func_fatal_error "\`$deplib' is not a valid libtool archive"
+ 		func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+@@ -8505,7 +8506,9 @@ EOF
+ 	      *.la)
+ 	        func_basename "$lib"
+ 		name="$func_basename_result"
+-		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
++		func_resolve_sysroot "$lib"
++		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
++
+ 		test -z "$libdir" && \
+ 		  func_fatal_error "\`$lib' is not a valid libtool archive"
+ 		func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
+@@ -8524,7 +8527,8 @@ EOF
+ 		# the library:
+ 		func_basename "$lib"
+ 		name="$func_basename_result"
+-		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
++		func_resolve_sysroot "$lib"
++		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
+ 		test -z "$libdir" && \
+ 		  func_fatal_error "\`$lib' is not a valid libtool archive"
+ 		func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch new file +20 -0
new file mode 100644
index 0000000..4d9e90c
@@ -0,0 +1,20 @@
+When using sysroot we should append it to libdir, which is helpful in
+cross builds as the system is staged in the sysroot. For normal builds,
+i.e. when lt_sysroot is not set, it will still behave the same and add
+-L/usr/lib to the relink command.
+
+-Khem Raj <[email protected]>
+
+Index: libtool-2.4/libltdl/config/ltmain.m4sh
+===================================================================
+--- libtool-2.4.orig/libltdl/config/ltmain.m4sh
++++ libtool-2.4/libltdl/config/ltmain.m4sh
+@@ -6122,7 +6122,7 @@ func_mode_link ()
+ 	      fi
+ 	    else
+ 	      # We cannot seem to hardcode it, guess we'll fake it.
+-	      add_dir="-L$libdir"
++	      add_dir="-L$lt_sysroot$libdir"
+ 	      # Try looking first in the location we're being installed to.
+ 	      if test -n "$inst_prefix_dir"; then
+ 		case $libdir in
meta/recipes-devtools/libtool/libtool_2.4.bb +2 -10
index b5ec33e..23fdf6c 100644
@@ -1,7 +1,7 @@
 require libtool.inc
 DEPENDS = "libtool-native"
 
-PR = "r0"
+PR = "r1"
 
 PACKAGES =+ "libltdl libltdl-dev libltdl-dbg"
 FILES_${PN} += "${datadir}/aclocal*"
@@ -9,15 +9,7 @@ FILES_libltdl = "${libdir}/libltdl.so.*"
 FILES_libltdl-dev = "${libdir}/libltdl.* ${includedir}/ltdl.h"
 FILES_libltdl-dbg = "${libdir}/.debug/"
 
-inherit autotools
-
-EXTRA_AUTORECONF = "--exclude=libtoolize"
-
-do_compile_prepend () {
-	# Sometimes this file doesn't get rebuilt, force the issue
-	rm -f ${S}/libltdl/config/ltmain.sh
-	make libltdl/config/ltmain.sh
-}
+EXTRA_OECONF = "--with-sysroot"
 
 #
 # We want the results of libtool-cross preserved - don't stage anything ourselves.
Signature · 1 line
1.7.1
#2 lore raw

Re: [PATCH 1/9] libtool: changes to enable sysroot support

Quoted 11 lines · Scott Garman

* Added OE patches by Khem Raj which enable sysroot support and rename the command line option --with-sysroot to --with-libtool-sysroot to avoid conflicts with binutils and gcc
* Stage the -cross and -native libtool in the same relative path so it can be accessed equally well from recipes using BBCLASSEXTEND = "native"
* Removed obsolete cross_compile.patch
* Reorganized common things to libtool.inc
* Changed SRC_URI_append to SRC_URI +=
* PR bump for all recipes

I'm afraid this patch has too many changes rolled into one. Not all of these changes are sysroot related.

Quoted 25 lines
meta/recipes-devtools/libtool/libtool-cross_2.4.bb +7 -5
index 6ea96a5..91ab64b 100644
@@ -1,9 +1,10 @@
-require libtool_${PV}.bb
+require libtool.inc
 
-PR = "r0"
-PACKAGES = ""
-SRC_URI_append = " file://cross_compile.patch \
-		   file://prefix.patch "
+PR = "r1"
+SRC_URI += "file://prefix.patch"
+
+SRC_URI[md5sum] = "b32b04148ecdd7344abc6fe8bd1bb021"
+SRC_URI[sha256sum] = "13df57ab63a94e196c5d6e95d64e53262834fe780d5e82c28f177f9f71ddf62e"
 
 DEPENDS += "libtool-native"
 
@@ -18,10 +19,11 @@ do_install () {
 	install -d ${D}${bindir}/
 	install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/${HOST_SYS}-libtool
 	install -d ${D}${datadir}/libtool/
+	install -d ${D}${datadir}/libtool/config

meta/recipes-devtools/libtool/libtool-cross_2.4.bb do_install () { · line 29

Quoted 10 lines
meta/recipes-devtools/libtool/libtool-cross_2.4.bb +3 -3
 	install -d ${D}${datadir}/aclocal/
-	install -c ${S}/libltdl/config/config.guess ${D}${datadir}/libtool/
-	install -c ${S}/libltdl/config/config.sub ${D}${datadir}/libtool/
-	install -c -m 0644 ${S}/libltdl/config/ltmain.sh ${D}${datadir}/libtool/
+	install -c ${S}/libltdl/config/config.guess ${D}${datadir}/libtool/config/
+	install -c ${S}/libltdl/config/config.sub ${D}${datadir}/libtool/config/
+	install -c -m 0644 ${S}/libltdl/config/ltmain.sh ${D}${datadir}/libtool/config/
 	install -c -m 0644 ${S}/libltdl/m4/libtool.m4 ${D}${datadir}/aclocal/
 	install -c -m 0644 ${S}/libltdl/m4/ltdl.m4 ${D}${datadir}/aclocal/
 }

The PACKAGES = "" is dropped here?

Quoted 41 lines
meta/recipes-devtools/libtool/libtool-native_2.4.bb +8 -6
index 4ad660b..014c9fa 100644
@@ -1,13 +1,17 @@
-require libtool_${PV}.bb
+require libtool.inc
 
 DEPENDS = ""
 
-PR = "r0"
-SRC_URI_append = " file://cross_compile.patch \
-		   file://prefix.patch "
+PR = "r1"
+SRC_URI += "file://prefix.patch"
+
+SRC_URI[md5sum] = "b32b04148ecdd7344abc6fe8bd1bb021"
+SRC_URI[sha256sum] = "13df57ab63a94e196c5d6e95d64e53262834fe780d5e82c28f177f9f71ddf62e"
 
 inherit native
 
+EXTRA_OECONF = " --with-libtool-sysroot=${STAGING_DIR_NATIVE}"
+
 do_configure_prepend () {
 	# Remove any existing libtool m4 since old stale versions would break
 	# any upgrade
@@ -21,5 +25,3 @@ do_install () {
 	install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/${HOST_SYS}-libtool
 }
 
-SRC_URI[md5sum] = "b32b04148ecdd7344abc6fe8bd1bb021"
-SRC_URI[sha256sum] = "13df57ab63a94e196c5d6e95d64e53262834fe780d5e82c28f177f9f71ddf62e"
meta/recipes-devtools/libtool/libtool-nativesdk_2.4.bb +0 -2
index c9f24a9..d4d075f 100644
@@ -1,8 +1,12 @@
 require libtool_${PV}.bb
 
-PR = "r0"
-SRC_URI_append = " file://cross_compile.patch \

meta/recipes-devtools/libtool/libtool-nativesdk_2.4.bb line 11

Quoted 10 lines
meta/recipes-devtools/libtool/libtool-nativesdk_2.4.bb +7 -1
-		   file://prefix.patch "
+# Let nativesdk recipe not provide PACKAGES provided by libtool.
+# Otherwise when an image wants say libltdl-dev, it picks up
+# libtool-nativesdk instead of libtool recipe to provide it.
+PACKAGES = ""
+
+PR = "r1"
+SRC_URI += "file://prefix.patch"
 
 inherit nativesdk

and in particular, this PACKAGES setting sounds totally wrong to me.

Now the trouble is I can't take any of this work without unravelling these two changes that worry me.

Cheers,

Richard

#3 lore raw

Re: [PATCH 1/9] libtool: changes to enable sysroot support

Quoted 13 lines · Richard Purdie
Quoted 11 lines · Scott Garman

* Added OE patches by Khem Raj which enable sysroot support and rename the command line option --with-sysroot to --with-libtool-sysroot to avoid conflicts with binutils and gcc
* Stage the -cross and -native libtool in the same relative path so it can be accessed equally well from recipes using BBCLASSEXTEND = "native"
* Removed obsolete cross_compile.patch
* Reorganized common things to libtool.inc
* Changed SRC_URI_append to SRC_URI +=
* PR bump for all recipes

Quoted 2 lines

I'm afraid this patch has too many changes rolled into one. Not all of these changes are sysroot related.

In the interests of moving this forward quickly, I've put together:

http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=rpurdie/libtool

which is this patch split out into three with some ideas/improvements from me on the layout.

Your nativesdk PACKAGES change is wrong, the correct fix is to call libltdl libltdl-nativesdk in the nativesdk case. The simplest way is:

PKGSUFFIX = ""
PACKAGES = "libltdl${PKGSUFFIX}"

and then change PKGSUFFIX in the nativesdk recipe.

I really wasn't sure about the -cross recipe changes. The change to use libtool.inc looked incorrect and the patch changes for the do_install also worried me a little and at least need more explanation. Dropping the PACKAGES line from the -cross recipe is also almost pretty certainly incorrect.

Can you see if you're happy with the revised patch versions above and also send out anything else you think is missing such as the suffix fix above please.

Cheers,

Richard

#4 lore raw

PATCH 2/9 libtool: fix library RPATHs

In reply to Scott Garman

Enabling sysroot support 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 <[email protected]>

---
 meta/recipes-devtools/libtool/libtool.inc          |    3 +-
 .../libtool/libtool/fix-final-rpath.patch          |   36 ++++++++++++++++++++
 2 files changed, 38 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch
meta/recipes-devtools/libtool/libtool.inc +2 -1
index bccb769..8701c82 100644
@@ -13,7 +13,8 @@ SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
            file://prefix-manpage-fix.patch \
            file://rename-with-sysroot.patch \
            file://resolve-sysroot.patch \
-           file://use-sysroot-in-libpath.patch"
+           file://use-sysroot-in-libpath.patch \
+           file://fix-final-rpath.patch"
 
 do_compile_prepend () {
 	# Sometimes this file doesn't get rebuilt, force the issue
meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch new file +36 -0
new file mode 100644
index 0000000..402e2c6
@@ -0,0 +1,36 @@
+Enalbing sysroot support 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 <[email protected]>
+Signed-off-by: Scott Garman <[email protected]>
+
+Index: libtool-2.4/libltdl/config/ltmain.m4sh
+===================================================================
+--- libtool-2.4.orig/libltdl/config/ltmain.m4sh	2011-01-13 14:10:14.580025108 +0000
++++ libtool-2.4/libltdl/config/ltmain.m4sh	2011-01-13 15:10:18.540025113 +0000
+@@ -7246,9 +7246,11 @@
+ 	  test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
+ 	  for libdir in $rpath; do
+ 	    if test -n "$hardcode_libdir_flag_spec"; then
++		  func_replace_sysroot "$libdir"
++		  libdir=$func_replace_sysroot_result
++		  func_stripname '=' '' "$libdir"
++		  libdir=$func_stripname_result
+ 	      if test -n "$hardcode_libdir_separator"; then
+-		func_replace_sysroot "$libdir"
+-		libdir=$func_replace_sysroot_result
+ 		if test -z "$hardcode_libdirs"; then
+ 		  hardcode_libdirs="$libdir"
+ 		else
+@@ -7981,6 +7983,10 @@
+       hardcode_libdirs=
+       for libdir in $compile_rpath $finalize_rpath; do
+ 	if test -n "$hardcode_libdir_flag_spec"; then
++	  func_replace_sysroot "$libdir"
++	  libdir=$func_replace_sysroot_result
++	  func_stripname '=' '' "$libdir"
++	  libdir=$func_stripname_result
+ 	  if test -n "$hardcode_libdir_separator"; then
+ 	    if test -z "$hardcode_libdirs"; then
+ 	      hardcode_libdirs="$libdir"
Signature · 1 line
1.7.1
#5 lore raw

PATCH 3/9 autotools.bbclass: libtool sysroot support changes

In reply to Scott Garman

We do not do it for native recipes, as the native compiler should fall back to a prefix of /usr and not solely depend on the sysroot. Otherwise we end up staging everything in the native sysroot before we start to build target recipes.

Also remove la mangling code, which is no longer necessary.

Commit derived from Khem Raj's OE commits.

---
 meta/classes/autotools.bbclass |   25 +++++++++----------------
 1 files changed, 9 insertions(+), 16 deletions(-)
meta/classes/autotools.bbclass +9 -16
index 324cbff..39f5036 100644
@@ -38,6 +38,12 @@ def autotools_set_crosscompiling(d):
 		return " cross_compiling=yes"
 	return ""
 
+def append_libtool_sysroot(d):
+	# Only supply libtool sysroot option for non-native packages
+	if not bb.data.inherits_class('native', d):
+		return '--with-libtool-sysroot=${STAGING_DIR_HOST}'
+	return ""
+
 # EXTRA_OECONF_append = "${@autotools_set_crosscompiling(d)}"
 
 CONFIGUREOPTS = " --build=${BUILD_SYS} \
@@ -56,14 +62,13 @@ CONFIGUREOPTS = " --build=${BUILD_SYS} \
 		  --includedir=${includedir} \
 		  --oldincludedir=${oldincludedir} \
 		  --infodir=${infodir} \
-		  --mandir=${mandir}"
+		  --mandir=${mandir} \
+		  ${@append_libtool_sysroot(d)}"
 
 oe_runconf () {
 	if [ -x ${S}/configure ] ; then
 		cfgcmd="${S}/configure \
-		        ${CONFIGUREOPTS} \
-			${EXTRA_OECONF} \
-		    $@"
+		${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
 		oenote "Running $cfgcmd..."
 		$cfgcmd || oefatal "oe_runconf failed" 
 	else
@@ -152,18 +157,6 @@ autotools_do_install() {
 	oe_runmake 'DESTDIR=${D}' install
 }
 
-PACKAGE_PREPROCESS_FUNCS += "autotools_prepackage_lamangler"
-
-autotools_prepackage_lamangler () {
-        for i in `find ${PKGD} -name "*.la"` ; do \
-            sed -i -e 's:${STAGING_LIBDIR}:${libdir}:g;' \
-                   -e 's:${D}::g;' \
-                   -e 's:-I${WORKDIR}\S*: :g;' \
-                   -e 's:-L${WORKDIR}\S*: :g;' \
-                   $i
-	done
-}
-
 autotools_stage_dir() {
  	sysroot_stage_dir $1 $2
 }
Signature · 1 line
1.7.1
#6 lore raw

PATCH 4/9 staging.bbclass, utils.bbclass: remove la mangling code

In reply to Scott Garman

libtool v2.4 --with-libtool-sysroot eliminates the need for la mangling.

Based on Khem Raj's OE commits.

---
 meta/classes/staging.bbclass |   14 --------------
 meta/classes/utils.bbclass   |   15 ++-------------
 2 files changed, 2 insertions(+), 27 deletions(-)
meta/classes/staging.bbclass +0 -14
index a7f3258..438cf37 100644
@@ -26,20 +26,6 @@ sysroot_stage_libdir() {
 	dest="$2"
 
 	sysroot_stage_dir $src $dest
-
-	olddir=`pwd`
-	cd $dest
-	las=$(find . -name \*.la -type f)
-	cd $olddir
-	echo "Found la files: $las"		 
-	for i in $las
-	do
-		sed -e 's/^installed=yes$/installed=no/' \
-		    -e '/^dependency_libs=/s,${WORKDIR}[[:alnum:]/\._+-]*/\([[:alnum:]\._+-]*\),${STAGING_LIBDIR}/\1,g' \
-		    -e "/^dependency_libs=/s,\([[:space:]']\)${libdir},\1${STAGING_LIBDIR},g" \
-		    -e "/^dependency_libs=/s,\([[:space:]']\)${base_libdir},\1${STAGING_DIR_HOST}${base_libdir},g" \
-		    -i $dest/$i
-	done
 }
 
 sysroot_stage_dirs() {
meta/classes/utils.bbclass +2 -13
index 746f46c..4d4b995 100644
@@ -199,19 +199,8 @@ oe_libinstall() {
 		__runcmd install -m 0644 $dota $destpath/
 	fi
 	if [ -f "$dotlai" -a -n "$libtool" ]; then
-		if test -n "$staging_install"
-		then
-			# stop libtool using the final directory name for libraries
-			# in staging:
-			__runcmd rm -f $destpath/$libname.la
-			__runcmd sed -e 's/^installed=yes$/installed=no/' \
-				     -e '/^dependency_libs=/s,${WORKDIR}[[:alnum:]/\._+-]*/\([[:alnum:]\._+-]*\),${STAGING_LIBDIR}/\1,g' \
-				     -e "/^dependency_libs=/s,\([[:space:]']\)${libdir},\1${STAGING_LIBDIR},g" \
-				     $dotlai >$destpath/$libname.la
-		else
-			rm -f $destpath/$libname.la
-			__runcmd install -m 0644 $dotlai $destpath/$libname.la
-		fi
+		rm -f $destpath/$libname.la
+		__runcmd install -m 0644 $dotlai $destpath/$libname.la
 	fi
 
 	for name in $library_names; do
Signature · 1 line
1.7.1
#7 lore raw

PATCH 5/9 insane.bbclass: skip checks on .la installed status

In reply to Scott Garman

Enabling libtool sysroot support triggers these errors but they are a valid change in behavior.

---
 meta/classes/insane.bbclass |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
meta/classes/insane.bbclass +0 -5
index 3ab4c2c..6f06d85 100644
@@ -427,11 +427,6 @@ def package_qa_check_staged(path,d):
             path = os.path.join(root,file)
             if file.endswith(".la"):
                 file_content = open(path).read()
-                # Don't check installed status for native/cross packages
-                if not bb.data.inherits_class("native", d) and not bb.data.inherits_class("cross", d):
-                    if installed in file_content:
-                        error_msg = "%s failed sanity test (installed) in path %s" % (file,root)
-                        sane = package_qa_handle_error(5, error_msg, "staging", path, d)
                 if workdir in file_content:
                     error_msg = "%s failed sanity test (workdir) in path %s" % (file,root)
                     sane = package_qa_handle_error(8, error_msg, "staging", path, d)
Signature · 1 line
1.7.1
#8 lore raw

Re: [PATCH 5/9] insane.bbclass: skip checks on .la installed status

Op 19 jan 2011, om 05:19 heeft Scott Garman het volgende geschreven:

Quoted 2 lines

Enabling libtool sysroot support triggers these errors but they are a valid change in behavior.

Based on the RPATH discussion off-list, should we add a check for RPATH pointing to staging as well? I know RPs patches fix it, but it would be nice to catch if it starts happening again.

regards,

Koen

Quoted 29 lines

---
meta/classes/insane.bbclass | 5 -----

1 files changed, 0 insertions(+), 5 deletions(-)
meta/classes/insane.bbclass +0 -5
index 3ab4c2c..6f06d85 100644
@@ -427,11 +427,6 @@ def package_qa_check_staged(path,d):
            path = os.path.join(root,file)
            if file.endswith(".la"):
                file_content = open(path).read()
-                # Don't check installed status for native/cross packages
-                if not bb.data.inherits_class("native", d) and not bb.data.inherits_class("cross", d):
-                    if installed in file_content:
-                        error_msg = "%s failed sanity test (installed) in path %s" % (file,root)
-                        sane = package_qa_handle_error(5, error_msg, "staging", path, d)
                if workdir in file_content:
                    error_msg = "%s failed sanity test (workdir) in path %s" % (file,root)
                    sane = package_qa_handle_error(8, error_msg, "staging", path, d)
Signature · 6 lines
1.7.1

_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky
#9 lore raw

Re: [PATCH 5/9] insane.bbclass: skip checks on .la installed status

Quoted 6 lines · Koen Kooi

Op 19 jan 2011, om 05:19 heeft Scott Garman het volgende geschreven:

Quoted 2 lines

Enabling libtool sysroot support triggers these errors but they are a valid change in behavior.

Based on the RPATH discussion off-list, should we add a check for RPATH pointing to staging as well? I know RPs patches fix it, but it would be nice to catch if it starts happening again.

By staging I assume you're referring to the sysroot dir? If so, we do have that QA check in insane.bbclass already (see package_qa_check_rpath), and I have been relying on it to detect the problems I was reporting. This patch doesn't alter or remove that.

If I'm misunderstanding, feel free to correct me.

Scott

Quoted 30 lines
Quoted 29 lines

---
meta/classes/insane.bbclass | 5 -----

1 files changed, 0 insertions(+), 5 deletions(-)
meta/classes/insane.bbclass +0 -6
index 3ab4c2c..6f06d85 100644
@@ -427,11 +427,6 @@ def package_qa_check_staged(path,d):
             path = os.path.join(root,file)
             if file.endswith(".la"):
                 file_content = open(path).read()
-                # Don't check installed status for native/cross packages
-                if not bb.data.inherits_class("native", d) and not bb.data.inherits_class("cross", d):
-                    if installed in file_content:
-                        error_msg = "%s failed sanity test (installed) in path %s" % (file,root)
-                        sane = package_qa_handle_error(5, error_msg, "staging", path, d)
                 if workdir in file_content:
                     error_msg = "%s failed sanity test (workdir) in path %s" % (file,root)
                     sane = package_qa_handle_error(8, error_msg, "staging", path, d)
--

1.7.1

_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky

Signature · 2 lines
Scott Garman
Embedded Linux Distro Engineer - Yocto Project
#10 lore raw

Re: [PATCH 5/9] insane.bbclass: skip checks on .la installed status

Op 19 jan 2011, om 19:27 heeft Scott Garman het volgende geschreven:

Quoted 9 lines · Koen Kooi
Quoted 6 lines

Op 19 jan 2011, om 05:19 heeft Scott Garman het volgende geschreven:

Quoted 2 lines

Enabling libtool sysroot support triggers these errors but they are a valid change in behavior.

Based on the RPATH discussion off-list, should we add a check for RPATH pointing to staging as well? I know RPs patches fix it, but it would be nice to catch if it starts happening again.

By staging I assume you're referring to the sysroot dir? If so, we do have that QA check in insane.bbclass already (see package_qa_check_rpath), and I have been relying on it to detect the problems I was reporting. This patch doesn't alter or remove that.

And indeed it does have that already, time to 'port' that to OE :)

Quoted 40 lines

If I'm misunderstanding, feel free to correct me.

Scott

Quoted 30 lines
Quoted 29 lines

---
meta/classes/insane.bbclass | 5 -----

1 files changed, 0 insertions(+), 5 deletions(-)
meta/classes/insane.bbclass +0 -6
index 3ab4c2c..6f06d85 100644
@@ -427,11 +427,6 @@ def package_qa_check_staged(path,d):
            path = os.path.join(root,file)
            if file.endswith(".la"):
                file_content = open(path).read()
-                # Don't check installed status for native/cross packages
-                if not bb.data.inherits_class("native", d) and not bb.data.inherits_class("cross", d):
-                    if installed in file_content:
-                        error_msg = "%s failed sanity test (installed) in path %s" % (file,root)
-                        sane = package_qa_handle_error(5, error_msg, "staging", path, d)
                if workdir in file_content:
                    error_msg = "%s failed sanity test (workdir) in path %s" % (file,root)
                    sane = package_qa_handle_error(8, error_msg, "staging", path, d)
--

1.7.1

_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky

Signature · 2 lines
Scott Garman
Embedded Linux Distro Engineer - Yocto Project
#11 lore raw

PATCH 6/9 binutils: upgrade to 2.21 and add libtool sysroot support

In reply to Scott Garman

* Upgraded binutils to v2.21
* Incorporated libtool sysroot patches from OE
* Removed patches no longer needed or obsoleted by OE patches

---
 .../binutils-2.20.1/binutils-2.16.1-e300c2c3.patch |   18 -
 .../binutils-2.20.1/binutils-libtool.patch         |   67 -
 .../binutils-2.20.1/binutils-mips-pie.patch        |   29 -
 .../110-arm-eabi-conf.patch                        |    0
 .../binutils-2.21/binutils-2.19.1-ld-sysroot.patch |   37 +
 .../binutils-poison.patch                          |    0
 .../binutils-uclibc-100-uclibc-conf.patch          |    0
 ...binutils-uclibc-300-001_ld_makefile_patch.patch |    0
 ...binutils-uclibc-300-006_better_file_error.patch |    0
 ...ils-uclibc-300-012_check_ldrunpath_length.patch |   19 +-
 .../binutils-uclibc-gas-needs-libm.patch           |    0
 .../binutils-x86_64_i386_biarch.patch              |    0
 .../libiberty_path_fix.patch                       |    0
 .../binutils-2.21/libtool-2.4-update.patch         |18675 ++++++++++++++++++++
 ...n_2.20.1.bb => binutils-cross-canadian_2.21.bb} |    2 +-
 ...tils-cross_2.20.1.bb => binutils-cross_2.21.bb} |    1 -
 ...rosssdk_2.20.1.bb => binutils-crosssdk_2.21.bb} |    2 +-
 .../{binutils_2.20.1.bb => binutils_2.21.bb}       |   20 +-
 18 files changed, 18732 insertions(+), 138 deletions(-)
 delete mode 100644 meta/recipes-devtools/binutils/binutils-2.20.1/binutils-2.16.1-e300c2c3.patch
 delete mode 100644 meta/recipes-devtools/binutils/binutils-2.20.1/binutils-libtool.patch
 delete mode 100644 meta/recipes-devtools/binutils/binutils-2.20.1/binutils-mips-pie.patch
 rename meta/recipes-devtools/binutils/{binutils-2.20.1 => binutils-2.21}/110-arm-eabi-conf.patch (100%)
 create mode 100644 meta/recipes-devtools/binutils/binutils-2.21/binutils-2.19.1-ld-sysroot.patch
 rename meta/recipes-devtools/binutils/{binutils-2.20.1 => binutils-2.21}/binutils-poison.patch (100%)
 rename meta/recipes-devtools/binutils/{binutils-2.20.1 => binutils-2.21}/binutils-uclibc-100-uclibc-conf.patch (100%)
 rename meta/recipes-devtools/binutils/{binutils-2.20.1 => binutils-2.21}/binutils-uclibc-300-001_ld_makefile_patch.patch (100%)
 rename meta/recipes-devtools/binutils/{binutils-2.20.1 => binutils-2.21}/binutils-uclibc-300-006_better_file_error.patch (100%)
 rename meta/recipes-devtools/binutils/{binutils-2.20.1 => binutils-2.21}/binutils-uclibc-300-012_check_ldrunpath_length.patch (70%)
 rename meta/recipes-devtools/binutils/{binutils-2.20.1 => binutils-2.21}/binutils-uclibc-gas-needs-libm.patch (100%)
 rename meta/recipes-devtools/binutils/{binutils-2.20.1 => binutils-2.21}/binutils-x86_64_i386_biarch.patch (100%)
 rename meta/recipes-devtools/binutils/{binutils-2.20.1 => binutils-2.21}/libiberty_path_fix.patch (100%)
 create mode 100644 meta/recipes-devtools/binutils/binutils-2.21/libtool-2.4-update.patch
 rename meta/recipes-devtools/binutils/{binutils-cross-canadian_2.20.1.bb => binutils-cross-canadian_2.21.bb} (86%)
 rename meta/recipes-devtools/binutils/{binutils-cross_2.20.1.bb => binutils-cross_2.21.bb} (98%)
 rename meta/recipes-devtools/binutils/{binutils-crosssdk_2.20.1.bb => binutils-crosssdk_2.21.bb} (96%)
 rename meta/recipes-devtools/binutils/{binutils_2.20.1.bb => binutils_2.21.bb} (72%)
meta/recipes-devtools/binutils/binutils-2.20.1/binutils-2.16.1-e300c2c3.patch deleted +0 -18
deleted file mode 100644
index dfe9b18..0000000
@@ -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 <[email protected]>
-
-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),
meta/recipes-devtools/binutils/binutils-2.20.1/binutils-libtool.patch deleted +0 -67

67 lines not on this page · raw message

meta/recipes-devtools/binutils/binutils-2.20.1/binutils-mips-pie.patch deleted +0 -29
deleted file mode 100644
index c71f0ad..0000000
@@ -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 <[email protected]>, 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))
meta/recipes-devtools/binutils/binutils-2.21/110-arm-eabi-conf.patch renamed from meta/recipes-devtools/binutils/binutils-2.20.1/110-arm-eabi-conf.patch +0 -0
similarity index 100%
rename from meta/recipes-devtools/binutils/binutils-2.20.1/110-arm-eabi-conf.patch
rename to meta/recipes-devtools/binutils/binutils-2.21/110-arm-eabi-conf.patch
meta/recipes-devtools/binutils/binutils-2.21/binutils-2.19.1-ld-sysroot.patch new file +37 -0
new file mode 100644
index 0000000..adcabb4
@@ -0,0 +1,37 @@
+http://sourceware.org/bugzilla/show_bug.cgi?id=10340
+
+Signed-off-by: Sven Rebhan <[email protected]>
+
+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);
meta/recipes-devtools/binutils/binutils-2.21/binutils-poison.patch renamed from meta/recipes-devtools/binutils/binutils-2.20.1/binutils-poison.patch +0 -0
similarity index 100%
rename from meta/recipes-devtools/binutils/binutils-2.20.1/binutils-poison.patch
rename to meta/recipes-devtools/binutils/binutils-2.21/binutils-poison.patch
meta/recipes-devtools/binutils/binutils-2.21/binutils-uclibc-100-uclibc-conf.patch renamed from meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-100-uclibc-conf.patch +0 -0
similarity index 100%
rename from meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-100-uclibc-conf.patch
rename to meta/recipes-devtools/binutils/binutils-2.21/binutils-uclibc-100-uclibc-conf.patch
meta/recipes-devtools/binutils/binutils-2.21/binutils-uclibc-300-001_ld_makefile_patch.patch renamed from meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-001_ld_makefile_patch.patch +0 -0
similarity index 100%
rename from meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-001_ld_makefile_patch.patch
rename to meta/recipes-devtools/binutils/binutils-2.21/binutils-uclibc-300-001_ld_makefile_patch.patch
meta/recipes-devtools/binutils/binutils-2.21/binutils-uclibc-300-006_better_file_error.patch renamed from meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-006_better_file_error.patch +0 -0
similarity index 100%
rename from meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-006_better_file_error.patch
rename to meta/recipes-devtools/binutils/binutils-2.21/binutils-uclibc-300-006_better_file_error.patch
meta/recipes-devtools/binutils/binutils-2.21/binutils-uclibc-300-012_check_ldrunpath_length.patch renamed from meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-012_check_ldrunpath_length.patch +10 -9
similarity index 70%
rename from meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-012_check_ldrunpath_length.patch
rename to meta/recipes-devtools/binutils/binutils-2.21/binutils-uclibc-300-012_check_ldrunpath_length.patch
index 498651a..b6f5a25 100644
@@ -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)
+     {
meta/recipes-devtools/binutils/binutils-2.21/binutils-uclibc-gas-needs-libm.patch renamed from meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-gas-needs-libm.patch +0 -0
similarity index 100%
rename from meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-gas-needs-libm.patch
rename to meta/recipes-devtools/binutils/binutils-2.21/binutils-uclibc-gas-needs-libm.patch
meta/recipes-devtools/binutils/binutils-2.21/binutils-x86_64_i386_biarch.patch renamed from meta/recipes-devtools/binutils/binutils-2.20.1/binutils-x86_64_i386_biarch.patch +0 -0
similarity index 100%
rename from meta/recipes-devtools/binutils/binutils-2.20.1/binutils-x86_64_i386_biarch.patch
rename to meta/recipes-devtools/binutils/binutils-2.21/binutils-x86_64_i386_biarch.patch
meta/recipes-devtools/binutils/binutils-2.21/libiberty_path_fix.patch renamed from meta/recipes-devtools/binutils/binutils-2.20.1/libiberty_path_fix.patch +0 -0
similarity index 100%
rename from meta/recipes-devtools/binutils/binutils-2.20.1/libiberty_path_fix.patch
rename to meta/recipes-devtools/binutils/binutils-2.21/libiberty_path_fix.patch
meta/recipes-devtools/binutils/binutils-2.21/libtool-2.4-update.patch new file +18675 -0

2,817 lines not on this page · raw message

meta/recipes-devtools/binutils/binutils-cross-canadian_2.21.bb renamed from meta/recipes-devtools/binutils/binutils-cross-canadian_2.20.1.bb +1 -1
similarity index 86%
rename from meta/recipes-devtools/binutils/binutils-cross-canadian_2.20.1.bb
rename to meta/recipes-devtools/binutils/binutils-cross-canadian_2.21.bb
index 1621b77..7dad2a6 100644

Lines of this file are not shown. View the raw message.

meta/recipes-devtools/binutils/binutils-cross_2.21.bb renamed from meta/recipes-devtools/binutils/binutils-cross_2.20.1.bb +0 -1
similarity index 98%
rename from meta/recipes-devtools/binutils/binutils-cross_2.20.1.bb
rename to meta/recipes-devtools/binutils/binutils-cross_2.21.bb
index 8c7e4bc..01d99db 100644

Lines of this file are not shown. View the raw message.

meta/recipes-devtools/binutils/binutils-crosssdk_2.21.bb renamed from meta/recipes-devtools/binutils/binutils-crosssdk_2.20.1.bb +1 -1
similarity index 96%
rename from meta/recipes-devtools/binutils/binutils-crosssdk_2.20.1.bb
rename to meta/recipes-devtools/binutils/binutils-crosssdk_2.21.bb
index 88627f8..0d6efff 100644

Lines of this file are not shown. View the raw message.

meta/recipes-devtools/binutils/binutils_2.21.bb renamed from meta/recipes-devtools/binutils/binutils_2.20.1.bb +8 -12
similarity index 72%
rename from meta/recipes-devtools/binutils/binutils_2.20.1.bb
rename to meta/recipes-devtools/binutils/binutils_2.21.bb
index 75837b1..8282eb8 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.1

Part of the diff is not shown here. View the raw message.

#12 lore raw

PATCH 7/9 binutils: Fix QA staging errors for target binutils

In reply to Scott Garman

* The spurious paths were caused by a -L on commandline which pointed to build dir. So we dont use -L <wordir> -liberty instead use the libiberty.a directly on commandline effects are same but .la does not have the workdir path in deplibs

Patch obtained from OpenEmbedded, written by Khem Raj.

---
 .../binutils-2.21/libtool-2.4-update.patch         | 1648 ++++++++++----------
 1 files changed, 846 insertions(+), 802 deletions(-)
meta/recipes-devtools/binutils/binutils-2.21/libtool-2.4-update.patch +846 -802
index 7b4d390..52c4928 100644
@@ -1,7 +1,7 @@
 Index: binutils-2.21/libtool.m4
 ===================================================================
---- binutils-2.21.orig/libtool.m4
-+++ binutils-2.21/libtool.m4
+--- binutils-2.21.orig/libtool.m4	2010-01-09 13:11:31.000000000 -0800
++++ binutils-2.21/libtool.m4	2011-01-07 10:49:16.396101000 -0800
 @@ -1,7 +1,8 @@
  # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  #
@@ -22,7 +22,7 @@ Index: binutils-2.21/libtool.m4
  #   Written by Gordon Matzigkeit, 1996
  #
  #   This file is part of GNU Libtool.
-@@ -37,7 +39,7 @@ m4_define([_LT_COPYING], [dnl
+@@ -37,7 +39,7 @@
  # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  ])
  
@@ -31,7 +31,7 @@ Index: binutils-2.21/libtool.m4
  
  
  # LT_PREREQ(VERSION)
-@@ -92,7 +94,8 @@ _LT_SET_OPTIONS([$0], [$1])
+@@ -92,7 +94,8 @@
  LIBTOOL_DEPS="$ltmain"
  
  # Always use our own libtool.
@@ -41,7 +41,7 @@ Index: binutils-2.21/libtool.m4
  AC_SUBST(LIBTOOL)dnl
  
  _LT_SETUP
-@@ -166,10 +169,13 @@ _LT_DECL([], [exeext], [0], [Executable
+@@ -166,10 +169,13 @@
  dnl
  m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  m4_require([_LT_CHECK_SHELL_FEATURES])dnl
@@ -55,7 +55,7 @@ Index: binutils-2.21/libtool.m4
  
  _LT_CONFIG_LIBTOOL_INIT([
  # See if we are running on zsh, and set the options which allow our
-@@ -199,7 +205,7 @@ aix3*)
+@@ -199,7 +205,7 @@
  esac
  
  # Global variables:
@@ -64,7 +64,7 @@ Index: binutils-2.21/libtool.m4
  can_build_shared=yes
  
  # All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -632,7 +638,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_
+@@ -632,7 +638,7 @@
  m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  configured by $[0], generated by m4_PACKAGE_STRING.
  
@@ -73,7 +73,7 @@ Index: binutils-2.21/libtool.m4
  This config.lt script is free software; the Free Software Foundation
  gives unlimited permision to copy, distribute and modify it."
  
-@@ -746,15 +752,12 @@ _LT_EOF
+@@ -746,15 +752,12 @@
    # if finds mixed CR/LF and LF-only lines.  Since sed operates in
    # text mode, it properly converts lines to CR/LF.  This bash problem
    # is reportedly fixed, but why not run on old versions too?
@@ -93,7 +93,7 @@ Index: binutils-2.21/libtool.m4
      (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
    chmod +x "$ofile"
  ],
-@@ -980,6 +983,8 @@ _LT_EOF
+@@ -980,6 +983,8 @@
        $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
        echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
        $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
@@ -102,7 +102,7 @@ Index: binutils-2.21/libtool.m4
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -1069,30 +1074,41 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
+@@ -1069,30 +1074,41 @@
    fi
  ])
  
@@ -160,7 +160,7 @@ Index: binutils-2.21/libtool.m4
  ])# _LT_SYS_MODULE_PATH_AIX
  
  
-@@ -1117,7 +1133,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -1117,7 +1133,7 @@
  
  AC_MSG_CHECKING([how to print strings])
  # Test print first, because it will be a builtin if present.
@@ -169,7 +169,7 @@ Index: binutils-2.21/libtool.m4
     test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
    ECHO='print -r --'
  elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -1161,6 +1177,39 @@ _LT_DECL([], [ECHO], [1], [An echo progr
+@@ -1161,6 +1177,39 @@
  ])# _LT_PROG_ECHO_BACKSLASH
  
  
@@ -209,7 +209,7 @@ Index: binutils-2.21/libtool.m4
  # _LT_ENABLE_LOCK
  # ---------------
  m4_defun([_LT_ENABLE_LOCK],
-@@ -1307,14 +1356,47 @@ need_locks="$enable_libtool_lock"
+@@ -1307,14 +1356,47 @@
  ])# _LT_ENABLE_LOCK
  
  
@@ -262,7 +262,7 @@ Index: binutils-2.21/libtool.m4
  
  AC_CHECK_TOOL(STRIP, strip, :)
  test -z "$STRIP" && STRIP=:
-@@ -1610,7 +1692,7 @@ else
+@@ -1610,7 +1692,7 @@
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
@@ -271,7 +271,7 @@ Index: binutils-2.21/libtool.m4
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
-@@ -1654,10 +1736,10 @@ else
+@@ -1654,10 +1736,10 @@
  /* When -fvisbility=hidden is used, assume the code has been annotated
     correspondingly for the symbols needed.  */
  #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -284,7 +284,7 @@ Index: binutils-2.21/libtool.m4
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -2197,8 +2279,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -2197,8 +2279,9 @@
    need_version=no
    need_lib_prefix=no
  
@@ -296,7 +296,7 @@ Index: binutils-2.21/libtool.m4
      library_names_spec='$libname.dll.a'
      # DLL is installed to $(libdir)/../bin by postinstall_cmds
      postinstall_cmds='base_file=`basename \${file}`~
-@@ -2231,13 +2314,71 @@ m4_if([$1], [],[
+@@ -2231,13 +2314,71 @@
        library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
        ;;
      esac
@@ -369,7 +369,7 @@ Index: binutils-2.21/libtool.m4
    # FIXME: first we should search . and the directory the executable is in
    shlibpath_var=PATH
    ;;
-@@ -2333,7 +2474,7 @@ haiku*)
+@@ -2333,7 +2474,7 @@
    soname_spec='${libname}${release}${shared_ext}$major'
    shlibpath_var=LIBRARY_PATH
    shlibpath_overrides_runpath=yes
@@ -378,7 +378,7 @@ Index: binutils-2.21/libtool.m4
    hardcode_into_libs=yes
    ;;
  
-@@ -2941,6 +3082,11 @@ case $reload_flag in
+@@ -2941,6 +3082,11 @@
  esac
  reload_cmds='$LD$reload_flag -o $output$reload_objs'
  case $host_os in
@@ -390,7 +390,7 @@ Index: binutils-2.21/libtool.m4
    darwin*)
      if test "$GCC" = yes; then
        reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -3007,7 +3153,8 @@ mingw* | pw32*)
+@@ -3007,7 +3153,8 @@
      lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
      lt_cv_file_magic_cmd='func_win32_libid'
    else
@@ -400,7 +400,7 @@ Index: binutils-2.21/libtool.m4
      lt_cv_file_magic_cmd='$OBJDUMP -f'
    fi
    ;;
-@@ -3158,6 +3305,21 @@ tpf*)
+@@ -3158,6 +3305,21 @@
    ;;
  esac
  ])
@@ -422,7 +422,7 @@ Index: binutils-2.21/libtool.m4
  file_magic_cmd=$lt_cv_file_magic_cmd
  deplibs_check_method=$lt_cv_deplibs_check_method
  test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -3165,7 +3327,11 @@ test -z "$deplibs_check_method" && depli
+@@ -3165,7 +3327,11 @@
  _LT_DECL([], [deplibs_check_method], [1],
      [Method to check whether dependent libraries are shared objects])
  _LT_DECL([], [file_magic_cmd], [1],
@@ -435,7 +435,7 @@ Index: binutils-2.21/libtool.m4
  ])# _LT_CHECK_MAGIC_METHOD
  
  
-@@ -3268,6 +3434,67 @@ dnl aclocal-1.4 backwards compatibility:
+@@ -3268,6 +3434,67 @@
  dnl AC_DEFUN([AM_PROG_NM], [])
  dnl AC_DEFUN([AC_PROG_NM], [])
  
@@ -503,7 +503,7 @@ Index: binutils-2.21/libtool.m4
  
  # LT_LIB_M
  # --------
-@@ -3394,8 +3621,8 @@ esac
+@@ -3394,8 +3621,8 @@
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  
  # Transform an extracted symbol line into symbol name and symbol address
@@ -514,7 +514,7 @@ Index: binutils-2.21/libtool.m4
  
  # Handle CRLF in mingw tool chain
  opt_cr=
-@@ -3431,6 +3658,7 @@ for ac_symprfx in "" "_"; do
+@@ -3431,6 +3658,7 @@
    else
      lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
    fi
@@ -522,7 +522,7 @@ Index: binutils-2.21/libtool.m4
  
    # Check to see that the pipe works correctly.
    pipe_works=no
-@@ -3464,6 +3692,18 @@ _LT_EOF
+@@ -3464,6 +3692,18 @@
        if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  	  cat <<_LT_EOF > conftest.$ac_ext
@@ -541,7 +541,7 @@ Index: binutils-2.21/libtool.m4
  #ifdef __cplusplus
  extern "C" {
  #endif
-@@ -3475,7 +3715,7 @@ _LT_EOF
+@@ -3475,7 +3715,7 @@
  	  cat <<_LT_EOF >> conftest.$ac_ext
  
  /* The mapping between symbol names and symbols.  */
@@ -550,7 +550,7 @@ Index: binutils-2.21/libtool.m4
    const char *name;
    void       *address;
  }
-@@ -3501,15 +3741,15 @@ static const void *lt_preloaded_setup()
+@@ -3501,15 +3741,15 @@
  _LT_EOF
  	  # Now try linking the two files.
  	  mv conftest.$ac_objext conftstm.$ac_objext
@@ -570,7 +570,7 @@ Index: binutils-2.21/libtool.m4
  	else
  	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  	fi
-@@ -3542,6 +3782,13 @@ else
+@@ -3542,6 +3782,13 @@
    AC_MSG_RESULT(ok)
  fi
  
@@ -584,7 +584,7 @@ Index: binutils-2.21/libtool.m4
  _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
      [Take the output of nm and produce a listing of raw symbols and C names])
  _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
-@@ -3552,6 +3799,8 @@ _LT_DECL([global_symbol_to_c_name_addres
+@@ -3552,6 +3799,8 @@
  _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
      [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
      [Transform the output of nm in a C name address pair when lib prefix is needed])
@@ -593,7 +593,7 @@ Index: binutils-2.21/libtool.m4
  ]) # _LT_CMD_GLOBAL_SYMBOLS
  
  
-@@ -3563,7 +3812,6 @@ _LT_TAGVAR(lt_prog_compiler_wl, $1)=
+@@ -3563,7 +3812,6 @@
  _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  _LT_TAGVAR(lt_prog_compiler_static, $1)=
  
@@ -601,7 +601,7 @@ Index: binutils-2.21/libtool.m4
  m4_if([$1], [CXX], [
    # C++ specific cases for pic, static, wl, etc.
    if test "$GXX" = yes; then
-@@ -3668,6 +3916,12 @@ m4_if([$1], [CXX], [
+@@ -3668,6 +3916,12 @@
  	  ;;
  	esac
  	;;
@@ -614,7 +614,7 @@ Index: binutils-2.21/libtool.m4
        dgux*)
  	case $cc_basename in
  	  ec++*)
-@@ -3820,7 +4074,7 @@ m4_if([$1], [CXX], [
+@@ -3820,7 +4074,7 @@
  	;;
        solaris*)
  	case $cc_basename in
@@ -623,7 +623,7 @@ Index: binutils-2.21/libtool.m4
  	    # Sun C++ 4.2, 5.x and Centerline C++
  	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-@@ -4042,6 +4296,12 @@ m4_if([$1], [CXX], [
+@@ -4042,6 +4296,12 @@
  	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  	;;
@@ -636,7 +636,7 @@ Index: binutils-2.21/libtool.m4
        pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
          # Portland Group compilers (*not* the Pentium gcc compiler,
  	# which looks to be a dead project)
-@@ -4104,7 +4364,7 @@ m4_if([$1], [CXX], [
+@@ -4104,7 +4364,7 @@
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
        case $cc_basename in
@@ -645,7 +645,7 @@ Index: binutils-2.21/libtool.m4
  	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
        *)
  	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
-@@ -4161,9 +4421,11 @@ case $host_os in
+@@ -4161,9 +4421,11 @@
      _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
      ;;
  esac
@@ -660,7 +660,7 @@ Index: binutils-2.21/libtool.m4
  
  #
  # Check to make sure the PIC flag actually works.
-@@ -4182,6 +4444,8 @@ fi
+@@ -4182,6 +4444,8 @@
  _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  	[Additional compiler flags for building library objects])
  
@@ -669,7 +669,7 @@ Index: binutils-2.21/libtool.m4
  #
  # Check to make sure the static flag actually works.
  #
-@@ -4202,6 +4466,7 @@ _LT_TAGDECL([link_static_flag], [lt_prog
+@@ -4202,6 +4466,7 @@
  m4_defun([_LT_LINKER_SHLIBS],
  [AC_REQUIRE([LT_PATH_LD])dnl
  AC_REQUIRE([LT_PATH_NM])dnl
@@ -677,7 +677,7 @@ Index: binutils-2.21/libtool.m4
  m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  m4_require([_LT_DECL_EGREP])dnl
  m4_require([_LT_DECL_SED])dnl
-@@ -4210,6 +4475,7 @@ m4_require([_LT_TAG_COMPILER])dnl
+@@ -4210,6 +4475,7 @@
  AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  m4_if([$1], [CXX], [
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
@@ -685,7 +685,7 @@ Index: binutils-2.21/libtool.m4
    case $host_os in
    aix[[4-9]]*)
      # If we're using GNU nm, then we don't want the "-C" option.
-@@ -4224,15 +4490,20 @@ m4_if([$1], [CXX], [
+@@ -4224,15 +4490,20 @@
      ;;
    pw32*)
      _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
@@ -711,7 +711,7 @@ Index: binutils-2.21/libtool.m4
  ], [
    runpath_var=
    _LT_TAGVAR(allow_undefined_flag, $1)=
-@@ -4400,7 +4671,8 @@ _LT_EOF
+@@ -4400,7 +4671,8 @@
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
        _LT_TAGVAR(always_export_symbols, $1)=no
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
@@ -721,7 +721,7 @@ Index: binutils-2.21/libtool.m4
  
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -4448,7 +4720,7 @@ _LT_EOF
+@@ -4448,7 +4720,7 @@
        if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  	 && test "$tmp_diet" = no
        then
@@ -730,7 +730,7 @@ Index: binutils-2.21/libtool.m4
  	tmp_sharedflag='-shared'
  	case $cc_basename,$host_cpu in
          pgcc*)				# Portland Group C compiler
-@@ -4499,12 +4771,12 @@ _LT_EOF
+@@ -4499,12 +4771,12 @@
  	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
@@ -745,7 +745,7 @@ Index: binutils-2.21/libtool.m4
  	  fi
  	  ;;
  	esac
-@@ -4518,8 +4790,8 @@ _LT_EOF
+@@ -4518,8 +4790,8 @@
  	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  	wlarc=
        else
@@ -756,7 +756,7 @@ Index: binutils-2.21/libtool.m4
        fi
        ;;
  
-@@ -4537,8 +4809,8 @@ _LT_EOF
+@@ -4537,8 +4809,8 @@
  
  _LT_EOF
        elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -767,7 +767,7 @@ Index: binutils-2.21/libtool.m4
        else
  	_LT_TAGVAR(ld_shlibs, $1)=no
        fi
-@@ -4584,8 +4856,8 @@ _LT_EOF
+@@ -4584,8 +4856,8 @@
  
      *)
        if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -778,7 +778,7 @@ Index: binutils-2.21/libtool.m4
        else
  	_LT_TAGVAR(ld_shlibs, $1)=no
        fi
-@@ -4715,7 +4987,7 @@ _LT_EOF
+@@ -4715,7 +4987,7 @@
  	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
          # Determine the default libpath from the value encoded in an
          # empty executable.
@@ -787,7 +787,7 @@ Index: binutils-2.21/libtool.m4
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
        else
-@@ -4726,7 +4998,7 @@ _LT_EOF
+@@ -4726,7 +4998,7 @@
  	else
  	 # Determine the default libpath from the value encoded in an
  	 # empty executable.
@@ -796,7 +796,7 @@ Index: binutils-2.21/libtool.m4
  	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  	  # Warning - without using the other run time loading flags,
  	  # -berok will link without error, but may produce a broken library.
-@@ -4770,20 +5042,63 @@ _LT_EOF
+@@ -4770,20 +5042,63 @@
        # Microsoft Visual C++.
        # hardcode_libdir_flag_spec is actually meaningless, as there is
        # no search path for DLLs.
@@ -874,7 +874,7 @@ Index: binutils-2.21/libtool.m4
        ;;
  
      darwin* | rhapsody*)
-@@ -4821,7 +5136,7 @@ _LT_EOF
+@@ -4821,7 +5136,7 @@
  
      # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
      freebsd* | dragonfly*)
@@ -883,7 +883,7 @@ Index: binutils-2.21/libtool.m4
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
        _LT_TAGVAR(hardcode_direct, $1)=yes
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-@@ -4829,7 +5144,7 @@ _LT_EOF
+@@ -4829,7 +5144,7 @@
  
      hpux9*)
        if test "$GCC" = yes; then
@@ -892,7 +892,7 @@ Index: binutils-2.21/libtool.m4
        else
  	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
        fi
-@@ -4845,7 +5160,7 @@ _LT_EOF
+@@ -4845,7 +5160,7 @@
  
      hpux10*)
        if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -901,7 +901,7 @@ Index: binutils-2.21/libtool.m4
        else
  	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
        fi
-@@ -4869,10 +5184,10 @@ _LT_EOF
+@@ -4869,10 +5184,10 @@
  	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  	  ;;
  	ia64*)
@@ -914,7 +914,7 @@ Index: binutils-2.21/libtool.m4
  	  ;;
  	esac
        else
-@@ -4919,16 +5234,31 @@ _LT_EOF
+@@ -4919,16 +5234,31 @@
  
      irix5* | irix6* | nonstopux*)
        if test "$GCC" = yes; then
@@ -953,7 +953,7 @@ Index: binutils-2.21/libtool.m4
        else
  	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -5013,7 +5343,7 @@ _LT_EOF
+@@ -5013,7 +5343,7 @@
      osf4* | osf5*)	# as osf3* with the addition of -msym flag
        if test "$GCC" = yes; then
  	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
@@ -962,7 +962,7 @@ Index: binutils-2.21/libtool.m4
  	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
        else
  	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-@@ -5032,9 +5362,9 @@ _LT_EOF
+@@ -5032,9 +5362,9 @@
        _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
        if test "$GCC" = yes; then
  	wlarc='${wl}'
@@ -974,7 +974,7 @@ Index: binutils-2.21/libtool.m4
        else
  	case `$CC -V 2>&1` in
  	*"Compilers 5.0"*)
-@@ -5306,8 +5636,6 @@ _LT_TAGDECL([], [inherit_rpath], [0],
+@@ -5306,8 +5636,6 @@
      to runtime path list])
  _LT_TAGDECL([], [link_all_deplibs], [0],
      [Whether libtool must link a program against all its dependency libraries])
@@ -983,7 +983,7 @@ Index: binutils-2.21/libtool.m4
  _LT_TAGDECL([], [always_export_symbols], [0],
      [Set to "yes" if exported symbols are required])
  _LT_TAGDECL([], [export_symbols_cmds], [2],
-@@ -5318,6 +5646,8 @@ _LT_TAGDECL([], [include_expsyms], [1],
+@@ -5318,6 +5646,8 @@
      [Symbols that must always be exported])
  _LT_TAGDECL([], [prelink_cmds], [2],
      [Commands necessary for linking programs (against libraries) with templates])
@@ -992,7 +992,7 @@ Index: binutils-2.21/libtool.m4
  _LT_TAGDECL([], [file_list_spec], [1],
      [Specify filename containing input files])
  dnl FIXME: Not yet implemented
-@@ -5419,6 +5749,7 @@ CC="$lt_save_CC"
+@@ -5419,6 +5749,7 @@
  m4_defun([_LT_LANG_CXX_CONFIG],
  [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  m4_require([_LT_DECL_EGREP])dnl
@@ -1000,7 +1000,7 @@ Index: binutils-2.21/libtool.m4
  if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
      ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
      (test "X$CXX" != "Xg++"))) ; then
-@@ -5480,6 +5811,7 @@ if test "$_lt_caught_CXX_error" != yes;
+@@ -5480,6 +5811,7 @@
  
    # Allow CC to be a program name with arguments.
    lt_save_CC=$CC
@@ -1008,7 +1008,7 @@ Index: binutils-2.21/libtool.m4
    lt_save_LD=$LD
    lt_save_GCC=$GCC
    GCC=$GXX
-@@ -5497,6 +5829,7 @@ if test "$_lt_caught_CXX_error" != yes;
+@@ -5497,6 +5829,7 @@
    fi
    test -z "${LDCXX+set}" || LD=$LDCXX
    CC=${CXX-"c++"}
@@ -1016,7 +1016,7 @@ Index: binutils-2.21/libtool.m4
    compiler=$CC
    _LT_TAGVAR(compiler, $1)=$CC
    _LT_CC_BASENAME([$compiler])
-@@ -5518,8 +5851,8 @@ if test "$_lt_caught_CXX_error" != yes;
+@@ -5518,8 +5851,8 @@
        # Check if GNU C++ uses GNU ld as the underlying linker, since the
        # archiving commands below assume that GNU ld is being used.
        if test "$with_gnu_ld" = yes; then
@@ -1027,7 +1027,7 @@ Index: binutils-2.21/libtool.m4
  
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
          _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-@@ -5660,7 +5993,7 @@ if test "$_lt_caught_CXX_error" != yes;
+@@ -5660,7 +5993,7 @@
            _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
            # Determine the default libpath from the value encoded in an empty
            # executable.
@@ -1036,7 +1036,7 @@ Index: binutils-2.21/libtool.m4
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  
            _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -5672,7 +6005,7 @@ if test "$_lt_caught_CXX_error" != yes;
+@@ -5672,7 +6005,7 @@
            else
  	    # Determine the default libpath from the value encoded in an
  	    # empty executable.
@@ -1045,7 +1045,7 @@ Index: binutils-2.21/libtool.m4
  	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  	    # Warning - without using the other run time loading flags,
  	    # -berok will link without error, but may produce a broken library.
-@@ -5714,29 +6047,75 @@ if test "$_lt_caught_CXX_error" != yes;
+@@ -5714,29 +6047,75 @@
          ;;
  
        cygwin* | mingw* | pw32* | cegcc*)
@@ -1144,7 +1144,7 @@ Index: binutils-2.21/libtool.m4
        darwin* | rhapsody*)
          _LT_DARWIN_LINKER_FEATURES($1)
  	;;
-@@ -5811,7 +6190,7 @@ if test "$_lt_caught_CXX_error" != yes;
+@@ -5811,7 +6190,7 @@
              ;;
            *)
              if test "$GXX" = yes; then
@@ -1153,7 +1153,7 @@ Index: binutils-2.21/libtool.m4
              else
                # FIXME: insert proper C++ library support
                _LT_TAGVAR(ld_shlibs, $1)=no
-@@ -5882,10 +6261,10 @@ if test "$_lt_caught_CXX_error" != yes;
+@@ -5882,10 +6261,10 @@
  	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  	            ;;
  	          ia64*)
@@ -1166,7 +1166,7 @@ Index: binutils-2.21/libtool.m4
  	            ;;
  	        esac
  	      fi
-@@ -5926,9 +6305,9 @@ if test "$_lt_caught_CXX_error" != yes;
+@@ -5926,9 +6305,9 @@
            *)
  	    if test "$GXX" = yes; then
  	      if test "$with_gnu_ld" = no; then
@@ -1178,7 +1178,7 @@ Index: binutils-2.21/libtool.m4
  	      fi
  	    fi
  	    _LT_TAGVAR(link_all_deplibs, $1)=yes
-@@ -5998,20 +6377,20 @@ if test "$_lt_caught_CXX_error" != yes;
+@@ -5998,20 +6377,20 @@
  	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  		rm -rf $tpldir~
  		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
@@ -1203,7 +1203,7 @@ Index: binutils-2.21/libtool.m4
  	      ;;
  	    *) # Version 6 and above use weak symbols
  	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-@@ -6206,7 +6585,7 @@ if test "$_lt_caught_CXX_error" != yes;
+@@ -6206,7 +6585,7 @@
  	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  		  ;;
  	        *)
@@ -1212,7 +1212,7 @@ Index: binutils-2.21/libtool.m4
  		  ;;
  	      esac
  
-@@ -6252,7 +6631,7 @@ if test "$_lt_caught_CXX_error" != yes;
+@@ -6252,7 +6631,7 @@
  
        solaris*)
          case $cc_basename in
@@ -1221,7 +1221,7 @@ Index: binutils-2.21/libtool.m4
  	    # Sun C++ 4.2, 5.x and Centerline C++
              _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-@@ -6293,9 +6672,9 @@ if test "$_lt_caught_CXX_error" != yes;
+@@ -6293,9 +6672,9 @@
  	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
@@ -1233,7 +1233,7 @@ Index: binutils-2.21/libtool.m4
  
  	        # Commands to make compiler produce verbose output that lists
  	        # what "hidden" libraries, object files and flags are used when
-@@ -6424,6 +6803,7 @@ if test "$_lt_caught_CXX_error" != yes;
+@@ -6424,6 +6803,7 @@
    fi # test -n "$compiler"
  
    CC=$lt_save_CC
@@ -1241,7 +1241,7 @@ Index: binutils-2.21/libtool.m4
    LDCXX=$LD
    LD=$lt_save_LD
    GCC=$lt_save_GCC
-@@ -6438,6 +6818,29 @@ AC_LANG_POP
+@@ -6438,6 +6818,29 @@
  ])# _LT_LANG_CXX_CONFIG
  
  
@@ -1271,7 +1271,7 @@ Index: binutils-2.21/libtool.m4
  # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  # ---------------------------------
  # Figure out "hidden" library dependencies from verbose
-@@ -6446,6 +6849,7 @@ AC_LANG_POP
+@@ -6446,6 +6849,7 @@
  # objects, libraries and library flags.
  m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
@@ -1279,7 +1279,7 @@ Index: binutils-2.21/libtool.m4
  # Dependencies to place before and after the object being linked:
  _LT_TAGVAR(predep_objects, $1)=
  _LT_TAGVAR(postdep_objects, $1)=
-@@ -6496,6 +6900,13 @@ public class foo {
+@@ -6496,6 +6900,13 @@
  };
  _LT_EOF
  ])
@@ -1293,7 +1293,7 @@ Index: binutils-2.21/libtool.m4
  dnl Parse the compiler output and extract the necessary
  dnl objects, libraries and library flags.
  if AC_TRY_EVAL(ac_compile); then
-@@ -6507,7 +6918,7 @@ if AC_TRY_EVAL(ac_compile); then
+@@ -6507,7 +6918,7 @@
    pre_test_object_deps_done=no
  
    for p in `eval "$output_verbose_link_cmd"`; do
@@ -1302,7 +1302,7 @@ Index: binutils-2.21/libtool.m4
  
      -L* | -R* | -l*)
         # Some compilers place space between "-{L,R}" and the path.
-@@ -6516,13 +6927,22 @@ if AC_TRY_EVAL(ac_compile); then
+@@ -6516,13 +6927,22 @@
            test $p = "-R"; then
  	 prev=$p
  	 continue
@@ -1329,7 +1329,7 @@ Index: binutils-2.21/libtool.m4
  	   # Internal compiler library paths should come after those
  	   # provided the user.  The postdeps already come after the
  	   # user supplied libs so there is no need to process them.
-@@ -6542,8 +6962,10 @@ if AC_TRY_EVAL(ac_compile); then
+@@ -6542,8 +6962,10 @@
  	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
  	 fi
         fi
@@ -1340,7 +1340,7 @@ Index: binutils-2.21/libtool.m4
      *.$objext)
         # This assumes that the test object file only shows up
         # once in the compiler output.
-@@ -6579,6 +7001,7 @@ else
+@@ -6579,6 +7001,7 @@
  fi
  
  $RM -f confest.$objext
@@ -1348,7 +1348,7 @@ Index: binutils-2.21/libtool.m4
  
  # PORTME: override above test on systems where it is broken
  m4_if([$1], [CXX],
-@@ -6615,7 +7038,7 @@ linux*)
+@@ -6615,7 +7038,7 @@
  
  solaris*)
    case $cc_basename in
@@ -1357,7 +1357,7 @@ Index: binutils-2.21/libtool.m4
      # The more standards-conforming stlport4 library is
      # incompatible with the Cstd library. Avoid specifying
      # it if it's in CXXFLAGS. Ignore libCrun as
-@@ -6728,7 +7151,9 @@ if test "$_lt_disable_F77" != yes; then
+@@ -6728,7 +7151,9 @@
    # Allow CC to be a program name with arguments.
    lt_save_CC="$CC"
    lt_save_GCC=$GCC
@@ -1367,7 +1367,7 @@ Index: binutils-2.21/libtool.m4
    compiler=$CC
    _LT_TAGVAR(compiler, $1)=$CC
    _LT_CC_BASENAME([$compiler])
-@@ -6782,6 +7207,7 @@ if test "$_lt_disable_F77" != yes; then
+@@ -6782,6 +7207,7 @@
  
    GCC=$lt_save_GCC
    CC="$lt_save_CC"
@@ -1375,7 +1375,7 @@ Index: binutils-2.21/libtool.m4
  fi # test "$_lt_disable_F77" != yes
  
  AC_LANG_POP
-@@ -6858,7 +7284,9 @@ if test "$_lt_disable_FC" != yes; then
+@@ -6858,7 +7284,9 @@
    # Allow CC to be a program name with arguments.
    lt_save_CC="$CC"
    lt_save_GCC=$GCC
@@ -1385,7 +1385,7 @@ Index: binutils-2.21/libtool.m4
    compiler=$CC
    GCC=$ac_cv_fc_compiler_gnu
  
-@@ -6914,7 +7342,8 @@ if test "$_lt_disable_FC" != yes; then
+@@ -6914,7 +7342,8 @@
    fi # test -n "$compiler"
  
    GCC=$lt_save_GCC
@@ -1395,7 +1395,7 @@ Index: binutils-2.21/libtool.m4
  fi # test "$_lt_disable_FC" != yes
  
  AC_LANG_POP
-@@ -6951,10 +7380,12 @@ _LT_COMPILER_BOILERPLATE
+@@ -6951,10 +7380,12 @@
  _LT_LINKER_BOILERPLATE
  
  # Allow CC to be a program name with arguments.
@@ -1409,7 +1409,7 @@ Index: binutils-2.21/libtool.m4
  compiler=$CC
  _LT_TAGVAR(compiler, $1)=$CC
  _LT_TAGVAR(LD, $1)="$LD"
-@@ -6985,7 +7416,8 @@ fi
+@@ -6985,7 +7416,8 @@
  AC_LANG_RESTORE
  
  GCC=$lt_save_GCC
@@ -1419,7 +1419,7 @@ Index: binutils-2.21/libtool.m4
  ])# _LT_LANG_GCJ_CONFIG
  
  
-@@ -7020,9 +7452,11 @@ _LT_LINKER_BOILERPLATE
+@@ -7020,9 +7452,11 @@
  
  # Allow CC to be a program name with arguments.
  lt_save_CC="$CC"
@@ -1431,7 +1431,7 @@ Index: binutils-2.21/libtool.m4
  compiler=$CC
  _LT_TAGVAR(compiler, $1)=$CC
  _LT_CC_BASENAME([$compiler])
-@@ -7035,7 +7469,8 @@ fi
+@@ -7035,7 +7469,8 @@
  
  GCC=$lt_save_GCC
  AC_LANG_RESTORE
@@ -1441,7 +1441,7 @@ Index: binutils-2.21/libtool.m4
  ])# _LT_LANG_RC_CONFIG
  
  
-@@ -7094,6 +7529,15 @@ _LT_DECL([], [OBJDUMP], [1], [An object
+@@ -7094,6 +7529,15 @@
  AC_SUBST([OBJDUMP])
  ])
  
@@ -1457,7 +1457,7 @@ Index: binutils-2.21/libtool.m4
  
  # _LT_DECL_SED
  # ------------
-@@ -7187,8 +7631,8 @@ m4_defun([_LT_CHECK_SHELL_FEATURES],
+@@ -7187,8 +7631,8 @@
  # Try some XSI features
  xsi_shell=no
  ( _lt_dummy="a/b/c"
@@ -1468,7 +1468,7 @@ Index: binutils-2.21/libtool.m4
      && eval 'test $(( 1 + 1 )) -eq 2 \
      && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
    && xsi_shell=yes
-@@ -7227,206 +7671,162 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn
+@@ -7227,206 +7671,162 @@
  ])# _LT_CHECK_SHELL_FEATURES
  
  
@@ -1823,8 +1823,8 @@ Index: binutils-2.21/libtool.m4
 +])# _LT_PATH_CONVERSION_FUNCTIONS
 Index: binutils-2.21/ltmain.sh
 ===================================================================
---- binutils-2.21.orig/ltmain.sh
-+++ binutils-2.21/ltmain.sh
+--- binutils-2.21.orig/ltmain.sh	2010-01-09 13:11:32.000000000 -0800
++++ binutils-2.21/ltmain.sh	2011-01-07 10:49:16.406101000 -0800
 @@ -1,10 +1,9 @@
 -# Generated from ltmain.m4sh.
  
@@ -1870,7 +1870,7 @@ Index: binutils-2.21/ltmain.sh
  
  # Be Bourne compatible
  if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-@@ -106,9 +106,6 @@ _LTECHO_EOF'
+@@ -106,9 +106,6 @@
  }
  
  # NLS nuisances: We save the old values to restore during execute mode.
@@ -1880,7 +1880,7 @@ Index: binutils-2.21/ltmain.sh
  lt_user_locale=
  lt_safe_locale=
  for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-@@ -121,15 +118,13 @@ do
+@@ -121,15 +118,13 @@
  	  lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
  	fi"
  done
@@ -1899,7 +1899,7 @@ Index: binutils-2.21/ltmain.sh
  # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
  # is ksh but when the shell is invoked as "sh" and the current value of
  # the _XPG environment variable is not equal to 1 (one), the special
-@@ -140,7 +135,7 @@ progpath="$0"
+@@ -140,7 +135,7 @@
  
  
  : ${CP="cp -f"}
@@ -1908,7 +1908,7 @@ Index: binutils-2.21/ltmain.sh
  : ${EGREP="/bin/grep -E"}
  : ${FGREP="/bin/grep -F"}
  : ${GREP="/bin/grep"}
-@@ -149,7 +144,7 @@ progpath="$0"
+@@ -149,7 +144,7 @@
  : ${MKDIR="mkdir"}
  : ${MV="mv -f"}
  : ${RM="rm -f"}
@@ -1917,7 +1917,7 @@ Index: binutils-2.21/ltmain.sh
  : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
  : ${Xsed="$SED -e 1s/^X//"}
  
-@@ -169,6 +164,27 @@ IFS=" 	$lt_nl"
+@@ -169,6 +164,27 @@
  dirname="s,/[^/]*$,,"
  basename="s,^.*/,,"
  
@@ -1945,7 +1945,7 @@ Index: binutils-2.21/ltmain.sh
  # func_dirname_and_basename file append nondir_replacement
  # perform func_basename and func_dirname in a single function
  # call:
-@@ -183,17 +199,31 @@ basename="s,^.*/,,"
+@@ -183,17 +199,31 @@
  # those functions but instead duplicate the functionality here.
  func_dirname_and_basename ()
  {
@@ -1987,7 +1987,7 @@ Index: binutils-2.21/ltmain.sh
  
  # These SED scripts presuppose an absolute path with a trailing slash.
  pathcar='s,^/\([^/]*\).*$,\1,'
-@@ -376,6 +406,15 @@ sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+@@ -376,6 +406,15 @@
  # Same as above, but do not quote variable references.
  double_quote_subst='s/\(["`\\]\)/\\\1/g'
  
@@ -2003,7 +2003,7 @@ Index: binutils-2.21/ltmain.sh
  # Re-`\' parameter expansions in output of double_quote_subst that were
  # `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
  # in input to double_quote_subst, that '$' was protected from expansion.
-@@ -404,7 +443,7 @@ opt_warning=:
+@@ -404,7 +443,7 @@
  # name if it has been set yet.
  func_echo ()
  {
@@ -2012,7 +2012,7 @@ Index: binutils-2.21/ltmain.sh
  }
  
  # func_verbose arg...
-@@ -430,14 +469,14 @@ func_echo_all ()
+@@ -430,14 +469,14 @@
  # Echo program name prefixed message to standard error.
  func_error ()
  {
@@ -2029,7 +2029,7 @@ Index: binutils-2.21/ltmain.sh
  
      # bash bug again:
      :
-@@ -656,19 +695,35 @@ func_show_eval_locale ()
+@@ -656,19 +695,35 @@
      fi
  }
  
@@ -2068,7 +2068,7 @@ Index: binutils-2.21/ltmain.sh
  	  b more
  	}
  	:go
-@@ -685,7 +740,9 @@ func_version ()
+@@ -685,7 +740,9 @@
  # Echo short help message to standard output and exit.
  func_usage ()
  {
@@ -2079,7 +2079,7 @@ Index: binutils-2.21/ltmain.sh
          s/^# //
  	s/^# *$//
  	s/\$progname/'$progname'/
-@@ -701,7 +758,10 @@ func_usage ()
+@@ -701,7 +758,10 @@
  # unless 'noexit' is passed as argument.
  func_help ()
  {
@@ -2090,7 +2090,7 @@ Index: binutils-2.21/ltmain.sh
          s/^# //
  	s/^# *$//
  	s*\$progname*'$progname'*
-@@ -714,7 +774,11 @@ func_help ()
+@@ -714,7 +774,11 @@
  	s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
  	s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
  	p
@@ -2103,7 +2103,7 @@ Index: binutils-2.21/ltmain.sh
      ret=$?
      if test -z "$1"; then
        exit $ret
-@@ -726,12 +790,39 @@ func_help ()
+@@ -726,12 +790,39 @@
  # exit_cmd.
  func_missing_arg ()
  {
@@ -2145,7 +2145,7 @@ Index: binutils-2.21/ltmain.sh
  
  
  
-@@ -741,26 +832,64 @@ magic="%%%MAGIC variable%%%"
+@@ -741,26 +832,64 @@
  magic_exe="%%%MAGIC EXE variable%%%"
  
  # Global variables.
@@ -2218,7 +2218,7 @@ Index: binutils-2.21/ltmain.sh
  # func_fatal_configuration arg...
  # Echo program name prefixed message to standard error, followed by
  # a configuration failure hint, and exit.
-@@ -850,130 +979,204 @@ func_enable_tag ()
+@@ -850,130 +979,204 @@
    esac
  }
  
@@ -2517,7 +2517,7 @@ Index: binutils-2.21/ltmain.sh
  
    case $host in
      *cygwin* | *mingw* | *pw32* | *cegcc*)
-@@ -981,82 +1184,44 @@ func_enable_tag ()
+@@ -981,82 +1184,44 @@
        opt_duplicate_compiler_generated_deps=:
        ;;
      *)
@@ -2624,7 +2624,7 @@ Index: binutils-2.21/ltmain.sh
  
  # func_lalib_p file
  # True iff FILE is a libtool `.la' library or `.lo' object file.
-@@ -1121,12 +1286,9 @@ func_ltwrapper_executable_p ()
+@@ -1121,12 +1286,9 @@
  # temporary ltwrapper_script.
  func_ltwrapper_scriptname ()
  {
@@ -2640,7 +2640,7 @@ Index: binutils-2.21/ltmain.sh
  }
  
  # func_ltwrapper_p file
-@@ -1149,7 +1311,7 @@ func_execute_cmds ()
+@@ -1149,7 +1311,7 @@
      save_ifs=$IFS; IFS='~'
      for cmd in $1; do
        IFS=$save_ifs
@@ -2649,7 +2649,7 @@ Index: binutils-2.21/ltmain.sh
        func_show_eval "$cmd" "${2-:}"
      done
      IFS=$save_ifs
-@@ -1172,6 +1334,37 @@ func_source ()
+@@ -1172,6 +1334,37 @@
  }
  
  
@@ -2687,7 +2687,7 @@ Index: binutils-2.21/ltmain.sh
  # func_infer_tag arg
  # Infer tagged configuration to use if any are available and
  # if one wasn't chosen via the "--tag" command line option.
-@@ -1184,8 +1377,7 @@ func_infer_tag ()
+@@ -1184,8 +1377,7 @@
      if test -n "$available_tags" && test -z "$tagname"; then
        CC_quoted=
        for arg in $CC; do
@@ -2697,7 +2697,7 @@ Index: binutils-2.21/ltmain.sh
        done
        CC_expanded=`func_echo_all $CC`
        CC_quoted_expanded=`func_echo_all $CC_quoted`
-@@ -1204,8 +1396,7 @@ func_infer_tag ()
+@@ -1204,8 +1396,7 @@
  	    CC_quoted=
  	    for arg in $CC; do
  	      # Double-quote args containing other shell metacharacters.
@@ -2707,7 +2707,7 @@ Index: binutils-2.21/ltmain.sh
  	    done
  	    CC_expanded=`func_echo_all $CC`
  	    CC_quoted_expanded=`func_echo_all $CC_quoted`
-@@ -1274,6 +1465,486 @@ EOF
+@@ -1274,6 +1465,486 @@
      }
  }
  
@@ -3194,7 +3194,7 @@ Index: binutils-2.21/ltmain.sh
  # func_mode_compile arg...
  func_mode_compile ()
  {
-@@ -1314,12 +1985,12 @@ func_mode_compile ()
+@@ -1314,12 +1985,12 @@
  	  ;;
  
  	-pie | -fpie | -fPIE)
@@ -3209,7 +3209,7 @@ Index: binutils-2.21/ltmain.sh
  	  continue
  	  ;;
  
-@@ -1340,15 +2011,14 @@ func_mode_compile ()
+@@ -1340,15 +2011,14 @@
  	  save_ifs="$IFS"; IFS=','
  	  for arg in $args; do
  	    IFS="$save_ifs"
@@ -3227,7 +3227,7 @@ Index: binutils-2.21/ltmain.sh
  	  continue
  	  ;;
  
-@@ -1364,8 +2034,7 @@ func_mode_compile ()
+@@ -1364,8 +2034,7 @@
        esac    #  case $arg_mode
  
        # Aesthetically quote the previous argument.
@@ -3237,7 +3237,7 @@ Index: binutils-2.21/ltmain.sh
      done # for arg
  
      case $arg_mode in
-@@ -1496,17 +2165,16 @@ compiler."
+@@ -1496,17 +2165,16 @@
  	$opt_dry_run || $RM $removelist
  	exit $EXIT_FAILURE
        fi
@@ -3259,7 +3259,7 @@ Index: binutils-2.21/ltmain.sh
      func_quote_for_eval "$srcfile"
      qsrcfile=$func_quote_for_eval_result
  
-@@ -1526,7 +2194,7 @@ compiler."
+@@ -1526,7 +2194,7 @@
  
        if test -z "$output_obj"; then
  	# Place PIC objects in $objdir
@@ -3268,7 +3268,7 @@ Index: binutils-2.21/ltmain.sh
        fi
  
        func_show_eval_locale "$command"	\
-@@ -1573,11 +2241,11 @@ compiler."
+@@ -1573,11 +2241,11 @@
  	command="$base_compile $qsrcfile $pic_flag"
        fi
        if test "$compiler_c_o" = yes; then
@@ -3282,7 +3282,7 @@ Index: binutils-2.21/ltmain.sh
        func_show_eval_locale "$command" \
          '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
  
-@@ -1622,13 +2290,13 @@ compiler."
+@@ -1622,13 +2290,13 @@
  }
  
  $opt_help || {
@@ -3298,7 +3298,7 @@ Index: binutils-2.21/ltmain.sh
        "")
          # Generic help is extracted from the usage comments
          # at the start of this file.
-@@ -1659,8 +2327,8 @@ This mode accepts the following addition
+@@ -1659,8 +2327,8 @@
  
    -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
    -no-suppress      do not suppress compiler output for multiple passes
@@ -3309,7 +3309,7 @@ Index: binutils-2.21/ltmain.sh
    -shared           do not build a \`.o' file suitable for static linking
    -static           only build a \`.o' file suitable for static linking
    -Wc,FLAG          pass FLAG directly to the compiler
-@@ -1804,7 +2472,7 @@ Otherwise, only FILE itself is deleted u
+@@ -1804,7 +2472,7 @@
          ;;
  
        *)
@@ -3318,7 +3318,7 @@ Index: binutils-2.21/ltmain.sh
          ;;
      esac
  
-@@ -1819,13 +2487,13 @@ if $opt_help; then
+@@ -1819,13 +2487,13 @@
    else
      {
        func_help noexit
@@ -3334,7 +3334,7 @@ Index: binutils-2.21/ltmain.sh
  	echo
  	func_mode_help
        done
-@@ -1854,13 +2522,16 @@ func_mode_execute ()
+@@ -1854,13 +2522,16 @@
        func_fatal_help "you must specify a COMMAND"
  
      # Handle -dlopen flags immediately.
@@ -3352,7 +3352,7 @@ Index: binutils-2.21/ltmain.sh
  	# Check to see that this really is a libtool archive.
  	func_lalib_unsafe_p "$file" \
  	  || func_fatal_help "\`$lib' is not a valid libtool archive"
-@@ -1882,7 +2553,7 @@ func_mode_execute ()
+@@ -1882,7 +2553,7 @@
  	dir="$func_dirname_result"
  
  	if test -f "$dir/$objdir/$dlname"; then
@@ -3361,7 +3361,7 @@ Index: binutils-2.21/ltmain.sh
  	else
  	  if test ! -f "$dir/$dlname"; then
  	    func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
-@@ -1907,10 +2578,10 @@ func_mode_execute ()
+@@ -1907,10 +2578,10 @@
        test -n "$absdir" && dir="$absdir"
  
        # Now add the directory to shlibpath_var.
@@ -3375,7 +3375,7 @@ Index: binutils-2.21/ltmain.sh
        fi
      done
  
-@@ -1939,8 +2610,7 @@ func_mode_execute ()
+@@ -1939,8 +2610,7 @@
  	;;
        esac
        # Quote arguments (to preserve shell metacharacters).
@@ -3385,7 +3385,7 @@ Index: binutils-2.21/ltmain.sh
      done
  
      if test "X$opt_dry_run" = Xfalse; then
-@@ -1972,22 +2642,59 @@ func_mode_execute ()
+@@ -1972,22 +2642,59 @@
      fi
  }
  
@@ -3452,7 +3452,7 @@ Index: binutils-2.21/ltmain.sh
        for libdir in $libdirs; do
  	if test -n "$finish_cmds"; then
  	  # Do each command in the finish commands.
-@@ -1997,7 +2704,7 @@ func_mode_finish ()
+@@ -1997,7 +2704,7 @@
  	if test -n "$finish_eval"; then
  	  # Do the single finish_eval.
  	  eval cmds=\"$finish_eval\"
@@ -3461,7 +3461,7 @@ Index: binutils-2.21/ltmain.sh
         $cmds"
  	fi
        done
-@@ -2006,53 +2713,55 @@ func_mode_finish ()
+@@ -2006,53 +2713,55 @@
      # Exit here if they wanted silent mode.
      $opt_silent && exit $EXIT_SUCCESS
  
@@ -3559,7 +3559,7 @@ Index: binutils-2.21/ltmain.sh
  
  
  # func_mode_install arg...
-@@ -2077,7 +2786,7 @@ func_mode_install ()
+@@ -2077,7 +2786,7 @@
      # The real first argument should be the name of the installation program.
      # Aesthetically quote it.
      func_quote_for_eval "$arg"
@@ -3568,7 +3568,7 @@ Index: binutils-2.21/ltmain.sh
      install_shared_prog=$install_prog
      case " $install_prog " in
        *[\\\ /]cp\ *) install_cp=: ;;
-@@ -2097,7 +2806,7 @@ func_mode_install ()
+@@ -2097,7 +2806,7 @@
      do
        arg2=
        if test -n "$dest"; then
@@ -3577,7 +3577,7 @@ Index: binutils-2.21/ltmain.sh
  	dest=$arg
  	continue
        fi
-@@ -2135,11 +2844,11 @@ func_mode_install ()
+@@ -2135,11 +2844,11 @@
  
        # Aesthetically quote the argument.
        func_quote_for_eval "$arg"
@@ -3591,7 +3591,7 @@ Index: binutils-2.21/ltmain.sh
      done
  
      test -z "$install_prog" && \
-@@ -2151,7 +2860,7 @@ func_mode_install ()
+@@ -2151,7 +2860,7 @@
      if test -n "$install_override_mode" && $no_mode; then
        if $install_cp; then :; else
  	func_quote_for_eval "$install_override_mode"
@@ -3600,7 +3600,7 @@ Index: binutils-2.21/ltmain.sh
        fi
      fi
  
-@@ -2209,10 +2918,13 @@ func_mode_install ()
+@@ -2209,10 +2918,13 @@
        case $file in
        *.$libext)
  	# Do the static libraries later.
@@ -3615,7 +3615,7 @@ Index: binutils-2.21/ltmain.sh
  	# Check to see that this really is a libtool archive.
  	func_lalib_unsafe_p "$file" \
  	  || func_fatal_help "\`$file' is not a valid libtool archive"
-@@ -2226,23 +2938,30 @@ func_mode_install ()
+@@ -2226,23 +2938,30 @@
  	if test "X$destdir" = "X$libdir"; then
  	  case "$current_libdirs " in
  	  *" $libdir "*) ;;
@@ -3650,7 +3650,7 @@ Index: binutils-2.21/ltmain.sh
  
  	  # Don't allow the user to place us outside of our expected
  	  # location b/c this prevents finding dependent libraries that
-@@ -2315,7 +3034,7 @@ func_mode_install ()
+@@ -2315,7 +3034,7 @@
  	func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
  
  	# Maybe install the static library, too.
@@ -3659,7 +3659,7 @@ Index: binutils-2.21/ltmain.sh
  	;;
  
        *.lo)
-@@ -2503,7 +3222,7 @@ func_mode_install ()
+@@ -2503,7 +3222,7 @@
      test -n "$future_libdirs" && \
        func_warning "remember to run \`$progname --finish$future_libdirs'"
  
@@ -3668,7 +3668,7 @@ Index: binutils-2.21/ltmain.sh
        # Maybe just do a dry run.
        $opt_dry_run && current_libdirs=" -n$current_libdirs"
        exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
-@@ -2512,7 +3231,7 @@ func_mode_install ()
+@@ -2512,7 +3231,7 @@
      fi
  }
  
@@ -3677,7 +3677,7 @@ Index: binutils-2.21/ltmain.sh
  
  
  # func_generate_dlsyms outputname originator pic_p
-@@ -2559,6 +3278,18 @@ extern \"C\" {
+@@ -2559,6 +3278,18 @@
  #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
  #endif
  
@@ -3696,7 +3696,7 @@ Index: binutils-2.21/ltmain.sh
  /* External symbol declarations for the compiler. */\
  "
  
-@@ -2570,21 +3301,22 @@ extern \"C\" {
+@@ -2570,21 +3301,22 @@
  	  # Add our own program objects to the symbol list.
  	  progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
  	  for progfile in $progfiles; do
@@ -3725,7 +3725,7 @@ Index: binutils-2.21/ltmain.sh
  	    }
  	  fi
  
-@@ -2593,23 +3325,23 @@ extern \"C\" {
+@@ -2593,23 +3325,23 @@
  	    export_symbols="$output_objdir/$outputname.exp"
  	    $opt_dry_run || {
  	      $RM $export_symbols
@@ -3757,7 +3757,7 @@ Index: binutils-2.21/ltmain.sh
  	          ;;
  	      esac
  	    }
-@@ -2620,10 +3352,52 @@ extern \"C\" {
+@@ -2620,10 +3352,52 @@
  	  func_verbose "extracting global C symbols from \`$dlprefile'"
  	  func_basename "$dlprefile"
  	  name="$func_basename_result"
@@ -3814,7 +3814,7 @@ Index: binutils-2.21/ltmain.sh
  	done
  
  	$opt_dry_run || {
-@@ -2661,26 +3435,9 @@ typedef struct {
+@@ -2661,26 +3435,9 @@
    const char *name;
    void *address;
  } lt_dlsymlist;
@@ -3843,7 +3843,7 @@ Index: binutils-2.21/ltmain.sh
  lt_${my_prefix}_LTX_preloaded_symbols[] =
  {\
    { \"$my_originator\", (void *) 0 },"
-@@ -2736,7 +3493,7 @@ static const void *lt_preloaded_setup()
+@@ -2736,7 +3493,7 @@
  	for arg in $LTCFLAGS; do
  	  case $arg in
  	  -pie | -fpie | -fPIE) ;;
@@ -3852,7 +3852,7 @@ Index: binutils-2.21/ltmain.sh
  	  esac
  	done
  
-@@ -2796,9 +3553,11 @@ func_win32_libid ()
+@@ -2796,9 +3553,11 @@
      win32_libid_type="x86 archive import"
      ;;
    *ar\ archive*) # could be an import, or static
@@ -3867,7 +3867,7 @@ Index: binutils-2.21/ltmain.sh
  	$SED -n -e '
  	    1,100{
  		/ I /{
-@@ -2827,6 +3586,131 @@ func_win32_libid ()
+@@ -2827,6 +3586,131 @@
    $ECHO "$win32_libid_type"
  }
  
@@ -3999,7 +3999,7 @@ Index: binutils-2.21/ltmain.sh
  
  
  # func_extract_an_archive dir oldlib
-@@ -2917,7 +3801,7 @@ func_extract_archives ()
+@@ -2917,7 +3801,7 @@
  	    darwin_file=
  	    darwin_files=
  	    for darwin_file in $darwin_filelist; do
@@ -4008,7 +4008,7 @@ Index: binutils-2.21/ltmain.sh
  	      $LIPO -create -output "$darwin_file" $darwin_files
  	    done # $darwin_filelist
  	    $RM -rf unfat-$$
-@@ -2932,7 +3816,7 @@ func_extract_archives ()
+@@ -2932,7 +3816,7 @@
          func_extract_an_archive "$my_xdir" "$my_xabs"
  	;;
        esac
@@ -4017,7 +4017,7 @@ Index: binutils-2.21/ltmain.sh
      done
  
      func_extract_archives_result="$my_oldobjs"
-@@ -3014,7 +3898,110 @@ func_fallback_echo ()
+@@ -3014,7 +3898,110 @@
  _LTECHO_EOF'
  }
      ECHO=\"$qECHO\"
@@ -4129,7 +4129,7 @@ Index: binutils-2.21/ltmain.sh
  
    # Find the directory that this script lives in.
    thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
-@@ -3078,7 +4065,7 @@ _LTECHO_EOF'
+@@ -3078,7 +4065,7 @@
  
      # relink executable if necessary
      if test -n \"\$relink_command\"; then
@@ -4138,7 +4138,7 @@ Index: binutils-2.21/ltmain.sh
        else
  	$ECHO \"\$relink_command_output\" >&2
  	$RM \"\$progdir/\$file\"
-@@ -3102,6 +4089,18 @@ _LTECHO_EOF'
+@@ -3102,6 +4089,18 @@
  
    if test -f \"\$progdir/\$program\"; then"
  
@@ -4157,7 +4157,7 @@ Index: binutils-2.21/ltmain.sh
  	# Export our shlibpath_var if we have one.
  	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
  	  $ECHO "\
-@@ -3116,35 +4115,10 @@ _LTECHO_EOF'
+@@ -3116,35 +4115,10 @@
  "
  	fi
  
@@ -4194,7 +4194,7 @@ Index: binutils-2.21/ltmain.sh
      fi
    else
      # The program doesn't exist.
-@@ -3158,166 +4132,6 @@ fi\
+@@ -3158,166 +4132,6 @@
  }
  
  
@@ -4361,7 +4361,7 @@ Index: binutils-2.21/ltmain.sh
  # func_emit_cwrapperexe_src
  # emit the source code for a wrapper executable on stdout
  # Must ONLY be called from within func_mode_link because
-@@ -3334,10 +4148,6 @@ func_emit_cwrapperexe_src ()
+@@ -3334,10 +4148,6 @@
  
     This wrapper executable should never be moved out of the build directory.
     If it is, it will not operate correctly.
@@ -4372,7 +4372,7 @@ Index: binutils-2.21/ltmain.sh
  */
  EOF
  	    cat <<"EOF"
-@@ -3462,22 +4272,13 @@ int setenv (const char *, const char *,
+@@ -3462,22 +4272,13 @@
    if (stale) { free ((void *) stale); stale = 0; } \
  } while (0)
  
@@ -4399,7 +4399,7 @@ Index: binutils-2.21/ltmain.sh
  
  void *xmalloc (size_t num);
  char *xstrdup (const char *string);
-@@ -3487,7 +4288,10 @@ char *chase_symlinks (const char *pathsp
+@@ -3487,7 +4288,10 @@
  int make_executable (const char *path);
  int check_executable (const char *path);
  char *strendzap (char *str, const char *pat);
@@ -4411,7 +4411,7 @@ Index: binutils-2.21/ltmain.sh
  void lt_setenv (const char *name, const char *value);
  char *lt_extend_str (const char *orig_value, const char *add, int to_end);
  void lt_update_exe_path (const char *name, const char *value);
-@@ -3497,14 +4301,14 @@ void lt_dump_script (FILE *f);
+@@ -3497,14 +4301,14 @@
  EOF
  
  	    cat <<EOF
@@ -4429,7 +4429,7 @@ Index: binutils-2.21/ltmain.sh
  EOF
  	    else
  	      cat <<"EOF"
-@@ -3513,10 +4317,10 @@ EOF
+@@ -3513,10 +4317,10 @@
  	    fi
  
  	    if test -n "$dllsearchpath"; then
@@ -4442,7 +4442,7 @@ Index: binutils-2.21/ltmain.sh
  EOF
  	    else
  	      cat <<"EOF"
-@@ -3539,12 +4343,10 @@ EOF
+@@ -3539,12 +4343,10 @@
  	    cat <<"EOF"
  
  #define LTWRAPPER_OPTION_PREFIX         "--lt-"
@@ -4456,7 +4456,7 @@ Index: binutils-2.21/ltmain.sh
  
  int
  main (int argc, char *argv[])
-@@ -3561,10 +4363,13 @@ main (int argc, char *argv[])
+@@ -3561,10 +4363,13 @@
    int i;
  
    program_name = (char *) xstrdup (base_name (argv[0]));
@@ -4473,7 +4473,7 @@ Index: binutils-2.21/ltmain.sh
    for (i = 1; i < argc; i++)
      {
        if (strcmp (argv[i], dumpscript_opt) == 0)
-@@ -3581,21 +4386,54 @@ EOF
+@@ -3581,21 +4386,54 @@
  	  lt_dump_script (stdout);
  	  return 0;
  	}
@@ -4535,7 +4535,7 @@ Index: binutils-2.21/ltmain.sh
    strendzap (actual_cwrapper_path, actual_cwrapper_name);
  
    /* wrapper name transforms */
-@@ -3613,8 +4451,9 @@ EOF
+@@ -3613,8 +4451,9 @@
    target_name = tmp_pathspec;
    tmp_pathspec = 0;
  
@@ -4547,7 +4547,7 @@ Index: binutils-2.21/ltmain.sh
  EOF
  
  	    cat <<EOF
-@@ -3664,35 +4503,19 @@ EOF
+@@ -3664,35 +4503,19 @@
  
    lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
    lt_setenv ("DUALCASE", "1");  /* for MSK sh */
@@ -4592,7 +4592,7 @@ Index: binutils-2.21/ltmain.sh
      }
  
  EOF
-@@ -3706,7 +4529,9 @@ EOF
+@@ -3706,7 +4529,9 @@
    if (rval == -1)
      {
        /* failed to start process */
@@ -4603,7 +4603,7 @@ Index: binutils-2.21/ltmain.sh
        return 127;
      }
    return rval;
-@@ -3728,7 +4553,7 @@ xmalloc (size_t num)
+@@ -3728,7 +4553,7 @@
  {
    void *p = (void *) malloc (num);
    if (!p)
@@ -4612,7 +4612,7 @@ Index: binutils-2.21/ltmain.sh
  
    return p;
  }
-@@ -3762,8 +4587,8 @@ check_executable (const char *path)
+@@ -3762,8 +4587,8 @@
  {
    struct stat st;
  
@@ -4623,7 +4623,7 @@ Index: binutils-2.21/ltmain.sh
    if ((!path) || (!*path))
      return 0;
  
-@@ -3780,8 +4605,8 @@ make_executable (const char *path)
+@@ -3780,8 +4605,8 @@
    int rval = 0;
    struct stat st;
  
@@ -4634,7 +4634,7 @@ Index: binutils-2.21/ltmain.sh
    if ((!path) || (!*path))
      return 0;
  
-@@ -3807,8 +4632,8 @@ find_executable (const char *wrapper)
+@@ -3807,8 +4632,8 @@
    int tmp_len;
    char *concat_name;
  
@@ -4645,7 +4645,7 @@ Index: binutils-2.21/ltmain.sh
  
    if ((wrapper == NULL) || (*wrapper == '\0'))
      return NULL;
-@@ -3861,7 +4686,8 @@ find_executable (const char *wrapper)
+@@ -3861,7 +4686,8 @@
  		{
  		  /* empty path: current directory */
  		  if (getcwd (tmp, LT_PATHMAX) == NULL)
@@ -4655,7 +4655,7 @@ Index: binutils-2.21/ltmain.sh
  		  tmp_len = strlen (tmp);
  		  concat_name =
  		    XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
-@@ -3886,7 +4712,8 @@ find_executable (const char *wrapper)
+@@ -3886,7 +4712,8 @@
      }
    /* Relative path | not found in path: prepend cwd */
    if (getcwd (tmp, LT_PATHMAX) == NULL)
@@ -4665,7 +4665,7 @@ Index: binutils-2.21/ltmain.sh
    tmp_len = strlen (tmp);
    concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
    memcpy (concat_name, tmp, tmp_len);
-@@ -3912,8 +4739,9 @@ chase_symlinks (const char *pathspec)
+@@ -3912,8 +4739,9 @@
    int has_symlinks = 0;
    while (strlen (tmp_pathspec) && !has_symlinks)
      {
@@ -4677,7 +4677,7 @@ Index: binutils-2.21/ltmain.sh
        if (lstat (tmp_pathspec, &s) == 0)
  	{
  	  if (S_ISLNK (s.st_mode) != 0)
-@@ -3935,8 +4763,9 @@ chase_symlinks (const char *pathspec)
+@@ -3935,8 +4763,9 @@
  	}
        else
  	{
@@ -4689,7 +4689,7 @@ Index: binutils-2.21/ltmain.sh
  	}
      }
    XFREE (tmp_pathspec);
-@@ -3949,7 +4778,8 @@ chase_symlinks (const char *pathspec)
+@@ -3949,7 +4778,8 @@
    tmp_pathspec = realpath (pathspec, buf);
    if (tmp_pathspec == 0)
      {
@@ -4699,7 +4699,7 @@ Index: binutils-2.21/ltmain.sh
      }
    return xstrdup (tmp_pathspec);
  #endif
-@@ -3975,11 +4805,25 @@ strendzap (char *str, const char *pat)
+@@ -3975,11 +4805,25 @@
    return str;
  }
  
@@ -4727,7 +4727,7 @@ Index: binutils-2.21/ltmain.sh
    vfprintf (stderr, message, ap);
    fprintf (stderr, ".\n");
  
-@@ -3988,20 +4832,32 @@ lt_error_core (int exit_status, const ch
+@@ -3988,20 +4832,32 @@
  }
  
  void
@@ -4765,7 +4765,7 @@ Index: binutils-2.21/ltmain.sh
    {
  #ifdef HAVE_SETENV
      /* always make a copy, for consistency with !HAVE_SETENV */
-@@ -4049,9 +4905,9 @@ lt_extend_str (const char *orig_value, c
+@@ -4049,9 +4905,9 @@
  void
  lt_update_exe_path (const char *name, const char *value)
  {
@@ -4778,7 +4778,7 @@ Index: binutils-2.21/ltmain.sh
  
    if (name && *name && value && *value)
      {
-@@ -4070,9 +4926,9 @@ lt_update_exe_path (const char *name, co
+@@ -4070,9 +4926,9 @@
  void
  lt_update_lib_path (const char *name, const char *value)
  {
@@ -4791,7 +4791,7 @@ Index: binutils-2.21/ltmain.sh
  
    if (name && *name && value && *value)
      {
-@@ -4222,7 +5078,7 @@ EOF
+@@ -4222,7 +5078,7 @@
  func_win32_import_lib_p ()
  {
      $opt_debug
@@ -4800,7 +4800,7 @@ Index: binutils-2.21/ltmain.sh
      *import*) : ;;
      *) false ;;
      esac
-@@ -4401,9 +5257,9 @@ func_mode_link ()
+@@ -4401,9 +5257,9 @@
  	    ;;
  	  *)
  	    if test "$prev" = dlfiles; then
@@ -4812,7 +4812,7 @@ Index: binutils-2.21/ltmain.sh
  	    fi
  	    prev=
  	    continue
-@@ -4427,7 +5283,7 @@ func_mode_link ()
+@@ -4427,7 +5283,7 @@
  	    *-*-darwin*)
  	      case "$deplibs " in
  		*" $qarg.ltframework "*) ;;
@@ -4821,7 +4821,7 @@ Index: binutils-2.21/ltmain.sh
  		   ;;
  	      esac
  	      ;;
-@@ -4446,7 +5302,7 @@ func_mode_link ()
+@@ -4446,7 +5302,7 @@
  	    moreargs=
  	    for fil in `cat "$save_arg"`
  	    do
@@ -4830,7 +4830,7 @@ Index: binutils-2.21/ltmain.sh
  	      arg=$fil
  	      # A libtool-controlled object.
  
-@@ -4475,7 +5331,7 @@ func_mode_link ()
+@@ -4475,7 +5331,7 @@
  
  		  if test "$prev" = dlfiles; then
  		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
@@ -4839,7 +4839,7 @@ Index: binutils-2.21/ltmain.sh
  		      prev=
  		      continue
  		    else
-@@ -4487,7 +5343,7 @@ func_mode_link ()
+@@ -4487,7 +5343,7 @@
  		  # CHECK ME:  I think I busted this.  -Ossama
  		  if test "$prev" = dlprefiles; then
  		    # Preload the old-style object.
@@ -4848,7 +4848,7 @@ Index: binutils-2.21/ltmain.sh
  		    prev=
  		  fi
  
-@@ -4557,12 +5413,12 @@ func_mode_link ()
+@@ -4557,12 +5413,12 @@
  	  if test "$prev" = rpath; then
  	    case "$rpath " in
  	    *" $arg "*) ;;
@@ -4863,7 +4863,7 @@ Index: binutils-2.21/ltmain.sh
  	    esac
  	  fi
  	  prev=
-@@ -4574,28 +5430,28 @@ func_mode_link ()
+@@ -4574,28 +5430,28 @@
  	  continue
  	  ;;
  	weak)
@@ -4898,7 +4898,7 @@ Index: binutils-2.21/ltmain.sh
  	  prev=
  	  func_append compile_command " $wl$qarg"
  	  func_append finalize_command " $wl$qarg"
-@@ -4686,15 +5542,16 @@ func_mode_link ()
+@@ -4686,15 +5542,16 @@
  	;;
  
        -L*)
@@ -4918,7 +4918,7 @@ Index: binutils-2.21/ltmain.sh
  	# We need an absolute path.
  	case $dir in
  	[\\/]* | [A-Za-z]:[\\/]*) ;;
-@@ -4706,10 +5563,16 @@ func_mode_link ()
+@@ -4706,10 +5563,16 @@
  	  ;;
  	esac
  	case "$deplibs " in
@@ -4938,7 +4938,7 @@ Index: binutils-2.21/ltmain.sh
  	  ;;
  	esac
  	case $host in
-@@ -4718,12 +5581,12 @@ func_mode_link ()
+@@ -4718,12 +5581,12 @@
  	  case :$dllsearchpath: in
  	  *":$dir:"*) ;;
  	  ::) dllsearchpath=$dir;;
@@ -4953,7 +4953,7 @@ Index: binutils-2.21/ltmain.sh
  	  esac
  	  ;;
  	esac
-@@ -4747,7 +5610,7 @@ func_mode_link ()
+@@ -4747,7 +5610,7 @@
  	    ;;
  	  *-*-rhapsody* | *-*-darwin1.[012])
  	    # Rhapsody C and math libraries are in the System framework
@@ -4962,7 +4962,7 @@ Index: binutils-2.21/ltmain.sh
  	    continue
  	    ;;
  	  *-*-sco3.2v5* | *-*-sco5v6*)
-@@ -4758,9 +5621,6 @@ func_mode_link ()
+@@ -4758,9 +5621,6 @@
  	    # Compiler inserts libc in the correct place for threads to work
  	    test "X$arg" = "X-lc" && continue
  	    ;;
@@ -4972,7 +4972,7 @@ Index: binutils-2.21/ltmain.sh
  	  esac
  	elif test "X$arg" = "X-lc_r"; then
  	 case $host in
-@@ -4770,7 +5630,7 @@ func_mode_link ()
+@@ -4770,7 +5630,7 @@
  	   ;;
  	 esac
  	fi
@@ -4981,7 +4981,7 @@ Index: binutils-2.21/ltmain.sh
  	continue
  	;;
  
-@@ -4782,8 +5642,8 @@ func_mode_link ()
+@@ -4782,8 +5642,8 @@
        # Tru64 UNIX uses -model [arg] to determine the layout of C++
        # classes, name mangling, and exception handling.
        # Darwin uses the -arch flag to determine output architecture.
@@ -4992,7 +4992,7 @@ Index: binutils-2.21/ltmain.sh
  	func_append compile_command " $arg"
  	func_append finalize_command " $arg"
  	prev=xcompiler
-@@ -4791,12 +5651,12 @@ func_mode_link ()
+@@ -4791,12 +5651,12 @@
  	;;
  
        -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
@@ -5007,7 +5007,7 @@ Index: binutils-2.21/ltmain.sh
  	esac
  	continue
  	;;
-@@ -4863,13 +5723,17 @@ func_mode_link ()
+@@ -4863,13 +5723,17 @@
  	# We need an absolute path.
  	case $dir in
  	[\\/]* | [A-Za-z]:[\\/]*) ;;
@@ -5026,7 +5026,7 @@ Index: binutils-2.21/ltmain.sh
  	esac
  	continue
  	;;
-@@ -4922,8 +5786,8 @@ func_mode_link ()
+@@ -4922,8 +5786,8 @@
  	for flag in $args; do
  	  IFS="$save_ifs"
            func_quote_for_eval "$flag"
@@ -5037,7 +5037,7 @@ Index: binutils-2.21/ltmain.sh
  	done
  	IFS="$save_ifs"
  	func_stripname ' ' '' "$arg"
-@@ -4938,9 +5802,9 @@ func_mode_link ()
+@@ -4938,9 +5802,9 @@
  	for flag in $args; do
  	  IFS="$save_ifs"
            func_quote_for_eval "$flag"
@@ -5050,7 +5050,7 @@ Index: binutils-2.21/ltmain.sh
  	done
  	IFS="$save_ifs"
  	func_stripname ' ' '' "$arg"
-@@ -4968,24 +5832,27 @@ func_mode_link ()
+@@ -4968,24 +5832,27 @@
  	arg="$func_quote_for_eval_result"
  	;;
  
@@ -5091,7 +5091,7 @@ Index: binutils-2.21/ltmain.sh
          continue
          ;;
  
-@@ -4997,7 +5864,7 @@ func_mode_link ()
+@@ -4997,7 +5864,7 @@
  
        *.$objext)
  	# A standard object.
@@ -5100,7 +5100,7 @@ Index: binutils-2.21/ltmain.sh
  	;;
  
        *.lo)
-@@ -5028,7 +5895,7 @@ func_mode_link ()
+@@ -5028,7 +5895,7 @@
  
  	    if test "$prev" = dlfiles; then
  	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
@@ -5109,7 +5109,7 @@ Index: binutils-2.21/ltmain.sh
  		prev=
  		continue
  	      else
-@@ -5040,7 +5907,7 @@ func_mode_link ()
+@@ -5040,7 +5907,7 @@
  	    # CHECK ME:  I think I busted this.  -Ossama
  	    if test "$prev" = dlprefiles; then
  	      # Preload the old-style object.
@@ -5118,7 +5118,7 @@ Index: binutils-2.21/ltmain.sh
  	      prev=
  	    fi
  
-@@ -5085,24 +5952,25 @@ func_mode_link ()
+@@ -5085,24 +5952,25 @@
  
        *.$libext)
  	# An archive.
@@ -5149,7 +5149,7 @@ Index: binutils-2.21/ltmain.sh
  	fi
  	continue
  	;;
-@@ -5127,7 +5995,7 @@ func_mode_link ()
+@@ -5127,7 +5995,7 @@
        func_fatal_help "the \`$prevarg' option requires an argument"
  
      if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
@@ -5158,7 +5158,7 @@ Index: binutils-2.21/ltmain.sh
        func_append compile_command " $arg"
        func_append finalize_command " $arg"
      fi
-@@ -5144,11 +6012,13 @@ func_mode_link ()
+@@ -5144,11 +6012,13 @@
      else
        shlib_search_path=
      fi
@@ -5174,7 +5174,7 @@ Index: binutils-2.21/ltmain.sh
      # Create the object directory.
      func_mkdir_p "$output_objdir"
  
-@@ -5169,12 +6039,12 @@ func_mode_link ()
+@@ -5169,12 +6039,12 @@
      # Find all interdependent deplibs by searching for libraries
      # that are linked more than once (e.g. -la -lb -la)
      for deplib in $deplibs; do
@@ -5190,7 +5190,7 @@ Index: binutils-2.21/ltmain.sh
      done
  
      if test "$linkmode" = lib; then
-@@ -5187,9 +6057,9 @@ func_mode_link ()
+@@ -5187,9 +6057,9 @@
        if $opt_duplicate_compiler_generated_deps; then
  	for pre_post_dep in $predeps $postdeps; do
  	  case "$pre_post_deps " in
@@ -5202,7 +5202,7 @@ Index: binutils-2.21/ltmain.sh
  	done
        fi
        pre_post_deps=
-@@ -5256,8 +6126,9 @@ func_mode_link ()
+@@ -5256,8 +6126,9 @@
  	for lib in $dlprefiles; do
  	  # Ignore non-libtool-libs
  	  dependency_libs=
@@ -5213,7 +5213,7 @@ Index: binutils-2.21/ltmain.sh
  	  esac
  
  	  # Collect preopened libtool deplibs, except any this library
-@@ -5267,7 +6138,7 @@ func_mode_link ()
+@@ -5267,7 +6138,7 @@
              deplib_base=$func_basename_result
  	    case " $weak_libs " in
  	    *" $deplib_base "*) ;;
@@ -5222,7 +5222,7 @@ Index: binutils-2.21/ltmain.sh
  	    esac
  	  done
  	done
-@@ -5288,11 +6159,11 @@ func_mode_link ()
+@@ -5288,11 +6159,11 @@
  	    compile_deplibs="$deplib $compile_deplibs"
  	    finalize_deplibs="$deplib $finalize_deplibs"
  	  else
@@ -5236,7 +5236,7 @@ Index: binutils-2.21/ltmain.sh
  		esac
  	    fi
  	  fi
-@@ -5377,7 +6248,7 @@ func_mode_link ()
+@@ -5377,7 +6248,7 @@
  	    if test "$linkmode" = lib ; then
  		case "$new_inherited_linker_flags " in
  		    *" $deplib "*) ;;
@@ -5245,7 +5245,7 @@ Index: binutils-2.21/ltmain.sh
  		esac
  	    fi
  	  fi
-@@ -5390,7 +6261,8 @@ func_mode_link ()
+@@ -5390,7 +6261,8 @@
  	    test "$pass" = conv && continue
  	    newdependency_libs="$deplib $newdependency_libs"
  	    func_stripname '-L' '' "$deplib"
@@ -5255,7 +5255,7 @@ Index: binutils-2.21/ltmain.sh
  	    ;;
  	  prog)
  	    if test "$pass" = conv; then
-@@ -5404,7 +6276,8 @@ func_mode_link ()
+@@ -5404,7 +6276,8 @@
  	      finalize_deplibs="$deplib $finalize_deplibs"
  	    fi
  	    func_stripname '-L' '' "$deplib"
@@ -5265,7 +5265,7 @@ Index: binutils-2.21/ltmain.sh
  	    ;;
  	  *)
  	    func_warning "\`-L' is ignored for archives/objects"
-@@ -5415,17 +6288,21 @@ func_mode_link ()
+@@ -5415,17 +6288,21 @@
  	-R*)
  	  if test "$pass" = link; then
  	    func_stripname '-R' '' "$deplib"
@@ -5290,7 +5290,7 @@ Index: binutils-2.21/ltmain.sh
  	*.$libext)
  	  if test "$pass" = conv; then
  	    deplibs="$deplib $deplibs"
-@@ -5488,11 +6365,11 @@ func_mode_link ()
+@@ -5488,11 +6365,11 @@
  	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
  	      # If there is no dlopen support or we're linking statically,
  	      # we need to preload.
@@ -5304,7 +5304,7 @@ Index: binutils-2.21/ltmain.sh
  	    fi
  	  fi
  	  continue
-@@ -5538,7 +6415,7 @@ func_mode_link ()
+@@ -5538,7 +6415,7 @@
  	  for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
  	    case " $new_inherited_linker_flags " in
  	      *" $tmp_inherited_linker_flag "*) ;;
@@ -5313,7 +5313,7 @@ Index: binutils-2.21/ltmain.sh
  	    esac
  	  done
  	fi
-@@ -5546,8 +6423,8 @@ func_mode_link ()
+@@ -5546,8 +6423,8 @@
  	if test "$linkmode,$pass" = "lib,link" ||
  	   test "$linkmode,$pass" = "prog,scan" ||
  	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
@@ -5324,7 +5324,7 @@ Index: binutils-2.21/ltmain.sh
  	fi
  
  	if test "$pass" = conv; then
-@@ -5558,20 +6435,20 @@ func_mode_link ()
+@@ -5558,20 +6435,20 @@
  	      func_fatal_error "cannot find name of link library for \`$lib'"
  	    fi
  	    # It is a libtool convenience library, so add in its objects.
@@ -5350,7 +5350,7 @@ Index: binutils-2.21/ltmain.sh
  	  done
  	  continue
  	fi # $pass = conv
-@@ -5579,9 +6456,15 @@ func_mode_link ()
+@@ -5579,9 +6456,15 @@
  
  	# Get the name of the library we link against.
  	linklib=
@@ -5369,7 +5369,7 @@ Index: binutils-2.21/ltmain.sh
  	if test -z "$linklib"; then
  	  func_fatal_error "cannot find name of link library for \`$lib'"
  	fi
-@@ -5598,9 +6481,9 @@ func_mode_link ()
+@@ -5598,9 +6481,9 @@
  	    # statically, we need to preload.  We also need to preload any
  	    # dependent libraries so libltdl's deplib preloader doesn't
  	    # bomb out in the load deplibs phase.
@@ -5381,7 +5381,7 @@ Index: binutils-2.21/ltmain.sh
  	  fi
  	  continue
  	fi # $pass = dlopen
-@@ -5622,14 +6505,14 @@ func_mode_link ()
+@@ -5622,14 +6505,14 @@
  
  	# Find the relevant object directory and library name.
  	if test "X$installed" = Xyes; then
@@ -5399,7 +5399,7 @@ Index: binutils-2.21/ltmain.sh
  	  fi
  	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
  	else
-@@ -5637,12 +6520,12 @@ func_mode_link ()
+@@ -5637,12 +6520,12 @@
  	    dir="$ladir"
  	    absdir="$abs_ladir"
  	    # Remove this search path later
@@ -5414,7 +5414,7 @@ Index: binutils-2.21/ltmain.sh
  	  fi
  	fi # $installed = yes
  	func_stripname 'lib' '.la' "$laname"
-@@ -5653,20 +6536,46 @@ func_mode_link ()
+@@ -5653,20 +6536,46 @@
  	  if test -z "$libdir" && test "$linkmode" = prog; then
  	    func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
  	  fi
@@ -5475,7 +5475,7 @@ Index: binutils-2.21/ltmain.sh
  	fi # $pass = dlpreopen
  
  	if test -z "$libdir"; then
-@@ -5684,7 +6593,7 @@ func_mode_link ()
+@@ -5684,7 +6593,7 @@
  
  
  	if test "$linkmode" = prog && test "$pass" != link; then
@@ -5484,7 +5484,7 @@ Index: binutils-2.21/ltmain.sh
  	  deplibs="$lib $deplibs"
  
  	  linkalldeplibs=no
-@@ -5697,7 +6606,8 @@ func_mode_link ()
+@@ -5697,7 +6606,8 @@
  	  for deplib in $dependency_libs; do
  	    case $deplib in
  	    -L*) func_stripname '-L' '' "$deplib"
@@ -5494,7 +5494,7 @@ Index: binutils-2.21/ltmain.sh
  		 ;;
  	    esac
  	    # Need to link against all dependency_libs?
-@@ -5708,12 +6618,12 @@ func_mode_link ()
+@@ -5708,12 +6618,12 @@
  	      # or/and link against static libraries
  	      newdependency_libs="$deplib $newdependency_libs"
  	    fi
@@ -5510,7 +5510,7 @@ Index: binutils-2.21/ltmain.sh
  	  done # for deplib
  	  continue
  	fi # $linkmode = prog...
-@@ -5728,7 +6638,7 @@ func_mode_link ()
+@@ -5728,7 +6638,7 @@
  	      # Make sure the rpath contains only unique directories.
  	      case "$temp_rpath:" in
  	      *"$absdir:"*) ;;
@@ -5519,7 +5519,7 @@ Index: binutils-2.21/ltmain.sh
  	      esac
  	    fi
  
-@@ -5740,7 +6650,7 @@ func_mode_link ()
+@@ -5740,7 +6650,7 @@
  	    *)
  	      case "$compile_rpath " in
  	      *" $absdir "*) ;;
@@ -5528,7 +5528,7 @@ Index: binutils-2.21/ltmain.sh
  	      esac
  	      ;;
  	    esac
-@@ -5749,7 +6659,7 @@ func_mode_link ()
+@@ -5749,7 +6659,7 @@
  	    *)
  	      case "$finalize_rpath " in
  	      *" $libdir "*) ;;
@@ -5537,7 +5537,7 @@ Index: binutils-2.21/ltmain.sh
  	      esac
  	      ;;
  	    esac
-@@ -5774,12 +6684,12 @@ func_mode_link ()
+@@ -5774,12 +6684,12 @@
  	  case $host in
  	  *cygwin* | *mingw* | *cegcc*)
  	      # No point in relinking DLLs because paths are not encoded
@@ -5552,7 +5552,7 @@ Index: binutils-2.21/ltmain.sh
  	      need_relink=yes
  	    fi
  	    ;;
-@@ -5814,7 +6724,7 @@ func_mode_link ()
+@@ -5814,7 +6724,7 @@
  	    *)
  	      case "$compile_rpath " in
  	      *" $absdir "*) ;;
@@ -5561,7 +5561,7 @@ Index: binutils-2.21/ltmain.sh
  	      esac
  	      ;;
  	    esac
-@@ -5823,7 +6733,7 @@ func_mode_link ()
+@@ -5823,7 +6733,7 @@
  	    *)
  	      case "$finalize_rpath " in
  	      *" $libdir "*) ;;
@@ -5570,7 +5570,7 @@ Index: binutils-2.21/ltmain.sh
  	      esac
  	      ;;
  	    esac
-@@ -5835,7 +6745,7 @@ func_mode_link ()
+@@ -5835,7 +6745,7 @@
  	    shift
  	    realname="$1"
  	    shift
@@ -5579,7 +5579,7 @@ Index: binutils-2.21/ltmain.sh
  	    # use dlname if we got it. it's perfectly good, no?
  	    if test -n "$dlname"; then
  	      soname="$dlname"
-@@ -5848,7 +6758,7 @@ func_mode_link ()
+@@ -5848,7 +6758,7 @@
  		versuffix="-$major"
  		;;
  	      esac
@@ -5588,7 +5588,7 @@ Index: binutils-2.21/ltmain.sh
  	    else
  	      soname="$realname"
  	    fi
-@@ -5877,7 +6787,7 @@ func_mode_link ()
+@@ -5877,7 +6787,7 @@
  	    linklib=$newlib
  	  fi # test -n "$old_archive_from_expsyms_cmds"
  
@@ -5597,7 +5597,7 @@ Index: binutils-2.21/ltmain.sh
  	    add_shlibpath=
  	    add_dir=
  	    add=
-@@ -5933,7 +6843,7 @@ func_mode_link ()
+@@ -5933,7 +6843,7 @@
  		if test -n "$inst_prefix_dir"; then
  		  case $libdir in
  		    [\\/]*)
@@ -5606,7 +5606,7 @@ Index: binutils-2.21/ltmain.sh
  		      ;;
  		  esac
  		fi
-@@ -5955,7 +6865,7 @@ func_mode_link ()
+@@ -5955,7 +6865,7 @@
  	    if test -n "$add_shlibpath"; then
  	      case :$compile_shlibpath: in
  	      *":$add_shlibpath:"*) ;;
@@ -5615,7 +5615,7 @@ Index: binutils-2.21/ltmain.sh
  	      esac
  	    fi
  	    if test "$linkmode" = prog; then
-@@ -5969,13 +6879,13 @@ func_mode_link ()
+@@ -5969,13 +6879,13 @@
  		 test "$hardcode_shlibpath_var" = yes; then
  		case :$finalize_shlibpath: in
  		*":$libdir:"*) ;;
@@ -5631,7 +5631,7 @@ Index: binutils-2.21/ltmain.sh
  	    add_shlibpath=
  	    add_dir=
  	    add=
-@@ -5989,7 +6899,7 @@ func_mode_link ()
+@@ -5989,7 +6899,7 @@
  	    elif test "$hardcode_shlibpath_var" = yes; then
  	      case :$finalize_shlibpath: in
  	      *":$libdir:"*) ;;
@@ -5640,7 +5640,7 @@ Index: binutils-2.21/ltmain.sh
  	      esac
  	      add="-l$name"
  	    elif test "$hardcode_automatic" = yes; then
-@@ -6001,12 +6911,12 @@ func_mode_link ()
+@@ -6001,12 +6911,12 @@
  	      fi
  	    else
  	      # We cannot seem to hardcode it, guess we'll fake it.
@@ -5655,7 +5655,7 @@ Index: binutils-2.21/ltmain.sh
  		    ;;
  		esac
  	      fi
-@@ -6083,27 +6993,33 @@ func_mode_link ()
+@@ -6083,27 +6993,33 @@
  	           temp_xrpath=$func_stripname_result
  		   case " $xrpath " in
  		   *" $temp_xrpath "*) ;;
@@ -5695,7 +5695,7 @@ Index: binutils-2.21/ltmain.sh
  	  done
  
  	  if test "$link_all_deplibs" != no; then
-@@ -6113,8 +7029,10 @@ func_mode_link ()
+@@ -6113,8 +7029,10 @@
  	      case $deplib in
  	      -L*) path="$deplib" ;;
  	      *.la)
@@ -5707,7 +5707,7 @@ Index: binutils-2.21/ltmain.sh
  		# We need an absolute path.
  		case $dir in
  		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
-@@ -6130,7 +7048,7 @@ func_mode_link ()
+@@ -6130,7 +7048,7 @@
  		case $host in
  		*-*-darwin*)
  		  depdepl=
@@ -5716,7 +5716,7 @@ Index: binutils-2.21/ltmain.sh
  		  if test -n "$deplibrary_names" ; then
  		    for tmp in $deplibrary_names ; do
  		      depdepl=$tmp
-@@ -6141,8 +7059,8 @@ func_mode_link ()
+@@ -6141,8 +7059,8 @@
                        if test -z "$darwin_install_name"; then
                            darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
                        fi
@@ -5727,7 +5727,7 @@ Index: binutils-2.21/ltmain.sh
  		      path=
  		    fi
  		  fi
-@@ -6152,7 +7070,7 @@ func_mode_link ()
+@@ -6152,7 +7070,7 @@
  		  ;;
  		esac
  		else
@@ -5736,7 +5736,7 @@ Index: binutils-2.21/ltmain.sh
  		  test -z "$libdir" && \
  		    func_fatal_error "\`$deplib' is not a valid libtool archive"
  		  test "$absdir" != "$libdir" && \
-@@ -6192,7 +7110,7 @@ func_mode_link ()
+@@ -6192,7 +7110,7 @@
  	  for dir in $newlib_search_path; do
  	    case "$lib_search_path " in
  	    *" $dir "*) ;;
@@ -5745,7 +5745,7 @@ Index: binutils-2.21/ltmain.sh
  	    esac
  	  done
  	  newlib_search_path=
-@@ -6205,7 +7123,7 @@ func_mode_link ()
+@@ -6205,7 +7123,7 @@
  	fi
  	for var in $vars dependency_libs; do
  	  # Add libraries to $var in reverse order
@@ -5754,7 +5754,7 @@ Index: binutils-2.21/ltmain.sh
  	  new_libs=
  	  for deplib in $tmp_libs; do
  	    # FIXME: Pedantically, this is the right thing to do, so
-@@ -6250,13 +7168,13 @@ func_mode_link ()
+@@ -6250,13 +7168,13 @@
  	    -L*)
  	      case " $tmp_libs " in
  	      *" $deplib "*) ;;
@@ -5771,7 +5771,7 @@ Index: binutils-2.21/ltmain.sh
  	done # for var
        fi
        # Last step: remove runtime libs from dependency_libs
-@@ -6269,7 +7187,7 @@ func_mode_link ()
+@@ -6269,7 +7187,7 @@
  	  ;;
  	esac
  	if test -n "$i" ; then
@@ -5780,7 +5780,7 @@ Index: binutils-2.21/ltmain.sh
  	fi
        done
        dependency_libs=$tmp_libs
-@@ -6310,7 +7228,7 @@ func_mode_link ()
+@@ -6310,7 +7228,7 @@
        # Now set the variables for building old libraries.
        build_libtool_libs=no
        oldlibs="$output"
@@ -5789,7 +5789,7 @@ Index: binutils-2.21/ltmain.sh
        ;;
  
      lib)
-@@ -6319,8 +7237,8 @@ func_mode_link ()
+@@ -6319,8 +7237,8 @@
        lib*)
  	func_stripname 'lib' '.la' "$outputname"
  	name=$func_stripname_result
@@ -5800,7 +5800,7 @@ Index: binutils-2.21/ltmain.sh
  	;;
        *)
  	test "$module" = no && \
-@@ -6330,8 +7248,8 @@ func_mode_link ()
+@@ -6330,8 +7248,8 @@
  	  # Add the "lib" prefix for modules if required
  	  func_stripname '' '.la' "$outputname"
  	  name=$func_stripname_result
@@ -5811,7 +5811,7 @@ Index: binutils-2.21/ltmain.sh
  	else
  	  func_stripname '' '.la' "$outputname"
  	  libname=$func_stripname_result
-@@ -6346,7 +7264,7 @@ func_mode_link ()
+@@ -6346,7 +7264,7 @@
  	  echo
  	  $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
  	  $ECHO "*** objects $objs is not portable!"
@@ -5820,7 +5820,7 @@ Index: binutils-2.21/ltmain.sh
  	fi
        fi
  
-@@ -6544,7 +7462,7 @@ func_mode_link ()
+@@ -6544,7 +7462,7 @@
  	  done
  
  	  # Make executables depend on our current version.
@@ -5829,7 +5829,7 @@ Index: binutils-2.21/ltmain.sh
  	  ;;
  
  	qnx)
-@@ -6612,10 +7530,10 @@ func_mode_link ()
+@@ -6612,10 +7530,10 @@
        fi
  
        func_generate_dlsyms "$libname" "$libname" "yes"
@@ -5842,7 +5842,7 @@ Index: binutils-2.21/ltmain.sh
  	# Remove our outputs, but don't remove object files since they
  	# may have been created when compiling PIC objects.
  	removelist=
-@@ -6631,7 +7549,7 @@ func_mode_link ()
+@@ -6631,7 +7549,7 @@
  		   continue
  		 fi
  	       fi
@@ -5851,7 +5851,7 @@ Index: binutils-2.21/ltmain.sh
  	       ;;
  	    *) ;;
  	  esac
-@@ -6642,7 +7560,7 @@ func_mode_link ()
+@@ -6642,7 +7560,7 @@
  
        # Now set the variables for building old libraries.
        if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
@@ -5860,7 +5860,7 @@ Index: binutils-2.21/ltmain.sh
  
  	# Transform .lo files to .o files.
  	oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
-@@ -6659,10 +7577,11 @@ func_mode_link ()
+@@ -6659,10 +7577,11 @@
  	# If the user specified any rpath flags, then add them.
  	temp_xrpath=
  	for libdir in $xrpath; do
@@ -5874,7 +5874,7 @@ Index: binutils-2.21/ltmain.sh
  	  esac
  	done
  	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
-@@ -6676,7 +7595,7 @@ func_mode_link ()
+@@ -6676,7 +7595,7 @@
        for lib in $old_dlfiles; do
  	case " $dlprefiles $dlfiles " in
  	*" $lib "*) ;;
@@ -5883,7 +5883,7 @@ Index: binutils-2.21/ltmain.sh
  	esac
        done
  
-@@ -6686,7 +7605,7 @@ func_mode_link ()
+@@ -6686,7 +7605,7 @@
        for lib in $old_dlprefiles; do
  	case "$dlprefiles " in
  	*" $lib "*) ;;
@@ -5892,7 +5892,7 @@ Index: binutils-2.21/ltmain.sh
  	esac
        done
  
-@@ -6698,7 +7617,7 @@ func_mode_link ()
+@@ -6698,7 +7617,7 @@
  	    ;;
  	  *-*-rhapsody* | *-*-darwin1.[012])
  	    # Rhapsody C library is in the System framework
@@ -5901,7 +5901,7 @@ Index: binutils-2.21/ltmain.sh
  	    ;;
  	  *-*-netbsd*)
  	    # Don't link with libc until the a.out ld.so is fixed.
-@@ -6715,7 +7634,7 @@ func_mode_link ()
+@@ -6715,7 +7634,7 @@
  	  *)
  	    # Add libc to deplibs on all other systems if necessary.
  	    if test "$build_libtool_need_lc" = "yes"; then
@@ -5910,7 +5910,7 @@ Index: binutils-2.21/ltmain.sh
  	    fi
  	    ;;
  	  esac
-@@ -6764,18 +7683,18 @@ EOF
+@@ -6764,18 +7683,18 @@
  		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  		  case " $predeps $postdeps " in
  		  *" $i "*)
@@ -5933,7 +5933,7 @@ Index: binutils-2.21/ltmain.sh
  		  else
  		    droppeddeps=yes
  		    echo
-@@ -6789,7 +7708,7 @@ EOF
+@@ -6789,7 +7708,7 @@
  		fi
  		;;
  	      *)
@@ -5942,7 +5942,7 @@ Index: binutils-2.21/ltmain.sh
  		;;
  	      esac
  	    done
-@@ -6807,18 +7726,18 @@ EOF
+@@ -6807,18 +7726,18 @@
  		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  		    case " $predeps $postdeps " in
  		    *" $i "*)
@@ -5965,7 +5965,7 @@ Index: binutils-2.21/ltmain.sh
  		    else
  		      droppeddeps=yes
  		      echo
-@@ -6840,7 +7759,7 @@ EOF
+@@ -6840,7 +7759,7 @@
  		fi
  		;;
  	      *)
@@ -5974,7 +5974,7 @@ Index: binutils-2.21/ltmain.sh
  		;;
  	      esac
  	    done
-@@ -6857,15 +7776,27 @@ EOF
+@@ -6857,15 +7776,27 @@
  	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  		case " $predeps $postdeps " in
  		*" $a_deplib "*)
@@ -6005,7 +6005,7 @@ Index: binutils-2.21/ltmain.sh
  		  for potent_lib in $potential_libs; do
  		      # Follow soft links.
  		      if ls -lLd "$potent_lib" 2>/dev/null |
-@@ -6885,10 +7816,10 @@ EOF
+@@ -6885,10 +7816,10 @@
  			*) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
  			esac
  		      done
@@ -6018,7 +6018,7 @@ Index: binutils-2.21/ltmain.sh
  			a_deplib=""
  			break 2
  		      fi
-@@ -6913,7 +7844,7 @@ EOF
+@@ -6913,7 +7844,7 @@
  	      ;;
  	    *)
  	      # Add a -L argument.
@@ -6027,7 +6027,7 @@ Index: binutils-2.21/ltmain.sh
  	      ;;
  	    esac
  	  done # Gone through all deplibs.
-@@ -6929,20 +7860,20 @@ EOF
+@@ -6929,20 +7860,20 @@
  	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  		case " $predeps $postdeps " in
  		*" $a_deplib "*)
@@ -6051,7 +6051,7 @@ Index: binutils-2.21/ltmain.sh
  		      a_deplib=""
  		      break 2
  		    fi
-@@ -6967,7 +7898,7 @@ EOF
+@@ -6967,7 +7898,7 @@
  	      ;;
  	    *)
  	      # Add a -L argument.
@@ -6060,7 +6060,7 @@ Index: binutils-2.21/ltmain.sh
  	      ;;
  	    esac
  	  done # Gone through all deplibs.
-@@ -7071,7 +8002,7 @@ EOF
+@@ -7071,7 +8002,7 @@
  	*)
  	  case " $deplibs " in
  	  *" -L$path/$objdir "*)
@@ -6069,7 +6069,7 @@ Index: binutils-2.21/ltmain.sh
  	  esac
  	  ;;
  	esac
-@@ -7081,10 +8012,10 @@ EOF
+@@ -7081,10 +8012,10 @@
  	-L*)
  	  case " $new_libs " in
  	  *" $deplib "*) ;;
@@ -6082,7 +6082,7 @@ Index: binutils-2.21/ltmain.sh
  	esac
        done
        deplibs="$new_libs"
-@@ -7101,10 +8032,12 @@ EOF
+@@ -7101,10 +8032,12 @@
  	  hardcode_libdirs=
  	  dep_rpath=
  	  rpath="$finalize_rpath"
@@ -6096,7 +6096,7 @@ Index: binutils-2.21/ltmain.sh
  		if test -z "$hardcode_libdirs"; then
  		  hardcode_libdirs="$libdir"
  		else
-@@ -7113,18 +8046,18 @@ EOF
+@@ -7113,18 +8046,18 @@
  		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
  		    ;;
  		  *)
@@ -6119,7 +6119,7 @@ Index: binutils-2.21/ltmain.sh
  	      esac
  	    fi
  	  done
-@@ -7133,40 +8066,38 @@ EOF
+@@ -7133,40 +8066,38 @@
  	     test -n "$hardcode_libdirs"; then
  	    libdir="$hardcode_libdirs"
  	    if test -n "$hardcode_libdir_flag_spec_ld"; then
@@ -6169,7 +6169,7 @@ Index: binutils-2.21/ltmain.sh
  	else
  	  soname="$realname"
  	fi
-@@ -7178,7 +8109,7 @@ EOF
+@@ -7178,7 +8109,7 @@
  	linknames=
  	for link
  	do
@@ -6178,7 +6178,7 @@ Index: binutils-2.21/ltmain.sh
  	done
  
  	# Use standard objects if they are pic
-@@ -7189,7 +8120,7 @@ EOF
+@@ -7189,7 +8120,7 @@
  	if test -n "$export_symbols" && test -n "$include_expsyms"; then
  	  $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
  	  export_symbols="$output_objdir/$libname.uexp"
@@ -6187,7 +6187,7 @@ Index: binutils-2.21/ltmain.sh
  	fi
  
  	orig_export_symbols=
-@@ -7220,13 +8151,45 @@ EOF
+@@ -7220,13 +8151,45 @@
  	    $opt_dry_run || $RM $export_symbols
  	    cmds=$export_symbols_cmds
  	    save_ifs="$IFS"; IFS='~'
@@ -6238,7 +6238,7 @@ Index: binutils-2.21/ltmain.sh
  		skipped_export=false
  	      else
  		# The command line is too long to execute in one step.
-@@ -7248,7 +8211,7 @@ EOF
+@@ -7248,7 +8211,7 @@
  	if test -n "$export_symbols" && test -n "$include_expsyms"; then
  	  tmp_export_symbols="$export_symbols"
  	  test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
@@ -6247,7 +6247,7 @@ Index: binutils-2.21/ltmain.sh
  	fi
  
  	if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
-@@ -7260,7 +8223,7 @@ EOF
+@@ -7260,7 +8223,7 @@
  	  # global variables. join(1) would be nice here, but unfortunately
  	  # isn't a blessed tool.
  	  $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
@@ -6256,7 +6256,7 @@ Index: binutils-2.21/ltmain.sh
  	  export_symbols=$output_objdir/$libname.def
  	  $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
  	fi
-@@ -7270,7 +8233,7 @@ EOF
+@@ -7270,7 +8233,7 @@
  	  case " $convenience " in
  	  *" $test_deplib "*) ;;
  	  *)
@@ -6265,7 +6265,7 @@ Index: binutils-2.21/ltmain.sh
  	    ;;
  	  esac
  	done
-@@ -7286,43 +8249,43 @@ EOF
+@@ -7286,43 +8249,43 @@
  	  fi
  	  if test -n "$whole_archive_flag_spec"; then
  	    save_libobjs=$libobjs
@@ -6320,7 +6320,7 @@ Index: binutils-2.21/ltmain.sh
  	    cmds=$archive_cmds
  	  fi
  	fi
-@@ -7366,10 +8329,13 @@ EOF
+@@ -7366,10 +8329,13 @@
  	    echo 'INPUT (' > $output
  	    for obj in $save_libobjs
  	    do
@@ -6336,7 +6336,7 @@ Index: binutils-2.21/ltmain.sh
  	  elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
  	    output=${output_objdir}/${output_la}.lnk
  	    func_verbose "creating linker input file list: $output"
-@@ -7383,15 +8349,17 @@ EOF
+@@ -7383,15 +8349,17 @@
  	    fi
  	    for obj
  	    do
@@ -6358,7 +6358,7 @@ Index: binutils-2.21/ltmain.sh
  	      func_len " $test_cmds"
  	      len0=$func_len_result
  	      len=$len0
-@@ -7411,12 +8379,12 @@ EOF
+@@ -7411,12 +8379,12 @@
  		  if test "$k" -eq 1 ; then
  		    # The first file doesn't have a previous command to add.
  		    reload_objs=$objlist
@@ -6373,7 +6373,7 @@ Index: binutils-2.21/ltmain.sh
  		  fi
  		  last_robj=$output_objdir/$output_la-${k}.$objext
  		  func_arith $k + 1
-@@ -7433,11 +8401,11 @@ EOF
+@@ -7433,11 +8401,11 @@
  	      # files will link in the last one created.
  	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
  	      reload_objs="$objlist $last_robj"
@@ -6388,7 +6388,7 @@ Index: binutils-2.21/ltmain.sh
  
  	    else
  	      output=
-@@ -7450,9 +8418,9 @@ EOF
+@@ -7450,9 +8418,9 @@
  	      libobjs=$output
  	      # Append the command to create the export file.
  	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
@@ -6400,7 +6400,7 @@ Index: binutils-2.21/ltmain.sh
  	      fi
  	    fi
  
-@@ -7471,7 +8439,7 @@ EOF
+@@ -7471,7 +8439,7 @@
  		lt_exit=$?
  
  		# Restore the uninstalled library and exit
@@ -6409,7 +6409,7 @@ Index: binutils-2.21/ltmain.sh
  		  ( cd "$output_objdir" && \
  		    $RM "${realname}T" && \
  		    $MV "${realname}U" "$realname" )
-@@ -7492,7 +8460,7 @@ EOF
+@@ -7492,7 +8460,7 @@
  	    if test -n "$export_symbols" && test -n "$include_expsyms"; then
  	      tmp_export_symbols="$export_symbols"
  	      test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
@@ -6418,7 +6418,7 @@ Index: binutils-2.21/ltmain.sh
  	    fi
  
  	    if test -n "$orig_export_symbols"; then
-@@ -7504,7 +8472,7 @@ EOF
+@@ -7504,7 +8472,7 @@
  	      # global variables. join(1) would be nice here, but unfortunately
  	      # isn't a blessed tool.
  	      $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
@@ -6427,7 +6427,7 @@ Index: binutils-2.21/ltmain.sh
  	      export_symbols=$output_objdir/$libname.def
  	      $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
  	    fi
-@@ -7515,7 +8483,7 @@ EOF
+@@ -7515,7 +8483,7 @@
  	  output=$save_output
  
  	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
@@ -6436,7 +6436,7 @@ Index: binutils-2.21/ltmain.sh
  	    test "X$libobjs" = "X " && libobjs=
  	  fi
  	  # Expand the library linking commands again to reset the
-@@ -7539,23 +8507,23 @@ EOF
+@@ -7539,23 +8507,23 @@
  
  	if test -n "$delfiles"; then
  	  # Append the command to remove temporary files to $cmds.
@@ -6464,7 +6464,7 @@ Index: binutils-2.21/ltmain.sh
  	  $opt_silent || {
  	    func_quote_for_expand "$cmd"
  	    eval "func_echo $func_quote_for_expand_result"
-@@ -7564,7 +8532,7 @@ EOF
+@@ -7564,7 +8532,7 @@
  	    lt_exit=$?
  
  	    # Restore the uninstalled library and exit
@@ -6473,7 +6473,7 @@ Index: binutils-2.21/ltmain.sh
  	      ( cd "$output_objdir" && \
  	        $RM "${realname}T" && \
  		$MV "${realname}U" "$realname" )
-@@ -7576,8 +8544,8 @@ EOF
+@@ -7576,8 +8544,8 @@
  	IFS="$save_ifs"
  
  	# Restore the uninstalled library and exit
@@ -6484,7 +6484,7 @@ Index: binutils-2.21/ltmain.sh
  
  	  if test -n "$convenience"; then
  	    if test -z "$whole_archive_flag_spec"; then
-@@ -7656,17 +8624,20 @@ EOF
+@@ -7656,17 +8624,20 @@
  
        if test -n "$convenience"; then
  	if test -n "$whole_archive_flag_spec"; then
@@ -6507,7 +6507,7 @@ Index: binutils-2.21/ltmain.sh
        # Create the old-style object.
        reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
  
-@@ -7690,7 +8661,7 @@ EOF
+@@ -7690,7 +8661,7 @@
  	# Create an invalid libtool object if no PIC, so that we don't
  	# accidentally link it into a program.
  	# $show "echo timestamp > $libobj"
@@ -6516,7 +6516,7 @@ Index: binutils-2.21/ltmain.sh
  	exit $EXIT_SUCCESS
        fi
  
-@@ -7740,8 +8711,8 @@ EOF
+@@ -7740,8 +8711,8 @@
  	if test "$tagname" = CXX ; then
  	  case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
  	    10.[0123])
@@ -6527,7 +6527,7 @@ Index: binutils-2.21/ltmain.sh
  	    ;;
  	  esac
  	fi
-@@ -7761,7 +8732,7 @@ EOF
+@@ -7761,7 +8732,7 @@
  	*)
  	  case " $compile_deplibs " in
  	  *" -L$path/$objdir "*)
@@ -6536,7 +6536,7 @@ Index: binutils-2.21/ltmain.sh
  	  esac
  	  ;;
  	esac
-@@ -7771,17 +8742,17 @@ EOF
+@@ -7771,17 +8742,17 @@
  	-L*)
  	  case " $new_libs " in
  	  *" $deplib "*) ;;
@@ -6558,7 +6558,7 @@ Index: binutils-2.21/ltmain.sh
  
        if test -n "$rpath$xrpath"; then
  	# If the user specified any rpath flags, then add them.
-@@ -7789,7 +8760,7 @@ EOF
+@@ -7789,7 +8760,7 @@
  	  # This is the magic to use -rpath.
  	  case "$finalize_rpath " in
  	  *" $libdir "*) ;;
@@ -6567,7 +6567,7 @@ Index: binutils-2.21/ltmain.sh
  	  esac
  	done
        fi
-@@ -7808,18 +8779,18 @@ EOF
+@@ -7808,18 +8779,18 @@
  	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
  		;;
  	      *)
@@ -6590,7 +6590,7 @@ Index: binutils-2.21/ltmain.sh
  	  esac
  	fi
  	case $host in
-@@ -7828,12 +8799,12 @@ EOF
+@@ -7828,12 +8799,12 @@
  	  case :$dllsearchpath: in
  	  *":$libdir:"*) ;;
  	  ::) dllsearchpath=$libdir;;
@@ -6605,7 +6605,7 @@ Index: binutils-2.21/ltmain.sh
  	  esac
  	  ;;
  	esac
-@@ -7842,7 +8813,7 @@ EOF
+@@ -7842,7 +8813,7 @@
        if test -n "$hardcode_libdir_separator" &&
  	 test -n "$hardcode_libdirs"; then
  	libdir="$hardcode_libdirs"
@@ -6614,7 +6614,7 @@ Index: binutils-2.21/ltmain.sh
        fi
        compile_rpath="$rpath"
  
-@@ -7859,18 +8830,18 @@ EOF
+@@ -7859,18 +8830,18 @@
  	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
  		;;
  	      *)
@@ -6637,7 +6637,7 @@ Index: binutils-2.21/ltmain.sh
  	  esac
  	fi
        done
-@@ -7878,7 +8849,7 @@ EOF
+@@ -7878,7 +8849,7 @@
        if test -n "$hardcode_libdir_separator" &&
  	 test -n "$hardcode_libdirs"; then
  	libdir="$hardcode_libdirs"
@@ -6646,7 +6646,7 @@ Index: binutils-2.21/ltmain.sh
        fi
        finalize_rpath="$rpath"
  
-@@ -7921,6 +8892,12 @@ EOF
+@@ -7921,6 +8892,12 @@
  	exit_status=0
  	func_show_eval "$link_command" 'exit_status=$?'
  
@@ -6659,7 +6659,7 @@ Index: binutils-2.21/ltmain.sh
  	# Delete the generated files.
  	if test -f "$output_objdir/${outputname}S.${objext}"; then
  	  func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
-@@ -7943,7 +8920,7 @@ EOF
+@@ -7943,7 +8920,7 @@
  	  # We should set the runpath_var.
  	  rpath=
  	  for dir in $perm_rpath; do
@@ -6668,7 +6668,7 @@ Index: binutils-2.21/ltmain.sh
  	  done
  	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
  	fi
-@@ -7951,7 +8928,7 @@ EOF
+@@ -7951,7 +8928,7 @@
  	  # We should set the runpath_var.
  	  rpath=
  	  for dir in $finalize_perm_rpath; do
@@ -6677,7 +6677,7 @@ Index: binutils-2.21/ltmain.sh
  	  done
  	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
  	fi
-@@ -7966,6 +8943,13 @@ EOF
+@@ -7966,6 +8943,13 @@
  	$opt_dry_run || $RM $output
  	# Link the executable and exit
  	func_show_eval "$link_command" 'exit $?'
@@ -6691,7 +6691,7 @@ Index: binutils-2.21/ltmain.sh
  	exit $EXIT_SUCCESS
        fi
  
-@@ -7999,6 +8983,12 @@ EOF
+@@ -7999,6 +8983,12 @@
  
        func_show_eval "$link_command" 'exit $?'
  
@@ -6704,7 +6704,7 @@ Index: binutils-2.21/ltmain.sh
        # Now create the wrapper script.
        func_verbose "creating $output"
  
-@@ -8096,7 +9086,7 @@ EOF
+@@ -8096,7 +9086,7 @@
  	else
  	  oldobjs="$old_deplibs $non_pic_objects"
  	  if test "$preload" = yes && test -f "$symfileobj"; then
@@ -6713,7 +6713,7 @@ Index: binutils-2.21/ltmain.sh
  	  fi
  	fi
  	addlibs="$old_convenience"
-@@ -8104,10 +9094,10 @@ EOF
+@@ -8104,10 +9094,10 @@
  
        if test -n "$addlibs"; then
  	gentop="$output_objdir/${outputname}x"
@@ -6726,7 +6726,7 @@ Index: binutils-2.21/ltmain.sh
        fi
  
        # Do each command in the archive commands.
-@@ -8118,10 +9108,10 @@ EOF
+@@ -8118,10 +9108,10 @@
  	# Add any objects from preloaded convenience libraries
  	if test -n "$dlprefiles"; then
  	  gentop="$output_objdir/${outputname}x"
@@ -6739,7 +6739,7 @@ Index: binutils-2.21/ltmain.sh
  	fi
  
  	# POSIX demands no paths to be encoded in archives.  We have
-@@ -8139,7 +9129,7 @@ EOF
+@@ -8139,7 +9129,7 @@
  	else
  	  echo "copying selected object files to avoid basename conflicts..."
  	  gentop="$output_objdir/${outputname}x"
@@ -6748,7 +6748,7 @@ Index: binutils-2.21/ltmain.sh
  	  func_mkdir_p "$gentop"
  	  save_oldobjs=$oldobjs
  	  oldobjs=
-@@ -8163,18 +9153,28 @@ EOF
+@@ -8163,18 +9153,28 @@
  		esac
  	      done
  	      func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
@@ -6780,7 +6780,7 @@ Index: binutils-2.21/ltmain.sh
  	else
  	  # the command line is too long to link in one step, link in parts
  	  func_verbose "using piecewise archive linking..."
-@@ -8189,7 +9189,7 @@ EOF
+@@ -8189,7 +9189,7 @@
  	  do
  	    last_oldobj=$obj
  	  done
@@ -6789,7 +6789,7 @@ Index: binutils-2.21/ltmain.sh
  	  func_len " $test_cmds"
  	  len0=$func_len_result
  	  len=$len0
-@@ -8208,7 +9208,7 @@ EOF
+@@ -8208,7 +9208,7 @@
  		RANLIB=$save_RANLIB
  	      fi
  	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
@@ -6798,7 +6798,7 @@ Index: binutils-2.21/ltmain.sh
  	      objlist=
  	      len=$len0
  	    fi
-@@ -8216,9 +9216,9 @@ EOF
+@@ -8216,9 +9216,9 @@
  	  RANLIB=$save_RANLIB
  	  oldobjs=$objlist
  	  if test "X$oldobjs" = "X" ; then
@@ -6810,7 +6810,7 @@ Index: binutils-2.21/ltmain.sh
  	  fi
  	fi
        fi
-@@ -8268,12 +9268,23 @@ EOF
+@@ -8268,12 +9268,23 @@
  	      *.la)
  		func_basename "$deplib"
  		name="$func_basename_result"
@@ -6837,7 +6837,7 @@ Index: binutils-2.21/ltmain.sh
  	      esac
  	    done
  	    dependency_libs="$newdependency_libs"
-@@ -8284,12 +9295,14 @@ EOF
+@@ -8284,12 +9295,14 @@
  	      *.la)
  	        func_basename "$lib"
  		name="$func_basename_result"
@@ -6855,7 +6855,7 @@ Index: binutils-2.21/ltmain.sh
  	      esac
  	    done
  	    dlfiles="$newdlfiles"
-@@ -8303,10 +9316,11 @@ EOF
+@@ -8303,10 +9316,11 @@
  		# the library:
  		func_basename "$lib"
  		name="$func_basename_result"
@@ -6869,7 +6869,7 @@ Index: binutils-2.21/ltmain.sh
  		;;
  	      esac
  	    done
-@@ -8318,7 +9332,7 @@ EOF
+@@ -8318,7 +9332,7 @@
  		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
  		*) abs=`pwd`"/$lib" ;;
  	      esac
@@ -6878,7 +6878,7 @@ Index: binutils-2.21/ltmain.sh
  	    done
  	    dlfiles="$newdlfiles"
  	    newdlprefiles=
-@@ -8327,7 +9341,7 @@ EOF
+@@ -8327,7 +9341,7 @@
  		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
  		*) abs=`pwd`"/$lib" ;;
  	      esac
@@ -6887,7 +6887,7 @@ Index: binutils-2.21/ltmain.sh
  	    done
  	    dlprefiles="$newdlprefiles"
  	  fi
-@@ -8412,7 +9426,7 @@ relink_command=\"$relink_command\""
+@@ -8412,7 +9426,7 @@
      exit $EXIT_SUCCESS
  }
  
@@ -6896,7 +6896,7 @@ Index: binutils-2.21/ltmain.sh
      func_mode_link ${1+"$@"}
  
  
-@@ -8432,9 +9446,9 @@ func_mode_uninstall ()
+@@ -8432,9 +9446,9 @@
      for arg
      do
        case $arg in
@@ -6909,7 +6909,7 @@ Index: binutils-2.21/ltmain.sh
        esac
      done
  
-@@ -8443,24 +9457,23 @@ func_mode_uninstall ()
+@@ -8443,24 +9457,23 @@
  
      rmdirs=
  
@@ -6941,7 +6941,7 @@ Index: binutils-2.21/ltmain.sh
  	esac
        fi
  
-@@ -8486,18 +9499,17 @@ func_mode_uninstall ()
+@@ -8486,18 +9499,17 @@
  
  	  # Delete the libtool libraries and symlinks.
  	  for n in $library_names; do
@@ -6966,7 +6966,7 @@ Index: binutils-2.21/ltmain.sh
  	    ;;
  	  uninstall)
  	    if test -n "$library_names"; then
-@@ -8525,19 +9537,19 @@ func_mode_uninstall ()
+@@ -8525,19 +9537,19 @@
  	  # Add PIC object to the list of files to remove.
  	  if test -n "$pic_object" &&
  	     test "$pic_object" != none; then
@@ -6989,7 +6989,7 @@ Index: binutils-2.21/ltmain.sh
  	  noexename=$name
  	  case $file in
  	  *.exe)
-@@ -8547,7 +9559,7 @@ func_mode_uninstall ()
+@@ -8547,7 +9559,7 @@
  	    noexename=$func_stripname_result
  	    # $file with .exe has already been added to rmfiles,
  	    # add $file without .exe
@@ -6998,7 +6998,7 @@ Index: binutils-2.21/ltmain.sh
  	    ;;
  	  esac
  	  # Do a test to see if this is a libtool program.
-@@ -8556,7 +9568,7 @@ func_mode_uninstall ()
+@@ -8556,7 +9568,7 @@
  	      func_ltwrapper_scriptname "$file"
  	      relink_command=
  	      func_source $func_ltwrapper_scriptname_result
@@ -7007,7 +7007,7 @@ Index: binutils-2.21/ltmain.sh
  	    else
  	      relink_command=
  	      func_source $dir/$noexename
-@@ -8564,12 +9576,12 @@ func_mode_uninstall ()
+@@ -8564,12 +9576,12 @@
  
  	    # note $name still contains .exe if it was in $file originally
  	    # as does the version of $file that was added into $rmfiles
@@ -7023,7 +7023,7 @@ Index: binutils-2.21/ltmain.sh
  	    fi
  	  fi
  	fi
-@@ -8577,7 +9589,6 @@ func_mode_uninstall ()
+@@ -8577,7 +9589,6 @@
        esac
        func_show_eval "$RM $rmfiles" 'exit_status=1'
      done
@@ -7031,7 +7031,7 @@ Index: binutils-2.21/ltmain.sh
  
      # Try to remove the ${objdir}s in the directories where we deleted files
      for dir in $rmdirs; do
-@@ -8589,16 +9600,16 @@ func_mode_uninstall ()
+@@ -8589,16 +9600,16 @@
      exit $exit_status
  }
  
@@ -7053,8 +7053,8 @@ Index: binutils-2.21/ltmain.sh
    eval exec "$exec_cmd"
 Index: binutils-2.21/ltoptions.m4
 ===================================================================
---- binutils-2.21.orig/ltoptions.m4
-+++ binutils-2.21/ltoptions.m4
+--- binutils-2.21.orig/ltoptions.m4	2010-01-09 13:11:32.000000000 -0800
++++ binutils-2.21/ltoptions.m4	2011-01-07 10:49:16.406101000 -0800
 @@ -8,7 +8,7 @@
  # unlimited permission to copy and/or distribute it, with or without
  # modifications, as long as this notice is preserved.
@@ -7066,8 +7066,8 @@ Index: binutils-2.21/ltoptions.m4
  AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
 Index: binutils-2.21/ltversion.m4
 ===================================================================
---- binutils-2.21.orig/ltversion.m4
-+++ binutils-2.21/ltversion.m4
+--- binutils-2.21.orig/ltversion.m4	2010-01-09 13:11:32.000000000 -0800
++++ binutils-2.21/ltversion.m4	2011-01-07 10:49:16.406101000 -0800
 @@ -7,17 +7,17 @@
  # unlimited permission to copy and/or distribute it, with or without
  # modifications, as long as this notice is preserved.
@@ -7094,8 +7094,8 @@ Index: binutils-2.21/ltversion.m4
  ])
 Index: binutils-2.21/lt~obsolete.m4
 ===================================================================
---- binutils-2.21.orig/lt~obsolete.m4
-+++ binutils-2.21/lt~obsolete.m4
+--- binutils-2.21.orig/lt~obsolete.m4	2010-01-09 13:11:32.000000000 -0800
++++ binutils-2.21/lt~obsolete.m4	2011-01-07 10:49:16.406101000 -0800
 @@ -7,7 +7,7 @@
  # unlimited permission to copy and/or distribute it, with or without
  # modifications, as long as this notice is preserved.
@@ -7107,9 +7107,9 @@ Index: binutils-2.21/lt~obsolete.m4
  #
 Index: binutils-2.21/configure
 ===================================================================
---- binutils-2.21.orig/configure
-+++ binutils-2.21/configure
-@@ -2670,7 +2670,7 @@ host_libs="intl mmalloc libiberty opcode
+--- binutils-2.21.orig/configure	2011-01-07 10:49:16.006101000 -0800
++++ binutils-2.21/configure	2011-01-07 10:49:17.906101000 -0800
+@@ -2670,7 +2670,7 @@
  # binutils, gas and ld appear in that order because it makes sense to run
  # "make check" in that particular order.
  # If --enable-gold is used, "gold" may replace "ld".
@@ -7118,7 +7118,7 @@ Index: binutils-2.21/configure
  
  # libgcj represents the runtime libraries only used by gcj.
  libgcj="target-libffi \
-@@ -3148,7 +3148,7 @@ case "${target}" in
+@@ -3148,7 +3148,7 @@
    am33_2.0-*-linux*)
      noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
      ;;
@@ -7127,7 +7127,7 @@ Index: binutils-2.21/configure
      noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
      ;;
    sh*-*-pe|mips*-*-pe|*arm-wince-pe)
-@@ -3487,7 +3487,7 @@ case "${target}" in
+@@ -3487,7 +3487,7 @@
    romp-*-*)
      noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
      ;;
@@ -7136,7 +7136,7 @@ Index: binutils-2.21/configure
      case "${host}" in
        i[3456789]86-*-vsta) ;; # don't add gprof back in
        i[3456789]86-*-go32*) ;; # don't add gprof back in
-@@ -7597,7 +7597,7 @@ case " $build_configdirs " in
+@@ -7597,7 +7597,7 @@
      # For an installed makeinfo, we require it to be from texinfo 4.7 or
      # higher, else we use the "missing" dummy.
      if ${MAKEINFO} --version \
@@ -7147,9 +7147,9 @@ Index: binutils-2.21/configure
        MAKEINFO="$MISSING makeinfo"
 Index: binutils-2.21/bfd/configure
 ===================================================================
---- binutils-2.21.orig/bfd/configure
-+++ binutils-2.21/bfd/configure
-@@ -667,6 +667,9 @@ OTOOL
+--- binutils-2.21.orig/bfd/configure	2010-12-08 00:37:34.000000000 -0800
++++ binutils-2.21/bfd/configure	2011-01-07 11:25:57.156101002 -0800
+@@ -667,6 +667,9 @@
  LIPO
  NMEDIT
  DSYMUTIL
@@ -7159,7 +7159,7 @@ Index: binutils-2.21/bfd/configure
  OBJDUMP
  LN_S
  NM
-@@ -779,6 +782,7 @@ enable_static
+@@ -779,6 +782,7 @@
  with_pic
  enable_fast_install
  with_gnu_ld
@@ -7167,7 +7167,7 @@ Index: binutils-2.21/bfd/configure
  enable_libtool_lock
  enable_plugins
  enable_largefile
-@@ -1453,6 +1457,8 @@ Optional Packages:
+@@ -1453,6 +1457,8 @@
    --with-pic              try to use only PIC/non-PIC objects [default=use
                            both]
    --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
@@ -7176,7 +7176,7 @@ Index: binutils-2.21/bfd/configure
    --with-mmap             try using mmap for BFD input files if available
    --with-separate-debug-dir=DIR
                            Look for global separate debug info in DIR
-@@ -5383,8 +5389,8 @@ esac
+@@ -5383,8 +5389,8 @@
  
  
  
@@ -7187,7 +7187,7 @@ Index: binutils-2.21/bfd/configure
  
  
  
-@@ -5424,7 +5430,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -5424,7 +5430,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
  $as_echo_n "checking how to print strings... " >&6; }
  # Test print first, because it will be a builtin if present.
@@ -7196,7 +7196,7 @@ Index: binutils-2.21/bfd/configure
     test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
    ECHO='print -r --'
  elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -6110,8 +6116,8 @@ $as_echo_n "checking whether the shell u
+@@ -6110,8 +6116,8 @@
  # Try some XSI features
  xsi_shell=no
  ( _lt_dummy="a/b/c"
@@ -7207,7 +7207,7 @@ Index: binutils-2.21/bfd/configure
      && eval 'test $(( 1 + 1 )) -eq 2 \
      && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
    && xsi_shell=yes
-@@ -6160,6 +6166,80 @@ esac
+@@ -6160,6 +6166,80 @@
  
  
  
@@ -7288,7 +7288,7 @@ Index: binutils-2.21/bfd/configure
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
  $as_echo_n "checking for $LD option to reload object files... " >&6; }
  if test "${lt_cv_ld_reload_flag+set}" = set; then :
-@@ -6176,6 +6256,11 @@ case $reload_flag in
+@@ -6176,6 +6256,11 @@
  esac
  reload_cmds='$LD$reload_flag -o $output$reload_objs'
  case $host_os in
@@ -7300,7 +7300,7 @@ Index: binutils-2.21/bfd/configure
    darwin*)
      if test "$GCC" = yes; then
        reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -6344,7 +6429,8 @@ mingw* | pw32*)
+@@ -6344,7 +6429,8 @@
      lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
      lt_cv_file_magic_cmd='func_win32_libid'
    else
@@ -7310,7 +7310,7 @@ Index: binutils-2.21/bfd/configure
      lt_cv_file_magic_cmd='$OBJDUMP -f'
    fi
    ;;
-@@ -6498,6 +6584,21 @@ esac
+@@ -6498,6 +6584,21 @@
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
  $as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -7332,7 +7332,7 @@ Index: binutils-2.21/bfd/configure
  file_magic_cmd=$lt_cv_file_magic_cmd
  deplibs_check_method=$lt_cv_deplibs_check_method
  test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -6513,9 +6614,162 @@ test -z "$deplibs_check_method" && depli
+@@ -6513,9 +6614,162 @@
  
  
  
@@ -7497,7 +7497,7 @@ Index: binutils-2.21/bfd/configure
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
  if test "${ac_cv_prog_AR+set}" = set; then :
-@@ -6531,7 +6785,7 @@ do
+@@ -6531,7 +6785,7 @@
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
    if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -7506,7 +7506,7 @@ Index: binutils-2.21/bfd/configure
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
-@@ -6551,11 +6805,15 @@ $as_echo "no" >&6; }
+@@ -6551,11 +6805,15 @@
  fi
  
  
@@ -7525,7 +7525,7 @@ Index: binutils-2.21/bfd/configure
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
  if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
-@@ -6571,7 +6829,7 @@ do
+@@ -6571,7 +6829,7 @@
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
    if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -7534,7 +7534,7 @@ Index: binutils-2.21/bfd/configure
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
-@@ -6590,6 +6848,10 @@ else
+@@ -6590,6 +6848,10 @@
  $as_echo "no" >&6; }
  fi
  
@@ -7545,7 +7545,7 @@ Index: binutils-2.21/bfd/configure
    if test "x$ac_ct_AR" = x; then
      AR="false"
    else
-@@ -6601,16 +6863,72 @@ ac_tool_warned=yes ;;
+@@ -6601,16 +6863,72 @@
  esac
      AR=$ac_ct_AR
    fi
@@ -7622,7 +7622,7 @@ Index: binutils-2.21/bfd/configure
  
  
  
-@@ -6952,8 +7270,8 @@ esac
+@@ -6952,8 +7270,8 @@
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  
  # Transform an extracted symbol line into symbol name and symbol address
@@ -7633,7 +7633,7 @@ Index: binutils-2.21/bfd/configure
  
  # Handle CRLF in mingw tool chain
  opt_cr=
-@@ -6989,6 +7307,7 @@ for ac_symprfx in "" "_"; do
+@@ -6989,6 +7307,7 @@
    else
      lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
    fi
@@ -7641,7 +7641,7 @@ Index: binutils-2.21/bfd/configure
  
    # Check to see that the pipe works correctly.
    pipe_works=no
-@@ -7030,6 +7349,18 @@ _LT_EOF
+@@ -7030,6 +7349,18 @@
        if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  	  cat <<_LT_EOF > conftest.$ac_ext
@@ -7660,7 +7660,7 @@ Index: binutils-2.21/bfd/configure
  #ifdef __cplusplus
  extern "C" {
  #endif
-@@ -7041,7 +7372,7 @@ _LT_EOF
+@@ -7041,7 +7372,7 @@
  	  cat <<_LT_EOF >> conftest.$ac_ext
  
  /* The mapping between symbol names and symbols.  */
@@ -7669,7 +7669,7 @@ Index: binutils-2.21/bfd/configure
    const char *name;
    void       *address;
  }
-@@ -7067,8 +7398,8 @@ static const void *lt_preloaded_setup()
+@@ -7067,8 +7398,8 @@
  _LT_EOF
  	  # Now try linking the two files.
  	  mv conftest.$ac_objext conftstm.$ac_objext
@@ -7680,7 +7680,7 @@ Index: binutils-2.21/bfd/configure
  	  LIBS="conftstm.$ac_objext"
  	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
  	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -7078,8 +7409,8 @@ _LT_EOF
+@@ -7078,8 +7409,8 @@
    test $ac_status = 0; } && test -s conftest${ac_exeext}; then
  	    pipe_works=yes
  	  fi
@@ -7691,7 +7691,7 @@ Index: binutils-2.21/bfd/configure
  	else
  	  echo "cannot find nm_test_func in $nlist" >&5
  	fi
-@@ -7116,6 +7447,20 @@ else
+@@ -7116,6 +7447,20 @@
  $as_echo "ok" >&6; }
  fi
  
@@ -7712,7 +7712,7 @@ Index: binutils-2.21/bfd/configure
  
  
  
-@@ -7135,6 +7480,41 @@ fi
+@@ -7135,6 +7480,41 @@
  
  
  
@@ -7754,7 +7754,7 @@ Index: binutils-2.21/bfd/configure
  
  
  # Check whether --enable-libtool-lock was given.
-@@ -7330,6 +7710,123 @@ esac
+@@ -7330,6 +7710,123 @@
  
  need_locks="$enable_libtool_lock"
  
@@ -7878,7 +7878,7 @@ Index: binutils-2.21/bfd/configure
  
    case $host_os in
      rhapsody* | darwin*)
-@@ -7893,6 +8390,8 @@ _LT_EOF
+@@ -7893,6 +8390,8 @@
        $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
        echo "$AR cru libconftest.a conftest.o" >&5
        $AR cru libconftest.a conftest.o 2>&5
@@ -7887,7 +7887,7 @@ Index: binutils-2.21/bfd/configure
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -8057,7 +8556,8 @@ fi
+@@ -8057,7 +8556,8 @@
  LIBTOOL_DEPS="$ltmain"
  
  # Always use our own libtool.
@@ -7897,7 +7897,7 @@ Index: binutils-2.21/bfd/configure
  
  
  
-@@ -8146,7 +8646,7 @@ aix3*)
+@@ -8146,7 +8646,7 @@
  esac
  
  # Global variables:
@@ -7906,7 +7906,7 @@ Index: binutils-2.21/bfd/configure
  can_build_shared=yes
  
  # All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -8444,8 +8944,6 @@ fi
+@@ -8444,8 +8944,6 @@
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
  
@@ -7915,7 +7915,7 @@ Index: binutils-2.21/bfd/configure
  
    if test "$GCC" = yes; then
      lt_prog_compiler_wl='-Wl,'
-@@ -8610,6 +9108,12 @@ $as_echo_n "checking for $compiler optio
+@@ -8610,6 +9108,12 @@
  	lt_prog_compiler_pic='--shared'
  	lt_prog_compiler_static='--static'
  	;;
@@ -7928,7 +7928,7 @@ Index: binutils-2.21/bfd/configure
        pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
          # Portland Group compilers (*not* the Pentium gcc compiler,
  	# which looks to be a dead project)
-@@ -8672,7 +9176,7 @@ $as_echo_n "checking for $compiler optio
+@@ -8672,7 +9176,7 @@
        lt_prog_compiler_pic='-KPIC'
        lt_prog_compiler_static='-Bstatic'
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.1

Part of the diff is not shown here. View the raw message.

#13 lore raw

PATCH 8/9 binutils: fix library RPATHs

In reply to Scott Garman

This integrates the RPATH fixes we recently applied to libtool.

---
 .../binutils/binutils-2.21/libtool-rpath-fix.patch |   36 ++++++++++++++++++++
 meta/recipes-devtools/binutils/binutils_2.21.bb    |    1 +
 2 files changed, 37 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-devtools/binutils/binutils-2.21/libtool-rpath-fix.patch
meta/recipes-devtools/binutils/binutils-2.21/libtool-rpath-fix.patch new file +36 -0
new file mode 100644
index 0000000..a0058c1
@@ -0,0 +1,36 @@
+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 <[email protected]> 
+Signed-off-by: Scott Garman <[email protected]>
+
+diff -urN binutils-2.21.orig//ltmain.sh binutils-2.21/ltmain.sh
+--- binutils-2.21.orig//ltmain.sh	2011-01-18 11:50:40.821710085 -0800
++++ binutils-2.21/ltmain.sh	2011-01-18 11:51:38.774952785 -0800
+@@ -8035,9 +8035,11 @@
+ 	  test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
+ 	  for libdir in $rpath; do
+ 	    if test -n "$hardcode_libdir_flag_spec"; then
++		  func_replace_sysroot "$libdir"
++		  libdir=$func_replace_sysroot_result
++		  func_stripname '=' '' "$libdir"
++		  libdir=$func_stripname_result
+ 	      if test -n "$hardcode_libdir_separator"; then
+-		func_replace_sysroot "$libdir"
+-		libdir=$func_replace_sysroot_result
+ 		if test -z "$hardcode_libdirs"; then
+ 		  hardcode_libdirs="$libdir"
+ 		else
+@@ -8770,6 +8772,10 @@
+       hardcode_libdirs=
+       for libdir in $compile_rpath $finalize_rpath; do
+ 	if test -n "$hardcode_libdir_flag_spec"; then
++	  func_replace_sysroot "$libdir"
++	  libdir=$func_replace_sysroot_result
++	  func_stripname '=' '' "$libdir"
++	  libdir=$func_stripname_result
+ 	  if test -n "$hardcode_libdir_separator"; then
+ 	    if test -z "$hardcode_libdirs"; then
+ 	      hardcode_libdirs="$libdir"
meta/recipes-devtools/binutils/binutils_2.21.bb +1 -0
index 8282eb8..1375126 100644
@@ -27,6 +27,7 @@ SRC_URI = "\
      file://libtool-2.4-update.patch \
      file://binutils-2.19.1-ld-sysroot.patch \
      file://libiberty_path_fix.patch \
+     file://libtool-rpath-fix.patch \
 # Need to consult w/ Mark Hatle to get this patch updated:
 #     file://binutils-poison.patch \
      "
Signature · 1 line
1.7.1
#14 lore raw

PATCH 9/9 poky-default.inc: bump binutils preferred version to 2.21

In reply to Scott Garman
---
 meta/conf/distro/include/poky-default.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/conf/distro/include/poky-default.inc +1 -1
index e5dd647..ef9f5cf 100644
@@ -17,7 +17,7 @@ PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-for-gcc-nativesdk ?= "${POKYLIBC}-n
 
 GCCVERSION ?= "4.5.1"
 SDKGCCVERSION ?= "4.5.1"
-BINUVERSION ?= "2.20.1"
+BINUVERSION ?= "2.21"
 GLIBCVERSION ?= "2.10.1"
 LINUXLIBCVERSION ?= "2.6.36"
 
Signature · 1 line
1.7.1