Merge branch 'master' into beta

This commit is contained in:
Josh Stone 2019-12-06 12:02:35 -08:00
commit 8e99f8c4a4
6 changed files with 111 additions and 10 deletions

8
.gitignore vendored
View File

@ -228,3 +228,11 @@
/rust-1.37.0-powerpc64-unknown-linux-gnu.tar.xz
/rust-1.37.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.37.0-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.39.0-src.tar.xz
/rust-1.38.0-aarch64-unknown-linux-gnu.tar.xz
/rust-1.38.0-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.38.0-i686-unknown-linux-gnu.tar.xz
/rust-1.38.0-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.38.0-powerpc64-unknown-linux-gnu.tar.xz
/rust-1.38.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.38.0-x86_64-unknown-linux-gnu.tar.xz

View File

@ -0,0 +1,38 @@
From 73369f32621f6a844a80a8513ae3ded901e4a406 Mon Sep 17 00:00:00 2001
From: Mark Rousskov <mark.simulacrum@gmail.com>
Date: Tue, 5 Nov 2019 11:16:46 -0500
Subject: [PATCH] Hopefully fix rustdoc build
It's super unclear why this broke when we switched to beta but not
previously -- but at least it's hopefully fixed now.
---
src/bootstrap/builder.rs | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 2748903f2d47..2edcef203ad2 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -886,7 +886,18 @@ impl<'a> Builder<'a> {
// things still build right, please do!
match mode {
Mode::Std => metadata.push_str("std"),
- _ => {},
+ // When we're building rustc tools, they're built with a search path
+ // that contains things built during the rustc build. For example,
+ // bitflags is built during the rustc build, and is a dependency of
+ // rustdoc as well. We're building rustdoc in a different target
+ // directory, though, which means that Cargo will rebuild the
+ // dependency. When we go on to build rustdoc, we'll look for
+ // bitflags, and find two different copies: one built during the
+ // rustc step and one that we just built. This isn't always a
+ // problem, somehow -- not really clear why -- but we know that this
+ // fixes things.
+ Mode::ToolRustc => metadata.push_str("tool-rustc"),
+ _ => {}
}
cargo.env("__CARGO_DEFAULT_LIB_METADATA", &metadata);
--
2.23.0

View File

@ -0,0 +1,39 @@
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

@ -49,7 +49,7 @@
Name: rust
Version: 1.39.0
Release: 0.1.beta.8%{?dist}
Release: 2%{?dist}
Summary: The Rust Programming Language
License: (ASL 2.0 or MIT) and (BSD and MIT)
# ^ written as: (rust itself) and (bundled libraries)
@ -71,6 +71,14 @@ Patch1: rust-pr57840-llvm7-debuginfo-variants.patch
# https://github.com/rust-lang/rust/pull/65474
Patch2: rust-pr65474-split-rustc-dev.patch
# Fix conflicting libraries of rustc tools
# https://github.com/rust-lang/rust/commit/73369f32621f6a844a80a8513ae3ded901e4a406
Patch3: 0001-Hopefully-fix-rustdoc-build.patch
# Fix the bindir used by rustdoc to find rustc
# https://github.com/rust-lang/rust/pull/66317
Patch4: rust-pr66317-bindir-relative.patch
# Get the Rust triple for any arch.
%{lua: function rust_triple(arch)
local abi = "gnu"
@ -402,6 +410,8 @@ test -f '%{local_rust_root}/bin/rustc'
%patch1 -p1 -R
%patch2 -p1
%patch3 -p1
%patch4 -p1
%if "%{python}" == "python3"
sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure
@ -711,6 +721,12 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py*
%changelog
* Tue Nov 12 2019 Josh Stone <jistone@redhat.com> - 1.39.0-2
- Fix a couple build and test issues with rustdoc.
* Thu Nov 07 2019 Josh Stone <jistone@redhat.com> - 1.39.0-1
- Update to 1.39.0.
* Fri Sep 27 2019 Josh Stone <jistone@redhat.com> - 1.38.0-2
- Filter the libraries included in rust-std (rhbz1756487)

View File

@ -1 +1 @@
SHA512 (rustc-1.38.0-src.tar.xz) = b756d29a7a222bc7b5c7f42ff397346ab840f78e559f93e6e36b65e76eea525cf429899fe4de9fb8966623a2225b552feef9fa831bee50f9e25c976fa2af8c0a
SHA512 (rustc-1.39.0-src.tar.xz) = 8610b2ec77722087c572bd84ac562a5b7c5f1a644aea58c5d5daa07a9aed242703b7816e73e2eaa049f773d5907859e259744a0de700622df005584fd798dab0

View File

@ -1,8 +1,8 @@
SHA512 (rustc-1.38.0-src.tar.xz) = b756d29a7a222bc7b5c7f42ff397346ab840f78e559f93e6e36b65e76eea525cf429899fe4de9fb8966623a2225b552feef9fa831bee50f9e25c976fa2af8c0a
SHA512 (rust-1.37.0-aarch64-unknown-linux-gnu.tar.xz) = c70054f589aa2aecfbd6a89f567306e0cf5d3eb56e5a544ced0a5d212f14033dab10559d22dd6b07945e45a25d8de14fc7897c9d24c0d8149548a06b404ca9d2
SHA512 (rust-1.37.0-armv7-unknown-linux-gnueabihf.tar.xz) = 6d9e055f36a2e912f30bebb25afdd3188019a438f208d3db67b38078bd5c37633c38fd48da15ba80640399babf89221e727a2bf43990aee269fcc5c91cd412b4
SHA512 (rust-1.37.0-i686-unknown-linux-gnu.tar.xz) = b59377350f82efd10c7afe0f7a28ecbd5355719d841d40c98bec0f01961233f7a19bed2581a111a76cde8dd8dc68a019fa7d3da66cb7ebcb002ba52a14a7e573
SHA512 (rust-1.37.0-powerpc64le-unknown-linux-gnu.tar.xz) = 366c8920448000bfb4baa3a47588a1c7bc81e18afb8d40f0efc824e429e9e6900efbdb4c9003fb45b9d8595328bd612bd63f390a7d3dedbb30b7dc57fc12abf3
SHA512 (rust-1.37.0-powerpc64-unknown-linux-gnu.tar.xz) = e8e5cf1c64bd3eec389cef022e1c7bae4618fb6966505d2e762d10e7f443fece43b8b95c989c020bdf739abaf9c3f036230df46f6477a2ccd517a7bdef2ba0d7
SHA512 (rust-1.37.0-s390x-unknown-linux-gnu.tar.xz) = 14f403d3ce9df2a2baba1db13c9f039d7118d7e0c8285ca19ea0284c32e80c3f786660dedef4d1758b2227f91732b8e7deccbf3f38c2b3491738c1408d6bfd0e
SHA512 (rust-1.37.0-x86_64-unknown-linux-gnu.tar.xz) = c4d48aa12cb929d6600f9cce81bb612c504aa1b3b3f8e76352af3a76b737dcbe0d31e8d139c17884b11aef9f12a55c4908fb8f3ff63dfa92533e4bd0a729914f
SHA512 (rustc-1.39.0-src.tar.xz) = 8610b2ec77722087c572bd84ac562a5b7c5f1a644aea58c5d5daa07a9aed242703b7816e73e2eaa049f773d5907859e259744a0de700622df005584fd798dab0
SHA512 (rust-1.38.0-aarch64-unknown-linux-gnu.tar.xz) = c9dea8907d05af938c1936139c1fb8673d0db90503552f53645d71637bb7248263fd20b1c16db140694b2d467a12c474015a2077d9b26c782b44e965a01544c6
SHA512 (rust-1.38.0-armv7-unknown-linux-gnueabihf.tar.xz) = ddbb2c8d2e7112c5871155890c8308080ac800795c685c4b4d06b9dd8c5abd28ee13961686c9be465d1bbd33d476c6478b90af8de0ca5a451f8b07eaff42f97d
SHA512 (rust-1.38.0-i686-unknown-linux-gnu.tar.xz) = ffdea264378510c6df687a173211427f4cb5930553c9d14e33c5776b0e15d435d1be719bba8a1db50f50a3171a38802e090451dc92a6ea764cc8fdca24651f24
SHA512 (rust-1.38.0-powerpc64le-unknown-linux-gnu.tar.xz) = 5f3e1dd233ef17d8a296dcb55738fa119e40c32b154a7575f149bf1475b64e34f7e805f206b9862dc6499be470f179290d8abb7ad8d2b5cb355cef03d95ae374
SHA512 (rust-1.38.0-powerpc64-unknown-linux-gnu.tar.xz) = 26240976834e510fa5a47c35b747b42db4651ea8decdb5498704432c9a21563e603046994fcc2b070d06361bf2c36fe02a15c7f02d88161b299a410f1995983a
SHA512 (rust-1.38.0-s390x-unknown-linux-gnu.tar.xz) = 7af64849236e0173d2aea723f3462682fde7d2e1e04d61c28d215163415e1b15cfb8cac57010ce55bdd928ea74076506ef50376d7550999e0fb00f9d20c4f5ff
SHA512 (rust-1.38.0-x86_64-unknown-linux-gnu.tar.xz) = 0b25c3049a7a213e9151c898979ec9b5b45e46a9072f9853d8f048cf401ef7ac343526d6919e68607a490e3e7bd0375b12ed9fb253caed26bb60f46473d3699b