summaryrefslogtreecommitdiff
path: root/dev-lang/rust/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-04-25 11:37:10 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-04-25 11:37:10 +0100
commit38423c67c8a23f6a1bc42038193182e2da3116eb (patch)
tree04e2cf4bd43601b77daa79fe654e409187093c5e /dev-lang/rust/files
parent623ee73d661e5ed8475cb264511f683407d87365 (diff)
gentoo resync : 25.04.2020
Diffstat (limited to 'dev-lang/rust/files')
-rw-r--r--dev-lang/rust/files/0012-Ignore-broken-and-non-applicable-tests.patch89
-rw-r--r--dev-lang/rust/files/1.43.0-llvm10-LLVMTimeTraceProfilerInitialize.patch26
-rw-r--r--dev-lang/rust/files/1.43.0-llvm10.patch194
3 files changed, 309 insertions, 0 deletions
diff --git a/dev-lang/rust/files/0012-Ignore-broken-and-non-applicable-tests.patch b/dev-lang/rust/files/0012-Ignore-broken-and-non-applicable-tests.patch
new file mode 100644
index 000000000000..45fda8aeaf8f
--- /dev/null
+++ b/dev-lang/rust/files/0012-Ignore-broken-and-non-applicable-tests.patch
@@ -0,0 +1,89 @@
+From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 16 Sep 2018 16:38:48 +0000
+Subject: [PATCH 12/15] 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)
+long-linker-command-lines: takes >10 minutes to run (but still passes)
+simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
+sparc-struct-abi: no sparc target
+sysroot-crates-are-unstable: can't run rustc without RPATH
+---
+ src/test/codegen/sparc-struct-abi.rs | 1 +
+ src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile | 2 ++
+ src/test/run-make-fulldeps/long-linker-command-lines/Makefile | 2 ++
+ src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile | 2 ++
+ src/test/ui/env-funky-keys.rs | 1 +
+ src/test/ui/simd/simd-intrinsic-generic-bitmask.rs | 2 ++
+ 6 files changed, 10 insertions(+)
+
+diff --git a/src/test/codegen/sparc-struct-abi.rs b/src/test/codegen/sparc-struct-abi.rs
+index 78e5b14a212..6f93e93286b 100644
+--- a/src/test/codegen/sparc-struct-abi.rs
++++ b/src/test/codegen/sparc-struct-abi.rs
+@@ -4,6 +4,7 @@
+
+ // only-sparc64
+ // compile-flags: -O --target=sparc64-unknown-linux-gnu --crate-type=rlib
++// ignore-test
+ #![feature(no_core, lang_items)]
+ #![no_core]
+
+diff --git a/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
+index f124ca2ab61..363b18f0985 100644
+--- a/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
++++ b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
+@@ -1,3 +1,5 @@
++# ignore-aarch64
++
+ -include ../tools.mk
+
+ all:
+diff --git a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
+index 5876fbc94bc..5f167ece1a2 100644
+--- a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
++++ b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
+@@ -1,3 +1,5 @@
++# ignore-test
++
+ -include ../tools.mk
+
+ all:
+diff --git a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
+index 9e770706857..6d92ec5cec8 100644
+--- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
++++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
+@@ -1,1 +1,3 @@
++# ignore-test
++
+ all:
+ python2.7 test.py
+diff --git a/src/test/ui/env-funky-keys.rs b/src/test/ui/env-funky-keys.rs
+index c5c824ac58d..f3fe047a79c 100644
+--- a/src/test/ui/env-funky-keys.rs
++++ b/src/test/ui/env-funky-keys.rs
+@@ -1,6 +1,7 @@
+ // run-pass
+ // Ignore this test on Android, because it segfaults there.
+
++// ignore-test
+ // ignore-android
+ // ignore-windows
+ // ignore-cloudabi no execve
+diff --git a/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs b/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs
+index b28f742a92e..3ee4ccce731 100644
+--- a/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs
++++ b/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs
+@@ -2,6 +2,8 @@
+ #![allow(non_camel_case_types)]
+
+ // ignore-emscripten
++// ignore-powerpc
++// ignore-powerpc64
+
+ // Test that the simd_bitmask intrinsic produces correct results.
+
+--
+2.24.1
+
diff --git a/dev-lang/rust/files/1.43.0-llvm10-LLVMTimeTraceProfilerInitialize.patch b/dev-lang/rust/files/1.43.0-llvm10-LLVMTimeTraceProfilerInitialize.patch
new file mode 100644
index 000000000000..552edddd4571
--- /dev/null
+++ b/dev-lang/rust/files/1.43.0-llvm10-LLVMTimeTraceProfilerInitialize.patch
@@ -0,0 +1,26 @@
+From 724b7ee92f3e83af2a451b726ad990fe7db54528 Mon Sep 17 00:00:00 2001
+From: Nikita Popov <nikita.ppv@gmail.com>
+Date: Tue, 4 Feb 2020 20:35:50 +0100
+Subject: [PATCH] Fix timeTraceProfilerInitialize for LLVM 10
+
+---
+ src/rustllvm/PassWrapper.cpp | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp
+index 65071c3ed86e0..ebf4d4017a813 100644
+--- a/src/rustllvm/PassWrapper.cpp
++++ b/src/rustllvm/PassWrapper.cpp
+@@ -67,7 +67,11 @@ extern "C" void LLVMInitializePasses() {
+ }
+
+ extern "C" void LLVMTimeTraceProfilerInitialize() {
+-#if LLVM_VERSION_GE(9, 0)
++#if LLVM_VERSION_GE(10, 0)
++ timeTraceProfilerInitialize(
++ /* TimeTraceGranularity */ 0,
++ /* ProcName */ "rustc");
++#elif LLVM_VERSION_GE(9, 0)
+ timeTraceProfilerInitialize();
+ #endif
+ }
diff --git a/dev-lang/rust/files/1.43.0-llvm10.patch b/dev-lang/rust/files/1.43.0-llvm10.patch
new file mode 100644
index 000000000000..14940716abf6
--- /dev/null
+++ b/dev-lang/rust/files/1.43.0-llvm10.patch
@@ -0,0 +1,194 @@
+From fe83c6cd5922fd6f964fa40ca704fb7f92426202 Mon Sep 17 00:00:00 2001
+From: Nikita Popov <nikita.ppv@gmail.com>
+Date: Tue, 4 Feb 2020 19:23:45 +0100
+Subject: [PATCH 2/7] Remove trailing newline from llvm-config output
+
+---
+ src/bootstrap/test.rs | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
+index 4cfda606c4bc8..aaec10ff10b38 100644
+--- a/src/bootstrap/test.rs
++++ b/src/bootstrap/test.rs
+@@ -1142,6 +1142,8 @@ impl Step for Compiletest {
+ let llvm_config = builder.ensure(native::Llvm { target: builder.config.build });
+ if !builder.config.dry_run {
+ let llvm_version = output(Command::new(&llvm_config).arg("--version"));
++ // Remove trailing newline from llvm-config output.
++ let llvm_version = llvm_version.trim_end();
+ cmd.arg("--llvm-version").arg(llvm_version);
+ }
+ if !builder.is_rust_llvm(target) {
+
+From 545f18e8f1c2227b74091fbca5c73595f65eeeed Mon Sep 17 00:00:00 2001
+From: Nikita Popov <nikita.ppv@gmail.com>
+Date: Sat, 18 Jan 2020 23:00:30 +0100
+Subject: [PATCH 3/7] Fix LLVM version handling in compiletest
+
+Convert version string to integer before comparing. Otherwise
+we get into trouble with double digit versions ;)
+---
+ src/tools/compiletest/src/header.rs | 27 +++++++++++++++++++++------
+ 1 file changed, 21 insertions(+), 6 deletions(-)
+
+diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs
+index 2a24a8c3c9485..cb648db8830ef 100644
+--- a/src/tools/compiletest/src/header.rs
++++ b/src/tools/compiletest/src/header.rs
+@@ -191,6 +191,7 @@ impl EarlyProps {
+ return true;
+ }
+ if let Some(ref actual_version) = config.llvm_version {
++ let actual_version = version_to_int(actual_version);
+ if line.starts_with("min-llvm-version") {
+ let min_version = line
+ .trim_end()
+@@ -199,7 +200,7 @@ impl EarlyProps {
+ .expect("Malformed llvm version directive");
+ // Ignore if actual version is smaller the minimum required
+ // version
+- &actual_version[..] < min_version
++ actual_version < version_to_int(min_version)
+ } else if line.starts_with("min-system-llvm-version") {
+ let min_version = line
+ .trim_end()
+@@ -208,7 +209,7 @@ impl EarlyProps {
+ .expect("Malformed llvm version directive");
+ // Ignore if using system LLVM and actual version
+ // is smaller the minimum required version
+- config.system_llvm && &actual_version[..] < min_version
++ config.system_llvm && actual_version < version_to_int(min_version)
+ } else if line.starts_with("ignore-llvm-version") {
+ // Syntax is: "ignore-llvm-version <version1> [- <version2>]"
+ let range_components = line
+@@ -219,15 +220,15 @@ impl EarlyProps {
+ .take(3) // 3 or more = invalid, so take at most 3.
+ .collect::<Vec<&str>>();
+ match range_components.len() {
+- 1 => &actual_version[..] == range_components[0],
++ 1 => actual_version == version_to_int(range_components[0]),
+ 2 => {
+- let v_min = range_components[0];
+- let v_max = range_components[1];
++ let v_min = version_to_int(range_components[0]);
++ let v_max = version_to_int(range_components[1]);
+ if v_max < v_min {
+ panic!("Malformed LLVM version range: max < min")
+ }
+ // Ignore if version lies inside of range.
+- &actual_version[..] >= v_min && &actual_version[..] <= v_max
++ actual_version >= v_min && actual_version <= v_max
+ }
+ _ => panic!("Malformed LLVM version directive"),
+ }
+@@ -238,6 +239,20 @@ impl EarlyProps {
+ false
+ }
+ }
++
++ fn version_to_int(version: &str) -> u32 {
++ let version_without_suffix = version.split('-').next().unwrap();
++ let components: Vec<u32> = version_without_suffix
++ .split('.')
++ .map(|s| s.parse().expect("Malformed version component"))
++ .collect();
++ match components.len() {
++ 1 => components[0] * 10000,
++ 2 => components[0] * 10000 + components[1] * 100,
++ 3 => components[0] * 10000 + components[1] * 100 + components[2],
++ _ => panic!("Malformed version"),
++ }
++ }
+ }
+ }
+
+
+From e06fff0609fedf95b826d82ff32ff836b0e3f3da Mon Sep 17 00:00:00 2001
+From: Nikita Popov <nikita.ppv@gmail.com>
+Date: Sun, 19 Jan 2020 22:47:45 +0100
+Subject: [PATCH 4/7] Adjust data layout in test
+
+---
+ .../run-make-fulldeps/target-specs/my-awesome-platform.json | 2 +-
+ .../target-specs/my-x86_64-unknown-linux-gnu-platform.json | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/test/run-make-fulldeps/target-specs/my-awesome-platform.json b/src/test/run-make-fulldeps/target-specs/my-awesome-platform.json
+index 8d028280a8da7..00de3de05f07a 100644
+--- a/src/test/run-make-fulldeps/target-specs/my-awesome-platform.json
++++ b/src/test/run-make-fulldeps/target-specs/my-awesome-platform.json
+@@ -1,5 +1,5 @@
+ {
+- "data-layout": "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128",
++ "data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128",
+ "linker-flavor": "gcc",
+ "llvm-target": "i686-unknown-linux-gnu",
+ "target-endian": "little",
+diff --git a/src/test/run-make-fulldeps/target-specs/my-x86_64-unknown-linux-gnu-platform.json b/src/test/run-make-fulldeps/target-specs/my-x86_64-unknown-linux-gnu-platform.json
+index 48040ae3da0ef..6d5e964ed4fee 100644
+--- a/src/test/run-make-fulldeps/target-specs/my-x86_64-unknown-linux-gnu-platform.json
++++ b/src/test/run-make-fulldeps/target-specs/my-x86_64-unknown-linux-gnu-platform.json
+@@ -1,6 +1,6 @@
+ {
+ "pre-link-args": {"gcc": ["-m64"]},
+- "data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128",
++ "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128",
+ "linker-flavor": "gcc",
+ "llvm-target": "x86_64-unknown-linux-gnu",
+ "target-endian": "little",
+
+From 724b7ee92f3e83af2a451b726ad990fe7db54528 Mon Sep 17 00:00:00 2001
+From: Nikita Popov <nikita.ppv@gmail.com>
+Date: Tue, 4 Feb 2020 20:35:50 +0100
+Subject: [PATCH 5/7] Fix timeTraceProfilerInitialize for LLVM 10
+
+---
+ src/rustllvm/PassWrapper.cpp | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp
+index 65071c3ed86e0..ebf4d4017a813 100644
+--- a/src/rustllvm/PassWrapper.cpp
++++ b/src/rustllvm/PassWrapper.cpp
+@@ -67,7 +67,11 @@ extern "C" void LLVMInitializePasses() {
+ }
+
+ extern "C" void LLVMTimeTraceProfilerInitialize() {
+-#if LLVM_VERSION_GE(9, 0)
++#if LLVM_VERSION_GE(10, 0)
++ timeTraceProfilerInitialize(
++ /* TimeTraceGranularity */ 0,
++ /* ProcName */ "rustc");
++#elif LLVM_VERSION_GE(9, 0)
+ timeTraceProfilerInitialize();
+ #endif
+ }
+
+From aed9cf36bb4b9c6b357e395552dbb5e1802feec9 Mon Sep 17 00:00:00 2001
+From: Nikita Popov <nikita.ppv@gmail.com>
+Date: Mon, 2 Mar 2020 22:37:55 +0100
+Subject: [PATCH 6/7] Update CreateMemSet() usage for LLVM 10
+
+---
+ src/rustllvm/RustWrapper.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
+index 49b6e1bfec38d..002eb031dac64 100644
+--- a/src/rustllvm/RustWrapper.cpp
++++ b/src/rustllvm/RustWrapper.cpp
+@@ -1300,8 +1300,13 @@ extern "C" LLVMValueRef LLVMRustBuildMemSet(LLVMBuilderRef B,
+ LLVMValueRef Dst, unsigned DstAlign,
+ LLVMValueRef Val,
+ LLVMValueRef Size, bool IsVolatile) {
++#if LLVM_VERSION_GE(10, 0)
++ return wrap(unwrap(B)->CreateMemSet(
++ unwrap(Dst), unwrap(Val), unwrap(Size), MaybeAlign(DstAlign), IsVolatile));
++#else
+ return wrap(unwrap(B)->CreateMemSet(
+ unwrap(Dst), unwrap(Val), unwrap(Size), DstAlign, IsVolatile));
++#endif
+ }
+
+ extern "C" LLVMValueRef