[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: new rustc targets that don't match Debian architectures



On Wed, Nov 26, 2025, at 9:41 AM, Simon Josefsson wrote:
> Fabian Grünbichler <debian@fabian.gruenbichler.email> writes:
>
>> I would like to introduce new packages for (Tier 3) BPF targets
>> `bpfeb-unknown-none` and `bpfel-unknown-none`, to support use cases like aya-rs
>> properly.
>
> Are those triplets registered?  Several packages build BPF targets now,
> but I'm not sure there is agreement on the triplets.  Getting some
> consistency on this would be nice.

Not sure what you mean by registered, but LLVM and rustc have their own target
triplets that differ from those used by GNU toolchains. This is already true
for all targets currently packaged (although for most of the mainstream ones,
the mapping is rather straightforward).

> In 'nsd' I chose /usr/lib/bpf, see:
>
> https://lists.debian.org/debian-devel/2025/09/msg00143.html
> https://lists.debian.org/debian-devel/2025/09/msg00150.html
>
> According to Matthias Klose, the GNU toolchain uses the 'bpf' triplet,
> which feels like a good argument to me.
>
> Little endian seems to be the default, according to:
>
> https://gcc.gnu.org/onlinedocs/gcc-15.2.0/gcc/eBPF-Options.html
>
> So maybe 'bpf' and 'bpfeb'?

I did not make up those target names, that's how they are called in rustc and
LLVM ;)

LLVM calls the targets bpfeb(-unknown-none) end bpfel(-unknown-none), with
"bpf" meaning whatever endianess the (build) host has..

Fabian


Reply to: