rust: update to 1.41.0
This commit is contained in:
parent
83181212ed
commit
3958b5437b
20 changed files with 104 additions and 256 deletions
|
@ -1,17 +1,17 @@
|
|||
From d2d990a812ef31f34c84325d33b0e42e900c8ebe Mon Sep 17 00:00:00 2001
|
||||
From b10e30c5f8a71f0efd871d0e5114f44d04a879fe Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Fri, 8 Sep 2017 00:04:29 -0500
|
||||
Subject: [PATCH 01/18] Fix LLVM build
|
||||
Subject: [PATCH 01/16] Fix LLVM build
|
||||
|
||||
---
|
||||
src/bootstrap/lib.rs | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
|
||||
index 39d7ea92..39cb804c 100644
|
||||
index 080bef68..e9b7976d 100644
|
||||
--- a/src/bootstrap/lib.rs
|
||||
+++ b/src/bootstrap/lib.rs
|
||||
@@ -750,7 +750,8 @@ impl Build {
|
||||
@@ -752,7 +752,8 @@ impl Build {
|
||||
// cc-rs because the build scripts will determine that for themselves.
|
||||
let mut base = self.cc[&target].args().iter()
|
||||
.map(|s| s.to_string_lossy().into_owned())
|
||||
|
@ -22,5 +22,5 @@ index 39d7ea92..39cb804c 100644
|
|||
|
||||
// If we're compiling on macOS then we add a few unconditional flags
|
||||
--
|
||||
2.24.0
|
||||
2.25.0
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From 027f5cc36df353efa443739b2827b45555b5ed23 Mon Sep 17 00:00:00 2001
|
||||
From c4c6747beb14cc96e7ce9d88018cef42533155df Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Sat, 2 Dec 2017 17:25:44 -0600
|
||||
Subject: [PATCH 02/18] Allow rustdoc to work when cross-compiling on musl
|
||||
Subject: [PATCH 02/16] Allow rustdoc to work when cross-compiling on musl
|
||||
|
||||
musl can't handle foreign-architecture libraries in LD_LIBRARY_PATH.
|
||||
---
|
||||
|
@ -9,7 +9,7 @@ musl can't handle foreign-architecture libraries in LD_LIBRARY_PATH.
|
|||
1 file changed, 2 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
|
||||
index a13ff69a..471b60f5 100644
|
||||
index 6937fb92..ce787609 100644
|
||||
--- a/src/bootstrap/bin/rustdoc.rs
|
||||
+++ b/src/bootstrap/bin/rustdoc.rs
|
||||
@@ -22,9 +22,6 @@ fn main() {
|
||||
|
@ -19,7 +19,7 @@ index a13ff69a..471b60f5 100644
|
|||
- let mut dylib_path = bootstrap::util::dylib_path();
|
||||
- dylib_path.insert(0, PathBuf::from(libdir.clone()));
|
||||
-
|
||||
//FIXME(misdreavus): once stdsimd uses cfg(rustdoc) instead of cfg(dox), remove the `--cfg dox`
|
||||
//FIXME(misdreavus): once stdsimd uses cfg(doc) instead of cfg(dox), remove the `--cfg dox`
|
||||
//arguments here
|
||||
let mut cmd = Command::new(rustdoc);
|
||||
@@ -36,7 +33,7 @@ fn main() {
|
||||
|
@ -41,5 +41,5 @@ index a13ff69a..471b60f5 100644
|
|||
);
|
||||
eprintln!("sysroot: {:?}", sysroot);
|
||||
--
|
||||
2.24.0
|
||||
2.25.0
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From df589c69c091b7a4900463a3c4db3b8d4b3c43f0 Mon Sep 17 00:00:00 2001
|
||||
From 33aff948106db1150cc7c1f457e74c4dbf95f74a Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Fri, 8 Sep 2017 00:05:18 -0500
|
||||
Subject: [PATCH 03/18] Require static native libraries when linking static
|
||||
Subject: [PATCH 03/16] Require static native libraries when linking static
|
||||
executables
|
||||
|
||||
On ELF targets like Linux, gcc/ld will create a dynamically-linked
|
||||
|
@ -52,5 +52,5 @@ index a2b50ea8..3250ec4d 100644
|
|||
NativeLibraryKind::NativeStaticNobundle => {
|
||||
// Link "static-nobundle" native libs only if the crate they originate from
|
||||
--
|
||||
2.24.0
|
||||
2.25.0
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From ce1d0500b190f39c5bd9c34deed8b8d8af537c90 Mon Sep 17 00:00:00 2001
|
||||
From 06b84a9e3d7514ac23953ad76242710444d2a0c1 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Sat, 21 Dec 2019 16:46:22 +0100
|
||||
Subject: [PATCH 04/18] Remove -nostdlib and musl_root from musl targets
|
||||
Subject: [PATCH 04/16] Remove -nostdlib and musl_root from musl targets
|
||||
|
||||
---
|
||||
config.toml.example | 3 ---
|
||||
|
@ -15,7 +15,7 @@ Subject: [PATCH 04/18] Remove -nostdlib and musl_root from musl targets
|
|||
8 files changed, 4 insertions(+), 131 deletions(-)
|
||||
|
||||
diff --git a/config.toml.example b/config.toml.example
|
||||
index e832570e..81cc3a99 100644
|
||||
index 5152a6c9..1d411c5c 100644
|
||||
--- a/config.toml.example
|
||||
+++ b/config.toml.example
|
||||
@@ -340,9 +340,6 @@
|
||||
|
@ -88,7 +88,7 @@ index a4cb81d3..b4247e74 100644
|
|||
}
|
||||
}
|
||||
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
|
||||
index 8e5fe252..47372c97 100644
|
||||
index 831053bc..3e49d459 100644
|
||||
--- a/src/bootstrap/compile.rs
|
||||
+++ b/src/bootstrap/compile.rs
|
||||
@@ -130,18 +130,7 @@ fn copy_third_party_objects(builder: &Builder<'_>, compiler: &Compiler, target:
|
||||
|
@ -128,10 +128,10 @@ index 8e5fe252..47372c97 100644
|
|||
if let Some(p) = builder.wasi_root(target) {
|
||||
let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap());
|
||||
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
|
||||
index d1bdfa0a..51b2bc62 100644
|
||||
index 5f2ef01b..c291d3a0 100644
|
||||
--- a/src/bootstrap/config.rs
|
||||
+++ b/src/bootstrap/config.rs
|
||||
@@ -131,8 +131,6 @@ pub struct Config {
|
||||
@@ -130,8 +130,6 @@ pub struct Config {
|
||||
pub print_step_timings: bool,
|
||||
pub missing_tools: bool,
|
||||
|
||||
|
@ -140,7 +140,7 @@ index d1bdfa0a..51b2bc62 100644
|
|||
pub prefix: Option<PathBuf>,
|
||||
pub sysconfdir: Option<PathBuf>,
|
||||
pub datadir: Option<PathBuf>,
|
||||
@@ -167,7 +165,6 @@ pub struct Target {
|
||||
@@ -166,7 +164,6 @@ pub struct Target {
|
||||
pub linker: Option<PathBuf>,
|
||||
pub ndk: Option<PathBuf>,
|
||||
pub crt_static: Option<bool>,
|
||||
|
@ -148,7 +148,7 @@ index d1bdfa0a..51b2bc62 100644
|
|||
pub wasi_root: Option<PathBuf>,
|
||||
pub qemu_rootfs: Option<PathBuf>,
|
||||
pub no_std: bool,
|
||||
@@ -307,7 +304,6 @@ struct Rust {
|
||||
@@ -306,7 +303,6 @@ struct Rust {
|
||||
parallel_compiler: Option<bool>,
|
||||
default_linker: Option<String>,
|
||||
channel: Option<String>,
|
||||
|
@ -156,7 +156,7 @@ index d1bdfa0a..51b2bc62 100644
|
|||
rpath: Option<bool>,
|
||||
verbose_tests: Option<bool>,
|
||||
optimize_tests: Option<bool>,
|
||||
@@ -342,7 +338,6 @@ struct TomlTarget {
|
||||
@@ -340,7 +336,6 @@ struct TomlTarget {
|
||||
llvm_filecheck: Option<String>,
|
||||
android_ndk: Option<String>,
|
||||
crt_static: Option<bool>,
|
||||
|
@ -164,7 +164,7 @@ index d1bdfa0a..51b2bc62 100644
|
|||
wasi_root: Option<String>,
|
||||
qemu_rootfs: Option<String>,
|
||||
}
|
||||
@@ -562,7 +557,6 @@ impl Config {
|
||||
@@ -559,7 +554,6 @@ impl Config {
|
||||
set(&mut config.llvm_tools_enabled, rust.llvm_tools);
|
||||
config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
|
||||
config.rustc_default_linker = rust.default_linker.clone();
|
||||
|
@ -172,7 +172,7 @@ index d1bdfa0a..51b2bc62 100644
|
|||
config.save_toolstates = rust.save_toolstates.clone().map(PathBuf::from);
|
||||
set(&mut config.deny_warnings, flags.deny_warnings.or(rust.deny_warnings));
|
||||
set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
|
||||
@@ -600,7 +594,6 @@ impl Config {
|
||||
@@ -595,7 +589,6 @@ impl Config {
|
||||
target.ranlib = cfg.ranlib.clone().map(PathBuf::from);
|
||||
target.linker = cfg.linker.clone().map(PathBuf::from);
|
||||
target.crt_static = cfg.crt_static.clone();
|
||||
|
@ -220,10 +220,10 @@ index bb6041d7..73f3781c 100755
|
|||
"rootfs in qemu testing, you probably don't want to use this")
|
||||
v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs",
|
||||
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
|
||||
index 39cb804c..8e36118a 100644
|
||||
index e9b7976d..c4203e83 100644
|
||||
--- a/src/bootstrap/lib.rs
|
||||
+++ b/src/bootstrap/lib.rs
|
||||
@@ -828,14 +828,6 @@ impl Build {
|
||||
@@ -827,14 +827,6 @@ impl Build {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -307,5 +307,5 @@ index e294e639..58ae91a9 100644
|
|||
base.crt_static_default = true;
|
||||
// These targets allow the user to choose between static and dynamic linking.
|
||||
--
|
||||
2.24.0
|
||||
2.25.0
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From 4f0e42ef109e688861abc33ae28dbb0bcba055aa Mon Sep 17 00:00:00 2001
|
||||
From 6c6ccb3928deffd97a75ef2d9417aae467cd7031 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Sat, 21 Dec 2019 16:49:07 +0100
|
||||
Subject: [PATCH 05/18] Prefer libgcc_eh over libunwind for musl
|
||||
Subject: [PATCH 05/16] Prefer libgcc_eh over libunwind for musl
|
||||
|
||||
+ @q66 changes to smaeul's original patch for Void's musl setup
|
||||
---
|
||||
|
@ -61,5 +61,5 @@ index 8d916447..6d653d41 100644
|
|||
extern {}
|
||||
|
||||
--
|
||||
2.24.0
|
||||
2.25.0
|
||||
|
||||
|
|
|
@ -1,93 +0,0 @@
|
|||
From b99ae159cca4c92146e07a4184064634ed4bd52d Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Sat, 21 Dec 2019 16:50:55 +0100
|
||||
Subject: [PATCH 06/18] Fix C aggregate-passing ABI on powerpc
|
||||
|
||||
The existing code (which looks like it was copied from MIPS) passes
|
||||
aggregates by value in registers. This is wrong. According to the SVR4
|
||||
powerpc psABI, all aggregates are passed indirectly.
|
||||
---
|
||||
src/librustc_target/abi/call/mod.rs | 2 +-
|
||||
src/librustc_target/abi/call/powerpc.rs | 41 ++++++-------------------
|
||||
2 files changed, 11 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/src/librustc_target/abi/call/mod.rs b/src/librustc_target/abi/call/mod.rs
|
||||
index 17bad189..81175fc0 100644
|
||||
--- a/src/librustc_target/abi/call/mod.rs
|
||||
+++ b/src/librustc_target/abi/call/mod.rs
|
||||
@@ -554,7 +554,7 @@ impl<'a, Ty> FnType<'a, Ty> {
|
||||
"arm" => arm::compute_abi_info(cx, self),
|
||||
"mips" => mips::compute_abi_info(cx, self),
|
||||
"mips64" => mips64::compute_abi_info(cx, self),
|
||||
- "powerpc" => powerpc::compute_abi_info(cx, self),
|
||||
+ "powerpc" => powerpc::compute_abi_info(self),
|
||||
"powerpc64" => powerpc64::compute_abi_info(cx, self),
|
||||
"s390x" => s390x::compute_abi_info(cx, self),
|
||||
"msp430" => msp430::compute_abi_info(self),
|
||||
diff --git a/src/librustc_target/abi/call/powerpc.rs b/src/librustc_target/abi/call/powerpc.rs
|
||||
index d496abf8..f20defd6 100644
|
||||
--- a/src/librustc_target/abi/call/powerpc.rs
|
||||
+++ b/src/librustc_target/abi/call/powerpc.rs
|
||||
@@ -1,49 +1,28 @@
|
||||
-use crate::abi::call::{ArgType, FnType, Reg, Uniform};
|
||||
-use crate::abi::{HasDataLayout, LayoutOf, Size, TyLayoutMethods};
|
||||
+use crate::abi::call::{ArgType, FnType};
|
||||
|
||||
-fn classify_ret_ty<'a, Ty, C>(cx: &C, ret: &mut ArgType<'_, Ty>, offset: &mut Size)
|
||||
- where Ty: TyLayoutMethods<'a, C>, C: LayoutOf<Ty = Ty> + HasDataLayout
|
||||
-{
|
||||
- if !ret.layout.is_aggregate() {
|
||||
- ret.extend_integer_width_to(32);
|
||||
- } else {
|
||||
+fn classify_ret_ty<Ty>(ret: &mut ArgType<'_, Ty>) {
|
||||
+ if ret.layout.is_aggregate() {
|
||||
ret.make_indirect();
|
||||
- *offset += cx.data_layout().pointer_size;
|
||||
+ } else {
|
||||
+ ret.extend_integer_width_to(32);
|
||||
}
|
||||
}
|
||||
|
||||
-fn classify_arg_ty<'a, Ty, C>(cx: &C, arg: &mut ArgType<'_, Ty>, offset: &mut Size)
|
||||
- where Ty: TyLayoutMethods<'a, C>, C: LayoutOf<Ty = Ty> + HasDataLayout
|
||||
-{
|
||||
- let dl = cx.data_layout();
|
||||
- let size = arg.layout.size;
|
||||
- let align = arg.layout.align.max(dl.i32_align).min(dl.i64_align).abi;
|
||||
-
|
||||
+fn classify_arg_ty<Ty>(arg: &mut ArgType<'_, Ty>) {
|
||||
if arg.layout.is_aggregate() {
|
||||
- arg.cast_to(Uniform {
|
||||
- unit: Reg::i32(),
|
||||
- total: size
|
||||
- });
|
||||
- if !offset.is_aligned(align) {
|
||||
- arg.pad_with(Reg::i32());
|
||||
- }
|
||||
+ arg.make_indirect();
|
||||
} else {
|
||||
arg.extend_integer_width_to(32);
|
||||
}
|
||||
-
|
||||
- *offset = offset.align_to(align) + size.align_to(align);
|
||||
}
|
||||
|
||||
-pub fn compute_abi_info<'a, Ty, C>(cx: &C, fty: &mut FnType<'_, Ty>)
|
||||
- where Ty: TyLayoutMethods<'a, C>, C: LayoutOf<Ty = Ty> + HasDataLayout
|
||||
-{
|
||||
- let mut offset = Size::ZERO;
|
||||
+pub fn compute_abi_info<Ty>(fty: &mut FnType<'_, Ty>) {
|
||||
if !fty.ret.is_ignore() {
|
||||
- classify_ret_ty(cx, &mut fty.ret, &mut offset);
|
||||
+ classify_ret_ty(&mut fty.ret);
|
||||
}
|
||||
|
||||
for arg in &mut fty.args {
|
||||
if arg.is_ignore() { continue; }
|
||||
- classify_arg_ty(cx, arg, &mut offset);
|
||||
+ classify_arg_ty(arg);
|
||||
}
|
||||
}
|
||||
--
|
||||
2.24.0
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From 8eb44a3bf861523e31b962db8c7fd1e7b6225e89 Mon Sep 17 00:00:00 2001
|
||||
From d54189d6441d59ba623b561438e3ce0664ab2101 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Sat, 21 Dec 2019 16:55:07 +0100
|
||||
Subject: [PATCH 07/18] Fix zero-sized aggregate ABI on powerpc
|
||||
Subject: [PATCH 06/16] Fix zero-sized aggregate ABI on powerpc
|
||||
|
||||
For targets that pass zero-sized aggregates indirectly (generally
|
||||
those that pass all aggregates indirectly), we must allocate a register
|
||||
|
@ -20,10 +20,10 @@ updating each implementation of `compute_abi_info` to handle ZSTs.
|
|||
1 file changed, 9 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/librustc/ty/layout.rs b/src/librustc/ty/layout.rs
|
||||
index e82232ac..8bdf3436 100644
|
||||
index c7278dc4..2e5ea499 100644
|
||||
--- a/src/librustc/ty/layout.rs
|
||||
+++ b/src/librustc/ty/layout.rs
|
||||
@@ -2638,12 +2638,11 @@ where
|
||||
@@ -2576,12 +2576,11 @@ where
|
||||
};
|
||||
|
||||
let target = &cx.tcx().sess.target.target;
|
||||
|
@ -41,7 +41,7 @@ index e82232ac..8bdf3436 100644
|
|||
let rust_abi = match sig.abi {
|
||||
RustIntrinsic | PlatformIntrinsic | Rust | RustCall => true,
|
||||
_ => false,
|
||||
@@ -2705,11 +2704,10 @@ where
|
||||
@@ -2650,11 +2649,10 @@ where
|
||||
let is_return = arg_idx.is_none();
|
||||
let mut arg = mk_arg_type(ty, arg_idx);
|
||||
if arg.layout.is_zst() {
|
||||
|
@ -58,5 +58,5 @@ index e82232ac..8bdf3436 100644
|
|||
}
|
||||
}
|
||||
--
|
||||
2.24.0
|
||||
2.25.0
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From a460f9c88e14ed904f5502a2e496e9906e6b0c78 Mon Sep 17 00:00:00 2001
|
||||
From 07274f2e91b0d91102dcb5397783295d7a27b8b2 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Sat, 6 Oct 2018 04:01:48 +0000
|
||||
Subject: [PATCH 08/18] test/use-extern-for-plugins: Don't assume multilib
|
||||
Subject: [PATCH 07/16] test/use-extern-for-plugins: Don't assume multilib
|
||||
|
||||
---
|
||||
src/test/run-make-fulldeps/use-extern-for-plugins/Makefile | 7 +------
|
||||
|
@ -26,5 +26,5 @@ index 838b1a27..94fa9f6d 100644
|
|||
all:
|
||||
$(RUSTC) foo.rs -C extra-filename=-host
|
||||
--
|
||||
2.24.0
|
||||
2.25.0
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From aea48e1f9131c7b83c60c78bd1c965865832430b Mon Sep 17 00:00:00 2001
|
||||
From d1ac85fbff21dc1d808308cc6f5a90b0cc562f2f Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Mon, 17 Sep 2018 01:32:20 +0000
|
||||
Subject: [PATCH 09/18] test/sysroot-crates-are-unstable: Fix test when rpath
|
||||
Subject: [PATCH 08/16] test/sysroot-crates-are-unstable: Fix test when rpath
|
||||
is disabled
|
||||
|
||||
Without this environment var, the test can't run rustc to find
|
||||
|
@ -21,5 +21,5 @@ index a35174b3..9e770706 100644
|
|||
- python2.7 test.py
|
||||
+ env '$(HOST_RPATH_ENV)' python2.7 test.py
|
||||
--
|
||||
2.24.0
|
||||
2.25.0
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From b1c843d5cefae7d341b84043249736cf93094971 Mon Sep 17 00:00:00 2001
|
||||
From 6cbefd6ad105c833052919319db3564966572ceb Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Sat, 21 Dec 2019 17:00:40 +0100
|
||||
Subject: [PATCH 10/18] Ignore broken and non-applicable tests
|
||||
Subject: [PATCH 09/16] Ignore broken and non-applicable tests
|
||||
|
||||
c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
|
||||
env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
|
||||
|
@ -87,5 +87,5 @@ index b28f742a..3ee4ccce 100644
|
|||
// Test that the simd_bitmask intrinsic produces correct results.
|
||||
|
||||
--
|
||||
2.24.0
|
||||
2.25.0
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From 99685056ca517da59642a551744cb43b57615aba Mon Sep 17 00:00:00 2001
|
||||
From cdb82589b4be62c11186e4645a5fd358f5c55421 Mon Sep 17 00:00:00 2001
|
||||
From: q66 <daniel@octaforge.org>
|
||||
Date: Sat, 21 Dec 2019 17:01:59 +0100
|
||||
Subject: [PATCH 11/18] Link stage2 tools dynamically to libstd
|
||||
Subject: [PATCH 10/16] Link stage2 tools dynamically to libstd
|
||||
|
||||
Replaces an older patch by Samuel Holland. The RUSTC_NO_PREFER_DYNAMIC
|
||||
env var was removed and replaced with the following logic in builder.rs.
|
||||
|
@ -14,10 +14,10 @@ be statically linked for convenience.
|
|||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
|
||||
index 2edcef20..ab308426 100644
|
||||
index 8b0ad169..4bc13ac2 100644
|
||||
--- a/src/bootstrap/builder.rs
|
||||
+++ b/src/bootstrap/builder.rs
|
||||
@@ -1251,6 +1251,8 @@ impl<'a> Builder<'a> {
|
||||
@@ -1228,6 +1228,8 @@ impl<'a> Builder<'a> {
|
||||
// linking all deps statically into the dylib.
|
||||
if let Mode::Std | Mode::Rustc | Mode::Codegen = mode {
|
||||
rustflags.arg("-Cprefer-dynamic");
|
||||
|
@ -27,5 +27,5 @@ index 2edcef20..ab308426 100644
|
|||
|
||||
Cargo {
|
||||
--
|
||||
2.24.0
|
||||
2.25.0
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From 423842fd809f8f2bafa2225745174c0b8d5a9fc9 Mon Sep 17 00:00:00 2001
|
||||
From be61ad716d24f7fb0ee52b234cbf922d09bc686a Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Mon, 17 Sep 2018 02:09:10 +0000
|
||||
Subject: [PATCH 12/18] Move debugger scripts to /usr/share/rust
|
||||
Subject: [PATCH 11/16] Move debugger scripts to /usr/share/rust
|
||||
|
||||
---
|
||||
src/bootstrap/dist.rs | 2 +-
|
||||
|
@ -10,10 +10,10 @@ Subject: [PATCH 12/18] Move debugger scripts to /usr/share/rust
|
|||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
|
||||
index 67907bc8..5abe9554 100644
|
||||
index 02533944..375f2413 100644
|
||||
--- a/src/bootstrap/dist.rs
|
||||
+++ b/src/bootstrap/dist.rs
|
||||
@@ -603,7 +603,7 @@ impl Step for DebuggerScripts {
|
||||
@@ -593,7 +593,7 @@ impl Step for DebuggerScripts {
|
||||
fn run(self, builder: &Builder<'_>) {
|
||||
let host = self.host;
|
||||
let sysroot = self.sysroot;
|
||||
|
@ -49,5 +49,5 @@ index 7b9b40e6..e471db36 100755
|
|||
category_enable="type category enable Rust"
|
||||
|
||||
--
|
||||
2.24.0
|
||||
2.25.0
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From 5f6e96316b489a4bc71f2b54dd0bf0b94a708374 Mon Sep 17 00:00:00 2001
|
||||
From f277b9c07cd6d096fad370a76c6dfdfb03aa3d1e Mon Sep 17 00:00:00 2001
|
||||
From: q66 <daniel@octaforge.org>
|
||||
Date: Sat, 21 Dec 2019 17:04:13 +0100
|
||||
Subject: [PATCH 13/18] Dynamically link libc on musl by default
|
||||
Subject: [PATCH 12/16] Dynamically link libc on musl by default
|
||||
|
||||
---
|
||||
src/librustc_target/spec/linux_musl_base.rs | 3 +--
|
||||
|
@ -22,5 +22,5 @@ index 58ae91a9..1fae72d6 100644
|
|||
base.crt_static_respected = true;
|
||||
|
||||
--
|
||||
2.24.0
|
||||
2.25.0
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From fae4aa3f952fc61880b71416527346a70fc69b4f Mon Sep 17 00:00:00 2001
|
||||
From 191b56a4e8c307e531a446f8cceb4ecc732beace Mon Sep 17 00:00:00 2001
|
||||
From: q66 <daniel@octaforge.org>
|
||||
Date: Sat, 21 Dec 2019 17:04:55 +0100
|
||||
Subject: [PATCH 14/18] Fix dynamic linkage of musl libc for the libc crate
|
||||
Subject: [PATCH 13/16] Fix dynamic linkage of musl libc for the libc crate
|
||||
|
||||
---
|
||||
vendor/libc/src/lib.rs | 1 +
|
||||
|
@ -40,5 +40,5 @@ index 238da24b..ffb05ee7 100644
|
|||
} else if #[cfg(target_os = "emscripten")] {
|
||||
#[link(name = "c")]
|
||||
--
|
||||
2.24.0
|
||||
2.25.0
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From 26364551a44c99b060b805a11acf34eb1333f151 Mon Sep 17 00:00:00 2001
|
||||
From a5843bb05ebd94b8acaa7a011c1db7abdc112e5c Mon Sep 17 00:00:00 2001
|
||||
From: Michael Hudson-Doyle <michael.hudson@canonical.com>
|
||||
Date: Wed, 13 Mar 2019 15:55:30 +1300
|
||||
Subject: [PATCH 15/18] round result of (highest as f64).log(2.0)
|
||||
Subject: [PATCH 14/16] round result of (highest as f64).log(2.0)
|
||||
|
||||
Even though (1024f64).log(2.0) has an exact, representable, value, with
|
||||
rustc 1.32 on i386 it comes out as +9.999999999999999985 with
|
||||
|
@ -25,5 +25,5 @@ index 9c9f237c..153031a2 100644
|
|||
let uints = (0..(highest + 1))
|
||||
.chain((first2..64).map(|i| 2u64.pow(i)))
|
||||
--
|
||||
2.24.0
|
||||
2.25.0
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From d9bb87c68c7db5377be751ae736bcd5864e3ad6e Mon Sep 17 00:00:00 2001
|
||||
From e83770856411e2ff780551143fc6c26a8552741e Mon Sep 17 00:00:00 2001
|
||||
From: q66 <daniel@octaforge.org>
|
||||
Date: Sat, 21 Dec 2019 17:06:17 +0100
|
||||
Subject: [PATCH 16/18] Void: fix linkage against host/target LLVM in cross
|
||||
Subject: [PATCH 15/16] Void: fix linkage against host/target LLVM in cross
|
||||
setups
|
||||
|
||||
---
|
||||
|
@ -24,5 +24,5 @@ index c5d5f066..91799142 100644
|
|||
} else if lib.starts_with("-l") {
|
||||
println!("cargo:rustc-link-lib={}", &lib[2..]);
|
||||
--
|
||||
2.24.0
|
||||
2.25.0
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From 7344f8a173bb0c90591d1eb1d18cd4eb1553051e Mon Sep 17 00:00:00 2001
|
||||
From 923d16b37c381d73ce0f88403256b26af3edf1bd Mon Sep 17 00:00:00 2001
|
||||
From: q66 <daniel@octaforge.org>
|
||||
Date: Sat, 21 Dec 2019 17:06:55 +0100
|
||||
Subject: [PATCH 17/18] Use ELFv2 ABI on all powerpc64 targets
|
||||
Subject: [PATCH 16/16] Use ELFv2 ABI on all powerpc64 targets
|
||||
|
||||
This patches librustc_target so that ELFv2 is used everywhere, matching our
|
||||
LLVM. While this is not perfect (it does not allow rustc to compile legacy
|
||||
|
@ -13,10 +13,10 @@ so at least match the environment we have.
|
|||
2 files changed, 2 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/librustc_target/abi/call/powerpc64.rs b/src/librustc_target/abi/call/powerpc64.rs
|
||||
index a9683104..98e44af3 100644
|
||||
index fe459480..997593b9 100644
|
||||
--- a/src/librustc_target/abi/call/powerpc64.rs
|
||||
+++ b/src/librustc_target/abi/call/powerpc64.rs
|
||||
@@ -124,7 +124,7 @@ pub fn compute_abi_info<'a, Ty, C>(cx: &C, fty: &mut FnType<'a, Ty>)
|
||||
@@ -117,7 +117,7 @@ pub fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
where Ty: TyLayoutMethods<'a, C> + Copy,
|
||||
C: LayoutOf<Ty = Ty, TyLayout = TyLayout<'a, Ty>> + HasDataLayout + HasTargetSpec
|
||||
{
|
||||
|
@ -47,5 +47,5 @@ index 89e68ab3..77659cdd 100644
|
|||
llvm_target: "powerpc64-unknown-linux-gnu".to_string(),
|
||||
target_endian: "big".to_string(),
|
||||
--
|
||||
2.24.0
|
||||
2.25.0
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
From 3cf50196b429a6912452ad6e43218b5f6b7922cf Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Sun, 3 Nov 2019 10:52:00 -0600
|
||||
Subject: [PATCH 18/18] Configure LLVM module PIC level
|
||||
|
||||
As of LLVM 9, this is required for 32-bit PowerPC to properly generate
|
||||
PLT references. Previously, only BigPIC was supported; now LLVM supports
|
||||
both BigPIC and SmallPIC, and there is no default value provided.
|
||||
---
|
||||
src/librustc_codegen_llvm/context.rs | 4 ++++
|
||||
src/librustc_codegen_llvm/llvm/ffi.rs | 1 +
|
||||
src/rustllvm/PassWrapper.cpp | 4 ++++
|
||||
3 files changed, 9 insertions(+)
|
||||
|
||||
diff --git a/src/librustc_codegen_llvm/context.rs b/src/librustc_codegen_llvm/context.rs
|
||||
index 2da93877..4a40349c 100644
|
||||
--- a/src/librustc_codegen_llvm/context.rs
|
||||
+++ b/src/librustc_codegen_llvm/context.rs
|
||||
@@ -203,6 +203,10 @@ pub unsafe fn create_module(
|
||||
let llvm_target = SmallCStr::new(&sess.target.target.llvm_target);
|
||||
llvm::LLVMRustSetNormalizedTarget(llmod, llvm_target.as_ptr());
|
||||
|
||||
+ if get_reloc_model(sess) == llvm::RelocMode::PIC {
|
||||
+ llvm::LLVMRustSetModulePICLevel(llmod);
|
||||
+ }
|
||||
+
|
||||
if is_pie_binary(sess) {
|
||||
llvm::LLVMRustSetModulePIELevel(llmod);
|
||||
}
|
||||
diff --git a/src/librustc_codegen_llvm/llvm/ffi.rs b/src/librustc_codegen_llvm/llvm/ffi.rs
|
||||
index c69942ef..7f7b5b22 100644
|
||||
--- a/src/librustc_codegen_llvm/llvm/ffi.rs
|
||||
+++ b/src/librustc_codegen_llvm/llvm/ffi.rs
|
||||
@@ -1805,6 +1805,7 @@ extern "C" {
|
||||
|
||||
pub fn LLVMRustSetComdat(M: &'a Module, V: &'a Value, Name: *const c_char);
|
||||
pub fn LLVMRustUnsetComdat(V: &Value);
|
||||
+ pub fn LLVMRustSetModulePICLevel(M: &Module);
|
||||
pub fn LLVMRustSetModulePIELevel(M: &Module);
|
||||
pub fn LLVMRustModuleBufferCreate(M: &Module) -> &'static mut ModuleBuffer;
|
||||
pub fn LLVMRustModuleBufferPtr(p: &ModuleBuffer) -> *const u8;
|
||||
diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp
|
||||
index 0cda3465..4c5bc20b 100644
|
||||
--- a/src/rustllvm/PassWrapper.cpp
|
||||
+++ b/src/rustllvm/PassWrapper.cpp
|
||||
@@ -754,6 +754,10 @@ LLVMRustSetDataLayoutFromTargetMachine(LLVMModuleRef Module,
|
||||
unwrap(Module)->setDataLayout(Target->createDataLayout());
|
||||
}
|
||||
|
||||
+extern "C" void LLVMRustSetModulePICLevel(LLVMModuleRef M) {
|
||||
+ unwrap(M)->setPICLevel(PICLevel::Level::BigPIC);
|
||||
+}
|
||||
+
|
||||
extern "C" void LLVMRustSetModulePIELevel(LLVMModuleRef M) {
|
||||
unwrap(M)->setPIELevel(PIELevel::Level::Large);
|
||||
}
|
||||
--
|
||||
2.24.0
|
||||
|
|
@ -17,7 +17,7 @@ diff --git a/lzma-sys/build.rs b/lzma-sys/build.rs
|
|||
index 7366d9c..a1e28b4 100644
|
||||
--- a/vendor/lzma-sys/build.rs
|
||||
+++ b/vendor/lzma-sys/build.rs
|
||||
@@ -53,6 +53,12 @@ fn main() {
|
||||
@@ -56,6 +56,12 @@ fn main() {
|
||||
build.flag("-std=c99").flag("-pthread");
|
||||
}
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
# Permission to use rust and cargo trademark is granted.
|
||||
# See: https://github.com/rust-lang/core-team/issues/4
|
||||
pkgname=rust
|
||||
version=1.40.0
|
||||
version=1.41.0
|
||||
revision=1
|
||||
_rust_dist_version=1.39.0
|
||||
_cargo_dist_version=0.40.0
|
||||
_rust_dist_version=1.40.0
|
||||
_cargo_dist_version=0.41.0
|
||||
# Always make sure custom distfiles used for bootstrap are
|
||||
# uploaded to https://alpha.de.repo.voidlinux.org/distfiles/
|
||||
wrksrc="rustc-${version}-src"
|
||||
|
@ -19,7 +19,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
|
|||
license="MIT, Apache-2.0"
|
||||
homepage="https://www.rust-lang.org/"
|
||||
distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
|
||||
checksum=dd97005578defc10a482bff3e4e728350d2099c60ffcf1f5e189540c39a549ad
|
||||
checksum=5546822c09944c4d847968e9b7b3d0e299f143f307c00fa40e84a99fabf8d74b
|
||||
lib32disabled=yes
|
||||
patch_args="-Np1"
|
||||
|
||||
|
@ -50,57 +50,57 @@ else
|
|||
case "$XBPS_MACHINE" in
|
||||
i686)
|
||||
checksum+="
|
||||
cb2e8afccfdc7e32fdbb1e106e3cedb0bd4ba1a6f060417f41c1e35a9ac8968d
|
||||
e108d2f3ba7f5986e08cd7f2b295110243d1b715d5722d276aad7b0469418626
|
||||
d2a7ab28f0ff82a482ff24425f844b917a74059dbce550a96f0ab9fe1c131ef9"
|
||||
257e4789043098a5e3b4fa85ea988019f37d640a10f83d39ada00fb23e057b8a
|
||||
beab29565d12a6b9db4ef471c34d4c034295760095f7edc3f7b6c51fc08589a0
|
||||
c48bc132f4025ff39b1b6dc52aef9d406c3f926ce05fe92d943ceab7a5fd6058"
|
||||
;;
|
||||
x86_64)
|
||||
checksum+="
|
||||
5b2a435a4c034615d70cfc383abe9924cbd1ffd4669caa55ce6539f22ed979ed
|
||||
b629952ec9e3e750137d7b8a922de145c97c1dc372dd616e86e4e501da13910b
|
||||
7b9ba52c252964724f49aab49e42bec62fca929297ef058412c7e727b0794620"
|
||||
b1c00618b7a98156e88b14682508a503284f85748eab23de749a20dcc8847111
|
||||
5a0b14a51f51b0194f70a2023749d9cb49c3b2e11f0d4c8232960b91fad336ac
|
||||
9b6ae643fa240c5ecbc1dc390f4020b6a683f25bac6f7437ebd4b9d32a8d0b6c"
|
||||
;;
|
||||
x86_64-musl)
|
||||
checksum+="
|
||||
bd3e2964d171eafc95668f675b521669b89abc32129214bb4c3b2509e4c66247
|
||||
4ac886aab08eae7c67edc0be3ffd808a0a6fa599b9aa52f52f0a48fdb8b56435
|
||||
9c17f3f43c77e3cf002b3b54f871718b0a4fca30e83dca0a76a037d4943806c7"
|
||||
769b9e31557fcc0ea2a661f88b679d3dbd62b537807c7b3c75ac6816a1be4fa3
|
||||
c647bb7f399b3d18e345b2dab1fb073470582a9298e83d8648f6661544df7279
|
||||
848646326474392bdac70a5bfa06efda4c36e2bbbf088f07456f98c7575844e1"
|
||||
;;
|
||||
ppc64le)
|
||||
checksum+="
|
||||
542d2bd00f1af6b2108e052b8f9cfd7afdf787d47b313d7b67d8dcd3bfafe96c
|
||||
e4ad2ed0a6de954788d27355a1f178000735bf2b7120f2aa3af49839ab405f16
|
||||
e420f7078262bd0735c6d368e0e46b064ea39fdbc86690932b86274616e838e6"
|
||||
aa07a07ad272de825da8c18ad8dc4143a25bd28e5538d68c3bced53f060432b4
|
||||
4eb3141fb6c3d3e101b5d4493664c9a01d4bb9eebdf4b96f5c26a81188c2452d
|
||||
7705f21d938a72ba6f01818661b2dea29183209940a335f18d1761e1e03d3710"
|
||||
;;
|
||||
ppc64le-musl)
|
||||
checksum+="
|
||||
aeb989553eb6b1e8a7473369d491c1ac4ff27a553743f19a042d759b1cbfbad9
|
||||
d7bf5bab6cd80d387fa1b9d41dd5a5825fc5de520048cc89a8d621760c44e6df
|
||||
e930b7da1f3ae1e0d3568c06cd4cc5f68a61813a8c53adf0e97d9592f3e3425e"
|
||||
2c8ffeaa23d8ae0e1776af068bd92ba5cd15973696956a2b58c215a940721e67
|
||||
c40f696c8afdcaafec50ddc29b9d8c836efa01b681e8ca48d09fcf79576ee039
|
||||
0fbe481d284a14b84cc63ccb50caeb248200f238d2c3e449c2b8a8bf49c951ce"
|
||||
;;
|
||||
ppc64)
|
||||
checksum+="
|
||||
fa5fe636f502cd5a6af97281656dba59295d76e91158c19b59d6a970987fce8f
|
||||
74f5deadb1052abf5475b3d7b204101a52337a89867daf3efde2adcd8dee78b2
|
||||
d516be75b7cde33aa69db1e4fd99b222b868df3f642dada3bfed34d1db585380"
|
||||
0f4d02f2d21d8f4b23829502130c89599f2315bb9adcee4f1b5109ee68a187ab
|
||||
8edd65b1f53485caa134d1625131e76f7ca072366cc5df3e2761a39f52f7e83f
|
||||
23a7967b0c1c762cdbea4f850cacbb462e386977203c0d5ff060275c526d80d7"
|
||||
;;
|
||||
ppc64-musl)
|
||||
checksum+="
|
||||
f1fd45b8570bff03e22c70dcfc8cfa6e7657ab41ce082687f4bd294e08dad152
|
||||
c3455841abfb9e59ae0709fe5f0fa171212e8628bf464214734eafb46f97c4c2
|
||||
af226341d50cebc5af608375b6b200a1c10e14139812dc77a928140fe5120be9"
|
||||
4645a4bb0d78da07c8dba1edc2769382a94dc3d8fbdd48e105a5c8dd20170e21
|
||||
0dbf82f8c24140f17fda36811861c9c3aa361f2256c5274a11eb4a1f183c7f3a
|
||||
d5a808fdb50068a14d6578f052c9e21ae7881d4ecdcf9e098c5e2c2b1ae65786"
|
||||
;;
|
||||
ppc)
|
||||
checksum+="
|
||||
ed91f1e60b56e6bd09b003fda0aef5b99e014663033f3b2ede44a51e5b574b13
|
||||
2cb595dd95d5f557b3d36006ce6fe283f324e721ad8f92e1f7772cc261787cae
|
||||
a2a64bba73102caadf819dd268f5710c978ece0efa05aaa89cbae45a5443e880"
|
||||
40121c3a6ec199338e7139e03e917a93290b7623334740d4d25cd1c8092f3de1
|
||||
c2b17cfe8b25d23b348b40e5802a4e369f691abe6ddbd4372df0d660eb100398
|
||||
295030192cf5b7e1fce75845a1961619a5f701185400ad816cf950d4e18f0646"
|
||||
;;
|
||||
ppc-musl)
|
||||
checksum+="
|
||||
3a83a55b11774af98f199ca47bf7429338a2f1e1df5fdbffbdee6bc5ffcae5c9
|
||||
4b16d538a5a3ff8d85bd0a2bb28896ab170a340f40e40e06a8f59028285d57f6
|
||||
bbbf7037590fd38c5d4b2e2ac7ddddcc13213d05885d7c1fc2eacbffa4d920f5"
|
||||
c5b743370ce140e95d413b20734d26ac22697b99455262cef801883f5c732019
|
||||
8061486273c602ac29c3e98aaa3a6d1114d16b9973e051f127e922232fef2270
|
||||
91cc5d6f0192f68d5053fb460dd8347b28cb29b4a63a6e648d6b754795b5c4e8"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue