Re: [ccache] Support for color diagnostics

2013-11-30 Thread Loïc Yhuel

Le 30/11/2013 11:07, Lubos Lunak a écrit :

On Saturday 30 of November 2013, Loïc Yhuel wrote:

Le 29/11/2013 14:08, Lubos Lunak a écrit :

On Friday 29 of November 2013, Lubos Lunak wrote:

   Hello,

   the attached patch adds ccache support for compiler color diagnostics
(also reported by somebody as #10075).

...

I think you didn't understand GCC documentation correctly.

  Actually I think I did. I've now tried with a chroot (openSUSE build service
really is a useful tool) and it pretty much matches my understanding of the
documentation.


  From the man page : "The default GCC_COLORS is ... Setting GCC_COLORS
to the empty string disables colors."
GCC enable colors when GCC_COLORS is not set, and your code doesn't.

  From the man page: "The default is ‘never’ if GCC_COLORS environment variable
isn't present in the environment".


In fact you don't have to test GCC_COLORS at all : when it's an empty
string (not unset !), colors are disabled , and adding
-fdiagnostics-color doesn't change anything.

  The patch does not add -fdiagnostics-color when GCC_COLORS is empty.


Sorry, I didn't check : the default is auto on Fedora, and not upstream...
That's why we don't see the same behavior.
http://pkgs.fedoraproject.org/cgit/gcc.git/tree/gcc48-color-auto.patch

___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] Support for color diagnostics

2013-11-29 Thread Loïc Yhuel

Le 29/11/2013 14:08, Lubos Lunak a écrit :

On Friday 29 of November 2013, Lubos Lunak wrote:

  Hello,

  the attached patch adds ccache support for compiler color diagnostics
(also reported by somebody as #10075).

...

Caveats:

  I forgot one:

- The function color_output_possible() may look simplistic, but as far as I
can tell it works just fine (it's been in Incecream for a number of years).


Hello,

I think you didn't understand GCC documentation correctly.

From the man page : "The default GCC_COLORS is ... Setting GCC_COLORS 
to the empty string disables colors."

GCC enable colors when GCC_COLORS is not set, and your code doesn't.

In fact you don't have to test GCC_COLORS at all : when it's an empty 
string (not unset !), colors are disabled , and adding 
-fdiagnostics-color doesn't change anything.

___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache