source: scripts/patches/binutils-2.14.90.0.8-genscripts-multilib.patch@ 5bd60e2

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 5bd60e2 was 7f65c0e, checked in by Jim Gifford <clfs@…>, 19 years ago

r625@server (orig r623): jim | 2005-10-31 12:43:24 -0800
Final Move

  • Property mode set to 100644
File size: 1.9 KB
RevLine 
[617118d]1diff -uNr binutils-2.14.90.0.8-ORIG/ld/genscripts.sh binutils-2.14.90.0.8/ld/genscripts.sh
2--- binutils-2.14.90.0.8-ORIG/ld/genscripts.sh 2004-01-15 08:07:52.000000000 +1100
3+++ binutils-2.14.90.0.8/ld/genscripts.sh 2004-03-29 13:04:52.000000000 +1000
4@@ -103,8 +103,13 @@
5 if [ "x${host}" = "x${target}" ] ; then
6 NATIVE=yes
7 USE_LIBPATH=yes
8+ skip_libdir=no
9 elif [ "x${use_sysroot}" = "xyes" ] ; then
10 USE_LIBPATH=yes
11+ skip_libdir=no
12+ elif [ "x${LIB_PATH}" != "x" ] ; then
13+ USE_LIBPATH=yes
14+ skip_libdir=yes
15 fi
16 ;;
17 esac
18@@ -125,13 +130,29 @@
19 #
20 # If the emulparams file set LIBPATH_SUFFIX, prepend an extra copy of
21 # the library path with the suffix applied.
22-
23-if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes ] ; then
24+if [ "x${USE_LIBPATH}" = xyes ] ; then
25 LIB_PATH2=
26- if [ x"$use_sysroot" != xyes ] ; then
27- LIB_PATH2=${libdir}
28+ if [ "x${LIB_PATH}" = "x" ] ; then
29+ libs="${NATIVE_LIB_DIRS}"
30+ else
31+ libs=`echo ${LIB_PATH} | sed 's/:/ /g'`
32+ LIB_PATH=
33+ fi
34+
35+ if [ "x${use_sysroot}" != "xyes" ] ; then
36+ if [ "x${skip_libdir}" != "xyes" ] ; then
37+ case " ${libs} " in
38+ *" ${libdir} "*) ;;
39+ *) libs="${libdir} ${libs}" ;;
40+ esac
41+ fi
42+ case " ${libs} " in
43+ *" ${tool_lib} "*) ;;
44+ *) libs="${tool_lib} ${libs}" ;;
45+ esac
46 fi
47- for lib in ${NATIVE_LIB_DIRS}; do
48+
49+ for lib in ${libs}; do
50 # The "=" is harmless if we aren't using a sysroot, but also needless.
51 if [ "x${use_sysroot}" = "xyes" ] ; then
52 lib="=${lib}"
53@@ -161,13 +182,13 @@
54 esac
55 fi
56 done
57+
58 case :${LIB_PATH}:${LIB_PATH2}: in
59 *:: | ::*) LIB_PATH=${LIB_PATH}${LIB_PATH2} ;;
60 *) LIB_PATH=${LIB_PATH}:${LIB_PATH2} ;;
61 esac
62 fi
63
64-
65 # Always search $(tooldir)/lib, aka /usr/local/TARGET/lib, except for
66 # sysrooted configurations and when LIBPATH=":".
67 if [ "x${use_sysroot}" != "xyes" ] ; then
Note: See TracBrowser for help on using the repository browser.