--- binutils-2.15.91.0.1-ORIG/ld/genscripts.sh 2004-05-28 04:26:04.000000000 +1000 +++ binutils-2.15.91.0.1/ld/genscripts.sh 2004-07-14 23:54:02.000000000 +1000 @@ -105,6 +105,8 @@ USE_LIBPATH=yes elif [ "x${use_sysroot}" = "xyes" ] ; then USE_LIBPATH=yes + elif [ "x${LIB_PATH}" != "x" ] ; then + USE_LIBPATH=yes fi ;; esac @@ -125,11 +127,15 @@ # # If the emulparams file set LIBPATH_SUFFIX, prepend an extra copy of # the library path with the suffix applied. - -if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes ] ; then +if [ "x${USE_LIBPATH}" = xyes ] ; then LIB_PATH2= + if [ "x${LIB_PATH}" = "x" ] ; then + libs="${NATIVE_LIB_DIRS}" + else + libs=`echo ${LIB_PATH} | sed 's/:/ /g'` + LIB_PATH= + fi - libs=${NATIVE_LIB_DIRS} if [ "x${use_sysroot}" != "xyes" ] ; then case " ${libs} " in *" ${libdir} "*) ;;