Re: [OE-core] [PATCH v2 7/7] rust-target-config.bbclass: Update for new riscv TUNE_FEATURES

Richard Purdie
2026-01-14T10:57:43Z

On Wed, 2026-01-14 at 11:50 +0100, Alexander Kanavin wrote:
> On Wed, 14 Jan 2026 at 11:33, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
>
> > Nice find. I worry about our sstate tests not covering this. We
> > might need to do:
> >
> > -rust_gen_target[vardepsexclude] += "ABIEXTENSION llvm_cpu"
> > +rust_gen_target[vardepsexclude] += "ABIEXTENSION llvm_cpu
> > TUNE_RISCV_ABI"
>
> I thought of that, but would this rebuild correctly if someone first
> builds for one TUNE_RISCV_ABI, then for another? I just don't know
> enough about it to run experiments. It probably would, as that
> variable feeds into TUNE_CCARGS.

The comment above this line says:

# These are accounted for in tmpdir path names so don't need to be in the task sig

so in theory this would handle changes to different machines with
different ABIs fine, as long as those ABIs have different tmpdir paths
which they should.

It doesn't guard against the value of TUNE_RISCV_ABI changing for a
given target as that wouldn't rebuild correctly.

I guess if we wanted to be really clear, we could probably do something
like:

RUSTCONFIG_EXCLUDEVARS = ""
RUSTCONFIG_EXCLUDEVARS:class-native = "ABIEXTENSION llvm_cpu TUNE_RISCV_ABI"
RUSTCONFIG_EXCLUDEVARS:class-nativesdk = "ABIEXTENSION llvm_cpu TUNE_RISCV_ABI"
rust_gen_target[vardepsexclude] += "${RUSTCONFIG_EXCLUDEVARS}"

but I guess we've not thought that was worth the effort in the past...

Cheers,

Richard