aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-04-24 13:43:27 -0600
committerTom Tromey <tromey@adacore.com>2019-04-24 13:43:27 -0600
commit1670072efb31e82d52d408940062860e2835d79c (patch)
tree099f7cd97ce2a85327805c7e72b107f9a4492472
parent44ed80923ab89e141120defa8c1209b69869a7ac (diff)
downloadgdb-1670072efb31e82d52d408940062860e2835d79c.zip
gdb-1670072efb31e82d52d408940062860e2835d79c.tar.gz
gdb-1670072efb31e82d52d408940062860e2835d79c.tar.bz2
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.
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/lib/gdb.exp3
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 23ff7bc..580c15e 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2019-04-24 Tom Tromey <tromey@adacore.com>
+ * lib/gdb.exp (gdb_compile): Don't add -fno-stack-protector for
+ Rust.
+
+2019-04-24 Tom Tromey <tromey@adacore.com>
+
* gdb.arch/amd64-eval.exp: Test bitfield return.
* gdb.arch/amd64-eval.cc (struct Bitfields): New.
(class Foo) <return_bitfields>: New method.
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 1176fdd..eaf7fc4 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"
}