aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/lib
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2014-07-05 11:59:53 +0930
committerAlan Modra <amodra@gmail.com>2014-07-05 12:54:40 +0930
commitabc868c6090192b9bf3059da81e518bd744b8da3 (patch)
tree31f7da024f989c7ae138efff67d937f99dbd0e91 /ld/testsuite/lib
parent878f7dc7d15cd4f47943bef53c8201f4781d1807 (diff)
downloadgdb-abc868c6090192b9bf3059da81e518bd744b8da3.zip
gdb-abc868c6090192b9bf3059da81e518bd744b8da3.tar.gz
gdb-abc868c6090192b9bf3059da81e518bd744b8da3.tar.bz2
Rid libdummy.a from lto.exp
libdummy.a is used to make run_cc_link_tests compile objects and archive them. libdummy.a isn't used. What we're really doing is preventing a final link. So do that directly. * lib/ld-lib.exp (run_ld_link_tests): Stop after assembling objects if binfile is empty. (run_ld_link_exec_tests, run_cc_link_tests): Likewise. Tidy status checks. * ld-plugin/lto.exp: Don't use libdummy.a trick to compile objects. Instead use an empty output file.
Diffstat (limited to 'ld/testsuite/lib')
-rw-r--r--ld/testsuite/lib/ld-lib.exp33
1 files changed, 16 insertions, 17 deletions
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 27bfc08..5b3e01d 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -1131,7 +1131,9 @@ proc run_ld_link_tests { ldtests } {
continue
}
- if { [regexp ".*\\.a$" $binfile] } {
+ if { $binfile eq "tmpdir/" } {
+ # compile only
+ } elseif { [regexp ".*\\.a$" $binfile] } {
if { ![ar_simple_create $ar $ld_options $binfile "$objfiles $ld_after"] } {
set failed 1
}
@@ -1334,10 +1336,12 @@ proc run_ld_link_exec_tests { targets_to_xfail ldtests } {
set link_cmd $ld
}
- if ![$link_proc $link_cmd $binfile "-L$srcdir/$subdir $ld_options $objfiles"] {
+ if { $binfile eq "tmpdir/" } {
+ # compile only
+ pass $testname
+ continue;
+ } elseif ![$link_proc $link_cmd $binfile "-L$srcdir/$subdir $ld_options $objfiles"] {
set failed 1
- } else {
- set failed 0
}
# Check if exec_output is expected.
@@ -1450,18 +1454,16 @@ proc run_cc_link_tests { ldtests } {
set cc_cmd $CC
}
- if { [regexp ".*\\.a$" $binfile] } {
+ if { $binfile eq "tmpdir/" } {
+ # compile only
+ } elseif { [regexp ".*\\.a$" $binfile] } {
if { ![ar_simple_create $ar $ldflags $binfile "$objfiles"] } {
fail $testname
set failed 1
- } else {
- set failed 0
}
} else {
if { ![ld_simple_link $cc_cmd $binfile "-L$srcdir/$subdir $ldflags $objfiles"] } {
set failed 1
- } else {
- set failed 0
}
# Check if exec_output is expected.
@@ -1535,16 +1537,13 @@ proc run_cc_link_tests { ldtests } {
}
}
}
-
- if { $failed != 0 } {
- fail $testname
- } else { if { $is_unresolved == 0 } {
- pass $testname
- } }
}
- # Catch action errors.
- if { $is_unresolved != 0 } {
+ if { $failed != 0 } {
+ fail $testname
+ } elseif { $is_unresolved == 0 } {
+ pass $testname
+ } else {
unresolved $testname
continue
}