public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Georgy Yakovlev" <gyakovlev@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/, dev-lang/rust/files/
Date: Sun, 25 Sep 2022 06:37:47 +0000 (UTC)	[thread overview]
Message-ID: <1664087824.46a3260c72f0a4d918daa3f313f8e586f12475f4.gyakovlev@gentoo> (raw)

commit:     46a3260c72f0a4d918daa3f313f8e586f12475f4
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 25 06:11:45 2022 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sun Sep 25 06:37:04 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46a3260c

dev-lang/rust: fix 1.64.0 build on sparc

Issue: https://github.com/bytecodealliance/rustix/issues/408
Bug: https://bugs.gentoo.org/872725
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 ...64.0-vendor-rustix-sparc-has-no-SIGSTKFLT.patch | 60 ++++++++++++++++++++++
 dev-lang/rust/rust-1.64.0.ebuild                   | 11 ++++
 2 files changed, 71 insertions(+)

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
new file mode 100644
index 000000000000..5d685baac569
--- /dev/null
+++ b/dev-lang/rust/files/1.64.0-vendor-rustix-sparc-has-no-SIGSTKFLT.patch
@@ -0,0 +1,60 @@
+From 3fd653f3978e5ec2249c37eb08934bfe343e9198 Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Sat, 24 Sep 2022 23:09:38 -0700
+Subject: [PATCH] vendor/rustix: sparc has no SIGSTKFLT
+
+gyakovlev: removed checkum HUNK
+
+---
+ vendor/rustix/.cargo-checksum.json               | 2 +-
+ vendor/rustix/src/imp/libc/process/types.rs      | 4 ++++
+ vendor/rustix/src/imp/linux_raw/process/types.rs | 4 ++--
+ 3 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/vendor/rustix/src/imp/libc/process/types.rs b/vendor/rustix/src/imp/libc/process/types.rs
+index 60d629d..1278cee 100644
+--- a/vendor/rustix/src/imp/libc/process/types.rs
++++ b/vendor/rustix/src/imp/libc/process/types.rs
+@@ -197,6 +197,8 @@ pub enum Signal {
+         target_os = "macos",
+         target_os = "netbsd",
+         target_os = "openbsd",
++        target_arch = "sparc",
++        target_arch = "sparc64",
+         all(
+             any(target_os = "android", target_os = "linux"),
+             any(target_arch = "mips", target_arch = "mips64"),
+@@ -274,6 +276,8 @@ impl Signal {
+                 target_os = "macos",
+                 target_os = "netbsd",
+                 target_os = "openbsd",
++                target_arch = "sparc",
++                target_arch = "sparc64",
+                 all(
+                     any(target_os = "android", target_os = "linux"),
+                     any(target_arch = "mips", target_arch = "mips64"),
+diff --git a/vendor/rustix/src/imp/linux_raw/process/types.rs b/vendor/rustix/src/imp/linux_raw/process/types.rs
+index 53e2c7d..859a108 100644
+--- a/vendor/rustix/src/imp/linux_raw/process/types.rs
++++ b/vendor/rustix/src/imp/linux_raw/process/types.rs
+@@ -119,7 +119,7 @@ pub enum Signal {
+     /// `SIGTERM`
+     Term = linux_raw_sys::general::SIGTERM,
+     /// `SIGSTKFLT`
+-    #[cfg(not(any(target_arch = "mips", target_arch = "mips64")))]
++    #[cfg(not(any(target_arch = "mips", target_arch = "mips64", target_arch = "sparc", target_arch = "sparc64")))]
+     Stkflt = linux_raw_sys::general::SIGSTKFLT,
+     /// `SIGCHLD`
+     #[doc(alias = "Chld")]
+@@ -179,7 +179,7 @@ impl Signal {
+             linux_raw_sys::general::SIGPIPE => Some(Self::Pipe),
+             linux_raw_sys::general::SIGALRM => Some(Self::Alarm),
+             linux_raw_sys::general::SIGTERM => Some(Self::Term),
+-            #[cfg(not(any(target_arch = "mips", target_arch = "mips64")))]
++            #[cfg(not(any(target_arch = "mips", target_arch = "mips64", target_arch = "sparc", target_arch = "sparc64")))]
+             linux_raw_sys::general::SIGSTKFLT => Some(Self::Stkflt),
+             linux_raw_sys::general::SIGCHLD => Some(Self::Child),
+             linux_raw_sys::general::SIGCONT => Some(Self::Cont),
+-- 
+2.37.3
+

diff --git a/dev-lang/rust/rust-1.64.0.ebuild b/dev-lang/rust/rust-1.64.0.ebuild
index 0300d3cc4b10..9f7e86a87d56 100644
--- a/dev-lang/rust/rust-1.64.0.ebuild
+++ b/dev-lang/rust/rust-1.64.0.ebuild
@@ -163,6 +163,7 @@ VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
 PATCHES=(
 	"${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch
 	"${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
+	"${FILESDIR}"/${PV}-vendor-rustix-sparc-has-no-SIGSTKFLT.patch
 )
 
 S="${WORKDIR}/${MY_P}-src"
@@ -270,6 +271,16 @@ esetup_unwind_hack() {
 }
 
 src_prepare() {
+	# this supidity is needed because patch is too large to be in filesdir
+	# and if we move it to devspace - it lacks checksum for sig verification
+	if [[ "${PV}" == 1.64.0 ]]; then
+			sed -i \
+			-e 's/516ba32a547b46a8e80ad20d4a17bf24a00bff0b69b74f56df119f770f3dfff6/fc7eb88c2f5104865379128b76767d36ce5b5fdb9f3483e683d150e514ebc3a3/' \
+			-e 's/fba10dc8ca9eaf4d481cb82bd1540cf5c05620533c44f917c09a22ea55ef408c/9cc4d1b4511a1f0d91231eb0f11c67ae5e8e38e4becd0bf5eb9e26d043796056/' \
+			vendor/rustix/.cargo-checksum.json || die
+	else
+		die "remove sed mr forgetful maintainer"
+	fi
 	if ! use system-bootstrap; then
 		has_version sys-devel/gcc || esetup_unwind_hack
 		local rust_stage0_root="${WORKDIR}"/rust-stage0


             reply	other threads:[~2022-09-25  6:37 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-25  6:37 Georgy Yakovlev [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-04-23 11:37 [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/, dev-lang/rust/files/ Matt Jolly
2024-12-08  7:04 Sam James
2024-11-03  6:06 Matt Jolly
2024-07-04  1:15 Sam James
2024-05-31 21:03 Sam James
2024-03-09  2:56 WANG Xuerui
2024-02-10  7:49 Sam James
2024-02-10  4:49 Sam James
2024-01-31 13:56 Matt Turner
2023-07-20  9:49 WANG Xuerui
2023-06-20 19:51 Georgy Yakovlev
2023-06-02  3:06 Georgy Yakovlev
2023-03-21  0:10 Georgy Yakovlev
2023-02-08 22:36 Georgy Yakovlev
2023-01-28 19:34 Georgy Yakovlev
2022-12-20  7:12 Georgy Yakovlev
2022-11-05  5:57 Georgy Yakovlev
2022-09-13 22:59 Georgy Yakovlev
2022-05-26 16:36 Georgy Yakovlev
2022-05-25 21:09 Georgy Yakovlev
2022-05-24 19:44 Georgy Yakovlev
2022-01-29 17:07 Georgy Yakovlev
2021-12-26  8:58 Georgy Yakovlev
2021-09-13 15:07 Georgy Yakovlev
2021-07-03  7:03 Georgy Yakovlev
2021-06-18  5:26 Georgy Yakovlev
2021-05-05 20:16 Georgy Yakovlev
2021-04-27 11:55 Georgy Yakovlev
2021-04-18 10:30 Georgy Yakovlev
2021-02-05 19:31 Georgy Yakovlev
2021-02-02 23:52 Georgy Yakovlev
2020-10-12  5:14 Georgy Yakovlev
2020-10-09  6:24 Georgy Yakovlev
2020-07-31  9:34 Georgy Yakovlev
2020-04-25  6:13 Georgy Yakovlev
2020-03-30 22:23 Georgy Yakovlev
2020-02-05  9:01 Georgy Yakovlev
2019-12-30  9:59 Georgy Yakovlev
2019-12-20  0:53 Georgy Yakovlev
2019-12-20  0:53 Georgy Yakovlev
2019-10-02 18:42 Georgy Yakovlev
2019-08-16  5:45 Georgy Yakovlev
2019-07-09 16:49 Georgy Yakovlev
2019-07-08 23:01 Georgy Yakovlev
2019-04-12  5:08 Georgy Yakovlev
2019-02-19  1:24 Thomas Deutschmann
2019-02-01  4:36 Georgy Yakovlev
2019-01-26  3:50 Georgy Yakovlev
2019-01-19 20:28 Thomas Deutschmann
2018-11-14 16:16 Dirkjan Ochtman
2018-05-14 14:41 Dirkjan Ochtman
2018-01-27 13:24 Dirkjan Ochtman
2016-11-08 18:44 Doug Goldstein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1664087824.46a3260c72f0a4d918daa3f313f8e586f12475f4.gyakovlev@gentoo \
    --to=gyakovlev@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox