summaryrefslogtreecommitdiff
path: root/ld/genscripts.sh
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>1999-06-18 15:25:45 +0000
committerRichard Henderson <rth@redhat.com>1999-06-18 15:25:45 +0000
commit3336653ad1da47adcdcadf5ac5062dac9ac1b243 (patch)
tree55306c388ca37dbed41e6275dba4065353829b2b /ld/genscripts.sh
parent49863f82f0726f95d341c35001794e12659d39f7 (diff)
downloadbinutils-gdb-3336653ad1da47adcdcadf5ac5062dac9ac1b243.tar.gz
* Makefile.am (GENSCRIPTS): Pass EMULATION_LIBPATH, not EMUL.
* configure.in (all_emuls): Add targ_extra_libpath. (all_libpath, EMULATION_LIBPATH): Define. * configure.tgt (powerpc-*-linux-gnu*): Define targ_extra_libpath. * genscripts.sh (LIB_PATH): Define if emulation in EMULATION_LIBPATH.
Diffstat (limited to 'ld/genscripts.sh')
-rwxr-xr-xld/genscripts.sh42
1 files changed, 21 insertions, 21 deletions
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
index eea5401515b..8294af7068e 100755
--- a/ld/genscripts.sh
+++ b/ld/genscripts.sh
@@ -14,7 +14,7 @@ libdir=$2
host=$3
target=$4
target_alias=$5
-DEFAULT_EMULATION=$6
+EMULATION_LIBPATH=$6
NATIVE_LIB_DIRS=$7
EMULATION_NAME=$8
tool_lib=`echo ${libdir} | sed -e 's|/lib$||'`/${9-$target_alias}/lib
@@ -36,26 +36,24 @@ fi
# To force a logically empty LIB_PATH, do LIBPATH=":".
if [ "x${LIB_PATH}" = "x" ] ; then
+ # Cross, or native non-default emulation not requesting LIB_PATH.
+ LIB_PATH=
+
if [ "x${host}" = "x${target}" ] ; then
- if [ "x${DEFAULT_EMULATION}" = "x${EMULATION_NAME}" ] ; then
- # Native.
- LIB_PATH=/lib:/usr/lib
- if [ -n "${NATIVE_LIB_DIRS}" ]; then
- LIB_PATH=${LIB_PATH}:${NATIVE_LIB_DIRS}
- fi
- if [ "${libdir}" != /usr/lib ]; then
- LIB_PATH=${LIB_PATH}:${libdir}
- fi
- if [ "${libdir}" != /usr/local/lib ] ; then
- LIB_PATH=${LIB_PATH}:/usr/local/lib
- fi
- else
- # Native, but not default emulation.
- LIB_PATH=
- fi
- else
- # Cross.
- LIB_PATH=
+ case " $EMULATION_LIBPATH " in
+ *" ${EMULATION_NAME} "*)
+ # Native, and default or emulation requesting LIB_PATH.
+ LIB_PATH=/lib:/usr/lib
+ if [ -n "${NATIVE_LIB_DIRS}" ]; then
+ LIB_PATH=${LIB_PATH}:${NATIVE_LIB_DIRS}
+ fi
+ if [ "${libdir}" != /usr/lib ]; then
+ LIB_PATH=${LIB_PATH}:${libdir}
+ fi
+ if [ "${libdir}" != /usr/local/lib ] ; then
+ LIB_PATH=${LIB_PATH}:/usr/local/lib
+ fi
+ esac
fi
fi
@@ -127,7 +125,9 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; then
ldscripts/${EMULATION_NAME}.xs
fi
-test "$DEFAULT_EMULATION" = "$EMULATION_NAME" && COMPILE_IN=true
+for i in $EMULATION_LIBPATH ; do
+ test "$i" = "$EMULATION_NAME" && COMPILE_IN=true
+done
# Generate e${EMULATION_NAME}.c.
. ${srcdir}/emultempl/${TEMPLATE_NAME-generic}.em