public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "orbea" <orbea@riseup.net>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/files/, dev-lang/rust/
Date: Sat,  9 Nov 2024 17:02:07 +0000 (UTC)	[thread overview]
Message-ID: <1731166577.c9f1bd68d7319e6ff4bed0d9ad7557b8ec8371db.orbea@gentoo> (raw)

commit:     c9f1bd68d7319e6ff4bed0d9ad7557b8ec8371db
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sat Nov  9 15:36:17 2024 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Sat Nov  9 15:36:17 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=c9f1bd68

dev-lang/rust: sync ::gentoo

Signed-off-by: orbea <orbea <AT> riseup.net>

 dev-lang/rust/files/1.82.0-i586-baseline.patch | 44 ++++++++++++++++++++++++++
 dev-lang/rust/rust-1.82.0.ebuild               | 10 +++++-
 2 files changed, 53 insertions(+), 1 deletion(-)

diff --git a/dev-lang/rust/files/1.82.0-i586-baseline.patch b/dev-lang/rust/files/1.82.0-i586-baseline.patch
new file mode 100644
index 0000000..25c4a1a
--- /dev/null
+++ b/dev-lang/rust/files/1.82.0-i586-baseline.patch
@@ -0,0 +1,44 @@
+Bug: https://bugs.gentoo.org/741708
+From: Ian Jordan <immoloism@gmail.com>
+Date: Thu, 01 Nov 204 15:28:39 +0100
+Subject: Change Pentium4 baseline to i586
+
+Based on the Debian patch at https://sources.debian.org/patches/rustc/1.80.1%2Bdfsg1-1/behaviour/d-rustc-i686-baseline.patch/
+This lowers baseline from Pentium4 to i586.
+
+Thanks-to: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
+
+--- a/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs
++++ b/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs
+@@ -2,7 +2,7 @@ use crate::spec::{base, Cc, LinkerFlavor, Lld, SanitizerSet, StackProbeType, Tar
+ 
+ pub fn target() -> Target {
+     let mut base = base::linux_gnu::opts();
+-    base.cpu = "pentium4".into();
++    base.cpu = "pentiumpro".into();
+     base.max_atomic_width = Some(64);
+     base.supported_sanitizers = SanitizerSet::ADDRESS;
+     base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32"]);
+--- a/tests/ui/abi/homogenous-floats-target-feature-mixup.rs
++++ b/tests/ui/abi/homogenous-floats-target-feature-mixup.rs
+@@ -24,7 +24,8 @@ fn main() {
+     match std::env::var("TARGET") {
+         Ok(s) => {
+             // Skip this tests on i586-unknown-linux-gnu where sse2 is disabled
+-            if s.contains("i586") {
++            // Debian: our i686 doesn't have SSE 2..
++            if s.contains("i586") || s.contains("i686") {
+                 return
+             }
+         }
+--- a/tests/ui/sse2.rs
++++ b/tests/ui/sse2.rs
+@@ -16,7 +16,7 @@ fn main() {
+         }
+         Err(_) => return,
+     }
+-    if cfg!(any(target_arch = "x86", target_arch = "x86_64")) {
++    if cfg!(any(target_arch = "x86_64")) {
+         assert!(cfg!(target_feature = "sse2"),
+                 "SSE2 was not detected as available on an x86 platform");
+     }

diff --git a/dev-lang/rust/rust-1.82.0.ebuild b/dev-lang/rust/rust-1.82.0.ebuild
index 6f52248..bcdb8b6 100644
--- a/dev-lang/rust/rust-1.82.0.ebuild
+++ b/dev-lang/rust/rust-1.82.0.ebuild
@@ -129,7 +129,6 @@ REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
 	rust-analyzer? ( rust-src )
 	test? ( ${ALL_LLVM_TARGETS[*]} )
 	wasm? ( llvm_targets_WebAssembly )
-	x86? ( cpu_flags_x86_sse2 )
 "
 
 # we don't use cmake.eclass, but can get a warning
@@ -317,6 +316,15 @@ src_prepare() {
 	#	clear_vendor_checksums "${i}"
 	#done
 
+	# Rust baselines to Pentium4 on x86, this patch lowers the baseline to i586 when sse2 is not set.
+	if use x86; then
+		if ! use cpu_flags_x86_sse2; then
+			eapply "${FILESDIR}/1.82.0-i586-baseline.patch"
+			# Required for i586 support, commented out until ready for wider use.
+			#grep -rl cmd.args.push\(\"-march=i686\" . | xargs sed  -i 's/march=i686/-march=i586/g' || die
+		fi
+	fi
+
 	if ! use system-bootstrap; then
 		has_version sys-devel/gcc || esetup_unwind_hack
 		local rust_stage0_root="${WORKDIR}"/rust-stage0


             reply	other threads:[~2024-11-09 17:02 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-09 17:02 orbea [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-26  0:42 [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/files/, dev-lang/rust/ orbea
2025-02-26  0:42 orbea
2025-02-21 17:54 orbea
2025-02-06 18:44 orbea
2024-09-18 16:28 orbea
2024-07-05  2:04 orbea
2024-06-29  4:26 orbea
2024-06-02 21:17 orbea
2024-04-04 16:10 orbea
2024-02-12 23:16 orbea
2024-02-12 23:16 orbea
2024-02-12 23:16 orbea
2023-10-09 14:00 orbea
2023-07-24 19:34 orbea
2023-06-05  0:15 orbea
2023-03-28 18:51 Quentin Retornaz
2023-02-12  2:59 Quentin Retornaz
2023-01-31 23:14 Quentin Retornaz
2022-11-15 21:18 Quentin Retornaz
2022-11-15 21:18 Quentin Retornaz
2022-10-07 21:11 Quentin Retornaz
2022-09-29 22:58 Quentin Retornaz
2022-09-24 20:10 Quentin Retornaz
2022-06-02  1:44 Quentin Retornaz
2022-06-02  1:44 Quentin Retornaz
2022-03-19 22:15 Quentin Retornaz
2022-01-15 19:13 Quentin Retornaz
2021-12-25 23:59 Quentin Retornaz
2021-08-20 23:56 Quentin Retornaz
2021-06-27  0:33 Quentin Retornaz
2019-02-20 19:12 Stefan Strogin

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=1731166577.c9f1bd68d7319e6ff4bed0d9ad7557b8ec8371db.orbea@gentoo \
    --to=orbea@riseup.net \
    --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