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>
INITRAMFS_EXTRA_FILES ?= $(GENERIC_PLATFORM_DIR)/image/initramfs-base-files.txt
-ifneq (,$(KERNEL_CC))
- KERNEL_MAKEOPTS += CC="$(KERNEL_CC)"
-endif
-
export HOST_EXTRACFLAGS=-I$(STAGING_DIR_HOST)/include
# defined in quilt.mk
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))