Re: new rustc targets that don't match Debian architectures
On Tue, Nov 25, 2025 at 11:28:48AM -0800, Josh Triplett wrote:
>...
> As a future example that will make this more complicated, in the future
> we will have Rust targets that use `rustc_codgen_gcc` (AKA `cg_gcc`),
> which uses `libgccjit` instead of LLVM. GCC doesn't do cross-compilation
> the way LLVM does, and requires a *unique* build of GCC for every single
> pair of (target, host). For those cases, I'd expect that those targets
> will need to build :arch packages for every *host* :arch. For instance,
> a `cg_gcc`-based target for the hypothetical xyz architecture would need
> either a `libstd-rust-dev-xyz:all` or `libstd-rust-dev:xyz` package, but
> it would *also* need a `librust-codegen-gcc-dev-xyz:amd64` package for
> amd64 hosts, and an `librust-codegen-gcc-dev-xyz:aarch64` package for
> aarch64 hosts.
>
> *That* is the case that makes me say this doesn't perfectly map onto
> Debian architectures and sometimes requires putting the architecture
> into the package name instead. I *think* that that problem wouldn't
> exist if everything followed the LLVM model that doesn't require M*N
> cross compilers for M hosts and N targtes.
Either you are confusing something, or I am missing something.
No matter whether you need M or M*N toolchain packages, these cannot
be :all since they have to run on the host.
No matter whether your toolchain is (target, host) or (any, host),
the resulting binary will be for one specific target.
Building an :arch package for an architecture other than the host
architecture is not possible in Debian.
cu
Adrian
Reply to: