void-packages/srcpkgs/maturin/patches/platforms-add-ppc-tier3.patch

117 lines
5.7 KiB
Diff

From 27a70f351da0289119f39964a3c661ae05a24856 Mon Sep 17 00:00:00 2001
From: Daniel Kolesa <daniel@octaforge.org>
Date: Fri, 5 Feb 2021 18:46:51 +0100
Subject: [PATCH] add ppc*-musl and ppcle support into platform crate
---
platforms/README.md | 10 ++++++++
platforms/src/platform.rs | 5 ++++
platforms/src/platform/tier3.rs | 45 +++++++++++++++++++++++++++++++++
3 files changed, 60 insertions(+)
diff --git platforms/README.md platforms/README.md
index a8a7fba..5038fed 100644
--- platforms/README.md
+++ platforms/README.md
@@ -117,6 +117,11 @@ accompanied by a minor version bump.
| [mips-unknown-linux-uclibc] | mips | linux | uclibc |
| [mipsel-unknown-linux-uclibc] | mips | linux | uclibc |
| [msp430-none-elf] | msp430 | unknown | "" |
+| [powerpc-unknown-linux-musl] | powerpc | linux | musl |
+| [powerpcle-unknown-linux-gnu] | powerpc | linux | gnu |
+| [powerpcle-unknown-linux-musl] | powerpc | linux | musl |
+| [powerpc64-unknown-linux-musl] | powerpc64 | linux | musl |
+| [powerpc64le-unknown-linux-musl] | powerpc64 | linux | musl |
| [sparc64-unknown-netbsd] | sparc64 | netbsd | "" |
| [thumbv6m-none-eabi] | thumbv6 | unknown | "" |
| [thumbv7em-none-eabi] | thumbv7 | unknown | "" |
@@ -206,8 +211,13 @@ additional terms or conditions.
[mipsel-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/tier2/constant.MIPSEL_UNKNOWN_LINUX_GNU.html
[mipsel-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/tier2/constant.MIPSEL_UNKNOWN_LINUX_MUSL.html
[powerpc-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/tier2/constant.POWERPC_UNKNOWN_LINUX_GNU.html
+[powerpc-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/tier3/constant.POWERPC_UNKNOWN_LINUX_MUSL.html
+[powerpcle-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/tier3/constant.POWERPCLE_UNKNOWN_LINUX_GNU.html
+[powerpcle-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/tier3/constant.POWERPCLE_UNKNOWN_LINUX_MUSL.html
[powerpc64-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/tier2/constant.POWERPC64_UNKNOWN_LINUX_GNU.html
+[powerpc64-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/tier3/constant.POWERPC64_UNKNOWN_LINUX_MUSL.html
[powerpc64le-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/tier2/constant.POWERPC64LE_UNKNOWN_LINUX_GNU.html
+[powerpc64le-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/tier3/constant.POWERPC64LE_UNKNOWN_LINUX_MUSL.html
[s390x-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/tier2/constant.S390X_UNKNOWN_LINUX_GNU.html
[sparc64-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/tier2/constant.SPARC64_UNKNOWN_LINUX_GNU.html
[sparcv9-sun-solaris]: https://docs.rs/platforms/latest/platforms/platform/tier2/constant.SPARCV9_SUN_SOLARIS.html
diff --git platforms/src/platform.rs platforms/src/platform.rs
index 8b1f049..30c0516 100644
--- platforms/src/platform.rs
+++ platforms/src/platform.rs
@@ -142,6 +142,11 @@ impl Platform {
tier3::MIPS_UNKNOWN_LINUX_UCLIBC,
tier3::MIPSEL_UNKNOWN_LINUX_UCLIBC,
tier3::MSP430_NONE_ELF,
+ tier3::POWERPC_UNKNOWN_LINUX_MUSL,
+ tier3::POWERPCLE_UNKNOWN_LINUX_GNU,
+ tier3::POWERPCLE_UNKNOWN_LINUX_MUSL,
+ tier3::POWERPC64_UNKNOWN_LINUX_MUSL,
+ tier3::POWERPC64LE_UNKNOWN_LINUX_MUSL,
tier3::SPARC64_UNKNOWN_NETBSD,
tier3::THUMBV6M_NONE_EABI,
tier3::THUMBV7EM_NONE_EABI,
diff --git platforms/src/platform/tier3.rs platforms/src/platform/tier3.rs
index 519db6a..32ba2f7 100644
--- platforms/src/platform/tier3.rs
+++ platforms/src/platform/tier3.rs
@@ -56,6 +56,51 @@ pub const MSP430_NONE_ELF: Platform = Platform {
tier: Tier::Three,
};
+/// `powerpc-unknown-linux-musl`: PowerPC Linux with MUSL
+pub const POWERPC_UNKNOWN_LINUX_MUSL: Platform = Platform {
+ target_triple: "powerpc-unknown-linux-musl",
+ target_arch: Arch::POWERPC,
+ target_os: OS::Linux,
+ target_env: Some(Env::Musl),
+ tier: Tier::Three,
+};
+
+/// `powerpcle-unknown-linux-gnu`: PowerPCLE Linux
+pub const POWERPCLE_UNKNOWN_LINUX_GNU: Platform = Platform {
+ target_triple: "powerpcle-unknown-linux-gnu",
+ target_arch: Arch::POWERPC,
+ target_os: OS::Linux,
+ target_env: Some(Env::GNU),
+ tier: Tier::Three,
+};
+
+/// `powerpcle-unknown-linux-musl`: PowerPCLE Linux with MUSL
+pub const POWERPCLE_UNKNOWN_LINUX_MUSL: Platform = Platform {
+ target_triple: "powerpcle-unknown-linux-musl",
+ target_arch: Arch::POWERPC,
+ target_os: OS::Linux,
+ target_env: Some(Env::Musl),
+ tier: Tier::Three,
+};
+
+/// `powerpc64-unknown-linux-musl`: PPC64 Linux with MUSL
+pub const POWERPC64_UNKNOWN_LINUX_MUSL: Platform = Platform {
+ target_triple: "powerpc64-unknown-linux-musl",
+ target_arch: Arch::POWERPC64,
+ target_os: OS::Linux,
+ target_env: Some(Env::Musl),
+ tier: Tier::Three,
+};
+
+/// `powerpc64le-unknown-linux-musl`: PPC64LE Linux with MUSL
+pub const POWERPC64LE_UNKNOWN_LINUX_MUSL: Platform = Platform {
+ target_triple: "powerpc64le-unknown-linux-musl",
+ target_arch: Arch::POWERPC64,
+ target_os: OS::Linux,
+ target_env: Some(Env::Musl),
+ tier: Tier::Three,
+};
+
/// `sparc64-unknown-netbsd`: NetBSD/sparc64
pub const SPARC64_UNKNOWN_NETBSD: Platform = Platform {
target_triple: "sparc64-unknown-netbsd",
--
2.30.0