Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Paul Cercueil <paul@crapouillou.net>
Cc: Romain Naour <romain.naour@gmail.com>,
	Giulio Benetti <giulio.benetti@benettiengineering.com>,
	Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] Config.in: add option to only use ccache for BR
Date: Wed, 27 Jul 2022 20:37:44 +0200	[thread overview]
Message-ID: <20220727203744.40f2fd12@windsurf> (raw)
In-Reply-To: <20220113210431.1361727-1-paul@crapouillou.net>

Hello Paul,

On Thu, 13 Jan 2022 21:04:31 +0000
Paul Cercueil <paul@crapouillou.net> wrote:

> Add an option, disabled by default, to only use ccache for Buildroot
> packages.
> 
> When enabled, ccache will be used when building Buildroot itself, but
> the toolchain exported as SDK will not make use of ccache to build
> external programs, unless the "BR_USE_CCACHE" environment variable is
> set.
> 
> The motivation behind this change is to be able to speed up iterative
> building of a Buildroot based distribution, without forcing the users of
> the SDK to use ccache, which has the problem of clobbering the
> filesystem in a hidden directory if the cache directory is left as
> default, or trying to access a cache folder that existed on the machine
> that built the SDK but which may not exist on the machine on which it
> was later installed.
> 
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  Config.in                      | 9 +++++++++
>  linux/linux.mk                 | 4 ++++
>  package/Makefile.in            | 4 ++++
>  toolchain/toolchain-wrapper.c  | 5 +++++
>  toolchain/toolchain-wrapper.mk | 4 ++++
>  5 files changed, 26 insertions(+)

We have applied your patch, but with some significant change.

We have dropped the Config.in option, as we believe the SDK should not
use ccache in general. We have introduce a BR2_USE_CCACHE variable (not
a Config.in option!) which when set to 1 tells the wrapper to use
ccache. Buildroot defines/exports this variable globally in its
Makefile, so that during the Buildroot build ccache is used (if
enabled, of course). ccache is not used in the SDK situation, unless
explicitly overridden with BR2_USE_CCACHE=1.

Thanks to that, we could also remove the BR_NO_CCACHE variable, so that
we don't have two confusing variables doing almost the same thing.

See
https://git.buildroot.org/buildroot/commit/?id=d5c0eaef1f7c3b705cc1cf3087bd83ad9098aa2f
for the final implementation.

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      parent reply	other threads:[~2022-07-27 18:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-13 21:04 [Buildroot] [PATCH 1/1] Config.in: add option to only use ccache for BR Paul Cercueil
2022-01-16 13:39 ` Paul Cercueil
2022-07-27 18:37 ` Thomas Petazzoni via buildroot [this message]

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=20220727203744.40f2fd12@windsurf \
    --to=buildroot@buildroot.org \
    --cc=giulio.benetti@benettiengineering.com \
    --cc=paul@crapouillou.net \
    --cc=romain.naour@gmail.com \
    --cc=thomas.de_schampheleire@nokia.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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