From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] infra/ccache: avoid color diagnostics with GCC older than v4.9
Date: Sun, 12 Feb 2017 14:08:03 +0100 [thread overview]
Message-ID: <20170212130803.GC11105@free.fr> (raw)
In-Reply-To: <20170212135914.4a4a0fab@free-electrons.com>
Thomas, All,
On 2017-02-12 13:59 +0100, Thomas Petazzoni spake thusly:
> On Sun, 12 Feb 2017 13:33:26 +0100, Yann E. MORIN wrote:
>
> > Something like, maybe:
> >
> > diff --git a/package/ccache/ccache.mk b/package/ccache/ccache.mk
> > index f174a5d..35d7a7b 100644
> > --- a/package/ccache/ccache.mk
> > +++ b/package/ccache/ccache.mk
> > @@ -31,6 +31,7 @@ HOST_CCACHE_CONF_OPTS += --with-bundled-zlib
> > define HOST_CCACHE_PATCH_CONFIGURATION
> > sed -i 's,getenv("CCACHE_DIR"),getenv("BR_CACHE_DIR"),' $(@D)/ccache.c
> > sed -i 's,"%s/.ccache","$(BR_CACHE_DIR)",' $(@D)/conf.c
> > + sed -i '/if (getenv("GCC_COLORS")/,+4d' $(@D)/ccache.c
> > endef
> >
> > HOST_CCACHE_POST_PATCH_HOOKS += HOST_CCACHE_PATCH_CONFIGURATION
> >
> > Or would we want it to be conditional on gcc < 4.9?
>
> Yes, it should be conditional on gcc < 4.9.
>
> > In anycase, I think overridign the environment variable is much
> > easier...
>
> Right, *but* if we forget to pass TARGET_MAKE_ENV or HOST_MAKE_ENV
> somewhere, then we will get a build failure. As a trivial example,
> package/makedevs/makedevs.mk directly calls $(HOSTCC), which uses
> ccache, but does not use $(HOST_MAKE_ENV). So that one would not pass
> GCC_COLORS="", and would therefore fail to build on machines with gcc <
> 4.9.
But we do a single build of ccache which gets used for both the target
and host compiler. So if we patch ccache, we have to do if any of them
if older than 4.9.
Which is not impossible, by far, but means that an older host gcc will
disable colouring of the target gcc output, and vice-versa.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2017-02-12 13:08 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
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 [this message]
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=20170212130803.GC11105@free.fr \
--to=yann.morin.1998@free.fr \
--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