diff --git a/.gitignore b/.gitignore index 10d4156..5669d3f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/rustc-1.39.0-src.tar.xz +SOURCES/rustc-1.41.1-src.tar.xz diff --git a/.rust.metadata b/.rust.metadata index 7069fd2..c47f774 100644 --- a/.rust.metadata +++ b/.rust.metadata @@ -1,8 +1 @@ -6cf245536bb7f8e58825f838be9a403579e45640 SOURCES/rustc-1.39.0-src.tar.xz -dbc88378ad42fa82f090c520bf83802f8a558059 SOURCES/rust-1.38.0-aarch64-unknown-linux-gnu.tar.xz -120be8d41b92b0040c94876be9637f01a0f72dab SOURCES/rust-1.38.0-i686-unknown-linux-gnu.tar.xz -9364d0c7706eb89d52cb551483dfec761d60f7af SOURCES/rust-1.38.0-powerpc64le-unknown-linux-gnu.tar.xz -ab200ae5943acba051d86e27987366340df69e45 SOURCES/rust-1.38.0-powerpc64-unknown-linux-gnu.tar.xz -6dddb393cbc305eb2bdd5bb8dd30ea84ffb55a17 SOURCES/rust-1.38.0-s390x-unknown-linux-gnu.tar.xz -35658873935dbb76c82f470f722b1356fc41972b SOURCES/rust-1.38.0-x86_64-unknown-linux-gnu.tar.xz -3a4c8f4057a31e6ca2212c0e14cdfd181f0bc126 SOURCES/rust-1.38.0-armv7-unknown-linux-gnueabihf.tar.xz +301d66a2853e8d36e2db79cbaeb446be9435241f SOURCES/rustc-1.41.1-src.tar.xz diff --git a/SOURCES/0001-Fix-compiletest-fallout-from-stage0-bump.patch b/SOURCES/0001-Fix-compiletest-fallout-from-stage0-bump.patch new file mode 100644 index 0000000..dfffce9 --- /dev/null +++ b/SOURCES/0001-Fix-compiletest-fallout-from-stage0-bump.patch @@ -0,0 +1,24 @@ +From 241d2e765dc7401e642812e43b75dbc3950f2c98 Mon Sep 17 00:00:00 2001 +From: Mark Rousskov +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 + diff --git a/SOURCES/0001-Hopefully-fix-rustdoc-build.patch b/SOURCES/0001-Hopefully-fix-rustdoc-build.patch deleted file mode 100644 index 06ca58e..0000000 --- a/SOURCES/0001-Hopefully-fix-rustdoc-build.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 73369f32621f6a844a80a8513ae3ded901e4a406 Mon Sep 17 00:00:00 2001 -From: Mark Rousskov -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 - diff --git a/SOURCES/0001-Update-the-barrier-cache-during-ARM-EHABI-unwinding.patch b/SOURCES/0001-Update-the-barrier-cache-during-ARM-EHABI-unwinding.patch new file mode 100644 index 0000000..82d928d --- /dev/null +++ b/SOURCES/0001-Update-the-barrier-cache-during-ARM-EHABI-unwinding.patch @@ -0,0 +1,52 @@ +From b6fd4598c5367e78b5841fd99412484f0e86fc21 Mon Sep 17 00:00:00 2001 +From: Amanieu d'Antras +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 + diff --git a/SOURCES/rust-pr57840-llvm7-debuginfo-variants.patch b/SOURCES/rust-pr57840-llvm7-debuginfo-variants.patch index 71996bc..b1fd427 100644 --- a/SOURCES/rust-pr57840-llvm7-debuginfo-variants.patch +++ b/SOURCES/rust-pr57840-llvm7-debuginfo-variants.patch @@ -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 diff --git a/SOURCES/rust-pr65474-split-rustc-dev.patch b/SOURCES/rust-pr65474-split-rustc-dev.patch deleted file mode 100644 index 7e1c57a..0000000 --- a/SOURCES/rust-pr65474-split-rustc-dev.patch +++ /dev/null @@ -1,479 +0,0 @@ -From 8e0007f829661e57d008d2e908c95f6e84b04b25 Mon Sep 17 00:00:00 2001 -From: bors -Date: Thu, 24 Oct 2019 07:27:00 +0000 -Subject: [PATCH] Auto merge of #65474 - Mark-Simulacrum:rustc-dev-split, - r=pietroalbini - -Split the rustc target libraries into separate rustc-dev component - -This is re-applies a squashed version of #64823 as well as including #65337 to fix bugs noted after merging the first PR. - -The second PR is confirmed as fixing windows-gnu, and presumably also fixes other platforms, such as musl (i.e. #65335 should be fixed); `RUSTUP_DIST_SERVER=https://dev-static.rust-lang.org rustup toolchain install nightly-2019-10-16` can be installed to confirm that this is indeed the case. - -diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs -index b8071b98f707..2748903f2d47 100644 ---- a/src/bootstrap/builder.rs -+++ b/src/bootstrap/builder.rs -@@ -443,6 +443,7 @@ impl<'a> Builder<'a> { - dist::Rustc, - dist::DebuggerScripts, - dist::Std, -+ dist::RustcDev, - dist::Analysis, - dist::Src, - dist::PlainSourceTarball, -diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs -index cadb9a7e441f..df1c72575846 100644 ---- a/src/bootstrap/check.rs -+++ b/src/bootstrap/check.rs -@@ -55,6 +55,7 @@ impl Step for Std { - cargo, - args(builder.kind), - &libstd_stamp(builder, compiler, target), -+ vec![], - true); - - let libdir = builder.sysroot_libdir(compiler, target); -@@ -103,6 +104,7 @@ impl Step for Rustc { - cargo, - args(builder.kind), - &librustc_stamp(builder, compiler, target), -+ vec![], - true); - - let libdir = builder.sysroot_libdir(compiler, target); -@@ -155,6 +157,7 @@ impl Step for CodegenBackend { - cargo, - args(builder.kind), - &codegen_backend_stamp(builder, compiler, target, backend), -+ vec![], - true); - } - } -@@ -199,6 +202,7 @@ impl Step for Rustdoc { - cargo, - args(builder.kind), - &rustdoc_stamp(builder, compiler, target), -+ vec![], - true); - - let libdir = builder.sysroot_libdir(compiler, target); -diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs -index 5074b035789a..da8d43ed49b7 100644 ---- a/src/bootstrap/compile.rs -+++ b/src/bootstrap/compile.rs -@@ -69,7 +69,7 @@ impl Step for Std { - return; - } - -- builder.ensure(StartupObjects { compiler, target }); -+ let mut target_deps = builder.ensure(StartupObjects { compiler, target }); - - let compiler_to_use = builder.compiler_for(compiler.stage, compiler.host, target); - if compiler_to_use != compiler { -@@ -91,7 +91,7 @@ impl Step for Std { - return; - } - -- copy_third_party_objects(builder, &compiler, target); -+ target_deps.extend(copy_third_party_objects(builder, &compiler, target).into_iter()); - - let mut cargo = builder.cargo(compiler, Mode::Std, target, "build"); - std_cargo(builder, &compiler, target, &mut cargo); -@@ -102,6 +102,7 @@ impl Step for Std { - cargo, - vec![], - &libstd_stamp(builder, compiler, target), -+ target_deps, - false); - - builder.ensure(StdLink { -@@ -113,9 +114,22 @@ impl Step for Std { - } - - /// Copies third pary objects needed by various targets. --fn copy_third_party_objects(builder: &Builder<'_>, compiler: &Compiler, target: Interned) { -+fn copy_third_party_objects(builder: &Builder<'_>, compiler: &Compiler, target: Interned) -+ -> Vec -+{ - let libdir = builder.sysroot_libdir(*compiler, target); - -+ let mut target_deps = vec![]; -+ -+ let mut copy_and_stamp = |sourcedir: &Path, name: &str| { -+ let target = libdir.join(name); -+ builder.copy( -+ &sourcedir.join(name), -+ &target, -+ ); -+ target_deps.push(target); -+ }; -+ - // Copies the crt(1,i,n).o startup objects - // - // Since musl supports fully static linking, we can cross link for it even -@@ -123,19 +137,13 @@ fn copy_third_party_objects(builder: &Builder<'_>, compiler: &Compiler, target: - // files. As those shipped with glibc won't work, copy the ones provided by - // musl so we have them on linux-gnu hosts. - if target.contains("musl") { -+ let srcdir = builder.musl_root(target).unwrap().join("lib"); - for &obj in &["crt1.o", "crti.o", "crtn.o"] { -- builder.copy( -- &builder.musl_root(target).unwrap().join("lib").join(obj), -- &libdir.join(obj), -- ); -+ copy_and_stamp(&srcdir, obj); - } - } else if target.ends_with("-wasi") { -- for &obj in &["crt1.o"] { -- builder.copy( -- &builder.wasi_root(target).unwrap().join("lib/wasm32-wasi").join(obj), -- &libdir.join(obj), -- ); -- } -+ let srcdir = builder.wasi_root(target).unwrap().join("lib/wasm32-wasi"); -+ copy_and_stamp(&srcdir, "crt1.o"); - } - - // Copies libunwind.a compiled to be linked wit x86_64-fortanix-unknown-sgx. -@@ -145,11 +153,11 @@ fn copy_third_party_objects(builder: &Builder<'_>, compiler: &Compiler, target: - // which is provided by std for this target. - if target == "x86_64-fortanix-unknown-sgx" { - let src_path_env = "X86_FORTANIX_SGX_LIBS"; -- let obj = "libunwind.a"; - let src = env::var(src_path_env).expect(&format!("{} not found in env", src_path_env)); -- let src = Path::new(&src).join(obj); -- builder.copy(&src, &libdir.join(obj)); -+ copy_and_stamp(Path::new(&src), "libunwind.a"); - } -+ -+ target_deps - } - - /// Configure cargo to compile the standard library, adding appropriate env vars -@@ -306,7 +314,7 @@ pub struct StartupObjects { - } - - impl Step for StartupObjects { -- type Output = (); -+ type Output = Vec; - - fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { - run.path("src/rtstartup") -@@ -325,13 +333,15 @@ impl Step for StartupObjects { - /// They don't require any library support as they're just plain old object - /// files, so we just use the nightly snapshot compiler to always build them (as - /// no other compilers are guaranteed to be available). -- fn run(self, builder: &Builder<'_>) { -+ fn run(self, builder: &Builder<'_>) -> Vec { - let for_compiler = self.compiler; - let target = self.target; - if !target.contains("windows-gnu") { -- return -+ return vec![] - } - -+ let mut target_deps = vec![]; -+ - let src_dir = &builder.src.join("src/rtstartup"); - let dst_dir = &builder.native_dir(target).join("rtstartup"); - let sysroot_dir = &builder.sysroot_libdir(for_compiler, target); -@@ -350,7 +360,9 @@ impl Step for StartupObjects { - .arg(src_file)); - } - -- builder.copy(dst_file, &sysroot_dir.join(file.to_string() + ".o")); -+ let target = sysroot_dir.join(file.to_string() + ".o"); -+ builder.copy(dst_file, &target); -+ target_deps.push(target); - } - - for obj in ["crt2.o", "dllcrt2.o"].iter() { -@@ -358,8 +370,12 @@ impl Step for StartupObjects { - builder.cc(target), - target, - obj); -- builder.copy(&src, &sysroot_dir.join(obj)); -+ let target = sysroot_dir.join(obj); -+ builder.copy(&src, &target); -+ target_deps.push(target); - } -+ -+ target_deps - } - } - -@@ -437,6 +453,7 @@ impl Step for Rustc { - cargo, - vec![], - &librustc_stamp(builder, compiler, target), -+ vec![], - false); - - builder.ensure(RustcLink { -@@ -585,7 +602,7 @@ impl Step for CodegenBackend { - - let tmp_stamp = out_dir.join(".tmp.stamp"); - -- let files = run_cargo(builder, cargo, vec![], &tmp_stamp, false); -+ let files = run_cargo(builder, cargo, vec![], &tmp_stamp, vec![], false); - if builder.config.dry_run { - return; - } -@@ -941,6 +958,7 @@ pub fn run_cargo(builder: &Builder<'_>, - cargo: Cargo, - tail_args: Vec, - stamp: &Path, -+ additional_target_deps: Vec, - is_check: bool) - -> Vec - { -@@ -1057,6 +1075,7 @@ pub fn run_cargo(builder: &Builder<'_>, - deps.push((path_to_add.into(), false)); - } - -+ deps.extend(additional_target_deps.into_iter().map(|d| (d, false))); - deps.sort(); - let mut new_contents = Vec::new(); - for (dep, proc_macro) in deps.iter() { -diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs -index 514ad1144491..93143570b0fe 100644 ---- a/src/bootstrap/dist.rs -+++ b/src/bootstrap/dist.rs -@@ -637,6 +637,28 @@ impl Step for DebuggerScripts { - } - } - -+fn skip_host_target_lib(builder: &Builder<'_>, compiler: Compiler) -> bool { -+ // The only true set of target libraries came from the build triple, so -+ // let's reduce redundant work by only producing archives from that host. -+ if compiler.host != builder.config.build { -+ builder.info("\tskipping, not a build host"); -+ true -+ } else { -+ false -+ } -+} -+ -+/// Copy stamped files into an image's `target/lib` directory. -+fn copy_target_libs(builder: &Builder<'_>, target: &str, image: &Path, stamp: &Path) { -+ let dst = image.join("lib/rustlib").join(target).join("lib"); -+ t!(fs::create_dir_all(&dst)); -+ for (path, host) in builder.read_stamp_file(stamp) { -+ if !host || builder.config.build == target { -+ builder.copy(&path, &dst.join(path.file_name().unwrap())); -+ } -+ } -+} -+ - #[derive(Debug, PartialOrd, Ord, Copy, Clone, Hash, PartialEq, Eq)] - pub struct Std { - pub compiler: Compiler, -@@ -667,44 +689,19 @@ impl Step for Std { - let target = self.target; - - let name = pkgname(builder, "rust-std"); -- -- // The only true set of target libraries came from the build triple, so -- // let's reduce redundant work by only producing archives from that host. -- if compiler.host != builder.config.build { -- builder.info("\tskipping, not a build host"); -- return distdir(builder).join(format!("{}-{}.tar.gz", name, target)); -+ let archive = distdir(builder).join(format!("{}-{}.tar.gz", name, target)); -+ if skip_host_target_lib(builder, compiler) { -+ return archive; - } - -- // We want to package up as many target libraries as possible -- // for the `rust-std` package, so if this is a host target we -- // depend on librustc and otherwise we just depend on libtest. -- if builder.hosts.iter().any(|t| t == target) { -- builder.ensure(compile::Rustc { compiler, target }); -- } else { -- builder.ensure(compile::Std { compiler, target }); -- } -+ builder.ensure(compile::Std { compiler, target }); - - let image = tmpdir(builder).join(format!("{}-{}-image", name, target)); - let _ = fs::remove_dir_all(&image); - -- let dst = image.join("lib/rustlib").join(target); -- t!(fs::create_dir_all(&dst)); -- let mut src = builder.sysroot_libdir(compiler, target).to_path_buf(); -- src.pop(); // Remove the trailing /lib folder from the sysroot_libdir -- builder.cp_filtered(&src, &dst, &|path| { -- if let Some(name) = path.file_name().and_then(|s| s.to_str()) { -- if name == builder.config.rust_codegen_backends_dir.as_str() { -- return false -- } -- if name == "bin" { -- return false -- } -- if name.contains("LLVM") { -- return false -- } -- } -- true -- }); -+ let compiler_to_use = builder.compiler_for(compiler.stage, compiler.host, target); -+ let stamp = compile::libstd_stamp(builder, compiler_to_use, target); -+ copy_target_libs(builder, &target, &image, &stamp); - - let mut cmd = rust_installer(builder); - cmd.arg("generate") -@@ -723,7 +720,73 @@ impl Step for Std { - let _time = timeit(builder); - builder.run(&mut cmd); - builder.remove_dir(&image); -- distdir(builder).join(format!("{}-{}.tar.gz", name, target)) -+ archive -+ } -+} -+ -+#[derive(Debug, PartialOrd, Ord, Copy, Clone, Hash, PartialEq, Eq)] -+pub struct RustcDev { -+ pub compiler: Compiler, -+ pub target: Interned, -+} -+ -+impl Step for RustcDev { -+ type Output = PathBuf; -+ const DEFAULT: bool = true; -+ const ONLY_HOSTS: bool = true; -+ -+ fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { -+ run.path("rustc-dev") -+ } -+ -+ fn make_run(run: RunConfig<'_>) { -+ run.builder.ensure(RustcDev { -+ compiler: run.builder.compiler_for( -+ run.builder.top_stage, -+ run.builder.config.build, -+ run.target, -+ ), -+ target: run.target, -+ }); -+ } -+ -+ fn run(self, builder: &Builder<'_>) -> PathBuf { -+ let compiler = self.compiler; -+ let target = self.target; -+ -+ let name = pkgname(builder, "rustc-dev"); -+ let archive = distdir(builder).join(format!("{}-{}.tar.gz", name, target)); -+ if skip_host_target_lib(builder, compiler) { -+ return archive; -+ } -+ -+ builder.ensure(compile::Rustc { compiler, target }); -+ -+ let image = tmpdir(builder).join(format!("{}-{}-image", name, target)); -+ let _ = fs::remove_dir_all(&image); -+ -+ let compiler_to_use = builder.compiler_for(compiler.stage, compiler.host, target); -+ let stamp = compile::librustc_stamp(builder, compiler_to_use, target); -+ copy_target_libs(builder, &target, &image, &stamp); -+ -+ let mut cmd = rust_installer(builder); -+ cmd.arg("generate") -+ .arg("--product-name=Rust") -+ .arg("--rel-manifest-dir=rustlib") -+ .arg("--success-message=Rust-is-ready-to-develop.") -+ .arg("--image-dir").arg(&image) -+ .arg("--work-dir").arg(&tmpdir(builder)) -+ .arg("--output-dir").arg(&distdir(builder)) -+ .arg(format!("--package-name={}-{}", name, target)) -+ .arg(format!("--component-name=rustc-dev-{}", target)) -+ .arg("--legacy-manifest-dirs=rustlib,cargo"); -+ -+ builder.info(&format!("Dist rustc-dev stage{} ({} -> {})", -+ compiler.stage, &compiler.host, target)); -+ let _time = timeit(builder); -+ builder.run(&mut cmd); -+ builder.remove_dir(&image); -+ archive - } - } - -diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs -index a182405f3b2d..d1cf1cbca784 100644 ---- a/src/bootstrap/lib.rs -+++ b/src/bootstrap/lib.rs -@@ -1137,6 +1137,7 @@ impl Build { - pub fn copy(&self, src: &Path, dst: &Path) { - if self.config.dry_run { return; } - self.verbose_than(1, &format!("Copy {:?} to {:?}", src, dst)); -+ if src == dst { return; } - let _ = fs::remove_file(&dst); - let metadata = t!(src.symlink_metadata()); - if metadata.file_type().is_symlink() { -diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs -index f41e7dd17ede..c0d2deab2f8b 100644 ---- a/src/tools/build-manifest/src/main.rs -+++ b/src/tools/build-manifest/src/main.rs -@@ -399,6 +399,7 @@ impl Builder { - fn add_packages_to(&mut self, manifest: &mut Manifest) { - let mut package = |name, targets| self.package(name, &mut manifest.pkg, targets); - package("rustc", HOSTS); -+ package("rustc-dev", HOSTS); - package("cargo", HOSTS); - package("rust-mingw", MINGW); - package("rust-std", TARGETS); -@@ -426,6 +427,13 @@ impl Builder { - "rls-preview", "rust-src", "llvm-tools-preview", - "lldb-preview", "rust-analysis", "miri-preview" - ]); -+ -+ // The compiler libraries are not stable for end users, but `rustc-dev` was only recently -+ // split out of `rust-std`. We'll include it by default as a transition for nightly users. -+ if self.rust_release == "nightly" { -+ self.extend_profile("default", &mut manifest.profiles, &["rustc-dev"]); -+ self.extend_profile("complete", &mut manifest.profiles, &["rustc-dev"]); -+ } - } - - fn add_renames_to(&self, manifest: &mut Manifest) { -@@ -481,6 +489,15 @@ impl Builder { - components.push(host_component("rust-mingw")); - } - -+ // The compiler libraries are not stable for end users, but `rustc-dev` was only recently -+ // split out of `rust-std`. We'll include it by default as a transition for nightly users, -+ // but ship it as an optional component on the beta and stable channels. -+ if self.rust_release == "nightly" { -+ components.push(host_component("rustc-dev")); -+ } else { -+ extensions.push(host_component("rustc-dev")); -+ } -+ - // Tools are always present in the manifest, - // but might be marked as unavailable if they weren't built. - extensions.extend(vec![ -@@ -498,6 +515,11 @@ impl Builder { - .filter(|&&target| target != host) - .map(|target| Component::from_str("rust-std", target)) - ); -+ extensions.extend( -+ HOSTS.iter() -+ .filter(|&&target| target != host) -+ .map(|target| Component::from_str("rustc-dev", target)) -+ ); - extensions.push(Component::from_str("rust-src", "*")); - - // If the components/extensions don't actually exist for this -@@ -534,6 +556,14 @@ impl Builder { - dst.insert(profile_name.to_owned(), pkgs.iter().map(|s| (*s).to_owned()).collect()); - } - -+ fn extend_profile(&mut self, -+ profile_name: &str, -+ dst: &mut BTreeMap>, -+ pkgs: &[&str]) { -+ dst.get_mut(profile_name).expect("existing profile") -+ .extend(pkgs.iter().map(|s| (*s).to_owned())); -+ } -+ - fn package(&mut self, - pkgname: &str, - dst: &mut BTreeMap, diff --git a/SOURCES/rust-pr66317-bindir-relative.patch b/SOURCES/rust-pr66317-bindir-relative.patch deleted file mode 100644 index 71d3b0c..0000000 --- a/SOURCES/rust-pr66317-bindir-relative.patch +++ /dev/null @@ -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()?; diff --git a/SOURCES/rust-pr68019-in-tree-compiletest.patch b/SOURCES/rust-pr68019-in-tree-compiletest.patch new file mode 100644 index 0000000..a0b28bf --- /dev/null +++ b/SOURCES/rust-pr68019-in-tree-compiletest.patch @@ -0,0 +1,97 @@ +From ed8e55fe8d732d8a87343441db3bfbb974f043df Mon Sep 17 00:00:00 2001 +From: Josh Stone +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 { + 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 +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 + diff --git a/SPECS/rust.spec b/SPECS/rust.spec index 972dabd..76adf3a 100644 --- a/SPECS/rust.spec +++ b/SPECS/rust.spec @@ -1,7 +1,7 @@ # Only x86_64 and i686 are Tier 1 platforms at this time. # https://forge.rust-lang.org/platform-support.html #global rust_arches x86_64 i686 armv7hl aarch64 ppc64 ppc64le s390x -%global rust_arches x86_64 i686 aarch64 ppc64le s390x armv7hl +%global rust_arches x86_64 i686 aarch64 ppc64le s390x # The channel can be stable, beta, or nightly %{!?channel: %global channel stable} @@ -10,19 +10,19 @@ # 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. -%global bootstrap_rust 1.38.0 -%global bootstrap_cargo 1.38.0 -%global bootstrap_channel 1.38.0 -%global bootstrap_date 2019-09-26 +%global bootstrap_rust 1.40.0 +%global bootstrap_cargo 1.40.0 +%global bootstrap_channel 1.40.0 +%global bootstrap_date 2019-12-19 # Only the specified arches will use bootstrap binaries. -%global bootstrap_arches %%{rust_arches} +#global bootstrap_arches %%{rust_arches} # Using llvm-static may be helpful as an opt-in, e.g. to aid LLVM rebases. %bcond_with llvm_static # We can also choose to just use Rust's bundled LLVM, in case the system LLVM -# is insufficient. Rust currently requires LLVM 6.0+. +# is insufficient. Rust currently requires LLVM 7.0+. %if 0%{?rhel} && 0%{?rhel} <= 6 && !0%{?epel} %bcond_without bundled_llvm %else @@ -49,8 +49,8 @@ %endif Name: rust -Version: 1.39.0 -Release: 2%{?dist} +Version: 1.41.1 +Release: 1%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) # ^ written as: (rust itself) and (bundled libraries) @@ -68,17 +68,15 @@ Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz # We do have the necessary fix in our LLVM 7. Patch1: rust-pr57840-llvm7-debuginfo-variants.patch -# Reduce the size of rust-std -# https://github.com/rust-lang/rust/pull/65474 -Patch2: rust-pr65474-split-rustc-dev.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 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 +# 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 # Disable cargo->libgit2->libssh2, as it's not approved for FIPS (rhbz1732949) Patch10: rustc-1.39.0-disable-libssh2.patch @@ -167,19 +165,22 @@ BuildRequires: %{python} %if %with bundled_llvm BuildRequires: cmake3 >= 3.4.3 -Provides: bundled(llvm) = 8.0.0 +Provides: bundled(llvm) = 9.0.0 %else BuildRequires: cmake >= 2.8.11 %if 0%{?epel} %global llvm llvm7.0 %endif +%if 0%{?fedora} >= 32 +%global llvm llvm9.0 +%endif %if %defined llvm %global llvm_root %{_libdir}/%{llvm} %else %global llvm llvm %global llvm_root %{_prefix} %endif -BuildRequires: %{llvm}-devel >= 6.0 +BuildRequires: %{llvm}-devel >= 7.0 %if %with llvm_static BuildRequires: %{llvm}-static BuildRequires: libffi-devel @@ -234,6 +235,10 @@ Requires: /usr/bin/cc %if "%{llvm_root}" == "%{_prefix}" || 0%{?scl:1} %global llvm_has_filecheck 1 %endif +%if "%{llvm_root}" != "%{_prefix}" +# https://github.com/rust-lang/rust/issues/68714 +%global library_path $(%{llvm_root}/bin/llvm-config --libdir) +%endif %endif %description @@ -433,9 +438,6 @@ sed -i.try-py3 -e '/try python2.7/i try %{python} "$@"' ./configure rm -rf src/llvm-project/ %endif -# We never enable emscripten. -rm -rf src/llvm-emscripten/ - # Remove other unused vendored libraries rm -rf vendor/curl-sys/curl/ rm -rf vendor/jemalloc-sys/jemalloc/ @@ -497,6 +499,7 @@ export LIBSSH2_SYS_USE_PKG_CONFIG=1 %endif %{?cmake_path:export PATH=%{cmake_path}:$PATH} +%{?library_path:export LIBRARY_PATH="%{library_path}"} %{?rustflags:export RUSTFLAGS="%{rustflags}"} # We're going to override --libdir when configuring to get rustlib into a @@ -547,6 +550,7 @@ export LIBSSH2_SYS_USE_PKG_CONFIG=1 %install %{?cmake_path:export PATH=%{cmake_path}:$PATH} +%{?library_path:export LIBRARY_PATH="%{library_path}"} %{?rustflags:export RUSTFLAGS="%{rustflags}"} DESTDIR=%{buildroot} %{python} ./x.py install @@ -617,6 +621,7 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %check %{?cmake_path:export PATH=%{cmake_path}:$PATH} +%{?library_path:export LIBRARY_PATH="%{library_path}"} %{?rustflags:export RUSTFLAGS="%{rustflags}"} # The results are not stable on koji, so mask errors and just log it. @@ -643,7 +648,6 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %dir %{rustlibdir}/%{rust_triple} %dir %{rustlibdir}/%{rust_triple}/lib %{rustlibdir}/%{rust_triple}/lib/*.so -%{rustlibdir}/%{rust_triple}/codegen-backends/ %exclude %{_bindir}/*miri @@ -736,6 +740,18 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %changelog +* Thu Feb 27 2020 Josh Stone - 1.41.1-1 +- Update to 1.41.1. + +* Thu Jan 30 2020 Josh Stone - 1.41.0-1 +- Update to 1.41.0. + +* Thu Jan 16 2020 Josh Stone - 1.40.0-1 +- Update to 1.40.0. +- Fix compiletest with newer (local-rebuild) libtest +- Build compiletest with in-tree libtest +- Fix ARM EHABI unwinding + * Tue Nov 12 2019 Josh Stone - 1.39.0-2 - Fix a couple build and test issues with rustdoc.