Re: [PATCH v1] tools build: Fix rust cross compilation
From: Miguel Ojeda
Date: Thu Feb 12 2026 - 14:15:56 EST
On Thu, Feb 12, 2026 at 7:58 PM Dmitrii Dolgov <9erthalion6@xxxxxxxxx> wrote:
>
> Note that CROSS_COMPILE might be different from what rust compiler
> expects, since it may omit the target vendor value, e.g.
> "aarch64-linux-gnu" instead of "aarch64-unknown-linux-gnu". Thus provide
> an explicit RUST_TARGET_ARCH, and if not specified, try to match
> the CROSS_COMPILE value.
I would suggest explicitly doing the mapping automatically, rather
than guessing or requesting users to provide one more variable, like
we do for the non-tools side.
Perhaps using a "table" like we do for LLVM and `bindgen` -- see for
instance `scripts/Makefile.clang`.
Cc'ing Kbuild and rust-for-linux.
Cheers,
Miguel