Updated to 1.41.0

This commit is contained in:
Алзим 2020-01-31 18:13:04 +03:00
parent 3c9f643fd4
commit b48bbea163
8 changed files with 190 additions and 64 deletions

View file

@ -1,4 +1,4 @@
sources:
rust-1.39.0-i686-unknown-linux-gnu.tar.xz: 1da9b77bf9cc8299ce0bb51bcd092a5e075b4e2b
rust-1.39.0-x86_64-unknown-linux-gnu.tar.xz: 82204b42f0166688d0b131664a43a8f708caaf2b
rustc-1.40.0-src.tar.xz: 34aa1c281487724648b39439bc512f958a3da4ad
rust-1.40.0-i686-unknown-linux-gnu.tar.xz: 861dbd38d52c828d23bed0cfe28295cbac7ed10d
rust-1.40.0-x86_64-unknown-linux-gnu.tar.xz: 91fe08a0a84722f3b547da2be0fcb5d3e0ef44d8
rustc-1.41.0-src.tar.xz: 6b9911b73ae2969ec1b84b89803ff4278d5b507b

View file

@ -0,0 +1,24 @@
From 241d2e765dc7401e642812e43b75dbc3950f2c98 Mon Sep 17 00:00:00 2001
From: Mark Rousskov <mark.simulacrum@gmail.com>
Date: Wed, 18 Dec 2019 13:28:14 -0500
Subject: [PATCH] Fix compiletest fallout from stage0 bump
---
src/tools/compiletest/src/main.rs | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs
index 15f8abd75d59..32965bbb292d 100644
--- a/src/tools/compiletest/src/main.rs
+++ b/src/tools/compiletest/src/main.rs
@@ -569,6 +569,7 @@ pub fn test_opts(config: &Config) -> test::TestOpts {
list: false,
options: test::Options::new(),
time_options: None,
+ force_run_in_process: false,
}
}
--
2.24.1

View file

@ -0,0 +1,52 @@
From b6fd4598c5367e78b5841fd99412484f0e86fc21 Mon Sep 17 00:00:00 2001
From: Amanieu d'Antras <amanieu@gmail.com>
Date: Wed, 1 Jan 2020 17:11:45 +0100
Subject: [PATCH] Update the barrier cache during ARM EHABI unwinding
---
src/libpanic_unwind/gcc.rs | 8 +++++++-
src/libunwind/libunwind.rs | 2 ++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/libpanic_unwind/gcc.rs b/src/libpanic_unwind/gcc.rs
index 4f572fe21b30..328d0d4ce7be 100644
--- a/src/libpanic_unwind/gcc.rs
+++ b/src/libpanic_unwind/gcc.rs
@@ -187,7 +187,13 @@ cfg_if::cfg_if! {
match eh_action {
EHAction::None |
EHAction::Cleanup(_) => return continue_unwind(exception_object, context),
- EHAction::Catch(_) => return uw::_URC_HANDLER_FOUND,
+ EHAction::Catch(_) => {
+ // EHABI requires the personality routine to update the
+ // SP value in the barrier cache of the exception object.
+ (*exception_object).private[5] =
+ uw::_Unwind_GetGR(context, uw::UNWIND_SP_REG);
+ return uw::_URC_HANDLER_FOUND;
+ }
EHAction::Terminate => return uw::_URC_FAILURE,
}
} else {
diff --git a/src/libunwind/libunwind.rs b/src/libunwind/libunwind.rs
index 0b39503c0d03..30658ce328d8 100644
--- a/src/libunwind/libunwind.rs
+++ b/src/libunwind/libunwind.rs
@@ -23,6 +23,7 @@ pub type _Unwind_Word = uintptr_t;
pub type _Unwind_Ptr = uintptr_t;
pub type _Unwind_Trace_Fn = extern "C" fn(ctx: *mut _Unwind_Context, arg: *mut c_void)
-> _Unwind_Reason_Code;
+
#[cfg(target_arch = "x86")]
pub const unwinder_private_data_size: usize = 5;
@@ -151,6 +152,7 @@ if #[cfg(all(any(target_os = "ios", target_os = "netbsd", not(target_arch = "arm
use _Unwind_VRS_DataRepresentation::*;
pub const UNWIND_POINTER_REG: c_int = 12;
+ pub const UNWIND_SP_REG: c_int = 13;
pub const UNWIND_IP_REG: c_int = 15;
#[cfg_attr(all(feature = "llvm-libunwind",
--
2.24.1

View file

@ -1,10 +0,0 @@
--- rustc-beta-src/src/test/run-make-fulldeps/foreign-exceptions/Makefile.orig 2019-12-07 18:36:56.000000000 -0800
+++ rustc-beta-src/src/test/run-make-fulldeps/foreign-exceptions/Makefile 2019-12-12 15:49:24.655515206 -0800
@@ -1,3 +1,7 @@
+# ignore-arm
+# ignore-armeb
+# https://github.com/rust-lang/rust/issues/67242
+
-include ../tools.mk
all: foo

View file

@ -29,4 +29,4 @@ index 6deedd0b5ea3..9f63038c3623 100644
+ || llvm_util::get_major_version() < 8;
}
// Describes the members of an enum value: An enum is described as a union of
// FIXME(eddyb) maybe precompute this? Right now it's computed once

View file

@ -1,39 +0,0 @@
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 2748903f2d47..10d02d6db829 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -1231,7 +1231,8 @@ impl<'a> Builder<'a> {
cargo.arg("--frozen");
}
- cargo.env("RUSTC_INSTALL_BINDIR", &self.config.bindir);
+ // Try to use a sysroot-relative bindir, in case it was configured absolutely.
+ cargo.env("RUSTC_INSTALL_BINDIR", self.config.bindir_relative());
self.ci_env.force_coloring_in_ci(&mut cargo);
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index d1bdfa0a7676..0c03b95c7b25 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -647,6 +647,20 @@ impl Config {
config
}
+ /// Try to find the relative path of `bindir`, otherwise return it in full.
+ pub fn bindir_relative(&self) -> &Path {
+ let bindir = &self.bindir;
+ if bindir.is_absolute() {
+ // Try to make it relative to the prefix.
+ if let Some(prefix) = &self.prefix {
+ if let Ok(stripped) = bindir.strip_prefix(prefix) {
+ return stripped;
+ }
+ }
+ }
+ bindir
+ }
+
/// Try to find the relative path of `libdir`.
pub fn libdir_relative(&self) -> Option<&Path> {
let libdir = self.libdir.as_ref()?;

View file

@ -0,0 +1,97 @@
From ed8e55fe8d732d8a87343441db3bfbb974f043df Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Wed, 8 Jan 2020 09:44:45 -0800
Subject: [PATCH 1/2] Remove obsolete llvm_tools flag
---
src/bootstrap/tool.rs | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
index 815498047fd5..f785a0989a36 100644
--- a/src/bootstrap/tool.rs
+++ b/src/bootstrap/tool.rs
@@ -293,7 +293,6 @@ fn rustbook_features() -> Vec<String> {
macro_rules! bootstrap_tool {
($(
$name:ident, $path:expr, $tool_name:expr
- $(,llvm_tools = $llvm:expr)*
$(,is_external_tool = $external:expr)*
$(,features = $features:expr)*
;
@@ -305,15 +304,6 @@ macro_rules! bootstrap_tool {
)+
}
- impl Tool {
- /// Whether this tool requires LLVM to run
- pub fn uses_llvm_tools(&self) -> bool {
- match self {
- $(Tool::$name => false $(|| $llvm)*,)+
- }
- }
- }
-
impl<'a> Builder<'a> {
pub fn tool_exe(&self, tool: Tool) -> PathBuf {
match tool {
@@ -381,7 +371,7 @@ bootstrap_tool!(
Tidy, "src/tools/tidy", "tidy";
Linkchecker, "src/tools/linkchecker", "linkchecker";
CargoTest, "src/tools/cargotest", "cargotest";
- Compiletest, "src/tools/compiletest", "compiletest", llvm_tools = true;
+ Compiletest, "src/tools/compiletest", "compiletest";
BuildManifest, "src/tools/build-manifest", "build-manifest";
RemoteTestClient, "src/tools/remote-test-client", "remote-test-client";
RustInstaller, "src/tools/rust-installer", "fabricate", is_external_tool = true;
--
2.24.1
From cc4688d66d75e149a0136f701045cbf7ee672725 Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Wed, 8 Jan 2020 10:04:18 -0800
Subject: [PATCH 2/2] Build compiletest with in-tree libtest
---
src/bootstrap/tool.rs | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
index f785a0989a36..73a4dda74e88 100644
--- a/src/bootstrap/tool.rs
+++ b/src/bootstrap/tool.rs
@@ -294,6 +294,7 @@ macro_rules! bootstrap_tool {
($(
$name:ident, $path:expr, $tool_name:expr
$(,is_external_tool = $external:expr)*
+ $(,is_unstable_tool = $unstable:expr)*
$(,features = $features:expr)*
;
)+) => {
@@ -344,7 +345,12 @@ macro_rules! bootstrap_tool {
compiler: self.compiler,
target: self.target,
tool: $tool_name,
- mode: Mode::ToolBootstrap,
+ mode: if false $(|| $unstable)* {
+ // use in-tree libraries for unstable features
+ Mode::ToolStd
+ } else {
+ Mode::ToolBootstrap
+ },
path: $path,
is_optional_tool: false,
source_type: if false $(|| $external)* {
@@ -371,7 +377,7 @@ bootstrap_tool!(
Tidy, "src/tools/tidy", "tidy";
Linkchecker, "src/tools/linkchecker", "linkchecker";
CargoTest, "src/tools/cargotest", "cargotest";
- Compiletest, "src/tools/compiletest", "compiletest";
+ Compiletest, "src/tools/compiletest", "compiletest", is_unstable_tool = true;
BuildManifest, "src/tools/build-manifest", "build-manifest";
RemoteTestClient, "src/tools/remote-test-client", "remote-test-client";
RustInstaller, "src/tools/rust-installer", "fabricate", is_external_tool = true;
--
2.24.1

View file

@ -25,9 +25,9 @@
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24
# or nightly wants some beta-YYYY-MM-DD
# Note that cargo matches the program version here, not its crate version.
%define bootstrap_rust 1.39.0
%define bootstrap_cargo 1.39.0
%define bootstrap_date 2019-11-07
%define bootstrap_rust 1.40.0
%define bootstrap_cargo 1.40.0
%define bootstrap_date 2019-12-19
%bcond_without bootstrap
@ -61,7 +61,7 @@
Summary: The Rust Programming Language
Name: rust
Version: 1.40.0
Version: 1.41.0
Release: 1
License: (ASL 2.0 or MIT) and (BSD and MIT)
Group: Development/Rust
@ -75,12 +75,14 @@ Source10: rust.rpmlintrc
# Revert https://github.com/rust-lang/rust/pull/57840
# We do have the necessary fix in our LLVM 7.
Patch1: rust-pr57840-llvm7-debuginfo-variants.patch
# Fix the bindir used by rustdoc to find rustc
# https://github.com/rust-lang/rust/pull/66317
Patch2: rust-pr66317-bindir-relative.patch
# ARM loops when C++ tries to catch and rethrow a Rust exception
# https://github.com/rust-lang/rust/issues/67242
Patch3: rust-issue-67242-ignore-arm-foreign-exceptions.patch
# Fix compiletest with newer (local-rebuild) libtest
# https://github.com/rust-lang/rust/commit/241d2e765dc7401e642812e43b75dbc3950f2c98
Patch2: 0001-Fix-compiletest-fallout-from-stage0-bump.patch
# https://github.com/rust-lang/rust/pull/68019
Patch3: rust-pr68019-in-tree-compiletest.patch
# Fix ARM unwinding for foreign-exceptions
# https://github.com/rust-lang/rust/pull/67779
Patch4: 0001-Update-the-barrier-cache-during-ARM-EHABI-unwinding.patch
BuildRequires: ncurses-devel
BuildRequires: curl
BuildRequires: pkgconfig(libcurl)
@ -130,7 +132,6 @@ This package includes the Rust compiler and documentation generator.
%dir %{rustlibdir}/%{rust_triple}
%dir %{rustlibdir}/%{rust_triple}/lib
%{rustlibdir}/%{rust_triple}/lib/*.so
%{rustlibdir}/%{rust_triple}/codegen-backends/
# %%exclude - No work!
#%%exclude %%{_bindir}/*miri
%{_bindir}/*miri
@ -359,6 +360,7 @@ test -f '%{local_rust_root}/bin/rustc'
%patch1 -p1 -R
%patch2 -p1
%patch3 -p1
%patch4 -p1
# python3
sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure