aboutsummaryrefslogtreecommitdiffstats
path: root/include/kernel.mk
diff options
context:
space:
mode:
authorZeyu Dong <dzy201415@gmail.com>2023-09-29 20:54:58 -0400
committerChristian Marangi <ansuelsmth@gmail.com>2023-10-28 21:34:20 +0200
commit52751b12320599b557d8c7779b612102b963595d (patch)
tree0e36eb2172b133de96f49d3e486ca7d3fe971539 /include/kernel.mk
parent0221b860321ca2dd2bdc6339c01aa9adb3ddb34e (diff)
downloadupstream-52751b12320599b557d8c7779b612102b963595d.tar.gz
upstream-52751b12320599b557d8c7779b612102b963595d.tar.bz2
upstream-52751b12320599b557d8c7779b612102b963595d.zip
build: cache kernel module package compiling
Kernel module packages compiling is not cached (e.g. mac80211) even with CONFIG_CCACHE on. CC should be set to KERNEL_CC in KERNEL_MAKE_FLAGS at kernel.mk to allow kernel module packages using ccache. Signed-off-by: Zeyu Dong <dzy201415@gmail.com>
Diffstat (limited to 'include/kernel.mk')
-rw-r--r--include/kernel.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/kernel.mk b/include/kernel.mk
index 3012eb89935..8236416132d 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -119,6 +119,10 @@ KERNEL_MAKE_FLAGS = \
cmd_syscalls= \
$(if $(__package_mk),KBUILD_EXTRA_SYMBOLS="$(wildcard $(PKG_SYMVERS_DIR)/*.symvers)")
+ifneq (,$(KERNEL_CC))
+ KERNEL_MAKE_FLAGS += CC="$(KERNEL_CC)"
+endif
+
KERNEL_NOSTDINC_FLAGS = \
-nostdinc $(if $(DUMP),, -isystem $(shell $(TARGET_CC) -print-file-name=include))