]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Unsupport gdb.rust for remote host
authorTom de Vries <tdevries@suse.de>
Tue, 28 Mar 2023 08:22:48 +0000 (10:22 +0200)
committerTom de Vries <tdevries@suse.de>
Tue, 28 Mar 2023 08:22:48 +0000 (10:22 +0200)
With test-case gdb.rust/watch.exp and remote host I run into:
...
Executing on host: gcc   watch.rs  -g  -lm   -o watch    (timeout = 300)
  ...
ld:watch.rs: file format not recognized; treating as linker script
ld:watch.rs:1: syntax error
  ...
UNTESTED: gdb.rust/watch.exp: failed to prepare
...

The problem is that find_rustc returns "" for remote host, so we fall back to gcc, which fails.

Fix this by returning 0 in allow_rust_tests for remote host.

Tested on x86_64-linux.

gdb/testsuite/lib/gdb.exp

index 14ce39e8ed7288206e6797d9b730dae6e6eb8c5b..0d064017f0980b82220e113907435132d9c9d694 100644 (file)
@@ -2479,6 +2479,11 @@ proc allow_rust_tests {} {
        return 0
     }
 
+    if { [is_remote host] } {
+       # Proc find_rustc returns "" for remote host.
+       return 0
+    }
+
     # The rust compiler does not support "-m32", skip.
     global board board_info
     set board [target_info name]