This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] GDB testsuite: Re-enable -fdiagnostics-color=never


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=dcc069254040954ee72b3ed65b772d48cdff93df

commit dcc069254040954ee72b3ed65b772d48cdff93df
Author: Andreas Arnez <arnez@linux.vnet.ibm.com>
Date:   Thu Jan 18 19:42:46 2018 +0100

    GDB testsuite: Re-enable -fdiagnostics-color=never
    
    In August 2017 the GDB test suite was changed to always add the compile
    option "-fdiagnostics-color=never", see:
    
      https://sourceware.org/ml/gdb-patches/2017-08/msg00150.html
    
    Since this option is not understood by rustc, a commit from 09/2017
    dropped its use in that case:
    
      https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5eb5f850
      ("Don't use -fdiagnostics-color=never for rustc")
    
    But that change goes overboard and stops using the option for other
    languages as well.  Thus compiler diagnostics written into gdb.log may
    contain colored output again.  This is fixed.
    
    gdb/testsuite/ChangeLog:
    
    	* lib/gdb.exp (gdb_compile): Re-enable use of
    	universal_compile_options for languages other than Rust.

Diff:
---
 gdb/testsuite/ChangeLog   | 5 +++++
 gdb/testsuite/lib/gdb.exp | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index c3fc9c3..5040e14 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
 2018-01-18  Andreas Arnez  <arnez@linux.vnet.ibm.com>
 
+	* lib/gdb.exp (gdb_compile): Re-enable use of
+	universal_compile_options for languages other than Rust.
+
+2018-01-18  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
 	* gdb.arch/s390-tdbregs.exp: Add the compile option -msoft-float.
 
 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index a4bde72..7ee3a70 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3504,12 +3504,12 @@ proc gdb_compile {source dest type options} {
 
     # Add platform-specific options if a shared library was specified using
     # "shlib=librarypath" in OPTIONS.
+    set new_options {}
     if {[lsearch -exact $options rust] != -1} {
 	# -fdiagnostics-color is not a rustcc option.
     } else {
 	set new_options [universal_compile_options]
     }
-    set new_options {}
     set shlib_found 0
     set shlib_load 0
     foreach opt $options {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]