This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[FYI] Fix Rust testing
- From: Tom Tromey <tromey at adacore dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at adacore dot com>
- Date: Wed, 24 Apr 2019 13:44:21 -0600
- Subject: [FYI] Fix Rust testing
This changes the gdb test suite to omit -fno-stack-protector when
compiling Rust code. This makes Rust testing work again.
I think I saw this patch somewhere already, but I couldn't find it
again just now, so I'm checking this version in.
gdb/testsuite/ChangeLog
2019-04-24 Tom Tromey <tromey@adacore.com>
* lib/gdb.exp (gdb_compile): Don't add -fno-stack-protector for
Rust.
---
gdb/testsuite/ChangeLog | 5 +++++
gdb/testsuite/lib/gdb.exp | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 1176fdded14..eaf7fc4303d 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3564,7 +3564,8 @@ proc gdb_compile {source dest type options} {
if { $getting_compiler_info == 0
&& [test_compiler_info {gcc-*-*}]
&& !([test_compiler_info {gcc-[0-3]-*}]
- || [test_compiler_info {gcc-4-0-*}]) } {
+ || [test_compiler_info {gcc-4-0-*}])
+ && [lsearch -exact $options rust] == -1} {
# Put it at the front to not override any user-provided value.
lappend new_options "early_flags=-fno-stack-protector"
}
--
2.20.1