This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: biarch gcc
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Christian Joensson <c dot christian dot joensson at comhem dot se>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 13 Aug 2003 14:40:16 +0930
- Subject: Re: biarch gcc
- References: <20030812145817.GG27145@bubble.sa.bigpond.net.au><20030812172330.A24972@u1sparc.j-son.org>
On Tue, Aug 12, 2003 at 05:23:31PM +0200, Christian Joensson wrote:
> uhm, to me, this also applies to binutils... I'm having "problems"
> running the testsuite for ld, for example, on sparc64-linux... mainly
> due to the libpath.exp file generated... it has "only" /lib etc, not
> /lib64...
That's because libpath.exp is generated by genscripts.sh, and
genscripts.sh is called for multiple emulations.
$ grep genscripts make.log0
LIB_PATH='' /bin/sh /src/binutils-current/ld/genscripts.sh /src/binutils-current/ld /usr/local/lib "/usr/local" i586-pc-linux-gnu sparc64-unknown-linux-gnu sparc64-linux "elf64_sparc elf32_sparc" "/usr/local/lib /lib /usr/lib" no elf64_sparc "sparc64-linux"
LIB_PATH='' /bin/sh /src/binutils-current/ld/genscripts.sh /src/binutils-current/ld /usr/local/lib "/usr/local" i586-pc-linux-gnu sparc64-unknown-linux-gnu sparc64-linux "elf64_sparc elf32_sparc" "/usr/local/lib /lib /usr/lib" no elf32_sparc "sparc-linux"
LIB_PATH='' /bin/sh /src/binutils-current/ld/genscripts.sh /src/binutils-current/ld /usr/local/lib "/usr/local" i586-pc-linux-gnu sparc64-unknown-linux-gnu sparc64-linux "elf64_sparc elf32_sparc" "/usr/local/lib /lib /usr/lib" no sparclinux "sparc-linuxaout"
LIB_PATH='' /bin/sh /src/binutils-current/ld/genscripts.sh /src/binutils-current/ld /usr/local/lib "/usr/local" i586-pc-linux-gnu sparc64-unknown-linux-gnu sparc64-linux "elf64_sparc elf32_sparc" "/usr/local/lib /lib /usr/lib" no sun4 "sparc-sun-sunos4"
You'll be getting the one from the sparc-linux invocation. Since the
native one should always be the first one, try the following:
* genscripts.sh: Only generate libpath.exp for first emulation.
Index: ld/genscripts.sh
===================================================================
RCS file: /cvs/src/src/ld/genscripts.sh,v
retrieving revision 1.14
diff -u -p -r1.14 genscripts.sh
--- ld/genscripts.sh 30 May 2003 15:50:11 -0000 1.14
+++ ld/genscripts.sh 13 Aug 2003 05:05:53 -0000
@@ -123,7 +123,7 @@ LIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed
case " $EMULATION_LIBPATH " in
*" ${EMULATION_NAME} "*)
test -d tmpdir || mkdir tmpdir
- rm -f tmpdir/libpath
+ test -f tmpdir/libpath.exp || \
echo "set libpath \"${LIB_PATH}\"" | sed -e 's/:/ /g' > tmpdir/libpath.exp
;;
esac
--
Alan Modra
IBM OzLabs - Linux Technology Centre