From cdaeef2eb5f895b31ca8665b10712c4f3b64976e Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 30 May 2003 13:23:25 +0000 Subject: [PATCH] ld/ 2003-05-30 H.J. Lu * genscripts.sh: Create tmpdir/libpath.exp. ld/testsuite/ 2003-05-30 H.J. Lu * config/default.exp: Load tmpdir/libpath.exp. (gcc_ld_flag): Set from $libpath. --- ld/ChangeLog | 4 ++++ ld/genscripts.sh | 9 +++++++++ ld/testsuite/ChangeLog | 5 +++++ ld/testsuite/config/default.exp | 7 +++++++ 4 files changed, 25 insertions(+) diff --git a/ld/ChangeLog b/ld/ChangeLog index fbd7106..52620ac 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,7 @@ +2003-05-30 H.J. Lu + + * genscripts.sh: Create tmpdir/libpath.exp. + 2003-05-30 Nick Clifton * emultempl/armelf.em (arm_elf_before_allocation): Replace ASSERT diff --git a/ld/genscripts.sh b/ld/genscripts.sh index 39d97ae..fdfc37d 100755 --- a/ld/genscripts.sh +++ b/ld/genscripts.sh @@ -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 diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 8c6dc9b..f98a3a2 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2003-05-30 H.J. Lu + + * config/default.exp: Load tmpdir/libpath.exp. + (gcc_ld_flag): Set from $libpath. + 2003-05-27 Jason Thorpe * ld-elf/elf.exp: Use if_elf_format. diff --git a/ld/testsuite/config/default.exp b/ld/testsuite/config/default.exp index e883e87..8131f94 100644 --- a/ld/testsuite/config/default.exp +++ b/ld/testsuite/config/default.exp @@ -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 -- 2.7.4