kumquat-buildroot/toolchain
Paul Cercueil d5c0eaef1f Makefile, toolchain-wrapper.c: disable ccache by default outside of Buildroot
Until now, when BR2_CCACHE=y, ccache support was built into the
toolchain wrapper, and used regardless of whether the toolchain is
using during the Buildroot build itself, or later as part of the SDK.

However, having ccache support forcefully enabled in the SDK can
really be surprising, and is certainly unexpected for a
cross-compilation toolchain. This can be particularly surprising as
the ccache cache directory may be hardcoded in the ccache binary to
point to a folder that does not make sense on the SDK user's machine.

So what this commit does is create a BR2_USE_CCACHE variable, which
when set to 1 tells the toolchain wrapper to use ccache. Not defining
the variable, or specifying any other value that 1 causes the
toolchain wrapper to not use ccache. The main Buildroot Makefile is
modified to export BR2_USE_CCACHE = 1 when ccache support is enabled,
so that ccache is used during the Buildroot build.

However, when someone will use the SDK outside of Buildroot, the
toolchain wrapper will not use ccache.

The BR2_USE_CCACHE variable is only conditionally enabled in the main
Makefile (via ?=) so that it can be overridden in the environment if
one wants to quickly test disabling ccache in a ccache-enabled
Buildroot configuration. This is the scenario that was considered in
commit 792f1278e3 ("toolchain-wrapper:
support change of BR2_CCACHE"), which added the BR_NO_CCACHE variable.

The BR_NO_CCACHE variable is no longer needed, and replaced by this
BR2_USE_CCACHE variable.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
[Thomas: almost entirely rework the implementation and commit log]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-07-27 20:31:57 +02:00
..
toolchain package/toolchain: rename GLIBC_COPY_NSSWITCH_FILE 2021-11-25 20:53:43 +01:00
toolchain-buildroot toolchain: invert glibc <-> !static dependency 2022-07-27 11:11:19 +02:00
toolchain-external toolchain/toolchain-external/toolchain-external-custom: remove mentions of eglibc 2022-07-27 11:11:19 +02:00
Config.in arch: rework MMU option handling and move to "Target architecture" menu 2022-07-27 11:38:07 +02:00
helpers.mk toolchain: handle white spaces in sysroot dir in copy_toolchain_sysroot 2022-07-26 23:11:25 +02:00
toolchain-wrapper.c Makefile, toolchain-wrapper.c: disable ccache by default outside of Buildroot 2022-07-27 20:31:57 +02:00
toolchain-wrapper.mk toolchain/toolchain-wrapper: reproducible builds: omit absolute paths from debug symbols 2022-01-08 14:48:22 +01:00
toolchain.mk