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

Richard Purdie
2026-01-14T10:33:23Z

On Wed, 2026-01-14 at 11:16 +0100, Alexander Kanavin wrote:
> On Wed, 18 Jun 2025 at 01:39, Mark Hatle via lists.openembedded.org
> <mark.hatle=kernel.crashing.org@lists.openembedded.org> wrote:
> > -        tspec['llvm-abiname'] = "lp64d"
> > +        tspec['llvm-abiname'] = d.getVar('TUNE_RISCV_ABI')
> >      if "riscv32" in tspec['llvm-target']:
> > -        tspec['llvm-abiname'] = "ilp32d"
> > +        tspec['llvm-abiname'] = d.getVar('TUNE_RISCV_ABI')
>
> Unfortunately this adds a dependency on TUNE_RISCV_ABI (which is set
> only if the target is a risc-v machine) to rust-native's
> rust_gen_targets task, breaking sstate reuse for it between risc-v and
> any other target. I can imagine other native pieces written in rust
> will have the same issue.
>
> It's not immediately obvious to me how to address this, so I'd really
> appreciate suggestions. The code is hairy.
>
> Ticket: https://bugzilla.yoctoproject.org/show_bug.cgi?id=16132

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"

Cheers,

Richard