1 |
commit: 46a3260c72f0a4d918daa3f313f8e586f12475f4 |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 25 06:11:45 2022 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 25 06:37:04 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46a3260c |
7 |
|
8 |
dev-lang/rust: fix 1.64.0 build on sparc |
9 |
|
10 |
Issue: https://github.com/bytecodealliance/rustix/issues/408 |
11 |
Bug: https://bugs.gentoo.org/872725 |
12 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
13 |
|
14 |
...64.0-vendor-rustix-sparc-has-no-SIGSTKFLT.patch | 60 ++++++++++++++++++++++ |
15 |
dev-lang/rust/rust-1.64.0.ebuild | 11 ++++ |
16 |
2 files changed, 71 insertions(+) |
17 |
|
18 |
diff --git a/dev-lang/rust/files/1.64.0-vendor-rustix-sparc-has-no-SIGSTKFLT.patch b/dev-lang/rust/files/1.64.0-vendor-rustix-sparc-has-no-SIGSTKFLT.patch |
19 |
new file mode 100644 |
20 |
index 000000000000..5d685baac569 |
21 |
--- /dev/null |
22 |
+++ b/dev-lang/rust/files/1.64.0-vendor-rustix-sparc-has-no-SIGSTKFLT.patch |
23 |
@@ -0,0 +1,60 @@ |
24 |
+From 3fd653f3978e5ec2249c37eb08934bfe343e9198 Mon Sep 17 00:00:00 2001 |
25 |
+From: Georgy Yakovlev <gyakovlev@g.o> |
26 |
+Date: Sat, 24 Sep 2022 23:09:38 -0700 |
27 |
+Subject: [PATCH] vendor/rustix: sparc has no SIGSTKFLT |
28 |
+ |
29 |
+gyakovlev: removed checkum HUNK |
30 |
+ |
31 |
+--- |
32 |
+ vendor/rustix/.cargo-checksum.json | 2 +- |
33 |
+ vendor/rustix/src/imp/libc/process/types.rs | 4 ++++ |
34 |
+ vendor/rustix/src/imp/linux_raw/process/types.rs | 4 ++-- |
35 |
+ 3 files changed, 7 insertions(+), 3 deletions(-) |
36 |
+ |
37 |
+diff --git a/vendor/rustix/src/imp/libc/process/types.rs b/vendor/rustix/src/imp/libc/process/types.rs |
38 |
+index 60d629d..1278cee 100644 |
39 |
+--- a/vendor/rustix/src/imp/libc/process/types.rs |
40 |
++++ b/vendor/rustix/src/imp/libc/process/types.rs |
41 |
+@@ -197,6 +197,8 @@ pub enum Signal { |
42 |
+ target_os = "macos", |
43 |
+ target_os = "netbsd", |
44 |
+ target_os = "openbsd", |
45 |
++ target_arch = "sparc", |
46 |
++ target_arch = "sparc64", |
47 |
+ all( |
48 |
+ any(target_os = "android", target_os = "linux"), |
49 |
+ any(target_arch = "mips", target_arch = "mips64"), |
50 |
+@@ -274,6 +276,8 @@ impl Signal { |
51 |
+ target_os = "macos", |
52 |
+ target_os = "netbsd", |
53 |
+ target_os = "openbsd", |
54 |
++ target_arch = "sparc", |
55 |
++ target_arch = "sparc64", |
56 |
+ all( |
57 |
+ any(target_os = "android", target_os = "linux"), |
58 |
+ any(target_arch = "mips", target_arch = "mips64"), |
59 |
+diff --git a/vendor/rustix/src/imp/linux_raw/process/types.rs b/vendor/rustix/src/imp/linux_raw/process/types.rs |
60 |
+index 53e2c7d..859a108 100644 |
61 |
+--- a/vendor/rustix/src/imp/linux_raw/process/types.rs |
62 |
++++ b/vendor/rustix/src/imp/linux_raw/process/types.rs |
63 |
+@@ -119,7 +119,7 @@ pub enum Signal { |
64 |
+ /// `SIGTERM` |
65 |
+ Term = linux_raw_sys::general::SIGTERM, |
66 |
+ /// `SIGSTKFLT` |
67 |
+- #[cfg(not(any(target_arch = "mips", target_arch = "mips64")))] |
68 |
++ #[cfg(not(any(target_arch = "mips", target_arch = "mips64", target_arch = "sparc", target_arch = "sparc64")))] |
69 |
+ Stkflt = linux_raw_sys::general::SIGSTKFLT, |
70 |
+ /// `SIGCHLD` |
71 |
+ #[doc(alias = "Chld")] |
72 |
+@@ -179,7 +179,7 @@ impl Signal { |
73 |
+ linux_raw_sys::general::SIGPIPE => Some(Self::Pipe), |
74 |
+ linux_raw_sys::general::SIGALRM => Some(Self::Alarm), |
75 |
+ linux_raw_sys::general::SIGTERM => Some(Self::Term), |
76 |
+- #[cfg(not(any(target_arch = "mips", target_arch = "mips64")))] |
77 |
++ #[cfg(not(any(target_arch = "mips", target_arch = "mips64", target_arch = "sparc", target_arch = "sparc64")))] |
78 |
+ linux_raw_sys::general::SIGSTKFLT => Some(Self::Stkflt), |
79 |
+ linux_raw_sys::general::SIGCHLD => Some(Self::Child), |
80 |
+ linux_raw_sys::general::SIGCONT => Some(Self::Cont), |
81 |
+-- |
82 |
+2.37.3 |
83 |
+ |
84 |
|
85 |
diff --git a/dev-lang/rust/rust-1.64.0.ebuild b/dev-lang/rust/rust-1.64.0.ebuild |
86 |
index 0300d3cc4b10..9f7e86a87d56 100644 |
87 |
--- a/dev-lang/rust/rust-1.64.0.ebuild |
88 |
+++ b/dev-lang/rust/rust-1.64.0.ebuild |
89 |
@@ -163,6 +163,7 @@ VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc |
90 |
PATCHES=( |
91 |
"${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch |
92 |
"${FILESDIR}"/1.62.1-musl-dynamic-linking.patch |
93 |
+ "${FILESDIR}"/${PV}-vendor-rustix-sparc-has-no-SIGSTKFLT.patch |
94 |
) |
95 |
|
96 |
S="${WORKDIR}/${MY_P}-src" |
97 |
@@ -270,6 +271,16 @@ esetup_unwind_hack() { |
98 |
} |
99 |
|
100 |
src_prepare() { |
101 |
+ # this supidity is needed because patch is too large to be in filesdir |
102 |
+ # and if we move it to devspace - it lacks checksum for sig verification |
103 |
+ if [[ "${PV}" == 1.64.0 ]]; then |
104 |
+ sed -i \ |
105 |
+ -e 's/516ba32a547b46a8e80ad20d4a17bf24a00bff0b69b74f56df119f770f3dfff6/fc7eb88c2f5104865379128b76767d36ce5b5fdb9f3483e683d150e514ebc3a3/' \ |
106 |
+ -e 's/fba10dc8ca9eaf4d481cb82bd1540cf5c05620533c44f917c09a22ea55ef408c/9cc4d1b4511a1f0d91231eb0f11c67ae5e8e38e4becd0bf5eb9e26d043796056/' \ |
107 |
+ vendor/rustix/.cargo-checksum.json || die |
108 |
+ else |
109 |
+ die "remove sed mr forgetful maintainer" |
110 |
+ fi |
111 |
if ! use system-bootstrap; then |
112 |
has_version sys-devel/gcc || esetup_unwind_hack |
113 |
local rust_stage0_root="${WORKDIR}"/rust-stage0 |