aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-07-27 13:20:10 +0930
committerAlan Modra <amodra@gmail.com>2020-07-27 22:31:37 +0930
commit344e66534e37ec576d35b24b2933c808fd4e3e9c (patch)
tree4955fac2813a0b9fb34caa813017a23469f0f065 /ld
parentafd2ea23626c43886ab8b028b68b7b663d6de3c6 (diff)
downloadgdb-344e66534e37ec576d35b24b2933c808fd4e3e9c.zip
gdb-344e66534e37ec576d35b24b2933c808fd4e3e9c.tar.gz
gdb-344e66534e37ec576d35b24b2933c808fd4e3e9c.tar.bz2
ctf test ERROR: $target-cc does not exist
* testsuite/lib/ld-lib.exp (check_ctf_available): Check first that target compiler is available.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/testsuite/lib/ld-lib.exp24
2 files changed, 19 insertions, 10 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 467c2bc..ef8f648 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2020-07-27 Alan Modra <amodra@gmail.com>
+
+ * testsuite/lib/ld-lib.exp (check_ctf_available): Check first that
+ target compiler is available.
+
2020-07-23 Maciej W. Rozycki <macro@wdc.com>
PR ld/26288
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index d1ffab7..1ec9bec 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -1594,16 +1594,20 @@ proc check_ctf_available { } {
global ctf_available_saved
if {![info exists ctf_available_saved]} {
- set basename "tmpdir/ctf_available[pid]"
- set src ${basename}.c
- set output ${basename}.o
- set f [open $src "w"]
- puts $f "int main() { return 0; }"
- close $f
- set ctf_available_saved [compile_one_cc $src $output "-gt -c"]
- remote_file host delete $src
- remote_file host delete $output
- file delete $src
+ if { ![check_compiler_available] } {
+ set ctf_available_saved 0
+ } else {
+ set basename "tmpdir/ctf_available[pid]"
+ set src ${basename}.c
+ set output ${basename}.o
+ set f [open $src "w"]
+ puts $f "int main() { return 0; }"
+ close $f
+ set ctf_available_saved [compile_one_cc $src $output "-gt -c"]
+ remote_file host delete $src
+ remote_file host delete $output
+ file delete $src
+ }
}
return $ctf_available_saved
}