source:
patches/binutils-2.19.1-genscripts_multilib-1.patch@
3c67a00
Last change on this file since 3c67a00 was 7150133, checked in by , 16 years ago | |
---|---|
|
|
File size: 2.6 KB |
-
ld/genscripts.sh
Submitted By: Ryan Oliver (ryan dot oliver at pha dot com dot au) Origin: Ryan Oliver Date: 2009-02-03 Initial package version: 2.15 (problem also exists in 2.14 series) Description: Rediffed for 2.19.1 by Jim Gifford Updated patch, use this for all binutils 2.15 series instead of the binutils-2.15.90.0.1-genscripts-multilib.patch 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 -Naur binutils-2.19.1.orig/ld/genscripts.sh binutils-2.19.1/ld/genscripts.sh
old new 132 132 esac 133 133 134 134 # If the emulparams file sets NATIVE, make sure USE_LIBPATH is set also. 135 if test "x$NATIVE" = "xyes" ; then 135 # Also set USE_LIBPATH if LIB_PATH has been set 136 if [ "x$NATIVE" = "xyes" -o "x${LIB_PATH}" != "x" ] ; then 136 137 USE_LIBPATH=yes 137 138 fi 138 139 … … 147 148 # 148 149 # If the emulparams file set LIBPATH_SUFFIX, prepend an extra copy of 149 150 # the library path with the suffix applied. 150 151 if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes ] ; then 151 if [ "x${USE_LIBPATH}" = xyes ] ; then 152 152 LIB_PATH2= 153 if [ "x${LIB_PATH}" = "x" ] ; then 154 libs="${NATIVE_LIB_DIRS}" 155 else 156 libs=`echo ${LIB_PATH} | sed 's/:/ /g'` 157 LIB_PATH= 158 fi 153 159 154 libs=${NATIVE_LIB_DIRS}155 160 if [ "x${use_sysroot}" != "xyes" ] ; then 156 161 case " ${libs} " in 157 *" ${libdir} "*) ;;158 *) libs="${libdir} ${libs}" ;;159 esac160 case " ${libs} " in161 162 *" ${tool_lib} "*) ;; 162 163 *) libs="${tool_lib} ${libs}" ;; 163 164 esac
Note:
See TracBrowser
for help on using the repository browser.