diff options
Diffstat (limited to 'ld/genscripts.sh')
-rwxr-xr-x | ld/genscripts.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ld/genscripts.sh b/ld/genscripts.sh index e9d4f153a7a..81b78a2cf35 100755 --- a/ld/genscripts.sh +++ b/ld/genscripts.sh @@ -189,6 +189,14 @@ if [ "x${use_sysroot}" != "xyes" ] ; then ::) LIB_PATH=${tool_lib} ;; *) LIB_PATH=${tool_lib}:${LIB_PATH} ;; esac + # For multilib targets, search both $tool_lib dirs + if [ "x${LIBPATH_SUFFIX}" != "x" ] ; then + case :${LIB_PATH}: in + ::: | *:${tool_lib}${LIBPATH_SUFFIX}:*) ;; + ::) LIB_PATH=${tool_lib}${LIBPATH_SUFFIX} ;; + *) LIB_PATH=${tool_lib}${LIBPATH_SUFFIX}:${LIB_PATH} ;; + esac + fi fi LIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'` |