[69cde8d] | 1 | Submitted By: Ryan Oliver (ryan dot oliver at pha dot com dot au)
|
---|
| 2 | Origin: Ryan Oliver
|
---|
[7150133] | 3 | Date: 2009-02-03
|
---|
[69cde8d] | 4 | Initial package version: 2.15 (problem also exists in 2.14 series)
|
---|
| 5 | Description:
|
---|
[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] | 30 | diff -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
|
---|