Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] infra/ccache: avoid color diagnostics with GCC older than v4.9
Date: Sat, 11 Feb 2017 16:38:45 +0100	[thread overview]
Message-ID: <20170211163845.71459758@free-electrons.com> (raw)
In-Reply-To: <1486733648-14658-1-git-send-email-casantos@datacom.ind.br>

Hello,

Adding Arnout, Yann and Gustavo in Cc.

On Fri, 10 Feb 2017 11:34:08 -0200, Carlos Santos wrote:
> When GCC_COLORS is set, ccache passes '-fdiagnostics-color' to GCC but
> this flag requires GCC v4.9 or later. Older versions fail, complaining
> about the unrecognized command line option.
> 
> The problem is not detectable in the autobuilders because they redirect
> the output to files/pipes and ccache adds the offending flag only when
> stderr is a terminal.
> 
> Signed-off-by: Carlos Santos <casantos@datacom.ind.br>

This looks good to me in principle, so if Arnout, Yann and Gustavo
don't complain, I'm going to soon apply this to master.

Another option would be to adjust this in ccache itself at compile time
(i.e when ccache gets built) rather than having to pass this additional
GCC_COLORS variable in the environment when building things. This way
we would be absolutely sure -fdiagnostics-color will never be passed.
Hence why I'd like the feedback from other developers.

A few nits below (but I can fix while applying).

> +# When GCC_COLORS is set, ccache passes '-fdiagnostics-color' to GCC but
> +# this flag requires GCC v4.9 or later. Older versions fail, complaining
> +# about unrecognized command line option.
> +ifneq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_9),y)

I think we tend to use:

ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_9),)

instead.

> +	TARGET_MAKE_ENV += GCC_COLORS=""

And we don't indent such lines.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2017-02-11 15:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-10 13:34 [Buildroot] [PATCH] infra/ccache: avoid color diagnostics with GCC older than v4.9 Carlos Santos
2017-02-11 15:38 ` Thomas Petazzoni [this message]
2017-02-12 10:08   ` Yann E. MORIN
2017-02-12 12:14     ` Thomas Petazzoni
2017-02-12 12:33       ` Yann E. MORIN
2017-02-12 12:59         ` Thomas Petazzoni
2017-02-12 13:08           ` Yann E. MORIN
2017-02-12 13:10             ` Thomas Petazzoni
2017-02-12 11:33 ` [Buildroot] [PATCH v2] " Carlos Santos
2017-02-12 12:34   ` Yann E. MORIN
2017-02-12 14:14   ` Yann E. MORIN
2017-02-12 14:55     ` Carlos Santos
2017-02-12 17:21       ` Yann E. MORIN
2017-02-12 17:22       ` Thomas Petazzoni
2017-02-12 17:28         ` Yann E. MORIN
2017-02-13 22:41     ` Carlos Santos
2017-02-14 16:48       ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170211163845.71459758@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox