summaryrefslogtreecommitdiff
path: root/mk/compiler
diff options
context:
space:
mode:
authorgdt <gdt@pkgsrc.org>2022-12-09 12:18:56 +0000
committergdt <gdt@pkgsrc.org>2022-12-09 12:18:56 +0000
commitb75bd539a60263b6d7b2db5274072140c8a6945a (patch)
tree1e06c5cf269334ede6d009568cf2bab994769e8b /mk/compiler
parentb68fafbd78f3427f8a91b6131855b6e7a7417c06 (diff)
downloadpkgsrc-b75bd539a60263b6d7b2db5274072140c8a6945a.tar.gz
mk/compiler/ccache.mk: Use ccache3
The update to ccache4 caused a large increase in dependencies, breaking builds using e.g. "PKGSRC_COMPILER=ccache gcc", and the pre-update discussion of consequences and how to deal with it did not occur. The right long-term solution is to have a variable to select which ccache is used, and per-version circular dependency lists, accomoding both those who wish to use ccache 3 on low-resource machines and those who wish to use ccache 4. With 20224 branch manager hat on, I don't want to deal with ccache instability (or any instability at all now that we are past 12/1), so I have set ccache.mk to depend on ccache3, the status quo ante argumentum. Note that if one has any ccache installed, it will be used, so people that want to use ccache4 can just install it and then flip on "PKGSRC_COMPILER=ccache gcc".
Diffstat (limited to 'mk/compiler')
-rw-r--r--mk/compiler/ccache.mk12
1 files changed, 10 insertions, 2 deletions
diff --git a/mk/compiler/ccache.mk b/mk/compiler/ccache.mk
index 5fb3a345de4..47386f5ec2c 100644
--- a/mk/compiler/ccache.mk
+++ b/mk/compiler/ccache.mk
@@ -1,4 +1,4 @@
-# $NetBSD: ccache.mk,v 1.39 2019/09/02 02:23:02 rillig Exp $
+# $NetBSD: ccache.mk,v 1.40 2022/12/09 12:18:56 gdt Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -54,6 +54,14 @@
# Keywords: ccache
#
+# \todo We now have two versions of ccache, one with fairly light
+# dependencies and one with heavier dependencies (C++17, cmake, ruby).
+# Obviously some people are going to prefer one and some the other,
+# and thus the right approach is to have a CCACHE_TYPE variable that
+# can mean devel/ccache3 or devel/ccache, and to use that to control
+# both the circular dependency list and the package that is depended
+# on. For now (meaning the 2022Q4 branch), just set to ccache3.
+
.if !defined(COMPILER_CCACHE_MK)
COMPILER_CCACHE_MK= defined
@@ -130,7 +138,7 @@ PREPEND_PATH+= ${_CCACHE_DIR}/bin
# Add the dependency on ccache.
. if ${CCACHE_BASE} == ${LOCALBASE}
-TOOL_DEPENDS+= ccache-[0-9]*:../../devel/ccache
+TOOL_DEPENDS+= ccache-[0-9]*:../../devel/ccache3
. endif
# Override the compiler-specific hash with the version string for the