[RFC,0/8] rust: Fix powerpc64le support

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

Message

Andrew Jeffery Feb. 22, 2022, 3:52 a.m. UTC
Hello,

This series was motivated by some CI failures we saw in OpenBMC on our
ppc64le build machines, driven by the python3-cryptography dependency of
the tpm2-pkcs11 package, pulled in via packagegroup-security-tpm2.

I previously sent an initial, wildly insufficient attempt that fixed the
immediate error of using a bad architecture name in the snapshot
download URLs:

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

Khem was on the money with his query, and pulling that thread led
to this unwieldy series. Together these patches (plus another for
meta-openembedded to fix CARGO_BUILD_TARGET) result in a successful
`bitbake python3-cryptography` targetting an ARMv7 machine (an ASPEED
AST2600 BMC SoC) on ppc64le and x86-64.

Please treat the patches with suspicion, I really just slashed my way
through it all until the build didn't fail, then tried to clean the
result up into a series that might be reviewable. Hence RFC.

Anyway, please take a look!

Andrew

Andrew Jeffery (8):
  rust: Migrate arch_to_rust_target_arch() to rust-common class
  rust: Rename arch_to_rust_target_arch() for generality
  rust: Handle Power arch variants in arch_to_rust_arch()
  rust: Consistently use RUST_{BUILD,HOST,TARGET}_{ARCH,SYS}
  rust: libstd-rs: Install deps under {RUST_,}TARGET_SYS mismatch
  rust: Mitigate duplicate sections on matching architectures
  rust: Add snapshot checksums for powerpc64le
  rust: Introduce RUST_BUILD_ARCH

 meta/classes/cargo.bbclass                    |  4 +-
 meta/classes/cargo_common.bbclass             |  6 +--
 meta/classes/rust-common.bbclass              | 23 ++++++++++-
 meta/classes/rust.bbclass                     |  8 ++--
 meta/recipes-devtools/rust/libstd-rs.inc      | 12 +++++-
 meta/recipes-devtools/rust/rust-common.inc    | 29 ++++----------
 .../rust/rust-cross-canadian-common.inc       |  6 +--
 .../rust/rust-cross-canadian.inc              | 23 +++++------
 meta/recipes-devtools/rust/rust-cross.inc     |  2 +-
 meta/recipes-devtools/rust/rust-snapshot.inc  | 16 +++++---
 meta/recipes-devtools/rust/rust.inc           | 38 ++++++++++---------
 11 files changed, 96 insertions(+), 71 deletions(-)