Skip to contentSkip to conversation

python3-pyruvate: disable 64 bit atomics for mips

PATCH Superseded Tim Orling 1 participant 1 message Jan 18, 2022

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Tim Orling

author
#0 lore raw

PATCH 1/1 python3-pyruvate: disable 64 bit atomics for mips

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."

---
 .../recipes-devtools/python/python3-pyruvate_1.1.2.bb       | 6 ++++++
 1 file changed, 6 insertions(+)
meta-python/recipes-devtools/python/python3-pyruvate_1.1.2.bb +6 -0
index 835cf9a93d..25e1e68a56 100644
@@ -14,6 +14,12 @@ S = "${WORKDIR}/pyruvate-${PV}"
 
 inherit pypi setuptools3_rust
 
+# crossbeam-util -> 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:powerpc = " --cfg crossbeam_no_atomic_64"
+
 SRC_URI += " \
     crate://crates.io/aho-corasick/0.7.18 \
     crate://crates.io/atty/0.2.14 \
Signature · 1 line
2.30.2