summaryrefslogtreecommitdiff
path: root/ld/testsuite/lib/ld-lib.exp
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/lib/ld-lib.exp')
-rw-r--r--ld/testsuite/lib/ld-lib.exp16
1 files changed, 9 insertions, 7 deletions
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 1c912578c5..11185d825f 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -85,6 +85,7 @@ proc default_ld_link { ld target objects } {
global HOSTING_LIBS
global LIBS
global host_triplet
+ global link_output
set objs "$HOSTING_CRT0 $objects"
set libs "$LIBS $HOSTING_LIBS"
@@ -98,12 +99,12 @@ proc default_ld_link { ld target objects } {
verbose -log "$ld $HOSTING_EMU $flags -o $target $objs $libs"
- catch "exec $ld $HOSTING_EMU $flags -o $target $objs $libs" exec_output
- set exec_output [prune_warnings $exec_output]
- if [string match "" $exec_output] then {
+ catch "exec $ld $HOSTING_EMU $flags -o $target $objs $libs" link_output
+ set exec_output [prune_warnings $link_output]
+ if [string match "" $link_output] then {
return 1
} else {
- verbose -log "$exec_output"
+ verbose -log "$link_output"
return 0
}
}
@@ -114,7 +115,8 @@ proc default_ld_link { ld target objects } {
#
proc default_ld_simple_link { ld target objects } {
global host_triplet
-
+ global link_output
+
if { [which $ld] == 0 } then {
perror "$ld does not exist"
return 0
@@ -124,8 +126,8 @@ proc default_ld_simple_link { ld target objects } {
verbose -log "$ld $flags -o $target $objects"
- catch "exec $ld $flags -o $target $objects" exec_output
- set exec_output [prune_warnings $exec_output]
+ catch "exec $ld $flags -o $target $objects" link_output
+ set exec_output [prune_warnings $link_output]
# We don't care if we get a warning about a non-existent start
# symbol, since the default linker script might use ENTRY.