This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH: Only generate libpath.exp for first emulation
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Alan Modra <amodra at bigpond dot net dot au>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 20 Oct 2004 18:05:39 -0700
- Subject: PATCH: Only generate libpath.exp for first emulation
Alan,
Your patch
http://sources.redhat.com/ml/binutils/2003-08/msg00200.html
assumes the first emulation will be generated first. But it may not be
true for parallel build. This patch seems to work for me.
H.J.
---
2004-10-20 H.J. Lu <hongjiu.lu@intel.com>
* genscripts.sh (libpath.exp): Really generate for first
emulation only.
--- ld/genscripts.sh.bi 2004-05-11 13:34:26.000000000 -0700
+++ ld/genscripts.sh 2004-10-20 17:57:49.994589470 -0700
@@ -191,13 +191,12 @@ fi
LIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'`
# We need it for testsuite.
-case " $EMULATION_LIBPATH " in
- *" ${EMULATION_NAME} "*)
+set $EMULATION_LIBPATH
+if [ "x$1" = "x$EMULATION_NAME" ]; then
test -d tmpdir || mkdir tmpdir
- test -f tmpdir/libpath.exp || \
+ rm -f tmpdir/libpath.exp
echo "set libpath \"${LIB_PATH}\"" | sed -e 's/:/ /g' > tmpdir/libpath.exp
- ;;
-esac
+fi
# Generate 5 or 6 script files from a master script template in
# ${srcdir}/scripttempl/${SCRIPT_NAME}.sh. Which one of the 5 or 6