Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] gdb/testsuite: fix rust compiler selection in gdb_default_target_compile
@ 2026-10-05  5:25 simon.marchi
  2026-10-05  5:25 ` [PATCH 2/3] gdb/testsuite: wrap rustc in cc-with-tweaks.exp simon.marchi
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: simon.marchi @ 2026-10-05  5:25 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

From: Simon Marchi <simon.marchi@polymtl.ca>

The "set compiler" line looks like a copy-paste error from the if just
above.  If we compare this to the Go handler, then it seems clear that the
intent was to write:

	    if {[board_info $dest exists rustcompiler]} {
		set compiler [target_info rustcompiler]
	    } else {
		set compiler [find_rustc]
	    }

The name rustcompiler follows the convention used by other languages (e.g.
"gocompiler", "dcompiler", etc).

This also matches what was sent upstream to DejaGnu in commit c8beff4a0843
("Add Rust support to default_target_compile").

Change-Id: Ic21b397ff6a2afbcda72901203ff7834c752ff3f
---
 gdb/testsuite/lib/future.exp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp
index 44fc17b3f004..a5444df66c87 100644
--- a/gdb/testsuite/lib/future.exp
+++ b/gdb/testsuite/lib/future.exp
@@ -308,8 +308,8 @@ proc gdb_default_target_compile_1 {source destfile type options} {
 	    if {[board_info $dest exists rustflags]} {
 		append add_flags " [target_info rustflags]"
 	    }
-	    if {[board_info $dest exists rustflags]} {
-		set compiler [target_info rustflags]
+	    if {[board_info $dest exists rustcompiler]} {
+		set compiler [target_info rustcompiler]
 	    } else {
 		set compiler [find_rustc]
 	    }

base-commit: 2ce6c3190773eb22f467446c4fdc7edb123ce82f
-- 
2.55.0


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2026-10-18  3:46 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-05  5:25 [PATCH 1/3] gdb/testsuite: fix rust compiler selection in gdb_default_target_compile simon.marchi
2026-10-05  5:25 ` [PATCH 2/3] gdb/testsuite: wrap rustc in cc-with-tweaks.exp simon.marchi
2026-10-06 10:56   ` Andrew Burgess
2026-10-05  5:25 ` [PATCH 3/3] gdb/dwarf: fix crash when .gdb_index contains Rust legacy mangled names simon.marchi
2026-10-06 11:01   ` Andrew Burgess
2026-10-06 13:39     ` Simon Marchi
2026-10-14 13:01   ` Tom Tromey
2026-10-14 13:22     ` Simon Marchi
2026-10-14 14:59       ` Tom Tromey
2026-10-14 16:13       ` Tom Tromey
2026-10-14 16:26         ` Simon Marchi
2026-10-14 16:46   ` [PATCH v2 0/2] Fix " Simon Marchi
2026-10-15 15:47     ` Tom Tromey
2026-10-18  3:45       ` Simon Marchi
2026-10-14 16:46   ` [PATCH v2 1/2] gdb: add selftests for split_name Simon Marchi
2026-10-15 15:48     ` Tom Tromey
2026-10-15 18:33       ` Simon Marchi
2026-10-16  3:15         ` Tom Tromey
2026-10-14 16:46   ` [PATCH v2 2/2] gdb/dwarf: fix crash when .gdb_index contains Rust legacy mangled names Simon Marchi
2026-10-06 10:56 ` [PATCH 1/3] gdb/testsuite: fix rust compiler selection in gdb_default_target_compile Andrew Burgess

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox