]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix Rust testing
authorTom Tromey <tromey@adacore.com>
Wed, 24 Apr 2019 19:43:27 +0000 (13:43 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 24 Apr 2019 19:43:27 +0000 (13:43 -0600)
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
gdb/testsuite/lib/gdb.exp

index 23ff7bc433d1e5074785080dfb919044b05c9692..580c15e8fc41114c189cc99c60bf4aaca9d87e7e 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 1176fdded14c74abb23f5b505c26b972cd4890c4..eaf7fc4303db0dbe8d00fdcf35d8187e8391b0da 100644 (file)
@@ -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"
     }