source: patches/binutils-2.19.1-genscripts_multilib-1.patch @ 6c21280

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 6c21280 was 7150133, checked in by Jim Gifford <clfs@…>, 15 years ago

Updated Binutils to 2.19.1

  • Property mode set to 100644
File size: 2.6 KB
RevLine 
[69cde8d]1Submitted By: Ryan Oliver (ryan dot oliver at pha dot com dot au)
2Origin: Ryan Oliver
[7150133]3Date: 2009-02-03
[69cde8d]4Initial package version: 2.15 (problem also exists in 2.14 series)
5Description:
[7150133]6        Rediffed for 2.19.1 by Jim Gifford
7     
[69cde8d]8        Updated patch, use this for all binutils 2.15 series instead of the
9        binutils-2.15.90.0.1-genscripts-multilib.patch
10
11        If --with-libpath= was specified during configure (or LIB_PATH was
12        supplied during make) we want to have these libraries added to the
13        linker scripts search paths, and in the case of multi-lib have them
14        processed to provide both lib and lib64 search paths.
15        This patch produces this behaviour when building a cross-binutils.
16
17        Also to fix an annoyance we remove whatever was specified (if anything)
18        by --libdir= from the linker script search path. This is so when cross-
19        compiling a 64bit target-native biarch toolchain we can specify the
20        installation directory for binutils produced libraries to be */lib64
21        without having this directory added to the 32bit emulation search path.
22
23        By rights we should really check if ${libdir} matches a search path in
24        any of the supported emulations for this target (as opposed to only the
25        one genscripts.sh is currently processing) and if so ignore ${libpath}.
26
[7150133]27        This patch differs from the preceding genscripts-multilib patch as now
28        USE_LIBPATH will always be set if LIB_PATH is non empty
[69cde8d]29
[7150133]30diff -Naur binutils-2.19.1.orig/ld/genscripts.sh binutils-2.19.1/ld/genscripts.sh
31--- binutils-2.19.1.orig/ld/genscripts.sh       2008-01-28 03:07:44.000000000 -0800
32+++ binutils-2.19.1/ld/genscripts.sh    2009-02-03 08:42:35.330001955 -0800
33@@ -132,7 +132,8 @@
[69cde8d]34 esac
35 
36 # If the emulparams file sets NATIVE, make sure USE_LIBPATH is set also.
37-if test "x$NATIVE" = "xyes" ; then
38+# Also set USE_LIBPATH if LIB_PATH has been set
39+if [ "x$NATIVE" = "xyes" -o "x${LIB_PATH}" != "x" ] ; then
40   USE_LIBPATH=yes
41 fi
42 
[7150133]43@@ -147,17 +148,17 @@
[69cde8d]44 #
45 # If the emulparams file set LIBPATH_SUFFIX, prepend an extra copy of
46 # the library path with the suffix applied.
47-
48-if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes ] ; then
49+if [ "x${USE_LIBPATH}" = xyes ] ; then
50   LIB_PATH2=
51+  if [ "x${LIB_PATH}" = "x" ] ; then
52+    libs="${NATIVE_LIB_DIRS}"
53+  else
54+    libs=`echo ${LIB_PATH} | sed 's/:/ /g'`
55+    LIB_PATH=
56+  fi
57 
58-  libs=${NATIVE_LIB_DIRS}
59   if [ "x${use_sysroot}" != "xyes" ] ; then
60     case " ${libs} " in
61-      *" ${libdir} "*) ;;
62-      *) libs="${libdir} ${libs}" ;;
63-    esac
64-    case " ${libs} " in
65       *" ${tool_lib} "*) ;;
66       *) libs="${tool_lib} ${libs}" ;;
67     esac
Note: See TracBrowser for help on using the repository browser.