From: "H. J. Lu" <hjl@lucon.org>
To: binutils@sources.redhat.com
Subject: PATCH: Provide linker search path to ld testsuite
Date: Thu, 22 May 2003 16:32:00 -0000 [thread overview]
Message-ID: <20030522093226.A14871@lucon.org> (raw)
In-Reply-To: <20030521003442.GP3914@bubble.sa.bigpond.net.au>; from amodra@bigpond.net.au on Wed, May 21, 2003 at 10:04:42AM +0930
[-- Attachment #1: Type: text/plain, Size: 717 bytes --]
On Wed, May 21, 2003 at 10:04:42AM +0930, Alan Modra wrote:
> On Tue, May 20, 2003 at 08:35:52AM -0700, H. J. Lu wrote:
> > On Tue, May 20, 2003 at 04:59:33PM +0930, Alan Modra wrote:
> > > The problem is that the failing tests use -T $srcdir/$subdir/elf-offset.ld,
> > > and elf-offset.ld doesn't specify SEARCH_DIR. On my system, ld.so.conf
> > > doesn't specify the default dirs of /lib and /usr/lib, and I'm building
> > > binutils with --prefix=/usr/local
> > >
> >
> > How about this? I am not too happy about it since it only covers
> > native targets, which is sufficient since I only used CC with
>
> OK. Hmm, it would be better to do without elf-offset.ld somehow. I
I like this patch better.
H.J.
[-- Attachment #2: ld-test-link.patch --]
[-- Type: text/plain, Size: 1519 bytes --]
ld/
2003-05-22 H.J. Lu <hongjiu.lu@intel.com>
* genscripts.sh: Create tmpdir/libpath.exp.
ld/testsuite/
2003-05-22 H.J. Lu <hongjiu.lu@intel.com>
* config/default.exp: Load tmpdir/libpath.exp.
(gcc_ld_flag): Set from $libpath.
--- ld/genscripts.sh.link 2003-02-27 11:27:17.000000000 -0800
+++ ld/genscripts.sh 2003-05-22 09:23:37.000000000 -0700
@@ -119,6 +119,15 @@ 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} "*)
+ test -d tmpdir || mkdir tmpdir
+ rm -f tmpdir/libpath
+ echo "set libpath \"${LIB_PATH}\"" | sed -e 's/:/ /g' > tmpdir/libpath.exp
+ ;;
+esac
+
# Generate 5 or 6 script files from a master script template in
# ${srcdir}/scripttempl/${SCRIPT_NAME}.sh. Which one of the 5 or 6
# script files is actually used depends on command line options given
--- ld/testsuite/config/default.exp.link 2003-05-19 08:23:00.000000000 -0700
+++ ld/testsuite/config/default.exp 2003-05-22 09:22:40.000000000 -0700
@@ -69,6 +69,13 @@ if {![file isdirectory tmpdir/ld]} then
}
set gcc_ld_flag "-B[pwd]/tmpdir/ld/"
+# load the linker path
+load_lib tmpdir/libpath.exp
+
+foreach dir $libpath {
+ set gcc_ld_flag "$gcc_ld_flag -L$dir"
+}
+
# The mips64-*-linux-gnu compiler defaults to the N32 ABI after
# installed, but to the O32 ABI in the build tree, because of some
# specs-file hacks. Make sure we use an ABI that is compatible with
next prev parent reply other threads:[~2003-05-22 16:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-20 7:35 ld testsuite failures Alan Modra
2003-05-20 16:35 ` PATCH: " H. J. Lu
2003-05-21 0:34 ` Alan Modra
2003-05-21 2:42 ` Daniel Jacobowitz
2003-05-22 16:32 ` H. J. Lu [this message]
2003-05-30 8:09 ` PATCH: Provide linker search path to ld testsuite Nick Clifton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030522093226.A14871@lucon.org \
--to=hjl@lucon.org \
--cc=binutils@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).