This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
utilizing $LIBPATH_SUFFIX with non-sysroot cross-ld
- From: Mike Frysinger <vapier at gentoo dot org>
- To: binutils at sourceware dot org
- Date: Sun, 29 Jan 2006 00:39:06 -0500
- Subject: utilizing $LIBPATH_SUFFIX with non-sysroot cross-ld
the other thread reminded me of this ...
any reason the $LIBPATH_SUFFIX setting is ignored when creating a cross-ld and
when --with-sysroot is not used ?
attached is a PoC for utilizing $LIBPATH_SUFFIX in this case
(cross-ld/non-sysroot) ... iirc, i saw the idea somewhere else (crossgcc list
maybe) and then wrote this patch ...
-mike
If we don't use --with-sysroot for cross-compilers, the $LIBPATH_SUFFIX
setting is ignored when generating the default lib search path.
--- binutils/ld/genscripts.sh
+++ binutils/ld/genscripts.sh
@@ -186,6 +186,14 @@
::) 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'`