source:
scripts/patches/binutils-2.14-genscripts-multilib.patch@
055aa17
Last change on this file since 055aa17 was 7f65c0e, checked in by , 19 years ago | |
---|---|
|
|
File size: 3.4 KB |
-
ld/genscripts.sh
diff -uNr binutils-2.14-orig/ld/genscripts.sh binutils-2.14/ld/genscripts.sh
old new 50 50 if [ "x${host}" = "x${target}" ] ; then 51 51 NATIVE=yes 52 52 USE_LIBPATH=yes 53 skip_libdir=no 53 54 elif [ "x${use_sysroot}" = "xyes" ] ; then 54 55 USE_LIBPATH=yes 56 skip_libdir=no 57 elif [ "x${LIB_PATH}" != "x" ] ; then 58 USE_LIBPATH=yes 59 skip_libdir=yes 55 60 fi 56 61 ;; 57 62 esac … … 72 77 # 73 78 # If the emulparams file set LIBPATH_SUFFIX, prepend an extra copy of 74 79 # the library path with the suffix applied. 80 if [ "x${USE_LIBPATH}" = xyes ] ; then 81 LIB_PATH2= 82 if [ "x${LIB_PATH}" = "x" ] ; then 83 libs="${NATIVE_LIB_DIRS}" 84 else 85 libs=`echo ${LIB_PATH} | sed 's/:/ /g'` 86 LIB_PATH= 87 fi 75 88 76 if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes ] ; then 77 if [ x"$use_sysroot" != xyes ] ; then 78 LIB_PATH=${libdir} 89 if [ "x${use_sysroot}" != "xyes" ] ; then 90 if [ "x${skip_libdir}" != "xyes" ] ; then 91 case " ${libs} " in 92 *" ${libdir} "*) ;; 93 *) libs="${libdir} ${libs}" ;; 94 esac 95 fi 96 case " ${libs} " in 97 *" ${tool_lib} "*) ;; 98 *) libs="${tool_lib} ${libs}" ;; 99 esac 79 100 fi 80 LIB_PATH2="" 81 for lib in ${ NATIVE_LIB_DIRS}; do101 102 for lib in ${libs}; do 82 103 # The "=" is harmless if we aren't using a sysroot, but also needless. 83 104 if [ "x${use_sysroot}" = "xyes" ] ; then 84 105 lib="=${lib}" … … 91 112 esac 92 113 if test -n "$addsuffix"; then 93 114 case :${LIB_PATH}: in 94 95 96 115 *:${lib}${LIBPATH_SUFFIX}:*) ;; 116 ::) LIB_PATH=${lib}${LIBPATH_SUFFIX} ;; 117 *) LIB_PATH=${LIB_PATH}:${lib}${LIBPATH_SUFFIX} ;; 97 118 esac 98 case :${LIB_PATH}${LIB_PATH2}: in 99 *:${lib}:*) ;; 119 case :${LIB_PATH}:${LIB_PATH2}: in 120 *:${lib}:*) ;; 121 *::) LIB_PATH2=${lib} ;; 100 122 *) LIB_PATH2=${LIB_PATH2}:${lib} ;; 101 123 esac 102 124 else 103 case :${LIB_PATH }: in125 case :${LIB_PATH2}: in 104 126 *:${lib}:*) ;; 105 ::) LIB_PATH =${lib} ;;106 *) LIB_PATH =${LIB_PATH}:${lib} ;;127 ::) LIB_PATH2=${lib} ;; 128 *) LIB_PATH2=${LIB_PATH2}:${lib} ;; 107 129 esac 108 130 fi 109 131 done 110 LIB_PATH=${LIB_PATH}${LIB_PATH2}111 fi112 132 133 case :${LIB_PATH}:${LIB_PATH2}: in 134 *:: | ::*) LIB_PATH=${LIB_PATH}${LIB_PATH2} ;; 135 *) LIB_PATH=${LIB_PATH}:${LIB_PATH2} ;; 136 esac 137 fi 113 138 114 139 # Always search $(tooldir)/lib, aka /usr/local/TARGET/lib, except for 115 140 # sysrooted configurations. 116 141 if [ "x${use_sysroot}" != "xyes" ] ; then 117 LIB_PATH=${tool_lib}:${LIB_PATH} 142 case :${LIB_PATH}: in 143 ::: | *:${tool_lib}:*) ;; 144 ::) LIB_PATH=${tool_lib} ;; 145 *) LIB_PATH=${tool_lib}:${LIB_PATH} ;; 146 esac 118 147 fi 119 148 120 149 LIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'` 121 150 151 # We need it for testsuite. 152 case " $EMULATION_LIBPATH " in 153 *" ${EMULATION_NAME} "*) 154 test -d tmpdir || mkdir tmpdir 155 test -f tmpdir/libpath.exp || \ 156 echo "set libpath \"${LIB_PATH}\"" | sed -e 's/:/ /g' > tmpdir/libpath.exp 157 ;; 158 esac 159 122 160 # Generate 5 or 6 script files from a master script template in 123 161 # ${srcdir}/scripttempl/${SCRIPT_NAME}.sh. Which one of the 5 or 6 124 162 # script files is actually used depends on command line options given
Note:
See TracBrowser
for help on using the repository browser.