* [PATCH] configure.ac: support -fdiagnostics-color=always
@ 2015-04-06 17:33 Michael Zimmermann
2015-04-06 18:24 ` Andrei Borzenkov
0 siblings, 1 reply; 4+ messages in thread
From: Michael Zimmermann @ 2015-04-06 17:33 UTC (permalink / raw)
To: The development of GNU GRUB
---
configure.ac | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/configure.ac b/configure.ac
index 891c14f..1f8cb2c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1046,6 +1046,15 @@ if test "x$grub_cv_target_cc_qn" = xyes; then
TARGET_CFLAGS="$TARGET_CFLAGS -Qn"
fi
+AC_CACHE_CHECK([whether option -fdiagnostics-color=always works],
grub_cv_target_cc_fdiagnostics_color, [
+ CFLAGS="$TARGET_CFLAGS -fdiagnostics-color=always -Werror"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_target_cc_fdiagnostics_color=yes],
+ [grub_cv_target_cc_fdiagnostics_color=no])])
+if test "x$grub_cv_target_cc_fdiagnostics_color" = xyes; then
+ TARGET_CFLAGS="$TARGET_CFLAGS -fdiagnostics-color=always"
+fi
+
#
# Compiler features.
#
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] configure.ac: support -fdiagnostics-color=always
2015-04-06 17:33 [PATCH] configure.ac: support -fdiagnostics-color=always Michael Zimmermann
@ 2015-04-06 18:24 ` Andrei Borzenkov
2015-04-07 15:54 ` Lennart Sorensen
2015-04-24 15:40 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 2 replies; 4+ messages in thread
From: Andrei Borzenkov @ 2015-04-06 18:24 UTC (permalink / raw)
To: Michael Zimmermann; +Cc: The development of GNU GRUB
В Mon, 6 Apr 2015 19:33:30 +0200
Michael Zimmermann <sigmaepsilon92@gmail.com> пишет:
> ---
> configure.ac | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/configure.ac b/configure.ac
> index 891c14f..1f8cb2c 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1046,6 +1046,15 @@ if test "x$grub_cv_target_cc_qn" = xyes; then
> TARGET_CFLAGS="$TARGET_CFLAGS -Qn"
> fi
>
> +AC_CACHE_CHECK([whether option -fdiagnostics-color=always works],
> grub_cv_target_cc_fdiagnostics_color, [
> + CFLAGS="$TARGET_CFLAGS -fdiagnostics-color=always -Werror"
> + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
> + [grub_cv_target_cc_fdiagnostics_color=yes],
> + [grub_cv_target_cc_fdiagnostics_color=no])])
> +if test "x$grub_cv_target_cc_fdiagnostics_color" = xyes; then
> + TARGET_CFLAGS="$TARGET_CFLAGS -fdiagnostics-color=always"
> +fi
> +
> #
> # Compiler features.
> #
I think it should be left to distribution/user. You can always run
./configure TARGET_CFLAGS="-Os -fdiagnostic-color=always"
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] configure.ac: support -fdiagnostics-color=always
2015-04-06 18:24 ` Andrei Borzenkov
@ 2015-04-07 15:54 ` Lennart Sorensen
2015-04-24 15:40 ` Vladimir 'φ-coder/phcoder' Serbinenko
1 sibling, 0 replies; 4+ messages in thread
From: Lennart Sorensen @ 2015-04-07 15:54 UTC (permalink / raw)
To: The development of GNU GRUB; +Cc: Michael Zimmermann
On Mon, Apr 06, 2015 at 09:24:26PM +0300, Andrei Borzenkov wrote:
> В Mon, 6 Apr 2015 19:33:30 +0200
> Michael Zimmermann <sigmaepsilon92@gmail.com> пишет:
>
> > ---
> > configure.ac | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> >
> > diff --git a/configure.ac b/configure.ac
> > index 891c14f..1f8cb2c 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -1046,6 +1046,15 @@ if test "x$grub_cv_target_cc_qn" = xyes; then
> > TARGET_CFLAGS="$TARGET_CFLAGS -Qn"
> > fi
> >
> > +AC_CACHE_CHECK([whether option -fdiagnostics-color=always works],
> > grub_cv_target_cc_fdiagnostics_color, [
> > + CFLAGS="$TARGET_CFLAGS -fdiagnostics-color=always -Werror"
> > + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
> > + [grub_cv_target_cc_fdiagnostics_color=yes],
> > + [grub_cv_target_cc_fdiagnostics_color=no])])
> > +if test "x$grub_cv_target_cc_fdiagnostics_color" = xyes; then
> > + TARGET_CFLAGS="$TARGET_CFLAGS -fdiagnostics-color=always"
> > +fi
> > +
> > #
> > # Compiler features.
> > #
>
> I think it should be left to distribution/user. You can always run
>
> ./configure TARGET_CFLAGS="-Os -fdiagnostic-color=always"
Yes please. Having your text build logs corrupted by colour codes is
not helpful in any way. I didn't even know that awful option existed.
Now if it had a =auto like ls and grep and such have where if the output
is a terminal, it does colour, but otherwise it does not, well then at
least it doesn't bother people logging the output.
--
Len Sorensen
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] configure.ac: support -fdiagnostics-color=always
2015-04-06 18:24 ` Andrei Borzenkov
2015-04-07 15:54 ` Lennart Sorensen
@ 2015-04-24 15:40 ` Vladimir 'φ-coder/phcoder' Serbinenko
1 sibling, 0 replies; 4+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2015-04-24 15:40 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 1413 bytes --]
On 06.04.2015 20:24, Andrei Borzenkov wrote:
> В Mon, 6 Apr 2015 19:33:30 +0200
> Michael Zimmermann <sigmaepsilon92@gmail.com> пишет:
>
>> ---
>> configure.ac | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
>> diff --git a/configure.ac b/configure.ac
>> index 891c14f..1f8cb2c 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -1046,6 +1046,15 @@ if test "x$grub_cv_target_cc_qn" = xyes; then
>> TARGET_CFLAGS="$TARGET_CFLAGS -Qn"
>> fi
>>
>> +AC_CACHE_CHECK([whether option -fdiagnostics-color=always works],
>> grub_cv_target_cc_fdiagnostics_color, [
>> + CFLAGS="$TARGET_CFLAGS -fdiagnostics-color=always -Werror"
>> + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
>> + [grub_cv_target_cc_fdiagnostics_color=yes],
>> + [grub_cv_target_cc_fdiagnostics_color=no])])
>> +if test "x$grub_cv_target_cc_fdiagnostics_color" = xyes; then
>> + TARGET_CFLAGS="$TARGET_CFLAGS -fdiagnostics-color=always"
>> +fi
>> +
>> #
>> # Compiler features.
>> #
>
> I think it should be left to distribution/user. You can always run
>
> ./configure TARGET_CFLAGS="-Os -fdiagnostic-color=always"
>
Agreed. Especially given that stdout isn't necessarily a terminal.
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-04-24 15:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-06 17:33 [PATCH] configure.ac: support -fdiagnostics-color=always Michael Zimmermann
2015-04-06 18:24 ` Andrei Borzenkov
2015-04-07 15:54 ` Lennart Sorensen
2015-04-24 15:40 ` Vladimir 'φ-coder/phcoder' Serbinenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.