aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJory Pratt <anarchy@gentoo.org>2021-06-07 11:48:18 -0500
committerJory Pratt <anarchy@gentoo.org>2021-06-07 11:48:18 -0500
commit843a0759b960a877cf6bff270220128160543ecd (patch)
tree6765f943c12d232b3e7498cc0ae1d47408d3a823 /dev-lang
parentnet-libs/webkit-gtk: treeclean (diff)
downloadmusl-843a0759b960a877cf6bff270220128160543ecd.tar.gz
musl-843a0759b960a877cf6bff270220128160543ecd.tar.bz2
musl-843a0759b960a877cf6bff270220128160543ecd.zip
dev-lang/rust: Wait for new release from smaeul
Signed-off-by: Jory Pratt <anarchy@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/rust/Manifest9
-rw-r--r--dev-lang/rust/files/0001-Don-t-pass-CFLAGS-to-the-C-compiler.patch26
-rw-r--r--dev-lang/rust/files/0002-Fix-LLVM-build.patch25
-rw-r--r--dev-lang/rust/files/0003-Fix-linking-to-zlib-when-cross-compiling.patch34
-rw-r--r--dev-lang/rust/files/0004-Fix-rustdoc-when-cross-compiling-on-musl.patch45
-rw-r--r--dev-lang/rust/files/0005-Use-static-native-libraries-when-linking-static-exec.patch55
-rw-r--r--dev-lang/rust/files/0007-Prefer-libgcc_eh-over-libunwind-for-musl.patch38
-rw-r--r--dev-lang/rust/files/0008-Link-libssp_nonshared.a-on-all-musl-targets.patch29
-rw-r--r--dev-lang/rust/files/0009-test-failed-doctest-output-Fix-normalization.patch36
-rw-r--r--dev-lang/rust/files/0010-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch25
-rw-r--r--dev-lang/rust/files/0011-test-use-extern-for-plugins-Don-t-assume-multilib.patch30
-rw-r--r--dev-lang/rust/files/0012-Ignore-broken-and-non-applicable-tests.patch75
-rw-r--r--dev-lang/rust/files/0013-Link-stage-2-tools-dynamically-to-libstd.patch25
-rw-r--r--dev-lang/rust/files/0014-Move-debugger-scripts-to-usr-share-rust.patch69
-rw-r--r--dev-lang/rust/files/0015-Add-gentoo-target-specs.patch175
-rw-r--r--dev-lang/rust/files/0040-rls-atomics.patch58
-rw-r--r--dev-lang/rust/files/0050-llvm.patch18
-rw-r--r--dev-lang/rust/files/0051-llvm-powerpc-elfv2.patch12
-rw-r--r--dev-lang/rust/files/1.46.0-don-t-create-prefix-at-time-of-check.patch31
-rw-r--r--dev-lang/rust/files/1.47.0-libressl.patch44
-rw-r--r--dev-lang/rust/metadata.xml19
-rw-r--r--dev-lang/rust/rust-1.47.0-r1.ebuild533
22 files changed, 0 insertions, 1411 deletions
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
deleted file mode 100644
index a958eb9e..00000000
--- a/dev-lang/rust/Manifest
+++ /dev/null
@@ -1,9 +0,0 @@
-DIST 0006-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch 21313 BLAKE2B 0b73d172d01507cc30f29766c605dc2b771f4bd555c337e11a99ba78abd912d9dc4179f5ca07f5346e97dead7b39964832a2c33610ee1735315141bf6f0e0004 SHA512 001d0b99507cd6c25713f0a6ea6bc4b9fb762083b84085f4abb8c3544f1c2d153a1d2c35e03969d2d789f4b6b84d6dae92dd0b5d9d73fea5eb75aa266c31a05b
-DIST 0030-libc-linkage.patch 37284 BLAKE2B b1e9f36bea6c6bba46b65967e49d3f0e0084da3a02a3a253d425a6e1534e7362b91a04bb975f08d347a57e16f4fef4662cb8c0cbe0821e1cdb90ab442276ef77 SHA512 8818c4ef45ddc537ba6930f83d503beffad8d80e6f51d3d1742ac4c5943f12b91951182aa06fd90cdbf8cb52b43c4fa35ed8ec3176f7ab94261b655b27fcb789
-DIST rust-1.46.0-aarch64-gentoo-linux-musl.tar.xz 101117048 BLAKE2B ef9fafab60b24d5896f1d2c66718945946c0178c3434b1993add6056e3c88fab7d51923942d398bf2d0fbc0a1a9220dcef37ac289a421c3a1f6bcc6b7c755a46 SHA512 764f909849f91d3cbd071d96d6947b08b45f08b3bbd523fcea4310abc807957b0bb3b696e955182ab888c400b6c830442610d3bc510583afe0c910141514d438
-DIST rust-1.46.0-armv7a-unknown-linux-musleabihf.tar.xz 100547468 BLAKE2B 798183dee50e9e35ed2be6d21d89e49265a0764dde904409a5a52a6b0f9856b8ae566daf7651b2071c996930ca9079e39fe246cdce80eea7dc5bee5ce0b3802e SHA512 ad164673320c33a49abfd9e571291beb2394f35b03d913ab70d9da27d38427440efe87a17e0d15b4021c4355be812ab5fe5c02f9ab8f8d6d3d799a872a02ac0f
-DIST rust-1.46.0-i686-gentoo-linux-musl.tar.xz 113552128 BLAKE2B 994911aa66c8f4e6e36b3037febdf2fe1586f478a127604988858fb6bead13da2e46e6d4e2d91496ca399402db00c153fe0e77a788a7f13847ba0ebfd90dff86 SHA512 c00c7992914c4a02827e3011cad59e454f5778f2fc6224928fb1fdf5f39752474473a41273700350b54de6d940ba0964a77a341a435e8ea8f7b9750f64454dd0
-DIST rust-1.46.0-powerpc-gentoo-linux-musl.tar.xz 110418132 BLAKE2B a661d32c68f6b51ab4d023799b4d6b5246062fc34f09967b53354b765f41f3f8c354df616d9085fe1f8e29610feb676fe19570b01e2d8f34a6603fd254cbfb1b SHA512 45c76e6fd031e76d49c479d37bf5a3c691bc338f169b702645978a7eb21b912314e7e448004abc49c07068dec8d6a4933370258ded7653622190df15d34899db
-DIST rust-1.46.0-powerpc64-gentoo-linux-musl.tar.xz 94308552 BLAKE2B 1efc31c94e956180e4ad450e1d9f30996941b2754a163c57b35b1de9eda4abae80a3e90565c8170a3127fb7a95e91d08f6559c1e13e29b4cb14101dc457621ea SHA512 ed798d1d3c4353e469d3a94b25e057849ebd9bc03a8857478f6daa0b9b52dc4b026f07d637d60f9df67a12f06ee1f80c846c10871a16477a6b8ab94a93d2c3e8
-DIST rust-1.46.0-x86_64-gentoo-linux-musl.tar.xz 109962300 BLAKE2B d39f304b23e2d0c1c3729e9019608a283116db3199c8c1cc7610269c0b31de0fde782d7a3ea0f05a2be4676815556902b98627ddf57a18783f291a489ad1aa47 SHA512 2efbfbf33e1f5ef85e449eeac4a57cb6b4cc54eec33809ab211fdb84be3c03bcd5838d0ff5669c1991564e2a553c73aec0f2e7eca8912b59050f92a913eefd2c
-DIST rustc-1.47.0-src.tar.xz 104143736 BLAKE2B 0454094dde35275488046826da87655e51bf0795481d6d08fd70d644bfc12481bca8641166106ef32f20494906025244715b16ff21a1c023f4bd2818aab42521 SHA512 6ba83c0158f8130ddeae7e070417a2121d8a548c8fe97e28bce116d84048636c75aaee78e0c92cd43a50f5679a1223fc226cc8c5ba9bbd1465e84c5c6034d5c9
diff --git a/dev-lang/rust/files/0001-Don-t-pass-CFLAGS-to-the-C-compiler.patch b/dev-lang/rust/files/0001-Don-t-pass-CFLAGS-to-the-C-compiler.patch
deleted file mode 100644
index 40bf4dcb..00000000
--- a/dev-lang/rust/files/0001-Don-t-pass-CFLAGS-to-the-C-compiler.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From ba948554d0241f52fdc762abf21c101445d1fdc4 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Wed, 10 Jan 2018 13:36:41 -0600
-Subject: [PATCH 01/15] Don't pass CFLAGS to the C++ compiler
-
----
- src/bootstrap/builder.rs | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 6446fa7550d..29fec3a5717 100644
---- a/src/bootstrap/builder.rs
-+++ b/src/bootstrap/builder.rs
-@@ -1244,8 +1244,7 @@ impl<'a> Builder<'a> {
- if let Ok(cxx) = self.cxx(target) {
- let cxx = ccacheify(&cxx);
- cargo
-- .env(format!("CXX_{}", target.triple), &cxx)
-- .env(format!("CXXFLAGS_{}", target.triple), cflags);
-+ .env(format!("CXX_{}", target.triple), &cxx);
- }
- }
-
---
-2.26.2
-
diff --git a/dev-lang/rust/files/0002-Fix-LLVM-build.patch b/dev-lang/rust/files/0002-Fix-LLVM-build.patch
deleted file mode 100644
index c04d4459..00000000
--- a/dev-lang/rust/files/0002-Fix-LLVM-build.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From def3b8596d3d0bccff07f2524b96d2f490b9aa82 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Fri, 8 Sep 2017 00:04:29 -0500
-Subject: [PATCH 02/15] Fix LLVM build
-
----
- src/bootstrap/lib.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index a42ee11bd6f..77316c734b8 100644
---- a/src/bootstrap/lib.rs
-+++ b/src/bootstrap/lib.rs
-@@ -798,7 +798,7 @@ impl Build {
- .args()
- .iter()
- .map(|s| s.to_string_lossy().into_owned())
-- .filter(|s| !s.starts_with("-O") && !s.starts_with("/O"))
-+ .filter(|s| !s.starts_with("-O") && !s.starts_with("/O") && !s.starts_with("-static"))
- .collect::<Vec<String>>();
-
- // If we're compiling on macOS then we add a few unconditional flags
---
-2.26.2
-
diff --git a/dev-lang/rust/files/0003-Fix-linking-to-zlib-when-cross-compiling.patch b/dev-lang/rust/files/0003-Fix-linking-to-zlib-when-cross-compiling.patch
deleted file mode 100644
index 4c9f06c5..00000000
--- a/dev-lang/rust/files/0003-Fix-linking-to-zlib-when-cross-compiling.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 466ffdcb0b132ce135242180e66097ba178122b9 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 1 Nov 2020 20:13:23 -0600
-Subject: [PATCH 03/15] Fix linking to zlib when cross-compiling
-
----
- src/librustc_llvm/build.rs | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/src/librustc_llvm/build.rs b/src/librustc_llvm/build.rs
-index 25c0b40c495..485cd05ad63 100644
---- a/src/librustc_llvm/build.rs
-+++ b/src/librustc_llvm/build.rs
-@@ -192,14 +192,13 @@ fn main() {
- // of llvm-config, not the target that we're attempting to link.
- let mut cmd = Command::new(&llvm_config);
- cmd.arg(llvm_link_arg).arg("--libs");
-+ cmd.arg("--system-libs");
-+ cmd.args(&components);
-
-- if !is_crossed {
-- cmd.arg("--system-libs");
-- } else if target.contains("windows-gnu") {
-+ if target.contains("windows-gnu") {
- println!("cargo:rustc-link-lib=shell32");
- println!("cargo:rustc-link-lib=uuid");
- }
-- cmd.args(&components);
-
- for lib in output(&mut cmd).split_whitespace() {
- let name = if lib.starts_with("-l") {
---
-2.26.2
-
diff --git a/dev-lang/rust/files/0004-Fix-rustdoc-when-cross-compiling-on-musl.patch b/dev-lang/rust/files/0004-Fix-rustdoc-when-cross-compiling-on-musl.patch
deleted file mode 100644
index c6a7d795..00000000
--- a/dev-lang/rust/files/0004-Fix-rustdoc-when-cross-compiling-on-musl.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From db1328ce566169bf174beb82648eb9b3f075adee Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sat, 2 Dec 2017 17:25:44 -0600
-Subject: [PATCH 04/15] Fix rustdoc when cross-compiling on musl
-
-musl can't handle foreign-architecture libraries in LD_LIBRARY_PATH.
----
- src/bootstrap/bin/rustdoc.rs | 7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
-
-diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
-index ab846adf942..bb4cbb038f3 100644
---- a/src/bootstrap/bin/rustdoc.rs
-+++ b/src/bootstrap/bin/rustdoc.rs
-@@ -21,9 +21,6 @@ fn main() {
- Err(_) => 0,
- };
-
-- let mut dylib_path = bootstrap::util::dylib_path();
-- dylib_path.insert(0, PathBuf::from(libdir.clone()));
--
- //FIXME(misdreavus): once stdsimd uses cfg(doc) instead of cfg(dox), remove the `--cfg dox`
- //arguments here
- let mut cmd = Command::new(rustdoc);
-@@ -34,7 +31,7 @@ fn main() {
- .arg("dox")
- .arg("--sysroot")
- .arg(&sysroot)
-- .env(bootstrap::util::dylib_path_var(), env::join_paths(&dylib_path).unwrap());
-+ .env(bootstrap::util::dylib_path_var(), PathBuf::from(libdir.clone()));
-
- // Force all crates compiled by this compiler to (a) be unstable and (b)
- // allow the `rustc_private` feature to link to other unstable crates
-@@ -59,7 +56,7 @@ fn main() {
- eprintln!(
- "rustdoc command: {:?}={:?} {:?}",
- bootstrap::util::dylib_path_var(),
-- env::join_paths(&dylib_path).unwrap(),
-+ PathBuf::from(libdir.clone()),
- cmd,
- );
- eprintln!("sysroot: {:?}", sysroot);
---
-2.26.2
-
diff --git a/dev-lang/rust/files/0005-Use-static-native-libraries-when-linking-static-exec.patch b/dev-lang/rust/files/0005-Use-static-native-libraries-when-linking-static-exec.patch
deleted file mode 100644
index 5d1836d3..00000000
--- a/dev-lang/rust/files/0005-Use-static-native-libraries-when-linking-static-exec.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From f108b83c877724fd9f94f087fc529765c9bbdb14 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Fri, 8 Sep 2017 00:05:18 -0500
-Subject: [PATCH 05/15] Use static native libraries when linking static
- executables
-
-On ELF targets like Linux, gcc/ld will create a dynamically-linked
-executable without warning, even when passed `-static`, when asked to
-link to a `.so`. Avoid this confusing and unintended behavior by always
-using the static version of libraries when trying to link static
-executables.
----
- src/librustc_codegen_ssa/back/link.rs | 19 +++++++++++++++----
- 1 file changed, 15 insertions(+), 4 deletions(-)
-
-diff --git a/src/librustc_codegen_ssa/back/link.rs b/src/librustc_codegen_ssa/back/link.rs
-index bfcf979d125..70bc9d5e980 100644
---- a/src/librustc_codegen_ssa/back/link.rs
-+++ b/src/librustc_codegen_ssa/back/link.rs
-@@ -2057,9 +2057,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(
- }
- }
-
--// Link in all of our upstream crates' native dependencies. Remember that
--// all of these upstream native dependencies are all non-static
--// dependencies. We've got two cases then:
-+// Link in all of our upstream crates' native dependencies. We have two cases:
- //
- // 1. The upstream crate is an rlib. In this case we *must* link in the
- // native dependency because the rlib is just an archive.
-@@ -2108,7 +2106,20 @@ fn add_upstream_native_libraries(
- continue;
- }
- match lib.kind {
-- NativeLibKind::Dylib | NativeLibKind::Unspecified => cmd.link_dylib(name),
-+ NativeLibKind::Unspecified => {
-+ // On some targets, like Linux, linking a static executable inhibits using
-+ // dylibs at all. Force native libraries to be static, even if for example
-+ // an upstream rlib was originally linked against a native shared library.
-+ if crate_type == config::CrateType::Executable
-+ && sess.crt_static(Some(crate_type))
-+ && !sess.target.target.options.crt_static_allows_dylibs
-+ {
-+ cmd.link_staticlib(name)
-+ } else {
-+ cmd.link_dylib(name)
-+ }
-+ },
-+ NativeLibKind::Dylib => cmd.link_dylib(name),
- NativeLibKind::Framework => cmd.link_framework(name),
- NativeLibKind::StaticNoBundle => {
- // Link "static-nobundle" native libs only if the crate they originate from
---
-2.26.2
-
diff --git a/dev-lang/rust/files/0007-Prefer-libgcc_eh-over-libunwind-for-musl.patch b/dev-lang/rust/files/0007-Prefer-libgcc_eh-over-libunwind-for-musl.patch
deleted file mode 100644
index 34725881..00000000
--- a/dev-lang/rust/files/0007-Prefer-libgcc_eh-over-libunwind-for-musl.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 5944a594d6cd422e3ed3a83857b8f84f6920456a Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sat, 9 Sep 2017 00:14:16 -0500
-Subject: [PATCH 07/15] Prefer libgcc_eh over libunwind for musl
-
----
- library/unwind/build.rs | 1 -
- library/unwind/src/lib.rs | 2 +-
- 2 files changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/library/unwind/build.rs b/library/unwind/build.rs
-index ab09a6e324d..2f71e45f95a 100644
---- a/library/unwind/build.rs
-+++ b/library/unwind/build.rs
-@@ -14,7 +14,6 @@ fn main() {
- } else if target.contains("linux") {
- if target.contains("musl") {
- // linking for musl is handled in lib.rs
-- llvm_libunwind::compile();
- } else if !target.contains("android") {
- println!("cargo:rustc-link-lib=gcc_s");
- }
-diff --git a/library/unwind/src/lib.rs b/library/unwind/src/lib.rs
-index 20a2ca98405..401d2ad9a1c 100644
---- a/library/unwind/src/lib.rs
-+++ b/library/unwind/src/lib.rs
-@@ -38,7 +38,7 @@ cfg_if::cfg_if! {
- }
-
- #[cfg(target_env = "musl")]
--#[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
-+#[link(name = "gcc_eh", kind = "static-nobundle", cfg(target_feature = "crt-static"))]
- #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
- extern "C" {}
-
---
-2.26.2
-
diff --git a/dev-lang/rust/files/0008-Link-libssp_nonshared.a-on-all-musl-targets.patch b/dev-lang/rust/files/0008-Link-libssp_nonshared.a-on-all-musl-targets.patch
deleted file mode 100644
index 969d4c5e..00000000
--- a/dev-lang/rust/files/0008-Link-libssp_nonshared.a-on-all-musl-targets.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From d3114d5d4fa3595b9f7158f24807620571951be8 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 3 Nov 2019 17:01:32 -0600
-Subject: [PATCH 08/15] Link libssp_nonshared.a on all musl targets
-
----
- src/librustc_target/spec/linux_musl_base.rs | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/spec/linux_musl_base.rs
-index c5f5f99a96d..a3f763147fa 100644
---- a/src/librustc_target/spec/linux_musl_base.rs
-+++ b/src/librustc_target/spec/linux_musl_base.rs
-@@ -1,8 +1,11 @@
--use crate::spec::TargetOptions;
-+use crate::spec::{LinkerFlavor, TargetOptions};
-
- pub fn opts() -> TargetOptions {
- let mut base = super::linux_base::opts();
-
-+ // libssp_nonshared.a is needed for __stack_chk_fail_local when using libc.so
-+ base.post_link_args.insert(LinkerFlavor::Gcc, vec!["-lssp_nonshared".to_string()]);
-+
- // These targets statically link libc by default
- base.crt_static_default = true;
- // These targets allow the user to choose between static and dynamic linking.
---
-2.26.2
-
diff --git a/dev-lang/rust/files/0009-test-failed-doctest-output-Fix-normalization.patch b/dev-lang/rust/files/0009-test-failed-doctest-output-Fix-normalization.patch
deleted file mode 100644
index 8639b2b3..00000000
--- a/dev-lang/rust/files/0009-test-failed-doctest-output-Fix-normalization.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 7fd97298080acbe6f69e49a3d5df9eca423b5fe1 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 7 Oct 2019 18:36:28 -0500
-Subject: [PATCH 09/15] test/failed-doctest-output: Fix normalization
-
-Otherwise we get:
-
-1
-2 running 2 tests
-- test $DIR/failed-doctest-output.rs - OtherStruct (line 20) ... FAILED
-- test $DIR/failed-doctest-output.rs - SomeStruct (line 10) ... FAILED
-+ test src/rustc-1.38.0-src/$DIR/failed-doctest-output.rs - OtherStruct (line 20) ... FAILED
-+ test src/rustc-1.38.0-src/$DIR/failed-doctest-output.rs - SomeStruct (line 10) ... FAILED
-5
-6 failures:
-7
----
- src/test/rustdoc-ui/failed-doctest-output.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/test/rustdoc-ui/failed-doctest-output.rs b/src/test/rustdoc-ui/failed-doctest-output.rs
-index fcbd7cabc69..7d19ace7487 100644
---- a/src/test/rustdoc-ui/failed-doctest-output.rs
-+++ b/src/test/rustdoc-ui/failed-doctest-output.rs
-@@ -4,7 +4,7 @@
-
- // compile-flags:--test
- // rustc-env:RUST_BACKTRACE=0
--// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
-+// normalize-stdout-test: "[[:graph:]]*src/test/rustdoc-ui" -> "$$DIR"
- // failure-status: 101
-
- // doctest fails at runtime
---
-2.26.2
-
diff --git a/dev-lang/rust/files/0010-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch b/dev-lang/rust/files/0010-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
deleted file mode 100644
index 82772a15..00000000
--- a/dev-lang/rust/files/0010-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 415814d100e85eb031254af528246e44d3f04128 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 17 Sep 2018 01:32:20 +0000
-Subject: [PATCH 10/15] test/sysroot-crates-are-unstable: Fix test when rpath
- is disabled
-
-Without this environment var, the test can't run rustc to find
-the sysroot path.
----
- .../run-make-fulldeps/sysroot-crates-are-unstable/Makefile | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-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 1e267fb9576..30c33c5c13d 100644
---- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
-+++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
-@@ -1,2 +1,4 @@
-+-include ../tools.mk
-+
- all:
-- '$(PYTHON)' test.py
-+ env '$(HOST_RPATH_ENV)' '$(PYTHON)' test.py
---
-2.26.2
-
diff --git a/dev-lang/rust/files/0011-test-use-extern-for-plugins-Don-t-assume-multilib.patch b/dev-lang/rust/files/0011-test-use-extern-for-plugins-Don-t-assume-multilib.patch
deleted file mode 100644
index 6f5fa8b2..00000000
--- a/dev-lang/rust/files/0011-test-use-extern-for-plugins-Don-t-assume-multilib.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 815936fbf7f721ddfc35e6048457dbc84132f87a Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sat, 6 Oct 2018 04:01:48 +0000
-Subject: [PATCH 11/15] test/use-extern-for-plugins: Don't assume multilib
-
----
- src/test/run-make-fulldeps/use-extern-for-plugins/Makefile | 7 +------
- 1 file changed, 1 insertion(+), 6 deletions(-)
-
-diff --git a/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile b/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile
-index 838b1a2719b..94fa9f6d067 100644
---- a/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile
-+++ b/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile
-@@ -4,12 +4,7 @@
- # ignore-openbsd
- # ignore-sunos
-
--HOST := $(shell $(RUSTC) -vV | grep 'host:' | sed 's/host: //')
--ifeq ($(findstring i686,$(HOST)),i686)
--TARGET := $(subst i686,x86_64,$(HOST))
--else
--TARGET := $(subst x86_64,i686,$(HOST))
--endif
-+TARGET := $(shell $(RUSTC) -vV | grep 'host:' | sed 's/host: //')
-
- all:
- $(RUSTC) foo.rs -C extra-filename=-host
---
-2.26.2
-
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
deleted file mode 100644
index 8569293a..00000000
--- a/dev-lang/rust/files/0012-Ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 8db9fc72afc7864cb7e5a8ff99f9e4dd04ea82ca 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)
-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 +
- 5 files changed, 8 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 30c33c5c13d..d733bb1c557 100644
---- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
-+++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
-@@ -1,3 +1,5 @@
-+# ignore-test
-+
- -include ../tools.mk
-
- all:
-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
---
-2.26.2
-
diff --git a/dev-lang/rust/files/0013-Link-stage-2-tools-dynamically-to-libstd.patch b/dev-lang/rust/files/0013-Link-stage-2-tools-dynamically-to-libstd.patch
deleted file mode 100644
index bd16e6c1..00000000
--- a/dev-lang/rust/files/0013-Link-stage-2-tools-dynamically-to-libstd.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From b9369ec42bc76e451dfb44e157e81166abcb3c10 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 24 Sep 2018 23:42:23 +0000
-Subject: [PATCH 13/15] Link stage 2 tools dynamically to libstd
-
----
- src/bootstrap/builder.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 29fec3a5717..15c7729b4c2 100644
---- a/src/bootstrap/builder.rs
-+++ b/src/bootstrap/builder.rs
-@@ -1357,7 +1357,7 @@ impl<'a> Builder<'a> {
- // When we build Rust dylibs they're all intended for intermediate
- // usage, so make sure we pass the -Cprefer-dynamic flag instead of
- // linking all deps statically into the dylib.
-- if let Mode::Std | Mode::Rustc | Mode::Codegen = mode {
-+ if let Mode::Std | Mode::Rustc | Mode::Codegen | Mode::ToolRustc | Mode::ToolStd = mode {
- rustflags.arg("-Cprefer-dynamic");
- }
-
---
-2.26.2
-
diff --git a/dev-lang/rust/files/0014-Move-debugger-scripts-to-usr-share-rust.patch b/dev-lang/rust/files/0014-Move-debugger-scripts-to-usr-share-rust.patch
deleted file mode 100644
index ca1a1b49..00000000
--- a/dev-lang/rust/files/0014-Move-debugger-scripts-to-usr-share-rust.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 22b25a4088a3d09bb569b23dc282edb77df11ab4 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 17 Sep 2018 02:09:10 +0000
-Subject: [PATCH 14/15] Move debugger scripts to /usr/share/rust
-
----
- src/bootstrap/dist.rs | 2 +-
- src/etc/rust-gdb | 2 +-
- src/etc/rust-gdbgui | 2 +-
- src/etc/rust-lldb | 4 ++--
- 4 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index d021feafbe4..f0f5cb8169a 100644
---- a/src/bootstrap/dist.rs
-+++ b/src/bootstrap/dist.rs
-@@ -614,7 +614,7 @@ impl Step for DebuggerScripts {
- fn run(self, builder: &Builder<'_>) {
- let host = self.host;
- let sysroot = self.sysroot;
-- let dst = sysroot.join("lib/rustlib/etc");
-+ let dst = sysroot.join("share/rust");
- t!(fs::create_dir_all(&dst));
- let cp_debugger_script = |file: &str| {
- builder.install(&builder.src.join("src/etc/").join(file), &dst, 0o644);
-diff --git a/src/etc/rust-gdb b/src/etc/rust-gdb
-index b950cea79ed..559bfe3f1f9 100755
---- a/src/etc/rust-gdb
-+++ b/src/etc/rust-gdb
-@@ -12,7 +12,7 @@ fi
-
- # Find out where the pretty printer Python module is
- RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
--GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
-+GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/share/rust"
-
- # Run GDB with the additional arguments that load the pretty printers
- # Set the environment variable `RUST_GDB` to overwrite the call to a
-diff --git a/src/etc/rust-gdbgui b/src/etc/rust-gdbgui
-index 9744913b686..8722acdcc52 100755
---- a/src/etc/rust-gdbgui
-+++ b/src/etc/rust-gdbgui
-@@ -41,7 +41,7 @@ fi
-
- # Find out where the pretty printer Python module is
- RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
--GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
-+GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/share/rust"
-
- # Set the environment variable `RUST_GDB` to overwrite the call to a
- # different/specific command (defaults to `gdb`).
-diff --git a/src/etc/rust-lldb b/src/etc/rust-lldb
-index bce72f1bad6..8abb0124527 100755
---- a/src/etc/rust-lldb
-+++ b/src/etc/rust-lldb
-@@ -30,8 +30,8 @@ EOF
- fi
- fi
-
--script_import="command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_lookup.py\""
--commands_file="$RUSTC_SYSROOT/lib/rustlib/etc/lldb_commands"
-+script_import="command script import \"$RUSTC_SYSROOT/share/rust/lldb_lookup.py\""
-+commands_file="$RUSTC_SYSROOT/share/rust/lldb_commands"
-
- # Call LLDB with the commands added to the argument list
- exec "$lldb" --one-line-before-file "$script_import" --source-before-file "$commands_file" "$@"
---
-2.26.2
-
diff --git a/dev-lang/rust/files/0015-Add-gentoo-target-specs.patch b/dev-lang/rust/files/0015-Add-gentoo-target-specs.patch
deleted file mode 100644
index 61a19b92..00000000
--- a/dev-lang/rust/files/0015-Add-gentoo-target-specs.patch
+++ /dev/null
@@ -1,175 +0,0 @@
-From 037c877646effd72dbf82f3eb8e5ed41e9f5e89d Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 17 Sep 2018 02:29:06 +0000
-Subject: [PATCH 15/15] Add gentoo target specs
-
----
- src/librustc_target/spec/aarch64_gentoo_linux_musl.rs | 11 +++++++++++
- src/librustc_target/spec/arm_gentoo_linux_musleabi.rs | 11 +++++++++++
- .../spec/armv7a_gentoo_linux_musleabihf.rs | 11 +++++++++++
- src/librustc_target/spec/i686_gentoo_linux_musl.rs | 11 +++++++++++
- src/librustc_target/spec/mod.rs | 11 ++++++++++-
- .../spec/powerpc64_gentoo_linux_musl.rs | 11 +++++++++++
- src/librustc_target/spec/powerpc_gentoo_linux_musl.rs | 11 +++++++++++
- src/librustc_target/spec/x86_64_gentoo_linux_musl.rs | 11 +++++++++++
- 8 files changed, 87 insertions(+), 1 deletion(-)
- create mode 100644 src/librustc_target/spec/aarch64_gentoo_linux_musl.rs
- create mode 100644 src/librustc_target/spec/arm_gentoo_linux_musleabi.rs
- create mode 100644 src/librustc_target/spec/armv7a_gentoo_linux_musleabihf.rs
- create mode 100644 src/librustc_target/spec/i686_gentoo_linux_musl.rs
- create mode 100644 src/librustc_target/spec/powerpc64_gentoo_linux_musl.rs
- create mode 100644 src/librustc_target/spec/powerpc_gentoo_linux_musl.rs
- create mode 100644 src/librustc_target/spec/x86_64_gentoo_linux_musl.rs
-
-diff --git a/src/librustc_target/spec/aarch64_gentoo_linux_musl.rs b/src/librustc_target/spec/aarch64_gentoo_linux_musl.rs
-new file mode 100644
-index 00000000000..420fe7cde70
---- /dev/null
-+++ b/src/librustc_target/spec/aarch64_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::TargetResult;
-+
-+pub fn target() -> TargetResult {
-+ let mut base = super::aarch64_unknown_linux_musl::target()?;
-+
-+ base.llvm_target = "aarch64-gentoo-linux-musl".to_string();
-+ base.target_vendor = "gentoo".to_string();
-+ base.options.crt_static_default = false;
-+
-+ Ok(base)
-+}
-diff --git a/src/librustc_target/spec/arm_gentoo_linux_musleabi.rs b/src/librustc_target/spec/arm_gentoo_linux_musleabi.rs
-new file mode 100644
-index 00000000000..d47ca841647
---- /dev/null
-+++ b/src/librustc_target/spec/arm_gentoo_linux_musleabi.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::TargetResult;
-+
-+pub fn target() -> TargetResult {
-+ let mut base = super::arm_unknown_linux_musleabi::target()?;
-+
-+ base.llvm_target = "arm-gentoo-linux-musleabi".to_string();
-+ base.target_vendor = "gentoo".to_string();
-+ base.options.crt_static_default = false;
-+
-+ Ok(base)
-+}
-diff --git a/src/librustc_target/spec/armv7a_gentoo_linux_musleabihf.rs b/src/librustc_target/spec/armv7a_gentoo_linux_musleabihf.rs
-new file mode 100644
-index 00000000000..f5c85855c18
---- /dev/null
-+++ b/src/librustc_target/spec/armv7a_gentoo_linux_musleabihf.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::TargetResult;
-+
-+pub fn target() -> TargetResult {
-+ let mut base = super::armv7_unknown_linux_musleabihf::target()?;
-+
-+ base.llvm_target = "armv7a-gentoo-linux-musleabihf".to_string();
-+ base.target_vendor = "gentoo".to_string();
-+ base.options.crt_static_default = false;
-+
-+ Ok(base)
-+}
-diff --git a/src/librustc_target/spec/i686_gentoo_linux_musl.rs b/src/librustc_target/spec/i686_gentoo_linux_musl.rs
-new file mode 100644
-index 00000000000..1cd39cd76af
---- /dev/null
-+++ b/src/librustc_target/spec/i686_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::TargetResult;
-+
-+pub fn target() -> TargetResult {
-+ let mut base = super::i686_unknown_linux_musl::target()?;
-+
-+ base.llvm_target = "i686-gentoo-linux-musl".to_string();
-+ base.target_vendor = "gentoo".to_string();
-+ base.options.crt_static_default = false;
-+
-+ Ok(base)
-+}
-diff --git a/src/librustc_target/spec/mod.rs b/src/librustc_target/spec/mod.rs
-index fa29ff3f8d8..a711417e7c1 100644
---- a/src/librustc_target/spec/mod.rs
-+++ b/src/librustc_target/spec/mod.rs
-@@ -489,7 +489,17 @@ macro_rules! supported_targets {
- };
- }
-
-+mod arm_unknown_linux_musleabi;
-+
- supported_targets! {
-+ ("aarch64-gentoo-linux-musl", aarch64_gentoo_linux_musl),
-+ ("arm-unknown-linux-musleabi", arm_gentoo_linux_musleabi),
-+ ("armv7a-unknown-linux-musleabihf", armv7a_gentoo_linux_musleabihf),
-+ ("i686-gentoo-linux-musl", i686_gentoo_linux_musl),
-+ ("powerpc-gentoo-linux-musl", powerpc_gentoo_linux_musl),
-+ ("powerpc64-gentoo-linux-musl", powerpc64_gentoo_linux_musl),
-+ ("x86_64-gentoo-linux-musl", x86_64_gentoo_linux_musl),
-+
- ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu),
- ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32),
- ("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
-@@ -514,7 +524,6 @@ supported_targets! {
- ("sparc64-unknown-linux-gnu", sparc64_unknown_linux_gnu),
- ("arm-unknown-linux-gnueabi", arm_unknown_linux_gnueabi),
- ("arm-unknown-linux-gnueabihf", arm_unknown_linux_gnueabihf),
-- ("arm-unknown-linux-musleabi", arm_unknown_linux_musleabi),
- ("arm-unknown-linux-musleabihf", arm_unknown_linux_musleabihf),
- ("armv4t-unknown-linux-gnueabi", armv4t_unknown_linux_gnueabi),
- ("armv5te-unknown-linux-gnueabi", armv5te_unknown_linux_gnueabi),
-diff --git a/src/librustc_target/spec/powerpc64_gentoo_linux_musl.rs b/src/librustc_target/spec/powerpc64_gentoo_linux_musl.rs
-new file mode 100644
-index 00000000000..e840bb27bbf
---- /dev/null
-+++ b/src/librustc_target/spec/powerpc64_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::TargetResult;
-+
-+pub fn target() -> TargetResult {
-+ let mut base = super::powerpc64_unknown_linux_musl::target()?;
-+
-+ base.llvm_target = "powerpc64-gentoo-linux-musl".to_string();
-+ base.target_vendor = "gentoo".to_string();
-+ base.options.crt_static_default = false;
-+
-+ Ok(base)
-+}
-diff --git a/src/librustc_target/spec/powerpc_gentoo_linux_musl.rs b/src/librustc_target/spec/powerpc_gentoo_linux_musl.rs
-new file mode 100644
-index 00000000000..a623ffed53a
---- /dev/null
-+++ b/src/librustc_target/spec/powerpc_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::TargetResult;
-+
-+pub fn target() -> TargetResult {
-+ let mut base = super::powerpc_unknown_linux_musl::target()?;
-+
-+ base.llvm_target = "powerpc-gentoo-linux-musl".to_string();
-+ base.target_vendor = "gentoo".to_string();
-+ base.options.crt_static_default = false;
-+
-+ Ok(base)
-+}
-diff --git a/src/librustc_target/spec/x86_64_gentoo_linux_musl.rs b/src/librustc_target/spec/x86_64_gentoo_linux_musl.rs
-new file mode 100644
-index 00000000000..f33047358b5
---- /dev/null
-+++ b/src/librustc_target/spec/x86_64_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::TargetResult;
-+
-+pub fn target() -> TargetResult {
-+ let mut base = super::x86_64_unknown_linux_musl::target()?;
-+
-+ base.llvm_target = "x86_64-gentoo-linux-musl".to_string();
-+ base.target_vendor = "gentoo".to_string();
-+ base.options.crt_static_default = false;
-+
-+ Ok(base)
-+}
---
-2.26.2
-
diff --git a/dev-lang/rust/files/0040-rls-atomics.patch b/dev-lang/rust/files/0040-rls-atomics.patch
deleted file mode 100644
index d9aedb9a..00000000
--- a/dev-lang/rust/files/0040-rls-atomics.patch
+++ /dev/null
@@ -1,58 +0,0 @@
---- rustc-1.35.0-src/src/tools/rls/rls/src/cmd.rs
-+++ rustc-1.35.0-src/src/tools/rls/rls/src/cmd.rs
-@@ -7,7 +7,7 @@ use crate::config::Config;
- use crate::server::{self, LsService, Notification, Request, RequestId};
- use rls_analysis::{AnalysisHost, Target};
- use rls_vfs::Vfs;
--use std::sync::atomic::{AtomicU64, Ordering};
-+use std::sync::atomic::{AtomicU32, Ordering};
-
- use lsp_types::{
- ClientCapabilities, CodeActionContext, CodeActionParams, CompletionItem,
-@@ -313,8 +313,8 @@ fn url(file_name: &str) -> Url {
- }
-
- fn next_id() -> RequestId {
-- static ID: AtomicU64 = AtomicU64::new(1);
-- RequestId::Num(ID.fetch_add(1, Ordering::SeqCst))
-+ static ID: AtomicU32 = AtomicU32::new(1);
-+ RequestId::Num(ID.fetch_add(1, Ordering::SeqCst).into())
- }
-
- // Custom reader and output for the RLS server.
---- rustc-1.35.0-src/src/tools/rls/rls/src/server/io.rs
-+++ rustc-1.35.0-src/src/tools/rls/rls/src/server/io.rs
-@@ -7,7 +7,7 @@ use crate::lsp_data::{LSPNotification, LSPRequest};
-
- use std::fmt;
- use std::io::{self, BufRead, Write};
--use std::sync::atomic::{AtomicU64, Ordering};
-+use std::sync::atomic::{AtomicU32, Ordering};
- use std::sync::Arc;
-
- use jsonrpc_core::{self as jsonrpc, response, version, Id};
-@@ -171,13 +171,13 @@ pub trait Output: Sync + Send + Clone + 'static {
- /// An output that sends notifications and responses on `stdout`.
- #[derive(Clone)]
- pub(super) struct StdioOutput {
-- next_id: Arc<AtomicU64>,
-+ next_id: Arc<AtomicU32>,
- }
-
- impl StdioOutput {
- /// Constructs a new `stdout` output.
- pub(crate) fn new() -> StdioOutput {
-- StdioOutput { next_id: Arc::new(AtomicU64::new(1)) }
-+ StdioOutput { next_id: Arc::new(AtomicU32::new(1).into()) }
- }
- }
-
-@@ -194,7 +194,7 @@ impl Output for StdioOutput {
- }
-
- fn provide_id(&self) -> RequestId {
-- RequestId::Num(self.next_id.fetch_add(1, Ordering::SeqCst))
-+ RequestId::Num(self.next_id.fetch_add(1, Ordering::SeqCst).into())
- }
- }
-
diff --git a/dev-lang/rust/files/0050-llvm.patch b/dev-lang/rust/files/0050-llvm.patch
deleted file mode 100644
index f1899f76..00000000
--- a/dev-lang/rust/files/0050-llvm.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- rustc-1.38.0-src/src/llvm-project/llvm/include/llvm/Analysis/TargetLibraryInfo.def
-+++ rustc-1.38.0-src/src/llvm-project/llvm/include/llvm/Analysis/TargetLibraryInfo.def
-@@ -27,6 +27,15 @@
- #define TLI_DEFINE_STRING_INTERNAL(string_repr) string_repr,
- #endif
-
-+// avoid name conflicts with musl-libc
-+#undef fopen64
-+#undef fseeko64
-+#undef ftello64
-+#undef fstat64
-+#undef lstat64
-+#undef stat64
-+#undef tmpfile64
-+
- /// void *new(unsigned int);
- TLI_DEFINE_ENUM_INTERNAL(msvc_new_int)
- TLI_DEFINE_STRING_INTERNAL("??2@YAPAXI@Z")
diff --git a/dev-lang/rust/files/0051-llvm-powerpc-elfv2.patch b/dev-lang/rust/files/0051-llvm-powerpc-elfv2.patch
deleted file mode 100644
index b5ee930e..00000000
--- a/dev-lang/rust/files/0051-llvm-powerpc-elfv2.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- rustc-1.46.0-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
-+++ rustc-1.46.0-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
-@@ -215,6 +215,9 @@ static PPCTargetMachine::PPCABI computeTargetABI(const Triple &TT,
- case Triple::ppc64le:
- return PPCTargetMachine::PPC_ABI_ELFv2;
- case Triple::ppc64:
-+ // musl uses the ELFv2 ABI on both endians.
-+ if (TT.isMusl())
-+ return PPCTargetMachine::PPC_ABI_ELFv2;
- return PPCTargetMachine::PPC_ABI_ELFv1;
- default:
- return PPCTargetMachine::PPC_ABI_UNKNOWN;
diff --git a/dev-lang/rust/files/1.46.0-don-t-create-prefix-at-time-of-check.patch b/dev-lang/rust/files/1.46.0-don-t-create-prefix-at-time-of-check.patch
deleted file mode 100644
index 9064a52a..00000000
--- a/dev-lang/rust/files/1.46.0-don-t-create-prefix-at-time-of-check.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 6b31232a9d32529e30765108f30365ac48587ce6 Mon Sep 17 00:00:00 2001
-From: Georgy Yakovlev <gyakovlev@gentoo.org>
-Date: Thu, 8 Oct 2020 15:48:33 -0700
-Subject: [PATCH] don't create prefix at time of check
-
----
- src/bootstrap/install.rs | 8 ++------
- 1 file changed, 2 insertions(+), 6 deletions(-)
-
-diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
-index d9ee3bc..c5da9ce 100644
---- a/src/bootstrap/install.rs
-+++ b/src/bootstrap/install.rs
-@@ -73,12 +73,8 @@ fn install_sh(
- let docdir_default = datadir_default.join("doc/rust");
- let libdir_default = PathBuf::from("lib");
- let mandir_default = datadir_default.join("man");
-- let prefix = builder.config.prefix.as_ref().map_or(prefix_default, |p| {
-- fs::create_dir_all(p)
-- .unwrap_or_else(|err| panic!("could not create {}: {}", p.display(), err));
-- fs::canonicalize(p)
-- .unwrap_or_else(|err| panic!("could not canonicalize {}: {}", p.display(), err))
-- });
-+
-+ let prefix = builder.config.prefix.as_ref().unwrap_or(&prefix_default);
- let sysconfdir = builder.config.sysconfdir.as_ref().unwrap_or(&sysconfdir_default);
- let datadir = builder.config.datadir.as_ref().unwrap_or(&datadir_default);
- let docdir = builder.config.docdir.as_ref().unwrap_or(&docdir_default);
---
-2.28.0
-
diff --git a/dev-lang/rust/files/1.47.0-libressl.patch b/dev-lang/rust/files/1.47.0-libressl.patch
deleted file mode 100644
index 07ad0ebc..00000000
--- a/dev-lang/rust/files/1.47.0-libressl.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 0493f57a9878fd4d92fc419358173fd31b95bda8 Mon Sep 17 00:00:00 2001
-From: Georgy Yakovlev <gyakovlev@gentoo.org>
-Date: Sun, 11 Oct 2020 22:09:39 -0700
-Subject: [PATCH] Support LibreSSL 3.2.x
-
-Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
----
- vendor/openssl-sys/.cargo-checksum.json | 2 +-
- vendor/openssl-sys/build/main.rs | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/vendor/openssl-sys/.cargo-checksum.json b/vendor/openssl-sys/.cargo-checksum.json
-index 4c079f5..11beb6e 100644
---- a/vendor/openssl-sys/.cargo-checksum.json
-+++ b/vendor/openssl-sys/.cargo-checksum.json
-@@ -1 +1 @@
--{"files":{"CHANGELOG.md":"17531e8bd93e3bd9ada0d3b4e4d07508d316985a2cbe4df73186ba70d5971923","Cargo.toml":"b71de20a64dc4704f77b8cc8ea9f63e47f2d39f06696900077eefd93a17d16ec","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"949fb3913ec7f94229242978dfeee5e19261b6d7506fc91dcd153bb0d2a84895","build/cfgs.rs":"2b49fbdb045c40bd46bf7e7adfde8c45508e4b51af0080fb934eb1131863d75a","build/expando.c":"c4fa8a4424b2321f1857edfc5ce1ac1f03eda54440367d3142310c0eb5553004","build/find_normal.rs":"0742487bd3faa681232e812c5c96f0e5b83b485ba236a4efda1cd8f5a260b5eb","build/find_vendored.rs":"7bf0e59c5646d72ee5a4392ad970fdf5c20288ddaf54dd86a8caff49583b38f5","build/main.rs":"0d8b960ab71be4e2a08e3ff7e9615a17f7dddcd601b7fdd885bb6f6c5a6fe5f5","src/aes.rs":"822bf666db351fe6ef9607c918081d6ad378fc1cedb05290bb746f86980c6088","src/asn1.rs":"254025cb408dbeff73bee6d06325acba9042cb11db30bdad04eedfb789be84b3","src/bio.rs":"1f38a3ec4029511fecd7a51548965a265f3e7772891b5514e22bfb1d061b3a90","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"f21a403fea95e7b7efe0539a429831cfa51c8818adb79c7ebf73ae2a6f2dc87e","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"a1279719ade9704be3d9af55ff679abbe918d525f332ca15810146d45e9080cf","src/dh.rs":"7cc334e86d16b3eae165dfa3a6c8e488bc0fe590c17beda38893d2e9d784d5a6","src/dsa.rs":"ae79baf231681900ea76304285b3ffacf5298c90b8c04d371269cf4adbb5b9fa","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"81372dfe497db2fc90457a470a3b8ccb249828b3ce2bf4fd2da8ec42afd6a6b3","src/err.rs":"3edf1379b3277df32e047a52553d243d4a4001111a277cf4b12f7297f2fe2bf0","src/evp.rs":"ae748b7d7a0f74eb21c2750bf571c09f99bb835f23436c247493a66c28fb5c6b","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"846f03332238caace3dade00a6c15b5ed1773edd601cc72dca2f1339d58b2b7f","src/macros.rs":"638fb9098f6024e82b331eeee50c64cefdb58456dba28ee42560be655a0c2bf6","src/obj_mac.rs":"7203d356f7654c5805600b823eccf8e1d9d9cbce9a01859938612a3f0aae4cdc","src/object.rs":"3e45fb025ccbd6a556aae9738ef8a3b11cc2655ffa9d8422be21699b2e45d6c4","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"f00c3f88f7947f5d13698a2fc796c68eb1bd65b2686f661d29482021170db71f","src/pem.rs":"d3ae2748c53597c91aa1896f18844ccd9ce2dca1627662b8974330e5f1b3f36c","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"0e8c1f0bc37620a9208175542143bfd411ae88188974d2d5b37a2b8b77d0e2c8","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"1a6b028a63654d2419417a9a8af790cd22409a4643682a0686ecdb9441264eba","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"bb9bcb4a3b96ce6919236f48dfc5e0ad66f1cef1dce7d989c778d6f28ee6403b","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"60ca3dea1bbfda645bde563b4a878dac129c3f760e3ad572381000fc7a8ef522","src/x509.rs":"31ad553ece8fbb1fda6d8cf43ea0895863f961b6e1171ed05063134d3892f5cc","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"30c58ce7d80670cc597d041e0f59862c1100e38743fc9dde2aec6dc811a4a558"},"package":"a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de"}
-\ No newline at end of file
-+{"files":{"CHANGELOG.md":"17531e8bd93e3bd9ada0d3b4e4d07508d316985a2cbe4df73186ba70d5971923","Cargo.toml":"b71de20a64dc4704f77b8cc8ea9f63e47f2d39f06696900077eefd93a17d16ec","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"949fb3913ec7f94229242978dfeee5e19261b6d7506fc91dcd153bb0d2a84895","build/cfgs.rs":"2b49fbdb045c40bd46bf7e7adfde8c45508e4b51af0080fb934eb1131863d75a","build/expando.c":"c4fa8a4424b2321f1857edfc5ce1ac1f03eda54440367d3142310c0eb5553004","build/find_normal.rs":"0742487bd3faa681232e812c5c96f0e5b83b485ba236a4efda1cd8f5a260b5eb","build/find_vendored.rs":"7bf0e59c5646d72ee5a4392ad970fdf5c20288ddaf54dd86a8caff49583b38f5","build/main.rs":"16dadcb59a2e9f7b4c7f4d6731530533f52df6af9dcc1877bcdad52a5d403385","src/aes.rs":"822bf666db351fe6ef9607c918081d6ad378fc1cedb05290bb746f86980c6088","src/asn1.rs":"254025cb408dbeff73bee6d06325acba9042cb11db30bdad04eedfb789be84b3","src/bio.rs":"1f38a3ec4029511fecd7a51548965a265f3e7772891b5514e22bfb1d061b3a90","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"f21a403fea95e7b7efe0539a429831cfa51c8818adb79c7ebf73ae2a6f2dc87e","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"a1279719ade9704be3d9af55ff679abbe918d525f332ca15810146d45e9080cf","src/dh.rs":"7cc334e86d16b3eae165dfa3a6c8e488bc0fe590c17beda38893d2e9d784d5a6","src/dsa.rs":"ae79baf231681900ea76304285b3ffacf5298c90b8c04d371269cf4adbb5b9fa","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"81372dfe497db2fc90457a470a3b8ccb249828b3ce2bf4fd2da8ec42afd6a6b3","src/err.rs":"3edf1379b3277df32e047a52553d243d4a4001111a277cf4b12f7297f2fe2bf0","src/evp.rs":"ae748b7d7a0f74eb21c2750bf571c09f99bb835f23436c247493a66c28fb5c6b","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"846f03332238caace3dade00a6c15b5ed1773edd601cc72dca2f1339d58b2b7f","src/macros.rs":"638fb9098f6024e82b331eeee50c64cefdb58456dba28ee42560be655a0c2bf6","src/obj_mac.rs":"7203d356f7654c5805600b823eccf8e1d9d9cbce9a01859938612a3f0aae4cdc","src/object.rs":"3e45fb025ccbd6a556aae9738ef8a3b11cc2655ffa9d8422be21699b2e45d6c4","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"f00c3f88f7947f5d13698a2fc796c68eb1bd65b2686f661d29482021170db71f","src/pem.rs":"d3ae2748c53597c91aa1896f18844ccd9ce2dca1627662b8974330e5f1b3f36c","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"0e8c1f0bc37620a9208175542143bfd411ae88188974d2d5b37a2b8b77d0e2c8","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"1a6b028a63654d2419417a9a8af790cd22409a4643682a0686ecdb9441264eba","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"bb9bcb4a3b96ce6919236f48dfc5e0ad66f1cef1dce7d989c778d6f28ee6403b","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"60ca3dea1bbfda645bde563b4a878dac129c3f760e3ad572381000fc7a8ef522","src/x509.rs":"31ad553ece8fbb1fda6d8cf43ea0895863f961b6e1171ed05063134d3892f5cc","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"30c58ce7d80670cc597d041e0f59862c1100e38743fc9dde2aec6dc811a4a558"},"package":"a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de"}
-diff --git a/vendor/openssl-sys/build/main.rs b/vendor/openssl-sys/build/main.rs
-index 49f26d2..2de8ea5 100644
---- a/vendor/openssl-sys/build/main.rs
-+++ b/vendor/openssl-sys/build/main.rs
-@@ -220,7 +220,7 @@ See rust-openssl README for more information:
- (3, 0, _) => ('3', '0', 'x'),
- (3, 1, 0) => ('3', '1', '0'),
- (3, 1, _) => ('3', '1', 'x'),
-- (3, 2, 0) => ('3', '2', '0'),
-+ (3, 2, _) => ('3', '2', 'x'),
- _ => version_error(),
- };
-
-@@ -261,7 +261,7 @@ fn version_error() -> ! {
- "
-
- This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
--through 3.2.0, but a different version of OpenSSL was found. The build is now aborting
-+through 3.2.x, but a different version of OpenSSL was found. The build is now aborting
- due to this version mismatch.
-
- "
---
-2.28.0
-
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
deleted file mode 100644
index 98798d46..00000000
--- a/dev-lang/rust/metadata.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>rust@gentoo.org</email>
- <name>Rust Project</name>
- </maintainer>
- <use>
- <flag name="clippy">Install clippy, Rust code linter</flag>
- <flag name="miri">Install miri, an interpreter for Rust's mid-level intermediate representation (requires USE=nightly)</flag>
- <flag name="nightly">Enable nightly (UNSTABLE) features</flag>
- <flag name="parallel-compiler">Build a multi-threaded rustc</flag>
- <flag name="rls">Install rls, Rust Language Server (used with IDEs supporting RLS protocol)</flag>
- <flag name="rustfmt">Install rustfmt, Rust code formatter</flag>
- <flag name="system-bootstrap">Bootstrap using installed rust compiler</flag>
- <flag name="system-llvm">Use the system LLVM install</flag>
- <flag name="wasm">Build support for the wasm32-unknown-unknown target</flag>
- </use>
-</pkgmetadata>
diff --git a/dev-lang/rust/rust-1.47.0-r1.ebuild b/dev-lang/rust/rust-1.47.0-r1.ebuild
deleted file mode 100644
index 760db0d8..00000000
--- a/dev-lang/rust/rust-1.47.0-r1.ebuild
+++ /dev/null
@@ -1,533 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6..9} )
-
-inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
-
-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"
-
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-RUST_TOOLCHAIN_BASEURL="https://portage.smaeul.xyz/distfiles/"
-
-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? (
- amd64? ( $(rust_arch_uri x86_64-gentoo-linux-musl rust-${RUST_STAGE0_VERSION} ) )
- arm? ( $(rust_arch_uri armv7a-unknown-linux-musleabihf rust-${RUST_STAGE0_VERSION} ) )
- arm64? ( $(rust_arch_uri aarch64-gentoo-linux-musl rust-${RUST_STAGE0_VERSION} ) )
- ppc? ( $(rust_arch_uri powerpc-gentoo-linux-musl rust-${RUST_STAGE0_VERSION} ) )
- ppc64? ( $(rust_arch_uri powerpc64-gentoo-linux-musl rust-${RUST_STAGE0_VERSION} ) )
- x86? ( $(rust_arch_uri i686-gentoo-linux-musl rust-${RUST_STAGE0_VERSION} ) )
- )
- https://dev.gentoo.org/~anarchy/dist/0006-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch
- https://dev.gentoo.org/~anarchy/dist/0030-libc-linkage.patch
-"
-
-# keep in sync with llvm ebuild of the same version as bundled one.
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR 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_arm_neon cpu_flags_arm_thumb2 cpu_flags_x86_sse2 debug doc libressl miri nightly parallel-compiler rls rustfmt +system-bootstrap system-llvm test 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. < 12.
-# 3. Specify LLVM_MAX_SLOT, e.g. 11.
-LLVM_DEPEND="
- || (
- sys-devel/llvm:11[${LLVM_TARGET_USEDEPS// /,}]
- )
- <sys-devel/llvm-12:=
-"
-LLVM_MAX_SLOT=11
-
-BOOTSTRAP_DEPEND="|| ( >=dev-lang/rust-1.$(($(ver_cut 2) - 1)) >=dev-lang/rust-bin-1.$(($(ver_cut 2) - 1)) )"
-
-BDEPEND="
- ${PYTHON_DEPS}
- app-eselect/eselect-rust
- || (
- >=sys-devel/gcc-4.7
- >=sys-devel/clang-3.5
- )
- system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
- !system-llvm? (
- dev-util/cmake
- dev-util/ninja
- )
-"
-
-# libgit2 should be at least same as bundled into libgit-sys #707746
-DEPEND="
- >=dev-libs/libgit2-0.99:=
- net-libs/libssh2:=
- net-libs/http-parser:=
- net-misc/curl:=[http2,ssl]
- elibc_musl? ( >=sys-libs/musl-1.2.1-r2 )
- sys-libs/zlib:=
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- system-llvm? (
- ${LLVM_DEPEND}
- wasm? ( sys-devel/lld )
- )
-"
-
-RDEPEND="${DEPEND}
- app-eselect/eselect-rust
-"
-
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
- miri? ( nightly )
- parallel-compiler? ( nightly )
- test? ( ${ALL_LLVM_TARGETS[*]} )
- wasm? ( llvm_targets_WebAssembly )
- x86? ( cpu_flags_x86_sse2 )
-"
-
-# we don't use cmake.eclass, but can get a warnings
-CMAKE_WARN_UNUSED_CLI=no
-
-QA_FLAGS_IGNORED="
- usr/lib/${PN}/${PV}/bin/.*
- usr/lib/${PN}/${PV}/lib/lib.*.so
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_SONAME="
- usr/lib/${PN}/${PV}/lib/lib.*.so.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-# causes double bootstrap
-RESTRICT="test"
-
-PATCHES=(
- "${FILESDIR}"/1.46.0-don-t-create-prefix-at-time-of-check.patch
- "${FILESDIR}"/1.47.0-libressl.patch
- "${FILESDIR}"/0001-Don-t-pass-CFLAGS-to-the-C-compiler.patch
- "${FILESDIR}"/0002-Fix-LLVM-build.patch
- "${FILESDIR}"/0003-Fix-linking-to-zlib-when-cross-compiling.patch
- "${FILESDIR}"/0004-Fix-rustdoc-when-cross-compiling-on-musl.patch
- "${FILESDIR}"/0005-Use-static-native-libraries-when-linking-static-exec.patch
- "${DISTDIR}"/0006-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch
- "${FILESDIR}"/0007-Prefer-libgcc_eh-over-libunwind-for-musl.patch
- "${FILESDIR}"/0008-Link-libssp_nonshared.a-on-all-musl-targets.patch
- "${FILESDIR}"/0009-test-failed-doctest-output-Fix-normalization.patch
- "${FILESDIR}"/0010-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
- "${FILESDIR}"/0011-test-use-extern-for-plugins-Don-t-assume-multilib.patch
- "${FILESDIR}"/0012-Ignore-broken-and-non-applicable-tests.patch
- "${FILESDIR}"/0013-Link-stage-2-tools-dynamically-to-libstd.patch
- "${FILESDIR}"/0014-Move-debugger-scripts-to-usr-share-rust.patch
- "${FILESDIR}"/0015-Add-gentoo-target-specs.patch
- "${DISTDIR}"/0030-libc-linkage.patch
- "${FILESDIR}"/0040-rls-atomics.patch
- "${FILESDIR}"/0050-llvm.patch
- "${FILESDIR}"/0051-llvm-powerpc-elfv2.patch
-)
-
-S="${WORKDIR}/${MY_P}-src"
-
-toml_usex() {
- usex "$1" true false
-}
-
-pre_build_checks() {
- local M=6144
- M=$(( $(usex clippy 128 0) + ${M} ))
- M=$(( $(usex miri 128 0) + ${M} ))
- M=$(( $(usex rls 512 0) + ${M} ))
- M=$(( $(usex rustfmt 256 0) + ${M} ))
- M=$(( $(usex system-llvm 0 2048) + ${M} ))
- M=$(( $(usex wasm 256 0) + ${M} ))
- M=$(( $(usex debug 15 10) * ${M} / 10 ))
- eshopts_push -s extglob
- if is-flagq '-g?(gdb)?([1-9])'; then
- M=$(( 15 * ${M} / 10 ))
- fi
- eshopts_pop
- M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
- M=$(( $(usex doc 256 0) + ${M} ))
- CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
-}
-
-pkg_pretend() {
- pre_build_checks
-}
-
-pkg_setup() {
- pre_build_checks
- python-any-r1_pkg_setup
-
- # required to link agains system libs, otherwise
- # crates use bundled sources and compile own static version
- 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}-${CHOST}"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
- --components=rust-std-${CHOST},rustc,cargo \
- --destdir="${rust_stage0_root}" --prefix=/ || die
- fi
-
- default
-}
-
-src_configure() {
- local arch_cflags rust_target="" rust_targets="\"$CHOST\"" tools="\"cargo\""
-
- # Collect rust target names to compile standard libs for all ABIs.
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}) | sed s/gnu/musl/)
- rust_targets="${rust_targets},\"${rust_target}\""
-
- if [ "$rust_target" = "armv7-unknown-linux-musleabihf" ] &&
- use cpu_flags_arm_neon && use cpu_flags_arm_thumb2; then
- rust_targets="${rust_targets},\"thumbv7neon-unknown-linux-musleabihf\""
- fi
- done
- if use wasm; then
- rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
- if use system-llvm; then
- # un-hardcode rust-lld linker for this target
- # https://bugs.gentoo.org/715348
- sed -i '/linker:/ s/rust-lld/wasm-ld/' src/librustc_target/spec/wasm32_base.rs || die
- fi
- fi
-
- 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="${CHOST}"
-
- 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/lib/${PN}/${PV}"
- sysconfdir = "etc"
- docdir = "share/doc/rust"
- bindir = "bin"
- libdir = "lib"
- mandir = "share/man"
- [rust]
- # https://github.com/rust-lang/rust/issues/54872
- codegen-units-std = 1
- 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
- remap-debuginfo = true
- lld = $(usex system-llvm false $(toml_usex wasm))
- backtrace-on-ice = true
- jemalloc = false
- [dist]
- src-tarball = false
- [target.${rust_target}]
- cc = "$(tc-getCC)"
- cxx = "$(tc-getCXX)"
- linker = "$(tc-getCC)"
- ar = "$(tc-getAR)"
- crt-static = false
- _EOF_
- if use system-llvm; then
- cat <<- EOF >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- EOF
- fi
-
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}) | sed s/gnu/musl/)
- arch_cflags="$(get_abi_CFLAGS ${v##*.})"
-
- export "CFLAGS_${rust_target//-/_}"="$CFLAGS ${arch_cflags}"
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${rust_target}]
- cc = "$(tc-getCC)"
- cxx = "$(tc-getCXX)"
- linker = "$(tc-getCC)"
- ar = "$(tc-getAR)"
- crt-static = false
- _EOF_
-
- if [ "$rust_target" = "armv7-unknown-linux-musleabihf" ] &&
- use cpu_flags_arm_neon && use cpu_flags_arm_thumb2; then
- rust_target=thumbv7neon-unknown-linux-musleabihf
-
- export "CFLAGS_${rust_target//-/_}"="$CFLAGS ${arch_cflags}"
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${rust_target}]
- cc = "$(tc-getCC)"
- cxx = "$(tc-getCXX)"
- linker = "$(tc-getCC)"
- ar = "$(tc-getAR)"
- crt-static = false
- _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() {
- RUST_BACKTRACE=1 \
- "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
-}
-
-src_test() {
- # https://rustc-dev-guide.rust-lang.org/tests/intro.html
-
- # those are basic and codegen tests.
- local tests=(
- codegen
- codegen-units
- compile-fail
- incremental
- mir-opt
- pretty
- run-make
- )
-
- # fails if llvm is not built with ALL targets.
- # and known to fail with system llvm sometimes.
- use system-llvm || tests+=( assembly )
-
- # fragile/expensive/less important tests
- # or tests that require extra builds
- # TODO: instead of skipping, just make some nonfatal.
- if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
- tests+=(
- rustdoc
- rustdoc-js
- rustdoc-js-std
- rustdoc-ui
- run-make-fulldeps
- ui
- ui-fulldeps
- )
- fi
-
- local i failed=()
- einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
- for i in "${tests[@]}"; do
- local t="src/test/${i}"
- einfo "rust_src_test: running ${t}"
- if ! RUST_BACKTRACE=1 \
- "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
- -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
- then
- failed+=( "${t}" )
- eerror "rust_src_test: ${t} failed"
- fi
- done
-
- if [[ ${#failed[@]} -ne 0 ]]; then
- eerror "rust_src_test: failure summary: ${failed[@]}"
- die "aborting due to test failures"
- fi
-}
-
-src_install() {
- DESTDIR="${D}" \
- "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml || die
-
- # bug #689562, #689160
- rm -v "${D}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
- rmdir -v "${D}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
- dobashcomp build/tmp/dist/cargo-image/etc/bash_completion.d/cargo
-
- # Move public shared libs to abi specific libdir
- mv "${ED}/usr/lib/${PN}/${PV}/lib"/*.so "${ED}/usr/lib/${PN}/${PV}/lib/rustlib/${CHOST}/lib" || die
-
- rm "${ED}/usr/lib/${PN}/${PV}/lib/rustlib/components" || die
- rm "${ED}/usr/lib/${PN}/${PV}/lib/rustlib/install.log" || die
- rm "${ED}/usr/lib/${PN}/${PV}/lib/rustlib"/manifest-* || die
- rm "${ED}/usr/lib/${PN}/${PV}/lib/rustlib/rust-installer-version" || die
- rm "${ED}/usr/lib/${PN}/${PV}/lib/rustlib/uninstall.sh" || die
-
- local symlinks=(
- cargo
- rustc
- rustdoc
- rust-gdb
- rust-gdbgui
- rust-lldb
- )
-
- use clippy && symlinks+=( clippy-driver cargo-clippy )
- use miri && symlinks+=( miri cargo-miri )
- use rls && symlinks+=( rls )
- use rustfmt && symlinks+=( rustfmt cargo-fmt )
-
- einfo "installing eselect-rust symlinks and paths"
- local i
- for i in "${symlinks[@]}"; do
- # we need realpath on /usr/bin/* symlink return version-appended binary path.
- # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
- # need to fix eselect-rust to remove this hack.
- local ver_i="${i}-${PV}"
- mv -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
- ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" "${ED}/usr/lib/${PN}/${PV}/bin/${i}" || die
- dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
- done
-
- # symlinks to switch components to active rust in eselect
- dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
- dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
- dosym "${PN}/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
- dosym "../../lib/${PN}/${PV}/share/doc" "/usr/share/doc/${P}"
-
- newenvd - "50${P}" <<-_EOF_
- LDPATH="${EPREFIX}/usr/lib/${PN}/${PV}/lib/rustlib/${CHOST}/lib"
- MANPATH="${EPREFIX}/usr/lib/rust/man"
- _EOF_
-
- rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
- rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || 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
- /usr/lib/rustlib
- /usr/lib/rust/lib
- /usr/lib/rust/man
- /usr/share/doc/rust
- _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
-}
-
-pkg_postrm() {
- eselect rust cleanup
-}