[PATCH v2 0/3] Rust enablement for AArch64

Miguel Ojeda miguel.ojeda.sandonis at gmail.com
Tue Jun 6 08:25:34 PDT 2023


On Tue, Jun 6, 2023 at 4:56 PM Jamie Cunliffe <Jamie.Cunliffe at arm.com> wrote:
>
> The third patch disables Rust support when building for big
> endian. Currently there is no `aarch64_be-unknown-none` target which
> would allow this. Support for this can come at a later time either by
> using the target.json approach, or upstreaming a new target definition
> to rustc (preferred). We also might be able to use the
> `aarch64_be-unknown-linux-gnu` target, however, this can be done at a
> later time.  It's worth noting that in Makefile.clang, it's
> recommended for arch/{arch}/Makefile to set the endianness based on
> arguments rather than the target triple. It's currently not possible
> to do this with rustc, a different target triple has to be used.

Thanks Jamie for this!

It sounds like upstream `rustc` should support setting the endianness,
but if they are OK with maintaining another target, so that we can
start to get rid of `target.json`, that would be great.

By the way, should the patches be merged into one? i.e. the first
patch applied alone would be "wrong" in that BE is not supported
anyway, right? So why not put the constraint directly in the first
patch? Or am I missing something?

Similarly, for the second patch, I think it would be better to squash
it into the first, especially if the build is not correct if those
flags are not set.

But maybe I am missing something, or perhaps the arm64 maintainers
prefer otherwise.

Lina's `Tested-by` for Asahi would be great here.

Cheers,
Miguel



More information about the linux-arm-kernel mailing list