Rid libdummy.a from lto.exp
[deliverable/binutils-gdb.git] / ld / testsuite / lib / ld-lib.exp
index 27bfc08e945d1f43886d744187fb1f67a1643565..5b3e01d070d381f34ecd2d9ac68be78558af5d43 100644 (file)
@@ -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
        }
This page took 0.02444 seconds and 4 git commands to generate.