public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] GDB testsuite: Re-enable -fdiagnostics-color=never
@ 2018-01-18 18:26 Andreas Arnez
  2018-01-18 18:35 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Arnez @ 2018-01-18 18:26 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

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.
---
 gdb/testsuite/lib/gdb.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 {
-- 
2.9.4

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

* Re: [PATCH] GDB testsuite: Re-enable -fdiagnostics-color=never
  2018-01-18 18:26 [PATCH] GDB testsuite: Re-enable -fdiagnostics-color=never Andreas Arnez
@ 2018-01-18 18:35 ` Pedro Alves
  2018-01-18 18:44   ` Andreas Arnez
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2018-01-18 18:35 UTC (permalink / raw)
  To: Andreas Arnez, gdb-patches; +Cc: Tom Tromey

On 01/18/2018 06:25 PM, Andreas Arnez wrote:
> 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.

OK.  Looks obvious to me.

Thanks,
Pedro Alves

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

* Re: [PATCH] GDB testsuite: Re-enable -fdiagnostics-color=never
  2018-01-18 18:35 ` Pedro Alves
@ 2018-01-18 18:44   ` Andreas Arnez
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Arnez @ 2018-01-18 18:44 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches, Tom Tromey

On Thu, Jan 18 2018, Pedro Alves wrote:

> On 01/18/2018 06:25 PM, Andreas Arnez wrote:

[...]

>> gdb/testsuite/ChangeLog:
>> 
>> 	* lib/gdb.exp (gdb_compile): Re-enable use of
>> 	universal_compile_options for languages other than Rust.
>
> OK.  Looks obvious to me.

Thanks, pushed.

--
Andreas

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

end of thread, other threads:[~2018-01-18 18:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-18 18:26 [PATCH] GDB testsuite: Re-enable -fdiagnostics-color=never Andreas Arnez
2018-01-18 18:35 ` Pedro Alves
2018-01-18 18:44   ` Andreas Arnez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).