enable ccache for reference Linux kernel

Genode build system allows to easily enable 'ccache' for builds. This
change allows to enable using 'ccache' also for build of reference
Linux kernel used during porting device drivers.

To enable 'ccache' it is enough to pass value of 'CC' variable when
executing Linux build but this build by default depends on time when it
is built which causes 'ccache' misses. To solve this issue additional
flags are passed to make build independent from time, current user and
host on which build is performed.

Issue #4718
This commit is contained in:
Tomasz Gajewski 2023-01-06 10:40:26 +01:00 committed by Christian Helmuth
parent 114238c248
commit d33139c40a
5 changed files with 15 additions and 5 deletions

View File

@ -6,7 +6,9 @@ CUSTOM_TARGET_DEPS := kernel_build.phony
LX_DIR := $(call select_from_ports,linux)/src/linux
PWD := $(shell pwd)
LX_MK_ARGS = ARCH=arm64 CROSS_COMPILE=$(CROSS_DEV_PREFIX)
# options for Linux kernel build to not depend on current time, user and host
LX_MK_REPRODUCIBLE = KBUILD_BUILD_TIMESTAMP=no_timestamp KBUILD_BUILD_USER=genode KBUILD_BUILD_HOST=genode
LX_MK_ARGS = ARCH=arm64 CROSS_COMPILE=$(CROSS_DEV_PREFIX) CC=$(CC) $(LX_MK_REPRODUCIBLE)
#
# Linux kernel configuration

View File

@ -6,7 +6,9 @@ CUSTOM_TARGET_DEPS := kernel_build.phony
LX_DIR := $(call select_from_ports,linux)/src/linux
PWD := $(shell pwd)
LX_MK_ARGS = ARCH=x86 CROSS_COMPILE=$(CROSS_DEV_PREFIX)
# options for Linux kernel build to not depend on current time, user and host
LX_MK_REPRODUCIBLE = KBUILD_BUILD_TIMESTAMP=no_timestamp KBUILD_BUILD_USER=genode KBUILD_BUILD_HOST=genode
LX_MK_ARGS = ARCH=x86 CROSS_COMPILE=$(CROSS_DEV_PREFIX) CC=$(CC) $(LX_MK_REPRODUCIBLE)
#
# Linux kernel configuration

View File

@ -6,7 +6,9 @@ CUSTOM_TARGET_DEPS := kernel_build.phony
LX_DIR := $(call select_from_ports,linux)/src/linux
PWD := $(shell pwd)
LX_MK_ARGS = ARCH=x86_64 CROSS_COMPILE=$(CROSS_DEV_PREFIX)
# options for Linux kernel build to not depend on current time, user and host
LX_MK_REPRODUCIBLE = KBUILD_BUILD_TIMESTAMP=no_timestamp KBUILD_BUILD_USER=genode KBUILD_BUILD_HOST=genode
LX_MK_ARGS = ARCH=x86_64 CROSS_COMPILE=$(CROSS_DEV_PREFIX) CC=$(CC) $(LX_MK_REPRODUCIBLE)
#
# Linux kernel configuration

View File

@ -6,7 +6,9 @@ CUSTOM_TARGET_DEPS := kernel_build.phony
LX_DIR := $(call select_from_ports,linux)/src/linux
PWD := $(shell pwd)
LX_MK_ARGS = ARCH=x86 CROSS_COMPILE=$(CROSS_DEV_PREFIX)
# options for Linux kernel build to not depend on current time, user and host
LX_MK_REPRODUCIBLE = KBUILD_BUILD_TIMESTAMP=no_timestamp KBUILD_BUILD_USER=genode KBUILD_BUILD_HOST=genode
LX_MK_ARGS = ARCH=x86 CROSS_COMPILE=$(CROSS_DEV_PREFIX) CC=$(CC) $(LX_MK_REPRODUCIBLE)
#
# Linux kernel configuration

View File

@ -6,7 +6,9 @@ CUSTOM_TARGET_DEPS := kernel_build.phony
LX_DIR := $(call select_from_ports,linux)/src/linux
PWD := $(shell pwd)
LX_MK_ARGS = ARCH=x86_64 CROSS_COMPILE=$(CROSS_DEV_PREFIX)
# options for Linux kernel build to not depend on current time, user and host
LX_MK_REPRODUCIBLE = KBUILD_BUILD_TIMESTAMP=no_timestamp KBUILD_BUILD_USER=genode KBUILD_BUILD_HOST=genode
LX_MK_ARGS = ARCH=x86_64 CROSS_COMPILE=$(CROSS_DEV_PREFIX) CC=$(CC) $(LX_MK_REPRODUCIBLE)
#
# Linux kernel configuration