mbox series

[v2,0/3] rust: Fix powerpc64le support

Message ID 20220228143948.50809-1-andrew@aj.id.au
Headers show
Series rust: Fix powerpc64le support | expand

Message

Andrew Jeffery Feb. 28, 2022, 2:39 p.m. UTC
Hello,

Here's v2 of what was previously an RFC series where I just slashed my
way through trying to get rust going out of the box on powerpc64le.

Thanks to some pointers from Alex that effort has been significantly
cleaned up.

v2 is no-longer RFC as I think I have a decent understanding of what's
going on now. The RFC series can be found here:

https://lore.kernel.org/openembedded-core/20220222035234.463162-1-andrew@aj.id.au/

The changes in v2 include:

* Drop the incorrect attempts at refactoring
* Drop the (now unnecessary) install hack for libstd-rs
* Drop the patch that tried to avoid duplicate toml sections by instead
  fixing the build configuration

The bits that survived since the RFC were:

* The introduction of RUST_BUILD_ARCH to handle the snapshot artifacts
* The introduction of arch_to_rust_arch() in a new python library for
  rust

arch_to_rust_arch() is not just a rename of arch_to_rust_target_arch()
as it was in the RFC. arch_to_rust_target_arch() stays for its existing
job - arch_to_rust_arch() appears alongside to do arch translations
earlier in the process. I'm not wedded to 'arch_to_rust_arch()' as a
name, if someone has a better color for the bikeshed then suggest away. 

Finally, I've re-posted the patch adding the snapshot checksums for
powerpc64le in case there is any enthusiasm for applying it. It's okay
if not, we can maintain that in e.g. OpenBMC in a bbappend if necessary.

Please review!

Andrew Jeffery (3):
  rust: Introduce arch_to_rust_arch()
  rust: Introduce RUST_BUILD_ARCH
  rust: Add snapshot checksums for powerpc64le

 meta/classes/base.bbclass                    |  2 +-
 meta/classes/rust-common.bbclass             |  6 +++++-
 meta/lib/oe/rust.py                          |  5 +++++
 meta/recipes-devtools/rust/rust-common.inc   |  8 +++++---
 meta/recipes-devtools/rust/rust-snapshot.inc | 16 ++++++++++------
 meta/recipes-devtools/rust/rust.inc          |  2 +-
 6 files changed, 27 insertions(+), 12 deletions(-)
 create mode 100644 meta/lib/oe/rust.py