summaryrefslogtreecommitdiffstats
path: root/debian/patches/d-rustc-i686-baseline.patch
blob: bc1e55d917ed6f8c6467cdbb20c473887485a9bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Date: Thu, 14 Jul 2022 13:17:39 +0200
Subject: d-rustc-i686-baseline

===================================================================
---
 compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: rust/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs
===================================================================
--- rust.orig/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs
+++ rust/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs
@@ -2,7 +2,7 @@ use crate::spec::{Cc, LinkerFlavor, Lld,
 
 pub fn target() -> Target {
     let mut base = super::linux_gnu_base::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"]);
Index: rust/tests/ui/sse2.rs
===================================================================
--- rust.orig/tests/ui/sse2.rs
+++ rust/tests/ui/sse2.rs
@@ -15,7 +15,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");
     }
Index: rust/tests/ui/abi/homogenous-floats-target-feature-mixup.rs
===================================================================
--- rust.orig/tests/ui/abi/homogenous-floats-target-feature-mixup.rs
+++ rust/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
             }
         }