summaryrefslogtreecommitdiff
path: root/ld/testsuite/config
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2005-03-24 23:36:03 +0000
committerMark Mitchell <mark@codesourcery.com>2005-03-24 23:36:03 +0000
commit780d7da34509782f397215746989075224856922 (patch)
treee507cbd630b540cded562bb79b18c128975d06cb /ld/testsuite/config
parent253b206b22e1cba27a14948e3d4fa055440d7aa1 (diff)
downloadbinutils-redhat-780d7da34509782f397215746989075224856922.tar.gz
* config/default.exp: Do not load libpath.exp if it does not
exist. (CC): Provide fallback definition. (CFLAGS): Likewise. (CXX): Likewise. (CXXFLAGS): Likewise.
Diffstat (limited to 'ld/testsuite/config')
-rw-r--r--ld/testsuite/config/default.exp15
1 files changed, 12 insertions, 3 deletions
diff --git a/ld/testsuite/config/default.exp b/ld/testsuite/config/default.exp
index b05ae0a10d..9656bfb825 100644
--- a/ld/testsuite/config/default.exp
+++ b/ld/testsuite/config/default.exp
@@ -70,10 +70,19 @@ if {![file isdirectory tmpdir/ld]} then {
set gcc_ld_flag "-B[pwd]/tmpdir/ld/"
# load the linker path
-load_lib tmpdir/libpath.exp
+if {[file exists tmpdir/libpath.exp]} {
+ load_lib tmpdir/libpath.exp
-foreach dir $libpath {
- set gcc_ld_flag "$gcc_ld_flag -L$dir"
+ foreach dir $libpath {
+ set gcc_ld_flag "$gcc_ld_flag -L$dir"
+ }
+}
+
+# The "make check" target in the Makefile passes in
+# "CC=$(CC_FOR_TARGET)". But, if the user invokes runtest directly
+# (as when testing an installed linker), CC may not be set.
+if {![info exists CC]} {
+ set CC [transform gcc]
}
# The mips64-*-linux-gnu compiler defaults to the N32 ABI after