aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2007-12-24 17:27:34 +0000
committerNick Clifton <nickc@redhat.com>2007-12-24 17:27:34 +0000
commit9b168ecec9a83b56f7812ca96f43c5efa772ff4f (patch)
treea3e0c23d54ed0a44d268e41733caea768de3f830 /ld
parent384e4a9cc2cdb10fa26aeacf84b13c5934e7a27a (diff)
downloadgdb-9b168ecec9a83b56f7812ca96f43c5efa772ff4f.zip
gdb-9b168ecec9a83b56f7812ca96f43c5efa772ff4f.tar.gz
gdb-9b168ecec9a83b56f7812ca96f43c5efa772ff4f.tar.bz2
* genscripts.sh (LIB_PATH): Include both {target_alias} and
{TOOL_LIB} in the search paths for multilibbed targets.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rwxr-xr-xld/genscripts.sh21
2 files changed, 26 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index f409af8..658e9cd 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-24 Hector Oron <hector.oron@gmail.com>
+
+ * genscripts.sh (LIB_PATH): Include both {target_alias} and
+ {TOOL_LIB} in the search paths for multilibbed targets.
+
2007-12-15 Richard Sandiford <rsandifo@nildram.co.uk>
* scripttempl/armbpabi.sc (.text): Don't KEEP (*(.text.*personality*)).
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
index 46af1da..fd24097 100755
--- a/ld/genscripts.sh
+++ b/ld/genscripts.sh
@@ -198,6 +198,27 @@ if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes ] ; then
*:: | ::*) LIB_PATH=${LIB_PATH}${LIB_PATH2} ;;
*) LIB_PATH=${LIB_PATH}:${LIB_PATH2} ;;
esac
+
+ # For multilib'ed targets, ensure both ${target_alias}/lib${LIBPATH_SUFFIX}
+ # and ${TOOL_LIB}/lib${LIBPATH_SUFFIX} are in the default search path, because
+ # 64bit libraries may be in both places, depending on cross-development
+ # setup method (e.g.: /usr/s390x-linux/lib64 vs /usr/s390-linux/lib64)
+ case "${LIBPATH_SUFFIX}:${tool_lib}" in
+ :*) ;;
+ *:*${LIBPATH_SUFFIX}) ;;
+ *)
+ paths="${exec_prefix}/${target_alias}/lib${LIBPATH_SUFFIX}"
+ if [ x"${TOOL_LIB}" != x ]; then
+ paths="${paths} ${exec_prefix}/${TOOL_LIB}/lib${LIBPATH_SUFFIX}"
+ fi
+ for path in $paths; do
+ case :${LIB_PATH}: in
+ ::: | *:${path}:*) ;;
+ *) LIB_PATH=${path}:${LIB_PATH} ;;
+ esac
+ done
+ ;;
+ esac
fi
# Always search $(tooldir)/lib, aka /usr/local/TARGET/lib, except for