summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2020-04-24 20:35:51 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2020-04-24 23:05:51 -0700
commitcff84737fa33c9186b8549c66ecda830382fba36 (patch)
tree3696ed32178472427bb4df0c620e2cf34abc44f9 /dev-lang/rust
parentdev-lang/rust-bin: bump to 1.43.0, multilib on amd64 (diff)
downloadgentoo-cff84737fa33c9186b8549c66ecda830382fba36.tar.gz
gentoo-cff84737fa33c9186b8549c66ecda830382fba36.tar.bz2
gentoo-cff84737fa33c9186b8549c66ecda830382fba36.zip
dev-lang/rust: bump to 1.43.0
use system libgit2 initial src_test support (thanks smaeul) clean-up ebuild code a bit Closes: https://bugs.gentoo.org/707746 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'dev-lang/rust')
-rw-r--r--dev-lang/rust/Manifest15
-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
-rw-r--r--dev-lang/rust/rust-1.43.0.ebuild413
5 files changed, 737 insertions, 0 deletions
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index acba249de038..5f746fe30666 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -26,5 +26,20 @@ DIST rust-1.41.1-powerpc64le-unknown-linux-gnu.tar.xz 110594504 BLAKE2B eaf9c92e
DIST rust-1.41.1-s390x-unknown-linux-gnu.tar.xz 114814112 BLAKE2B ef22c377e1d89ef4ebe78df19d91bcf042e2e1d8997be80d7d40998b18f6b44f8bb1232b1f72e42e3ffb6d1ff235f3cd2f04854e996bbf7be8f6d5d7299e8514 SHA512 f809adc626876df5c6e050362d59189ede5e3991ac41fd129922540abeb728f618e1a3f3925cee34895de5e037141aabb1f8c2b94d4069945d174e38446e8153
DIST rust-1.41.1-x86_64-unknown-linux-gnu.tar.xz 111202140 BLAKE2B 226c68b1e97cc9be82e81f6c9e065e08514166a65a57159c2f63527063ae5f514650afc2591e0c4854ecd0239dc82cbc9a97b99412608645aca879a71354d857 SHA512 c75d4a18cf9300c6ab480d34c5e4b41be971535931455239330cb2a0e927bcf9cf102498cad5dd1d5d802fd1d9c9d214b80e8ff15aa6be68d3e7f41420cad666
DIST rust-1.41.1-x86_64-unknown-linux-musl.tar.xz 96076684 BLAKE2B 3672e24a83c1e4c97a0844f9522a9fced19d5ef01c89d44e54bba8683514a86f7a14ea2e8c2f28d03c65b7e2e0358ff3cea2f85de1e69eb5334c55e18a8c8e4f SHA512 29e7b2aae35017d7f4313e0a482712390ffec752e62d8b1bda95d56a1f93ba882a8f610b469b5d2d7fa3d6d35c2cdc4e45d219ad85b8a3f71ba6ce04b1add48b
+DIST rust-1.42.0-aarch64-unknown-linux-gnu.tar.xz 99903344 BLAKE2B 77e64c56c2f3ab505af9d9003d127b8beb3b2204344985faa6de92905c96d92342485e062e0ff1228baf51a67c8c2274078a60cc86e0c67ba99481a5c01d4d0d SHA512 691a11e279efdcafa6bdafacb7fb48ccf653e180e0e85909b6031105a297d47538efb36d63216f6185427f818483a51aa827f351ca2123840d72caf60079fe13
+DIST rust-1.42.0-arm-unknown-linux-gnueabi.tar.xz 102380528 BLAKE2B 5df9a33fa2b1414c9986f01d8dbd85fab2a705818336e1b2c94ca63136be7be63d25a2586efa956cf31aa604106b3c92857e2133169c7f3062da22006f1896bf SHA512 8e1b5351a3289441823ed0ce12f2fb0cedc267efe5c504966aefbc9a74f37ed11f4da1086295d7351c58c2d0bf59c4b7b54b23d5ec0dec4750bd7e38500afeb0
+DIST rust-1.42.0-arm-unknown-linux-gnueabihf.tar.xz 100300920 BLAKE2B eb90db613230e44f5002388d83460b635f33ceee349b094ca2472171d54ce3d459b6a2143a66705ef7ea89dcb0fc9b21e6d2f2f53479098ca8559f7c84ee0697 SHA512 d58c1820f39abfdf74569e26ba4f13347dde16632415d4ec0b54cc99c3b04563ed551ed1ba717b33e9b1a9b13e2502008203472f8ed712e302d1db66909e7ccf
+DIST rust-1.42.0-armv7-unknown-linux-gnueabihf.tar.xz 105021972 BLAKE2B 5a04715582193138344ef05700af4ccc90074a1b7d6ed8109993b6c59315e6fd6bc947504fcde36b869da8db4b7b8d8240f908387c8b2d78e21e35f6c27fdef7 SHA512 26768ec530506e20fed8f9ef2c1ca85eec155fc90949f2063836b6109b296a976c8430a698971a8b1c11e8f6ad043d854a36e9f0e849417178411dc5cbd30e59
+DIST rust-1.42.0-i686-unknown-linux-gnu.tar.xz 124258356 BLAKE2B 3e2e0c11e792943be65c989d4b9ba98cc92b2a1dfec7b8506f00d20e439050faf744b991e7e4fa91f0c8a52f7a4e5fb8dc5d383fd0430fa46c4e35dfa5bb26e7 SHA512 7376be5abed573bbf68f73ed5609fa8e22dfa3ead19a3f3d78d553347e3ae01604ab9906f5317f1687a8ab3f9ad9c38cde44ef6f56d7da65a788a74aee9df057
+DIST rust-1.42.0-mips-unknown-linux-gnu.tar.xz 95265764 BLAKE2B b02a340c7689812f7e13286f3dcde893933869c9becb071e9b0455eb68130d74fd67babdf85859ff7b4ef449261be6e09f230a4cf6196041c199d717324c8b21 SHA512 cc19b383ac3dde62750cd247e7fdec9ca4b4ee16880b9b00c42e62c57b46c522950983b500bf8fc70b8198469a18ab92c1ca382e8a07abf8bc937d8f17208d5d
+DIST rust-1.42.0-mips64-unknown-linux-gnuabi64.tar.xz 99814476 BLAKE2B 405fa7426a8d21648be97f6b93065b20878419a2c0aa5889ea6a66b9c0f5804d2673a23932a2462965f04e320c4e78f4c79d5b0a6f9877dfe9909d4b4b8864be SHA512 e8933af6290f2cb881fdfc7d2ba3da1c47ef67d847c8a3e659f8f626b7154f202f071ccd4e90555333a3f3dc2bf4101a645b5665dd00a6d72b5acacd6ad317a2
+DIST rust-1.42.0-mipsel-unknown-linux-gnu.tar.xz 95248132 BLAKE2B 875597ba699281d7160ba2f36fe03f3a234d19e5c6e91ce1291ab2369799349a42e1e7e6dcdf524980548a8c499693d6b48967913d4280776da7a921dfd18ab1 SHA512 733307eec1f938385a43b38aadcd84b7d4c1cfc084e070333d955d8b36f3192a7f7e6c05c5c07d782b945acbb261e48db94f2f9f7d3a09e8669055a577c90528
+DIST rust-1.42.0-powerpc-unknown-linux-gnu.tar.xz 100228400 BLAKE2B e05749ab974ffb0dbae332d4f59c8f71047f86c5e33a368555d996ccf14d229b0cda2cfbcf7f05902746fcf9b18a9a1ba4cd8d8cfeb51d3128f04914e8bc062d SHA512 ad2c9d3ebae5ccffd1f70d0a732a3e6cf793b203a8ab7bea3b90d45b63dac84cd513fcc494c7401a6dedcc1e4c3b6fa4ba95a4d3c10411dce5c2a06b84ef934a
+DIST rust-1.42.0-powerpc64-unknown-linux-gnu.tar.xz 106116524 BLAKE2B bfa533d3fdeaba4c539f18f205ddaa99c6a6be8f4213cf2d02090cc576ee17c721295262c78d84ec01bc286b59f6a30bf32e7c44e435205908fec03de1a8d60a SHA512 668d1d353bdaf676043ab7f4baad464b202e8ae1be7713e3481b8e9fb5fabd1020e10e178d69d099541cb1b23362b50b826790740156f1c96efa3d2a7457e404
+DIST rust-1.42.0-powerpc64le-unknown-linux-gnu.tar.xz 109926880 BLAKE2B 92a9067ff95bf2293eb5dc3f055275646f9f9764a59ea5dc772b1d8da78c28acfbd93e7a9076dd7ddfb36255cecda0646a7e5cc4ef4767cdb320aaf046f77162 SHA512 e1db9bbef45e88e7d1d5b905379c04786a015c90d0d9de6a6c16276a3e91c342a8231dda7a4d46ecc7adc969d07fd7dd8595975647b9ab69f8997fee74401219
+DIST rust-1.42.0-s390x-unknown-linux-gnu.tar.xz 116937084 BLAKE2B 4d68801c7c40aa0aca24d19d25e80614b5b40aa2715aacddb6b9f5441b1c7e19e7b0d396caea860607df1dc580deadc43d9cd1f988cbe654b3132b665f9032af SHA512 85b1331a9a71cc43a2fa628b8510590ff072e409c2c38ebfd9089ab7a245182e23b52f6221b25c63f6048e1bf4ada0f561dd8f3f810680c9727040bc8a0d8d46
+DIST rust-1.42.0-x86_64-unknown-linux-gnu.tar.xz 110826392 BLAKE2B 8c90bacc9b350d64c4084edf104e9004461d681e19f8e8179ff6eb0b2bc50e25d95e3ed13c83f77224cc60f374f3961f0069dfe20512c844598b8eb2393300b0 SHA512 87c06d4503e7ba12bd3dfc8dd279a3bdf33a24d2c22eec1378b79b2c17ccdad9b4c8dbd0d4704eae1f3476aec5639d3ba143e8c74a296d631b17b57da7447e70
+DIST rust-1.42.0-x86_64-unknown-linux-musl.tar.xz 97471188 BLAKE2B 29e7089a33a20e5c57a68c171e6b049e5dbc97d4c940106bbf7116c970e7ddb2271b1cf33162b4141d89b0b59049e09ca49c848a326036eefbc03e369f3ab18e SHA512 d804a08e38fa6735ce57067a3c39c59e2932943aa8baf43419815e9c743f50e198d88ef80d87fc193b8bcba011c685471146c0741954095eed74e41f86de38c8
DIST rustc-1.41.1-src.tar.xz 93754192 BLAKE2B 235ece650d0c75e1c8700ce73d3811997cd0d827b850a6dd435a269f3f86d85849d54755ea346c5ddcbe0d1224836fd78213f6abeab4a9a8c4c3e2d8a05ff7b4 SHA512 ef33565c9cf4e27ca279072bfed3301e0276c09407d49727640746ba78d289de285278d64b1cce8708461fd6c97c7ab2ea8d56e7a4c4a23b2e66e2d164c35fc9
DIST rustc-1.42.0-src.tar.xz 94186592 BLAKE2B 82298ef3da44188546bb945bcbfc1af630e6a4466b643667da08a04a33c6417afd68fc86302bdd22ab36c208fdb13cbc479e762d1217c05507bbfeb13bfbef7e SHA512 589bfdc92deedd33b8ea0df7f7c64c2a9a085fbea64936eff92f81e812309c060ed7a7adc96f6010d7adf62a68434a230da0f6c5b3540df4e0a5c6de05a31b16
+DIST rustc-1.43.0-src.tar.xz 94354332 BLAKE2B 845b52b6e447b3c9bf3256256f0215056989334d99dc17d196fd088b4c515928602632ce8882316dff6dee462c22aebf5bc7f21da0b4b206ec88bc178ff69163 SHA512 dbff18567f2971da4eb13c670c30b136757692df1bc5024cdc0406f3c30574d3485fd616724987bcc765bc5f64c8ed5026f0e96f11eacb035e00256ed190b4f3
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
diff --git a/dev-lang/rust/rust-1.43.0.ebuild b/dev-lang/rust/rust-1.43.0.ebuild
new file mode 100644
index 000000000000..f667f6633749
--- /dev/null
+++ b/dev-lang/rust/rust-1.43.0.ebuild
@@ -0,0 +1,413 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clippy cpu_flags_x86_sse2 debug doc libressl miri nightly parallel-compiler rls rustfmt system-bootstrap system-llvm wasm ${ALL_LLVM_TARGETS[*]}"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling more than one slot
+# simultaneously.
+
+# How to use it:
+# 1. List all the working slots (with min versions) in ||, newest first.
+# 2. Update the := to specify *max* version, e.g. < 11.
+# 3. Specify LLVM_MAX_SLOT, e.g. 10.
+LLVM_DEPEND="
+ || (
+ sys-devel/llvm:10[${LLVM_TARGET_USEDEPS// /,}]
+ sys-devel/llvm:9[${LLVM_TARGET_USEDEPS// /,}]
+ )
+ <sys-devel/llvm-11:=
+ wasm? ( sys-devel/lld )
+"
+LLVM_MAX_SLOT=10
+
+BOOTSTRAP_DEPEND="|| ( >=dev-lang/rust-1.$(($(ver_cut 2) - 1)) >=dev-lang/rust-bin-1.$(($(ver_cut 2) - 1)) )"
+
+# libgit2 should be at least same as bungled into libgit-sys #707746
+COMMON_DEPEND="
+ >=dev-libs/libgit2-0.99:=
+ net-libs/libssh2:=
+ net-libs/http-parser:=
+ net-misc/curl:=[ssl]
+ sys-libs/zlib:=
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ elibc_musl? ( sys-libs/libunwind )
+ system-llvm? (
+ ${LLVM_DEPEND}
+ )
+"
+
+DEPEND="${COMMON_DEPEND}
+ ${PYTHON_DEPS}
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
+ !system-llvm? (
+ dev-util/cmake
+ dev-util/ninja
+ )
+"
+
+RDEPEND="${COMMON_DEPEND}
+ >=app-eselect/eselect-rust-20190311
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+QA_FLAGS_IGNORED="
+ usr/bin/.*-${PV}
+ usr/lib.*/lib.*.so
+ usr/lib/rustlib/.*/codegen-backends/librustc_codegen_llvm-llvm.so
+ usr/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="usr/lib.*/librustc_macros.*.so"
+
+PATCHES=(
+ "${FILESDIR}"/1.40.0-add-soname.patch
+ "${FILESDIR}"/0012-Ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.43.0-llvm10.patch
+ "${FILESDIR}"/1.42.0-libressl.patch
+)
+
+S="${WORKDIR}/${MY_P}-src"
+
+toml_usex() {
+ usex "$1" true false
+}
+
+pre_build_checks() {
+ CHECKREQS_DISK_BUILD="9G"
+ eshopts_push -s extglob
+ if is-flagq '-g?(gdb)?([1-9])'; then
+ CHECKREQS_DISK_BUILD="15G"
+ fi
+ eshopts_pop
+ check-reqs_pkg_setup
+}
+
+pkg_pretend() {
+ pre_build_checks
+}
+
+pkg_setup() {
+ pre_build_checks
+ python-any-r1_pkg_setup
+
+ export LIBGIT2_SYS_USE_PKG_CONFIG=1
+ export LIBSSH2_SYS_USE_PKG_CONFIG=1
+ export PKG_CONFIG_ALLOW_CROSS=1
+
+ if use system-llvm; then
+ llvm_pkg_setup
+
+ local llvm_config="$(get_llvm_prefix "$LLVM_MAX_SLOT")/bin/llvm-config"
+
+ export LLVM_LINK_SHARED=1
+ export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
+ fi
+}
+
+src_prepare() {
+ if ! use system-bootstrap; then
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+ local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
+ --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
+ fi
+ rust_targets="${rust_targets#,}"
+
+ local tools="\"cargo\","
+ if use clippy; then
+ tools="\"clippy\",$tools"
+ fi
+ if use miri; then
+ tools="\"miri\",$tools"
+ fi
+ if use rls; then
+ tools="\"rls\",\"analysis\",\"src\",$tools"
+ fi
+ if use rustfmt; then
+ tools="\"rustfmt\",$tools"
+ fi
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ rust_stage0_root="$(rustc --print sysroot)"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+
+ rust_target="$(rust_abi)"
+
+ cat <<- EOF > "${S}"/config.toml
+ [llvm]
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ ninja = true
+ targets = "${LLVM_TARGETS// /;}"
+ experimental-targets = ""
+ link-shared = $(toml_usex system-llvm)
+ [build]
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ docs = $(toml_usex doc)
+ compiler-docs = $(toml_usex doc)
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ tools = [${tools}]
+ verbose = 2
+ sanitizers = false
+ profiler = false
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr"
+ libdir = "lib"
+ docdir = "share/doc/${PF}"
+ mandir = "share/man"
+ [rust]
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debuginfo-level-rustc = 0
+ backtrace = true
+ incremental = false
+ default-linker = "$(tc-getCC)"
+ parallel-compiler = $(toml_usex parallel-compiler)
+ channel = "$(usex nightly nightly stable)"
+ rpath = false
+ verbose-tests = true
+ optimize-tests = $(toml_usex !debug)
+ codegen-tests = true
+ dist-src = false
+ lld = $(usex system-llvm false $(toml_usex wasm))
+ backtrace-on-ice = true
+ jemalloc = false
+ [dist]
+ src-tarball = false
+ EOF
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ cat <<- EOF >> "${S}"/config.env
+ CFLAGS_${rust_target}=${arch_cflags}
+ EOF
+
+ cat <<- EOF >> "${S}"/config.toml
+ [target.${rust_target}]
+ cc = "$(tc-getBUILD_CC)"
+ cxx = "$(tc-getBUILD_CXX)"
+ linker = "$(tc-getCC)"
+ ar = "$(tc-getAR)"
+ EOF
+ # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ if use elibc_musl; then
+ cat <<- EOF >> "${S}"/config.toml
+ crt-static = false
+ EOF
+ fi
+ if use system-llvm; then
+ cat <<- EOF >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ EOF
+ fi
+ done
+ if use wasm; then
+ cat <<- EOF >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ EOF
+ fi
+
+ einfo "Rust configured with the following settings:"
+ cat "${S}"/config.toml || die
+}
+
+src_compile() {
+ env $(cat "${S}"/config.env) RUST_BACKTRACE=1\
+ "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+ env $(cat "${S}"/config.env) RUST_BACKTRACE=1\
+ "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml -j$(makeopts_jobs) --no-doc --no-fail-fast \
+ src/test/codegen \
+ src/test/codegen-units \
+ src/test/compile-fail \
+ src/test/incremental \
+ src/test/mir-opt \
+ src/test/pretty \
+ src/test/run-fail \
+ src/test/run-make \
+ src/test/run-make-fulldeps \
+ src/test/ui \
+ src/test/ui-fulldeps || die
+}
+
+src_install() {
+ env $(cat "${S}"/config.env) DESTDIR="${D}" \
+ "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml || die
+
+ # bug #689562, #689160
+ rm "${D}/etc/bash_completion.d/cargo" || die
+ rmdir "${D}"/etc{/bash_completion.d,} || die
+ dobashcomp build/tmp/dist/cargo-image/etc/bash_completion.d/cargo
+
+ mv "${ED}/usr/bin/rustc" "${ED}/usr/bin/rustc-${PV}" || die
+ mv "${ED}/usr/bin/rustdoc" "${ED}/usr/bin/rustdoc-${PV}" || die
+ mv "${ED}/usr/bin/rust-gdb" "${ED}/usr/bin/rust-gdb-${PV}" || die
+ mv "${ED}/usr/bin/rust-gdbgui" "${ED}/usr/bin/rust-gdbgui-${PV}" || die
+ mv "${ED}/usr/bin/rust-lldb" "${ED}/usr/bin/rust-lldb-${PV}" || die
+ mv "${ED}/usr/bin/cargo" "${ED}/usr/bin/cargo-${PV}" || die
+ if use clippy; then
+ mv "${ED}/usr/bin/clippy-driver" "${ED}/usr/bin/clippy-driver-${PV}" || die
+ mv "${ED}/usr/bin/cargo-clippy" "${ED}/usr/bin/cargo-clippy-${PV}" || die
+ fi
+ if use miri; then
+ mv "${ED}/usr/bin/miri" "${ED}/usr/bin/miri-${PV}" || die
+ mv "${ED}/usr/bin/cargo-miri" "${ED}/usr/bin/cargo-miri-${PV}" || die
+ fi
+ if use rls; then
+ mv "${ED}/usr/bin/rls" "${ED}/usr/bin/rls-${PV}" || die
+ fi
+ if use rustfmt; then
+ mv "${ED}/usr/bin/rustfmt" "${ED}/usr/bin/rustfmt-${PV}" || die
+ mv "${ED}/usr/bin/cargo-fmt" "${ED}/usr/bin/cargo-fmt-${PV}" || die
+ fi
+
+ # Move public shared libs to abi specific libdir
+ # Private and target specific libs MUST stay in /usr/lib/rustlib/${rust_target}/lib
+ if [[ $(get_libdir) != lib ]]; then
+ dodir /usr/$(get_libdir)
+ mv "${ED}/usr/lib"/*.so "${ED}/usr/$(get_libdir)/" || die
+ fi
+
+ dodoc COPYRIGHT
+ rm "${ED}/usr/share/doc/${P}"/*.old || die
+ rm "${ED}/usr/share/doc/${P}/LICENSE-APACHE" || die
+ rm "${ED}/usr/share/doc/${P}/LICENSE-MIT" || die
+
+ # note: eselect-rust adds EROOT to all paths below
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/cargo
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-gdbgui
+ /usr/bin/rust-lldb
+ EOF
+ if use clippy; then
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
+ fi
+ if use miri; then
+ echo /usr/bin/miri >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
+ fi
+ if use rls; then
+ echo /usr/bin/rls >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update --if-unset
+
+ elog "Rust installs a helper script for calling GDB and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
+
+ if has_version app-editors/emacs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+
+ if use elibc_musl; then
+ ewarn "${PN} on *-musl targets is configured with crt-static"
+ ewarn ""
+ ewarn "you will need to set RUSTFLAGS=\"-C target-feature=-crt-static\" in make.conf"
+ ewarn "to use it with portage, otherwise you may see failures like"
+ ewarn "error: cannot produce proc-macro for serde_derive v1.0.98 as the target "
+ ewarn "x86_64-unknown-linux-musl does not support these crate types"
+ fi
+}
+
+pkg_postrm() {
+ eselect rust cleanup
+}