]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
kernel: Disable ccache when kernel rust support is enabled
authorHarish Sadineni <Harish.Sadineni@windriver.com>
Mon, 9 Feb 2026 14:34:49 +0000 (06:34 -0800)
committerDeepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Mon, 2 Mar 2026 08:48:59 +0000 (00:48 -0800)
commitd7c42ffecad5ffc0e5bf8a1eb06084cdc30e3356
treef534094922c615d0f8e541c4e78b0fad394a4d53
parent7a89f7b338dc5de0f15dd3b67b6c20dbe8f8e347
kernel: Disable ccache when kernel rust support is enabled

Currently, a ccache enabled build fails with:
  |   HOSTRUSTC scripts/generate_rust_target
  |   HOSTCC  scripts/kallsyms
  |   HOSTCC  scripts/sorttable
  |   HOSTCC  scripts/asn1_compiler
  |   TOUCH   include/generated/gcc-plugins.h
  |   DESCEND objtool
  | error: multiple input filenames provided (first two filenames are gcc and
.../tmp/work-shared/qemux86-64/kernel-source/scripts/generate_rust_target.rs)

Linux rust build infrastructure does not currently support ccache (Opened bug[0]).

Quick summary: There are 2 issues: $HOSTCC is not escaped and rustc
expect a path (and not a command)

Disable ccache if KERNEL_RUST_SUPPORT is 'True' for kernel and kernel module builds, including
auxiliary tooling such as make-mod-scripts.

More details in: https://lists.openembedded.org/g/openembedded-core/message/229336

[0]: https://github.com/Rust-for-Linux/linux/issues/1224

Co-developed-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: El Mehdi YOUNES <elmehdi.younes@smile.fr>
Cc: Alban MOIZAN <alban.moizan@smile.fr>
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
meta/classes-recipe/kernel-yocto-rust.bbclass
meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb