summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-02-27 11:52:02 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-29 10:26:13 +0000
commit78264a5c06492a1c52e3529b75e8d8cf28cac285 (patch)
treed2a054e2d366899714860bcf556fd868b527c3bd /meta/recipes-devtools
parente5e6d6fe9a12318c12c5ece5e9efecaf24969a85 (diff)
downloadpoky-78264a5c06492a1c52e3529b75e8d8cf28cac285.tar.gz
python3-maturin: Recognise riscv32 architecture
(From OE-Core rev: 728784e4df700af86d0f848142b0085813e49090) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/python/python3-maturin/0001-Add-32-bit-RISC-V-support.patch102
-rw-r--r--meta/recipes-devtools/python/python3-maturin_1.4.0.bb1
2 files changed, 103 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3-maturin/0001-Add-32-bit-RISC-V-support.patch b/meta/recipes-devtools/python/python3-maturin/0001-Add-32-bit-RISC-V-support.patch
new file mode 100644
index 0000000000..a0ef0c9e22
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-maturin/0001-Add-32-bit-RISC-V-support.patch
@@ -0,0 +1,102 @@
1From a945706bd610c5400fc85a248d5e0c96ebd2e953 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 27 Feb 2024 10:38:49 -0800
4Subject: [PATCH] Add 32-bit RISC-V support
5
6Tested with qemuriscv32 and it builds fine with all tests passed on a
7qemu machine.
8
9Upstream-Status: Submitted [https://github.com/PyO3/maturin/pull/1969]
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 src/target.rs | 11 ++++++++++-
13 1 file changed, 10 insertions(+), 1 deletion(-)
14
15diff --git a/src/target.rs b/src/target.rs
16index fbb93531..33fa9273 100644
17--- a/src/target.rs
18+++ b/src/target.rs
19@@ -69,6 +69,7 @@ pub enum Arch {
20 X86_64,
21 S390X,
22 Wasm32,
23+ Riscv32,
24 Riscv64,
25 Mips64el,
26 Mips64,
27@@ -91,6 +92,7 @@ impl fmt::Display for Arch {
28 Arch::X86_64 => write!(f, "x86_64"),
29 Arch::S390X => write!(f, "s390x"),
30 Arch::Wasm32 => write!(f, "wasm32"),
31+ Arch::Riscv32 => write!(f, "riscv32"),
32 Arch::Riscv64 => write!(f, "riscv64"),
33 Arch::Mips64el => write!(f, "mips64el"),
34 Arch::Mips64 => write!(f, "mips64"),
35@@ -115,7 +117,7 @@ impl Arch {
36 Arch::Powerpc | Arch::Powerpc64Le | Arch::Powerpc64 => "powerpc",
37 Arch::X86 => "i386",
38 Arch::X86_64 => "amd64",
39- Arch::Riscv64 => "riscv",
40+ Arch::Riscv32 | Arch::Riscv64 => "riscv",
41 Arch::Mips64el | Arch::Mips64 | Arch::Mipsel | Arch::Mips => "mips",
42 // sparc64 is unsupported since FreeBSD 13.0
43 Arch::Sparc64 => "sparc64",
44@@ -139,6 +141,7 @@ fn get_supported_architectures(os: &Os) -> Vec<Arch> {
45 Arch::S390X,
46 Arch::X86,
47 Arch::X86_64,
48+ Arch::Riscv32,
49 Arch::Riscv64,
50 Arch::Mips64el,
51 Arch::Mips64,
52@@ -158,6 +161,7 @@ fn get_supported_architectures(os: &Os) -> Vec<Arch> {
53 Arch::Powerpc64Le,
54 Arch::X86,
55 Arch::X86_64,
56+ Arch::Riscv32,
57 Arch::Riscv64,
58 Arch::Mips64el,
59 Arch::Mipsel,
60@@ -171,6 +175,7 @@ fn get_supported_architectures(os: &Os) -> Vec<Arch> {
61 Arch::Powerpc,
62 Arch::Powerpc64,
63 Arch::Powerpc64Le,
64+ Arch::Riscv32,
65 Arch::Riscv64,
66 Arch::Sparc64,
67 ],
68@@ -255,6 +260,7 @@ impl Target {
69 Architecture::Powerpc64le => Arch::Powerpc64Le,
70 Architecture::S390x => Arch::S390X,
71 Architecture::Wasm32 => Arch::Wasm32,
72+ Architecture::Riscv32(_) => Arch::Riscv32,
73 Architecture::Riscv64(_) => Arch::Riscv64,
74 Architecture::Mips64(mips64_arch) => match mips64_arch {
75 Mips64Architecture::Mips64el => Arch::Mips64el,
76@@ -343,6 +349,7 @@ impl Target {
77 Arch::X86_64 => "x86_64",
78 Arch::S390X => "s390x",
79 Arch::Wasm32 => "wasm32",
80+ Arch::Riscv32 => "riscv32",
81 Arch::Riscv64 => "riscv64",
82 // It's kinda surprising that Python doesn't include the `el` suffix
83 Arch::Mips64el | Arch::Mips64 => "mips64",
84@@ -388,6 +395,7 @@ impl Target {
85 }
86 Arch::Armv6L
87 | Arch::Wasm32
88+ | Arch::Riscv32
89 | Arch::Riscv64
90 | Arch::Mips64el
91 | Arch::Mips64
92@@ -418,6 +426,7 @@ impl Target {
93 | Arch::Wasm32
94 | Arch::Mipsel
95 | Arch::Mips
96+ | Arch::Riscv32
97 | Arch::Powerpc => 32,
98 }
99 }
100--
1012.44.0
102
diff --git a/meta/recipes-devtools/python/python3-maturin_1.4.0.bb b/meta/recipes-devtools/python/python3-maturin_1.4.0.bb
index 82e65abb24..ed19ee647a 100644
--- a/meta/recipes-devtools/python/python3-maturin_1.4.0.bb
+++ b/meta/recipes-devtools/python/python3-maturin_1.4.0.bb
@@ -5,6 +5,7 @@ LICENSE = "MIT | Apache-2.0"
5LIC_FILES_CHKSUM = "file://license-apache;md5=1836efb2eb779966696f473ee8540542 \ 5LIC_FILES_CHKSUM = "file://license-apache;md5=1836efb2eb779966696f473ee8540542 \
6 file://license-mit;md5=85fd3b67069cff784d98ebfc7d5c0797" 6 file://license-mit;md5=85fd3b67069cff784d98ebfc7d5c0797"
7 7
8SRC_URI += "file://0001-Add-32-bit-RISC-V-support.patch"
8SRC_URI[sha256sum] = "ed12e1768094a7adeafc3a74ebdb8dc2201fa64c4e7e31f14cfc70378bf93790" 9SRC_URI[sha256sum] = "ed12e1768094a7adeafc3a74ebdb8dc2201fa64c4e7e31f14cfc70378bf93790"
9 10
10S = "${WORKDIR}/maturin-${PV}" 11S = "${WORKDIR}/maturin-${PV}"