rust 1.32.0-1 (i586;x86_64) 2019-5330
-10000

Status rejected
Submitter cris [@T] beebgames.com
Platform 3.0
Repository main
URL https://abf.openmandriva.org/build_lists/450365
Packages
rust-1.32.0-1.i586.source
rust-1.32.0-1.i586.binary
rust-src-1.32.0-1.i586.binary
rust-1.32.0-1.x86_64.source
rust-1.32.0-1.x86_64.binary
rust-src-1.32.0-1.x86_64.binary
Build Date 2019-03-30 12:01:41 +0000 UTC
Last Updated 2019-04-28 17:32:47.458267105 +0000 UTC
$ git diff --patch-with-stat --summary 306261ada0ba1af22c7f771bcf4957c941a96ee3..7dafa65dfec900e86c654780679990d69405a56c

 .abf.yml                                   |  3 +-
 1.30.1-clippy-sysroot.patch                | 62 ++++++++++++++++++++++++++++++
 1.32.0-fix-configure-of-bundled-llvm.patch | 32 +++++++++++++++
 1.32.0-system-llvm-7-SIGSEGV.patch         | 33 ++++++++++++++++
 rust.spec                                  |  8 +++-
 5 files changed, 134 insertions(+), 4 deletions(-)
 create mode 100644 1.30.1-clippy-sysroot.patch
 create mode 100644 1.32.0-fix-configure-of-bundled-llvm.patch
 create mode 100644 1.32.0-system-llvm-7-SIGSEGV.patch

diff --git a/.abf.yml b/.abf.yml
index 2e4df8c..3ba3e93 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -11,5 +11,4 @@ sources:
   rustc-1.30.0-armv7-unknown-linux-gnueabihf.tar.gz: cbf94368c6f026b29df756890f1a93b0086bd682
   rustc-1.30.0-i686-unknown-linux-gnu.tar.gz: 4ccf2164ccc3027c61e2d163ed5ba6d2769b4e81
   rustc-1.30.0-x86_64-unknown-linux-gnu.tar.gz: 11450cd2954c20ec346f1713c851590caa68d23b
-  rustc-1.31.0-src.tar.gz: 699c7a4af09173e74f90b31eaed468184018037e
-  rustc-1.31.1-src.tar.gz: b4276b400bade8e3fc13aed023c5356ec28bdc80
+  rustc-1.32.0-src.tar.gz: 4a8a9e1158b36571be12c7d86c358691d5febf22
diff --git a/1.30.1-clippy-sysroot.patch b/1.30.1-clippy-sysroot.patch
new file mode 100644
index 0000000..d38f8ba
--- /dev/null
+++ b/1.30.1-clippy-sysroot.patch
@@ -0,0 +1,62 @@
+--- a/src/tools/clippy/src/driver.rs	2018-10-25 20:09:06.143109996 +0300
++++ b/src/tools/clippy/src/driver.rs	2018-10-25 20:11:09.204106005 +0300
+@@ -29,54 +29,22 @@
+             exit(0);
+         }
+ 
+-        let sys_root = option_env!("SYSROOT")
+-            .map(String::from)
+-            .or_else(|| std::env::var("SYSROOT").ok())
+-            .or_else(|| {
+-                let home = option_env!("RUSTUP_HOME").or(option_env!("MULTIRUST_HOME"));
+-                let toolchain = option_env!("RUSTUP_TOOLCHAIN").or(option_env!("MULTIRUST_TOOLCHAIN"));
+-                home.and_then(|home| toolchain.map(|toolchain| format!("{}/toolchains/{}", home, toolchain)))
+-            })
+-            .or_else(|| {
+-                Command::new("rustc")
+-                    .arg("--print")
+-                    .arg("sysroot")
+-                    .output()
+-                    .ok()
+-                    .and_then(|out| String::from_utf8(out.stdout).ok())
+-                    .map(|s| s.trim().to_owned())
+-            })
+-            .expect("need to specify SYSROOT env var during clippy compilation, or use rustup or multirust");
+-
+         // Setting RUSTC_WRAPPER causes Cargo to pass 'rustc' as the first argument.
+         // We're invoking the compiler programmatically, so we ignore this/
+-        let mut orig_args: Vec<String> = env::args().collect();
+-        if orig_args.len() <= 1 {
++        let mut args: Vec<String> = env::args().collect();
++        if args.len() <= 1 {
+             std::process::exit(1);
+         }
+-        if Path::new(&orig_args[1]).file_stem() == Some("rustc".as_ref()) {
++        if Path::new(&args[1]).file_stem() == Some("rustc".as_ref()) {
+             // we still want to be able to invoke it normally though
+-            orig_args.remove(1);
++            args.remove(1);
+         }
+-        // this conditional check for the --sysroot flag is there so users can call
+-        // `clippy_driver` directly
+-        // without having to pass --sysroot or anything
+-        let mut args: Vec<String> = if orig_args.iter().any(|s| s == "--sysroot") {
+-            orig_args.clone()
+-        } else {
+-            orig_args
+-                .clone()
+-                .into_iter()
+-                .chain(Some("--sysroot".to_owned()))
+-                .chain(Some(sys_root))
+-                .collect()
+-        };
+ 
+         // this check ensures that dependencies are built but not linted and the final
+         // crate is
+         // linted but not built
+         let clippy_enabled = env::var("CLIPPY_TESTS").ok().map_or(false, |val| val == "true")
+-            || orig_args.iter().any(|s| s == "--emit=dep-info,metadata");
++            || args.iter().any(|s| s == "--emit=dep-info,metadata");
+ 
+         if clippy_enabled {
+             args.extend_from_slice(&["--cfg".to_owned(), r#"feature="cargo-clippy""#.to_owned()]);
diff --git a/1.32.0-fix-configure-of-bundled-llvm.patch b/1.32.0-fix-configure-of-bundled-llvm.patch
new file mode 100644
index 0000000..eaeab87
--- /dev/null
+++ b/1.32.0-fix-configure-of-bundled-llvm.patch
@@ -0,0 +1,32 @@
+Revert "[CMake] Unconditionally add .h and .td files to target sources"
+
+This reverts commit https://github.com/llvm-mirror/llvm/commit/6fb010f388bb2cb2f00fe039123092308ac4865d.
+
+Bug: https://bugs.gentoo.org/675752#c7
+--- a/src/llvm/cmake/modules/LLVMProcessSources.cmake
++++ b/src/llvm/cmake/modules/LLVMProcessSources.cmake
+@@ -52,15 +52,16 @@ function(llvm_process_sources OUT_VAR)
+   cmake_parse_arguments(ARG "" "" "ADDITIONAL_HEADERS;ADDITIONAL_HEADER_DIRS" ${ARGN})
+   set(sources ${ARG_UNPARSED_ARGUMENTS})
+   llvm_check_source_file_list( ${sources} )
+-  
+-  # This adds .td and .h files to the Visual Studio solution:
+-  add_td_sources(sources)
+-  find_all_header_files(hdrs "${ARG_ADDITIONAL_HEADER_DIRS}")
+-  if (hdrs)
+-    set_source_files_properties(${hdrs} PROPERTIES HEADER_FILE_ONLY ON)
++  if( LLVM_ENABLE_IDE )
++    # This adds .td and .h files to the Visual Studio solution:
++    add_td_sources(sources)
++    find_all_header_files(hdrs "${ARG_ADDITIONAL_HEADER_DIRS}")
++    if (hdrs)
++      set_source_files_properties(${hdrs} PROPERTIES HEADER_FILE_ONLY ON)
++    endif()
++    set_source_files_properties(${ARG_ADDITIONAL_HEADERS} PROPERTIES HEADER_FILE_ONLY ON)
++    list(APPEND sources ${ARG_ADDITIONAL_HEADERS} ${hdrs})
+   endif()
+-  set_source_files_properties(${ARG_ADDITIONAL_HEADERS} PROPERTIES HEADER_FILE_ONLY ON)
+-  list(APPEND sources ${ARG_ADDITIONAL_HEADERS} ${hdrs})
+ 
+   set( ${OUT_VAR} ${sources} PARENT_SCOPE )
+ endfunction(llvm_process_sources)
diff --git a/1.32.0-system-llvm-7-SIGSEGV.patch b/1.32.0-system-llvm-7-SIGSEGV.patch
new file mode 100644
index 0000000..afc2cab
--- /dev/null
+++ b/1.32.0-system-llvm-7-SIGSEGV.patch
@@ -0,0 +1,33 @@
+From 1c95f5a34c14f08d65cdd198827e3a2fcb63cf39 Mon Sep 17 00:00:00 2001
+From: Tom Tromey <tom@tromey.com>
+Date: Tue, 22 Jan 2019 11:13:53 -0700
+Subject: [PATCH] Fix issue 57762
+
+Issue 57762 points out a compiler crash when the compiler was built
+using a stock LLVM 7.  LLVM 7 was released without a necessary fix for
+a bug in the DWARF discriminant code.
+
+This patch changes rustc to use the fallback mode on (non-Rust) LLVM 7.
+
+Closes #57762
+---
+ src/librustc_codegen_llvm/debuginfo/metadata.rs | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs
+index 6deedd0b5ea3..a354eef6887a 100644
+--- a/src/librustc_codegen_llvm/debuginfo/metadata.rs
++++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs
+@@ -1164,7 +1164,11 @@ fn use_enum_fallback(cx: &CodegenCx) -> bool {
+     // On MSVC we have to use the fallback mode, because LLVM doesn't
+     // lower variant parts to PDB.
+     return cx.sess().target.target.options.is_like_msvc
+-        || llvm_util::get_major_version() < 7;
++        || llvm_util::get_major_version() < 7
++        // LLVM version 7 did not release with an important bug fix;
++        // but the required patch is in the equivalent Rust LLVM.
++        // See https://github.com/rust-lang/rust/issues/57762.
++        || (llvm_util::get_major_version() == 7 && unsafe { !llvm::LLVMRustIsRustLLVM() });
+ }
+ 
+ // Describes the members of an enum value: An enum is described as a union of
diff --git a/rust.spec b/rust.spec
index da9fdfe..4a51a3b 100644
--- a/rust.spec
+++ b/rust.spec
@@ -23,13 +23,17 @@
 
 Summary:	A safe, concurrent, practical programming language
 Name:		rust
-Version:	1.31.1
+Version:	1.32.0
 Release:	1
 Group:		Development/Other
 License:	MIT
 Url:		http://www.rust-lang.org/
 Source0:	http://static.rust-lang.org/dist/%{oname}-%{version}-src.tar.gz
 Source100:	rust.rpmlintrc
+
+Patch0:		1.32.0-system-llvm-7-SIGSEGV.patch
+Patch1:		1.32.0-fix-configure-of-bundled-llvm.patch
+Patch2:		1.30.1-clippy-sysroot.patch
 %if %{with bootstrap}
 Source1:	rustc-1.30.0-x86_64-unknown-linux-gnu.tar.gz
 Source2:	rust-std-1.30.0-x86_64-unknown-linux-gnu.tar.gz
@@ -113,6 +117,7 @@ various editors.
 
 %prep
 %setup -q -n %{oname}-%{version}-src
+%apply_patches
 
 %if %{with llvm}
 rm -rf src/llvm/
@@ -170,7 +175,6 @@ export RUSTFLAGS="-Clink-arg=-Wl,-z,relro,-z,now"
 	--mandir=%{_mandir} \
 	--infodir=%{_infodir} \
 	--libdir=%{common_libdir} \
-	--disable-jemalloc \
 	--disable-rpath \
 	--disable-codegen-tests \
 	--disable-debuginfo \
Not Available

cris [@T] beebgames.comsuperseded, rejected in abf2065d 02hrs
benbullard79 [@T] cox.net7 day rule is in effect2040d 17hrs
benbullard79 [@T] cox.netWoops!2040d 17hrs
benbullard79 [@T] cox.netSuperceded.2040d 17hrs