public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Yoann Congal" <yoann.congal@smile.fr>
To: <Harish.Sadineni@windriver.com>,
	<openembedded-core@lists.openembedded.org>
Cc: <Randy.MacLeod@windriver.com>, <Sundeep.Kokkonda@windriver.com>,
	<bruce.ashfield@gmail.com>, <paul@pbarker.dev>,
	<elmehdi.younes@smile.fr>
Subject: Re: [OE-core] [PATCH v6 07/14] kernel: Disable ccache when kernel rust support is enabled
Date: Thu, 26 Feb 2026 23:59:24 +0100	[thread overview]
Message-ID: <DGP9LKHSGZYC.3KL8OSVGZH43N@smile.fr> (raw)
In-Reply-To: <20260212181039.1826154-3-Harish.Sadineni@windriver.com>

On Thu Feb 12, 2026 at 7:10 PM CET, Harish via lists.openembedded.org Sadineni wrote:
> From: Harish Sadineni <Harish.Sadineni@windriver.com>
>
> 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

FYI, a patch has been submitted for this:
https://lore.kernel.org/rust-for-linux/20260225102819.16553-1-mo@sdhn.cc/
(It has a negative review though...)

> 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              | 7 +++++++
>  .../make-mod-scripts/make-mod-scripts_1.0.bb               | 7 +++++++
>  2 files changed, 14 insertions(+)
>
> diff --git a/meta/classes-recipe/kernel-yocto-rust.bbclass b/meta/classes-recipe/kernel-yocto-rust.bbclass
> index fd9ee91c79..608ccc4609 100644
> --- a/meta/classes-recipe/kernel-yocto-rust.bbclass
> +++ b/meta/classes-recipe/kernel-yocto-rust.bbclass
> @@ -16,3 +16,10 @@ do_kernel_configme[depends] += "${RUST_KERNEL_TASK_DEPENDS}"
>  do_kernel_configme:append () {
>          oe_runmake -C ${S} O=${B} rustavailable
>  }
> +
> +# Linux rust build infrastructure does not currently support ccache
> +# see https://github.com/Rust-for-Linux/linux/issues/1224
> +# Quick summary: There are 2 issues: $HOSTCC is not escaped and rustc expect a path (and not a command)
> +# More details in: https://lists.openembedded.org/g/openembedded-core/message/229336
> +# Disable ccache for kernel build if kernel rust support is enabled to workaround this.
> +CCACHE_DISABLE ?= "1"
> diff --git a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
> index 874e16e642..6226382001 100644
> --- a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
> +++ b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
> @@ -36,3 +36,10 @@ do_configure() {
>  		-C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} $t
>  	done
>  }
> +
> +# Linux rust build infrastructure does not currently support ccache
> +# see https://github.com/Rust-for-Linux/linux/issues/1224
> +# Quick summary: There are 2 issues: $HOSTCC is not escaped and rustc expect a path (and not a command)
> +# More details in: https://lists.openembedded.org/g/openembedded-core/message/229336
> +# Disable ccache for kernel build if kernel rust support is enabled to workaround this
> +CCACHE_DISABLE ?= "${@bb.utils.contains('KERNEL_RUST_SUPPORT', 'True', '1', '0', d)}"


-- 
Yoann Congal
Smile ECS



  reply	other threads:[~2026-02-26 22:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-12 18:10 [PATCH v6 05/14] kernel-yocto-rust: Fix for buildpaths errors when rust is enabled for kernel Harish.Sadineni
2026-02-12 18:10 ` [PATCH v6 06/14] make-mod-scripts: split `HOSTCC` flag to align with to linux-yocto Harish.Sadineni
2026-02-12 18:10 ` [PATCH v6 07/14] kernel: Disable ccache when kernel rust support is enabled Harish.Sadineni
2026-02-26 22:59   ` Yoann Congal [this message]
2026-02-12 18:10 ` [PATCH v6 08/14] kernel-devsrc: copying rust-kernel source to $kerneldir/build Harish.Sadineni
2026-02-12 18:10 ` [PATCH v6 09/14] selftest/cases/runtime_test: Add test for Linux Rust sample Harish.Sadineni
2026-02-15 13:40   ` [OE-core] " Mathieu Dubois-Briand
2026-02-15 17:01     ` Yoann Congal
2026-02-16 13:09       ` Harish Sadineni
2026-02-16 15:48         ` Mathieu Dubois-Briand
2026-02-17 17:01           ` Mathieu Dubois-Briand
2026-02-23  7:21             ` Mathieu Dubois-Briand
2026-02-23 11:19               ` Sundeep KOKKONDA
2026-02-27 13:33             ` Harish Sadineni
2026-03-04 12:39             ` Harish Sadineni
2026-02-12 18:10 ` [PATCH v6 10/14] kernel.bbclass: Copy include/config/auto.conf in STAGING_KERNEL_BUILDDIR Harish.Sadineni
2026-02-12 18:10 ` [PATCH v6 11/14] module-rust.bbclass: Prepare out-of-tree rust module compilation Harish.Sadineni
2026-02-12 18:10 ` [PATCH v6 12/14] meta-skeleton: Add rust-out-of-tree-module recipe Harish.Sadineni
2026-02-12 18:10 ` [PATCH v6 13/14] make-mod-scripts: fix for buildpath issues with rust-out-of-tree compilation Harish.Sadineni
2026-02-12 18:10 ` [PATCH v6 14/14] runtime_test: Add rust-out-of-tree selftest Harish.Sadineni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DGP9LKHSGZYC.3KL8OSVGZH43N@smile.fr \
    --to=yoann.congal@smile.fr \
    --cc=Harish.Sadineni@windriver.com \
    --cc=Randy.MacLeod@windriver.com \
    --cc=Sundeep.Kokkonda@windriver.com \
    --cc=bruce.ashfield@gmail.com \
    --cc=elmehdi.younes@smile.fr \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=paul@pbarker.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox