[lfs-patches] r2892 - trunk/binutils

bdubbs at higgs.linuxfromscratch.org bdubbs at higgs.linuxfromscratch.org
Sun May 11 08:10:31 PDT 2014


Author: bdubbs
Date: Sun May 11 08:10:31 2014
New Revision: 2892

Log:
Rename patch to std

Added:
   trunk/binutils/binutils-2.24-load_gcc_lto-plugin_by_default-1.patch
      - copied, changed from r2891, trunk/binutils/binutils-2.24-load-gcc-lto-plugin-by-default.patch
Deleted:
   trunk/binutils/binutils-2.24-load-gcc-lto-plugin-by-default.patch

Copied and modified: trunk/binutils/binutils-2.24-load_gcc_lto-plugin_by_default-1.patch (from r2891, trunk/binutils/binutils-2.24-load-gcc-lto-plugin-by-default.patch)
==============================================================================
--- trunk/binutils/binutils-2.24-load-gcc-lto-plugin-by-default.patch	Sat May 10 20:53:36 2014	(r2891, copy source)
+++ trunk/binutils/binutils-2.24-load_gcc_lto-plugin_by_default-1.patch	Sun May 11 08:10:31 2014	(r2892)
@@ -1,64 +1,65 @@
-Submitted By:            Miklos Karacsony <mkaracsony81 at gmail dot com>
-Date:                    2014-05-01
-Initial Package Version: 2.24
-Upstream Status:         Applied
-Origin:                  Upstream
-Description:             Load gcc LTO plugin by default
+Submitted By: Ryan Oliver (ryan dot oliver at pha dot com dot au)
+Origin: Ryan Oliver
+Date: 2005-04-03
+Initial package version: 2.15 (problem also exists in 2.14 series)
+Description:
+        Updated patch, use this for all binutils 2.15 series instead of the
+        binutils-2.15.90.0.1-genscripts-multilib.patch
 
-diff --git a/binutils/ar.c b/binutils/ar.c
-index a11ed15c86bc..f0feaef5b233 100644
---- a/binutils/ar.c
-+++ b/binutils/ar.c
-@@ -138,7 +138,11 @@ static int show_version = 0;
- 
- static int show_help = 0;
- 
-+#if BFD_SUPPORTS_PLUGINS
-+static const char *plugin_target = "plugin";
-+#else
- static const char *plugin_target = NULL;
-+#endif
- 
- static const char *target = NULL;
- 
-@@ -571,7 +575,6 @@ decode_options (int argc, char **argv)
-           break;
- 	case OPTION_PLUGIN:
- #if BFD_SUPPORTS_PLUGINS
--	  plugin_target = "plugin";
- 	  bfd_plugin_set_plugin (optarg);
- #else
- 	  fprintf (stderr, _("sorry - this program has been built without plugin support\n"));
-@@ -632,7 +635,6 @@ ranlib_main (int argc, char **argv)
- 	  /* PR binutils/13493: Support plugins.  */
- 	case OPTION_PLUGIN:
- #if BFD_SUPPORTS_PLUGINS
--	  plugin_target = "plugin";
- 	  bfd_plugin_set_plugin (optarg);
- #else
- 	  fprintf (stderr, _("sorry - this program has been built without plugin support\n"));
-diff --git a/binutils/nm.c b/binutils/nm.c
-index 156194f21de7..876bbed7a407 100644
---- a/binutils/nm.c
-+++ b/binutils/nm.c
-@@ -177,7 +177,11 @@ static char other_format[] = "%02x";
- static char desc_format[] = "%04x";
- 
- static char *target = NULL;
--static char *plugin_target = NULL;
-+#if BFD_SUPPORTS_PLUGINS
-+static const char *plugin_target = "plugin";
-+#else
-+static const char *plugin_target = NULL;
-+#endif
- 
- /* Used to cache the line numbers for a BFD.  */
- static bfd *lineno_cache_bfd;
-@@ -1648,7 +1652,6 @@ main (int argc, char **argv)
- 
- 	case OPTION_PLUGIN:	/* --plugin */
- #if BFD_SUPPORTS_PLUGINS
--	  plugin_target = "plugin";
- 	  bfd_plugin_set_plugin (optarg);
- #else
- 	  fatal (_("sorry - this program has been built without plugin support\n"));
+        If --with-libpath= was specified during configure (or LIB_PATH was
+        supplied during make) we want to have these libraries added to the
+        linker scripts search paths, and in the case of multi-lib have them
+        processed to provide both lib and lib64 search paths.
+        This patch produces this behaviour when building a cross-binutils.
+
+        Also to fix an annoyance we remove whatever was specified (if anything)
+        by --libdir= from the linker script search path. This is so when cross-
+        compiling a 64bit target-native biarch toolchain we can specify the
+        installation directory for binutils produced libraries to be */lib64
+        without having this directory added to the 32bit emulation search path.
+
+        By rights we should really check if ${libdir} matches a search path in
+        any of the supported emulations for this target (as opposed to only the
+        one genscripts.sh is currently processing) and if so ignore ${libpath}.
+
+	This patch differs from the preceding genscripts-multilib patch as now
+	USE_LIBPATH will always be set if LIB_PATH is non empty
+
+diff -uNr binutils-2.15.91.0.1-orig/ld/genscripts.sh binutils-2.15.91.0.1/ld/genscripts.sh
+--- binutils-2.15.91.0.1-orig/ld/genscripts.sh	2004-05-28 04:26:04.000000000 +1000
++++ binutils-2.15.91.0.1/ld/genscripts.sh	2005-04-03 16:14:51.000000000 +1000
+@@ -110,7 +110,8 @@
+ esac
+ 
+ # If the emulparams file sets NATIVE, make sure USE_LIBPATH is set also.
+-if test "x$NATIVE" = "xyes" ; then
++# Also set USE_LIBPATH if LIB_PATH has been set
++if [ "x$NATIVE" = "xyes" -o "x${LIB_PATH}" != "x" ] ; then
+   USE_LIBPATH=yes
+ fi
+ 
+@@ -125,17 +126,17 @@
+ #
+ # If the emulparams file set LIBPATH_SUFFIX, prepend an extra copy of
+ # the library path with the suffix applied.
+-
+-if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes ] ; then
++if [ "x${USE_LIBPATH}" = xyes ] ; then
+   LIB_PATH2=
++  if [ "x${LIB_PATH}" = "x" ] ; then 
++    libs="${NATIVE_LIB_DIRS}"
++  else
++    libs=`echo ${LIB_PATH} | sed 's/:/ /g'`
++    LIB_PATH=
++  fi
+ 
+-  libs=${NATIVE_LIB_DIRS}
+   if [ "x${use_sysroot}" != "xyes" ] ; then
+     case " ${libs} " in
+-      *" ${libdir} "*) ;;
+-      *) libs="${libdir} ${libs}" ;;
+-    esac
+-    case " ${libs} " in
+       *" ${tool_lib} "*) ;;
+       *) libs="${tool_lib} ${libs}" ;;
+     esac


More information about the patches mailing list