[v2] python3-pyruvate: disable 64 bit atomics for mips

Message ID 20220118185651.580658-1-tim.orling@konsulko.com
State New
Headers show
Series [v2] python3-pyruvate: disable 64 bit atomics for mips | expand

Commit Message

Tim Orling Jan. 18, 2022, 6:56 p.m. UTC
Use the same approach as librsvg to disable 64-bit atomics on platforms
which have 32-bit pointers or are otherwise not supported.

https://github.com/crossbeam-rs/crossbeam/blob/master/no_atomic.rs

https://doc.rust-lang.org/std/sync/atomic/#portability
"PowerPC and MIPS platforms with 32-bit pointers do not have AtomicU64
or AtomicI64 types."

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---

Changes in v2:
  - add the rest of the fixes from librsvg... mipsel, riscv32 et al

 .../recipes-devtools/python/python3-pyruvate_1.1.2.bb     | 8 ++++++++
 1 file changed, 8 insertions(+)

Patch

diff --git a/meta-python/recipes-devtools/python/python3-pyruvate_1.1.2.bb b/meta-python/recipes-devtools/python/python3-pyruvate_1.1.2.bb
index 835cf9a93d..dad18b78c2 100644
--- a/meta-python/recipes-devtools/python/python3-pyruvate_1.1.2.bb
+++ b/meta-python/recipes-devtools/python/python3-pyruvate_1.1.2.bb
@@ -14,6 +14,14 @@  S = "${WORKDIR}/pyruvate-${PV}"
 
 inherit pypi setuptools3_rust
 
+# crossbeam-* -> std::sync::atomic AtomicI64, AtomicU64
+# not supported on mips/powerpc with 32-bit pointers
+# https://doc.rust-lang.org/std/sync/atomic/#portability
+RUSTFLAGS:append:mips = " --cfg crossbeam_no_atomic_64"
+RUSTFLAGS:append:mipsel = " --cfg crossbeam_no_atomic_64"
+RUSTFLAGS:append:powerpc = " --cfg crossbeam_no_atomic_64"
+RUSTFLAGS:append:riscv32 = " --cfg crossbeam_no_atomic_64"
+
 SRC_URI += " \
     crate://crates.io/aho-corasick/0.7.18 \
     crate://crates.io/atty/0.2.14 \