89 lines
3.0 KiB
Diff
89 lines
3.0 KiB
Diff
From 88434b211f9e4219fe7b6d9adc737351091324cd Mon Sep 17 00:00:00 2001
|
|
From: Daniel Kolesa <daniel@octaforge.org>
|
|
Date: Fri, 5 Feb 2021 18:32:38 +0100
|
|
Subject: [PATCH] add support for tier 3 ppc targets
|
|
|
|
---
|
|
setup.py | 2 +-
|
|
src/target.rs | 18 ++++++++++++++++++
|
|
2 files changed, 19 insertions(+), 1 deletion(-)
|
|
|
|
diff --git setup.py setup.py
|
|
index 228267f..8fa1c1e 100644
|
|
--- setup.py
|
|
+++ setup.py
|
|
@@ -65,7 +65,7 @@ class PostInstallCommand(install):
|
|
|
|
cargo_args = [cargo, "rustc", "--bin", "maturin", "--message-format=json"]
|
|
|
|
- if platform.machine() in ("ppc64le", "ppc64", "powerpc"):
|
|
+ if platform.machine() in ("ppc64le", "ppc64", "powerpc", "ppcle", "ppc"):
|
|
cargo_args.extend(
|
|
["--no-default-features", "--features=upload,log,human-panic"]
|
|
)
|
|
diff --git src/target.rs src/target.rs
|
|
--- src/target.rs
|
|
+++ src/target.rs
|
|
@@ -41,6 +41,8 @@
|
|
Armv7L,
|
|
Powerpc64Le,
|
|
Powerpc64,
|
|
+ PowerpcLe,
|
|
+ Powerpc,
|
|
X86,
|
|
X86_64,
|
|
S390X,
|
|
@@ -53,6 +55,8 @@
|
|
Arch::Armv7L => write!(f, "armv7l"),
|
|
Arch::Powerpc64Le => write!(f, "ppc64le"),
|
|
Arch::Powerpc64 => write!(f, "ppc64"),
|
|
+ Arch::PowerpcLe => write!(f, "ppcle"),
|
|
+ Arch::Powerpc => write!(f, "ppc"),
|
|
Arch::X86 => write!(f, "i686"),
|
|
Arch::X86_64 => write!(f, "x86_64"),
|
|
Arch::S390X => write!(f, "s390x"),
|
|
@@ -68,6 +72,8 @@
|
|
Arch::Armv7L,
|
|
Arch::Powerpc64,
|
|
Arch::Powerpc64Le,
|
|
+ Arch::PowerpcLe,
|
|
+ Arch::Powerpc,
|
|
Arch::X86,
|
|
Arch::X86_64,
|
|
],
|
|
@@ -125,6 +131,16 @@
|
|
{
|
|
Arch::Powerpc64Le
|
|
}
|
|
+ platforms::target::Arch::POWERPC
|
|
+ if platform.target_triple.starts_with("powerpc-") =>
|
|
+ {
|
|
+ Arch::Powerpc
|
|
+ }
|
|
+ platforms::target::Arch::POWERPC
|
|
+ if platform.target_triple.starts_with("powerpcle-") =>
|
|
+ {
|
|
+ Arch::PowerpcLe
|
|
+ }
|
|
unsupported => bail!("The architecture {} is not supported", unsupported),
|
|
};
|
|
|
|
@@ -193,7 +209,7 @@
|
|
/// Returns the default Manylinux tag for this architecture
|
|
pub fn get_default_manylinux_tag(&self) -> Manylinux {
|
|
match self.arch {
|
|
- Arch::Aarch64 | Arch::Armv7L | Arch::Powerpc64 | Arch::Powerpc64Le | Arch::S390X => {
|
|
+ Arch::Aarch64 | Arch::Armv7L | Arch::Powerpc64 | Arch::Powerpc64Le | Arch::Powerpc | Arch::PowerpcLe | Arch::S390X => {
|
|
Manylinux::Manylinux2014
|
|
}
|
|
Arch::X86 | Arch::X86_64 => Manylinux::Manylinux2010,
|
|
@@ -207,6 +223,8 @@
|
|
Arch::Armv7L => 32,
|
|
Arch::Powerpc64 => 64,
|
|
Arch::Powerpc64Le => 64,
|
|
+ Arch::Powerpc => 32,
|
|
+ Arch::PowerpcLe => 32,
|
|
Arch::X86 => 32,
|
|
Arch::X86_64 => 64,
|
|
Arch::S390X => 64,
|