summaryrefslogtreecommitdiff
path: root/rustc-1.29.0.dyson.patch
blob: 87c8f6d083ea71cf9e98f41c7241477ce600cc2b (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
diff -Ndubr rustc-1.29.0-src/src/librustc_target/spec/mod.rs mrust/rustc-1.29.0-src/src/librustc_target/spec/mod.rs
--- rustc-1.29.0-src/src/librustc_target/spec/mod.rs	2018-09-11 05:37:38.000000000 +0200
+++ mrust/rustc-1.29.0-src/src/librustc_target/spec/mod.rs	2019-12-01 14:59:43.464760937 +0100
@@ -347,6 +347,7 @@

     ("armebv7r-none-eabihf", armebv7r_none_eabihf),

+    ("x86_64-pc-solaris2.11", x86_64_pc_solaris),
     ("x86_64-sun-solaris", x86_64_sun_solaris),
     ("sparcv9-sun-solaris", sparcv9_sun_solaris),

diff -Ndubr rustc-1.29.0-src/src/librustc_target/spec/x86_64_pc_solaris.rs mrust/rustc-1.29.0-src/src/librustc_target/spec/x86_64_pc_solaris.rs
--- rustc-1.29.0-src/src/librustc_target/spec/x86_64_pc_solaris.rs	1970-01-01 01:00:00.000000000 +0100
+++ mrust/rustc-1.29.0-src/src/librustc_target/spec/x86_64_pc_solaris.rs	2019-12-01 15:02:06.222678682 +0100
@@ -0,0 +1,33 @@
+// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use spec::{LinkerFlavor, Target, TargetResult};
+
+pub fn target() -> TargetResult {
+    let mut base = super::solaris_base::opts();
+    base.pre_link_args.insert(LinkerFlavor::Gcc, vec!["-m64".to_string()]);
+    base.cpu = "x86-64".to_string();
+    base.max_atomic_width = Some(64);
+    base.stack_probes = true;
+
+    Ok(Target {
+        llvm_target: "x86_64-pc-solaris".to_string(),
+        target_endian: "little".to_string(),
+        target_pointer_width: "64".to_string(),
+        target_c_int_width: "32".to_string(),
+        data_layout: "e-m:e-i64:64-f80:128-n8:16:32:64-S128".to_string(),
+        arch: "x86_64".to_string(),
+        target_os: "solaris".to_string(),
+        target_env: "gnu".to_string(),
+        target_vendor: "unknown".to_string(),
+        linker_flavor: LinkerFlavor::Gcc,
+        options: base,
+    })
+}
diff -Ndubr rustc-1.29.0-src/src/vendor/regex/build.rs mrust/rustc-1.29.0-src/src/vendor/regex/build.rs
--- rustc-1.29.0-src/src/vendor/regex/build.rs	2018-09-11 06:49:56.000000000 +0200
+++ mrust/rustc-1.29.0-src/src/vendor/regex/build.rs	2019-11-29 13:52:13.710194395 +0100
@@ -3,18 +3,10 @@
 use std::process::Command;

 fn main() {
-    let rustc = env::var_os("RUSTC").unwrap_or(OsString::from("rustc"));
-    let output = Command::new(&rustc)
-        .arg("--version")
-        .output()
-        .unwrap()
-        .stdout;
-    let version = String::from_utf8(output).unwrap();
-
-    enable_simd_optimizations(&version);
+    enable_simd_optimizations();
 }

-fn enable_simd_optimizations(version: &str) {
+fn enable_simd_optimizations() {
     // If we're using nightly Rust, then we can enable vector optimizations.
     // Note that these aren't actually activated unless the `unstable` feature
     // is enabled.
@@ -25,18 +17,8 @@
     if env::var_os("CARGO_CFG_REGEX_DISABLE_AUTO_OPTIMIZATIONS").is_some() {
         return;
     }
-    let parsed = match Version::parse(&version) {
-        Ok(parsed) => parsed,
-        Err(err) => {
-            eprintln!("failed to parse `rustc --version`: {}", err);
-            return;
-        }
-    };
-    let minimum = Version { major: 1, minor: 27, patch: 0 };
-    if version.contains("nightly") || parsed >= minimum {
         println!("cargo:rustc-cfg=regex_runtime_teddy_ssse3");
         println!("cargo:rustc-cfg=regex_runtime_teddy_avx2");
-    }
 }

 #[derive(Clone, Copy, Debug, Eq, PartialEq, PartialOrd, Ord)]