* [gentoo-commits] proj/musl:master commit in: dev-lang/rust/, dev-lang/rust/files/
@ 2017-12-14 2:13 Aric Belsito
0 siblings, 0 replies; 8+ messages in thread
From: Aric Belsito @ 2017-12-14 2:13 UTC (permalink / raw
To: gentoo-commits
commit: 34f463773e4a99b2a07959070be3598036ac6b68
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Wed Dec 13 18:29:58 2017 +0000
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Wed Dec 13 18:29:58 2017 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=34f46377
dev-lang/rust: new package
adjust from @smaeul's overlay.
dev-lang/rust/Manifest | 9 +
...Explicitly-run-perl-for-OpenSSL-Configure.patch | 30 ++
...bs-for-dependent-crates-when-linking-stat.patch | 121 ++++++
...ndency-resolution-errors-to-be-more-consi.patch | 68 ++++
...tic-native-libraries-when-linking-static-.patch | 44 +++
...-nostdlib-and-musl_root-from-musl-targets.patch | 416 +++++++++++++++++++++
...-Prefer-libgcc_eh-over-libunwind-for-musl.patch | 24 ++
dev-lang/rust/files/0007-Fix-LLVM-build.patch | 26 ++
...dd-openssl-configuration-for-musl-targets.patch | 40 ++
dev-lang/rust/files/0009-liblibc.patch | 16 +
.../rust/files/0010-static-linking-default.patch | 13 +
dev-lang/rust/files/llvm-musl-fixes.patch | 33 ++
dev-lang/rust/metadata.xml | 13 +
dev-lang/rust/rust-1.21.0.ebuild | 234 ++++++++++++
14 files changed, 1087 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
new file mode 100644
index 0000000..ef6f419
--- /dev/null
+++ b/dev-lang/rust/Manifest
@@ -0,0 +1,9 @@
+DIST rust-1.20.0-arm-unknown-linux-gnueabi.tar.xz 62038900 BLAKE2B b044754d736a2c795305fbd113abb196b105ae49b5130bace40fe2fa2f5e76614ab14ab48ece3edc535ea1551ae8ef5eee23263f25eafefe5447ea62af6cd689 SHA512 99156745cb8f21404db5f91ef615e1bcc129de86fa41e2c0188eb2b2845a2e7e7e2d9457f2f84a03e5e9e1f91d3424d30e8e6566c3ddd3963c97c5148228011a
+DIST rust-1.20.0-arm-unknown-linux-musleabi.tar.xz 55867948 BLAKE2B 8d084553ae4f7060c3196cd8b6f6a56043d1a6464b334ed8c565f572a07b639b279205101f80e27545573539755f8516577576877fba4e72cab344e8b02c0bd8 SHA512 0a4387d1751590d3e90060ea985f786639866782315b12c4919347c5975894485807eaf7c7f45328c40a966fd3ad599406edb7e305fff39fc5b726118fe3bd28
+DIST rust-1.20.0-armv7-unknown-linux-gnueabihf.tar.xz 62395492 BLAKE2B 7f701a02cbbb0445a41c616176dac7bb51ec94952e18c8a5afe2a74d217da805f7ffe59de6d99eca926ed083c67668f2a1aefeb9fe6da437f425e3892279af29 SHA512 ca041644fd78d399e81a8dad9b5d5b401a2d8426eaf1e4ed02a2c5415b0a1caefadbc9716fefd6fd01aedde4fae15fc0357375d43a803714a88d65643b8ab5d1
+DIST rust-1.20.0-armv7-unknown-linux-musleabihf.tar.xz 56067408 BLAKE2B bbb0c0e9a01005ac9341af67b77108de1eb33a3fefa3e3191d5f7f895098a3891f26869c30da7cce034feb70b419cd39fa29b00f77e7c8fe203c82759a87c5b3 SHA512 fe616c9fd1da2a89bf8e78ffbf41adfdfd32582ed2bfd9f7e13f18afa8866c65403e377a5ed65dfd927d5bb2e7b2d41ed98f62399e0e897bc0f78844a3f72832
+DIST rust-1.20.0-i686-unknown-linux-gnu.tar.xz 64411000 BLAKE2B bc5aaece728f2d589605a9ee1d27f81dd76e66e3a68891cb50718850e6c3e9a90cab004d16cc414f62c3a8bac54ec86dfd2915f2b90b90fd3ffef52b796f75de SHA512 fdd3e039589feba8a1f3ab2aa0d92bfe87a05d0e1697c5ea981577628e89715d3790a747408cb0d52fc48605c3faf6b59548e6237bdfc0505f8090b23a63a89b
+DIST rust-1.20.0-i686-unknown-linux-musl.tar.xz 59060784 BLAKE2B 5633d0e86e7d47ebdd7fb6e324193221fc33320480e310102faa8d6b113fcbd0f2b21f7e071bd8f320cc4678fcd3c09bf64315f746dbb5775480d65b021c4c87 SHA512 602fc7c656e9c44c8a2b591a276bb68624862d6b1e48746ad4e04d11d33198b7c07b3266b1a0c551c2ae03137cb185593ed077126f57ff3a1c6059ec0dae5c2f
+DIST rust-1.20.0-x86_64-unknown-linux-gnu.tar.xz 68410500 BLAKE2B 777bf0c248f86da0eb75bd38f1069652b1637692ed4d96921b8c3d62a2711cae60586f23ba4f0c48f5a42678fd77629b8dc3a27c7141d5fe8653ad3891943e8b SHA512 5e397b1d3f7ef2ef7f11a7d48ad309f17220751246d5bf3e7301cca1c1a81864be49a7b78e122bb3bc66938971b73c8db443ba9e969880544e61af4061a5d96e
+DIST rust-1.20.0-x86_64-unknown-linux-musl.tar.xz 56417968 BLAKE2B 12b5b32226f944672e3ce535cb046e627e7781840f8680193b1aa10746f03e8e1efe43bd3ca2abfc65daabeac93eef10b3b9107cbaa4e04eb2824cbc26eeaefa SHA512 32f9e36b84606879a91b802a8f73502fbc4f3079177b13d3c0fbe4a784745526e0eab2ba93ae2f0c38042c8fe434370774080223c7fa3d839cb4666c3f26c0b1
+DIST rustc-1.21.0-src.tar.xz 34212448 BLAKE2B 608fa85f4391f3f15db2d1b6f88df8f6811ba460d727c2ed366972f884dd3856711ed50ab0320d939885004d72a8d604be0aa8a65e6d61bd2e1ce33b5aee01be SHA512 63b5c247ef7028c59bb246b96cb9917476d6d13cf68b37956e290248a1e53de3e4dbfad1dcae3c5c2cacc73c9dd212c50e45902c7d913fadeaac81db630bc951
diff --git a/dev-lang/rust/files/0001-Explicitly-run-perl-for-OpenSSL-Configure.patch b/dev-lang/rust/files/0001-Explicitly-run-perl-for-OpenSSL-Configure.patch
new file mode 100644
index 0000000..b0267d7
--- /dev/null
+++ b/dev-lang/rust/files/0001-Explicitly-run-perl-for-OpenSSL-Configure.patch
@@ -0,0 +1,30 @@
+From 56da47a7e21b90dbd9fec0f935d4519d072b6a92 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Mon, 28 Aug 2017 11:22:11 -0500
+Subject: [PATCH 1/8] Explicitly run perl for OpenSSL Configure
+
+OpenSSL's Configure script is missing a shebang. On some platforms,
+execve falls back to execution with the shell. Some other platforms,
+like musl, will fail with an exec format error. Avoid this by calling
+perl explicitly (since it's a perl script).
+---
+ src/bootstrap/native.rs | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
+index 8429b64513..58148c7c8b 100644
+--- a/src/bootstrap/native.rs
++++ b/src/bootstrap/native.rs
+@@ -388,7 +388,8 @@ impl Step for Openssl {
+ drop(fs::remove_dir_all(&dst));
+ build.run(Command::new("tar").arg("xf").arg(&tarball).current_dir(&out));
+
+- let mut configure = Command::new(obj.join("Configure"));
++ let mut configure = Command::new("perl");
++ configure.arg(obj.join("Configure"));
+ configure.arg(format!("--prefix={}", dst.display()));
+ configure.arg("no-dso");
+ configure.arg("no-ssl2");
+--
+2.13.6
+
diff --git a/dev-lang/rust/files/0002-Require-rlibs-for-dependent-crates-when-linking-stat.patch b/dev-lang/rust/files/0002-Require-rlibs-for-dependent-crates-when-linking-stat.patch
new file mode 100644
index 0000000..672e864
--- /dev/null
+++ b/dev-lang/rust/files/0002-Require-rlibs-for-dependent-crates-when-linking-stat.patch
@@ -0,0 +1,121 @@
+From 1f9f168d318a0c87847b33afa9f13463c22a83ff Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sat, 2 Sep 2017 18:15:57 -0500
+Subject: [PATCH 2/8] Require rlibs for dependent crates when linking static
+ executables
+
+This handles the case for `CrateTypeExecutable` and `+crt_static`. I
+reworked the match block to avoid duplicating the `attempt_static` and
+error checking code again (this case would have been a copy of the
+`CrateTypeCdylib`/`CrateTypeStaticlib` case).
+
+On `linux-musl` targets where `std` was built with `crt_static = false`
+in `config.toml`, this change brings the test suite from entirely
+failing to mostly passing.
+
+This change should not affect behavior for other crate types, or for
+targets which do not respect `+crt_static`.
+---
+ src/librustc/middle/dependency_format.rs | 76 ++++++++++++++++++--------------
+ 1 file changed, 42 insertions(+), 34 deletions(-)
+
+diff --git a/src/librustc/middle/dependency_format.rs b/src/librustc/middle/dependency_format.rs
+index 837ab4fd4a..8d9a72723f 100644
+--- a/src/librustc/middle/dependency_format.rs
++++ b/src/librustc/middle/dependency_format.rs
+@@ -112,26 +112,51 @@ fn calculate_type<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
+ return Vec::new();
+ }
+
+- match ty {
+- // If the global prefer_dynamic switch is turned off, first attempt
+- // static linkage (this can fail).
+- config::CrateTypeExecutable if !sess.opts.cg.prefer_dynamic => {
+- if let Some(v) = attempt_static(tcx) {
+- return v;
+- }
+- }
++ let preferred_linkage = match ty {
++ // cdylibs must have all static dependencies.
++ config::CrateTypeCdylib => Linkage::Static,
++
++ // Generating a dylib without `-C prefer-dynamic` means that we're going
++ // to try to eagerly statically link all dependencies. This is normally
++ // done for end-product dylibs, not intermediate products.
++ config::CrateTypeDylib if !sess.opts.cg.prefer_dynamic => Linkage::Static,
++ config::CrateTypeDylib => Linkage::Dynamic,
++
++ // If the global prefer_dynamic switch is turned off, or the final
++ // executable will be statically linked, prefer static crate linkage.
++ config::CrateTypeExecutable if !sess.opts.cg.prefer_dynamic ||
++ sess.crt_static() => Linkage::Static,
++ config::CrateTypeExecutable => Linkage::Dynamic,
++
++ // proc-macro crates are required to be dylibs, and they're currently
++ // required to link to libsyntax as well.
++ config::CrateTypeProcMacro => Linkage::Dynamic,
+
+ // No linkage happens with rlibs, we just needed the metadata (which we
+ // got long ago), so don't bother with anything.
+- config::CrateTypeRlib => return Vec::new(),
+-
+- // Staticlibs and cdylibs must have all static dependencies. If any fail
+- // to be found, we generate some nice pretty errors.
+- config::CrateTypeStaticlib |
+- config::CrateTypeCdylib => {
+- if let Some(v) = attempt_static(tcx) {
+- return v;
+- }
++ config::CrateTypeRlib => Linkage::NotLinked,
++
++ // staticlibs must have all static dependencies.
++ config::CrateTypeStaticlib => Linkage::Static,
++ };
++
++ if preferred_linkage == Linkage::NotLinked {
++ // If the crate is not linked, there are no link-time dependencies.
++ return Vec::new();
++ }
++
++ if preferred_linkage == Linkage::Static {
++ // Attempt static linkage first. For dylibs and executables, we may be
++ // able to retry below with dynamic linkage.
++ if let Some(v) = attempt_static(tcx) {
++ return v;
++ }
++
++ // Staticlibs, cdylibs, and static executables must have all static
++ // dependencies. If any are not found, generate some nice pretty errors.
++ if ty == config::CrateTypeCdylib || ty == config::CrateTypeStaticlib ||
++ (ty == config::CrateTypeExecutable && sess.crt_static() &&
++ !sess.target.target.options.crt_static_allows_dylibs) {
+ for cnum in sess.cstore.crates() {
+ if sess.cstore.dep_kind(cnum).macros_only() { continue }
+ let src = sess.cstore.used_crate_source(cnum);
+@@ -141,23 +166,6 @@ fn calculate_type<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
+ }
+ return Vec::new();
+ }
+-
+- // Generating a dylib without `-C prefer-dynamic` means that we're going
+- // to try to eagerly statically link all dependencies. This is normally
+- // done for end-product dylibs, not intermediate products.
+- config::CrateTypeDylib if !sess.opts.cg.prefer_dynamic => {
+- if let Some(v) = attempt_static(tcx) {
+- return v;
+- }
+- }
+-
+- // Everything else falls through below. This will happen either with the
+- // `-C prefer-dynamic` or because we're a proc-macro crate. Note that
+- // proc-macro crates are required to be dylibs, and they're currently
+- // required to link to libsyntax as well.
+- config::CrateTypeExecutable |
+- config::CrateTypeDylib |
+- config::CrateTypeProcMacro => {},
+ }
+
+ let mut formats = FxHashMap();
+--
+2.13.6
+
diff --git a/dev-lang/rust/files/0003-Adjust-dependency-resolution-errors-to-be-more-consi.patch b/dev-lang/rust/files/0003-Adjust-dependency-resolution-errors-to-be-more-consi.patch
new file mode 100644
index 0000000..f92683d
--- /dev/null
+++ b/dev-lang/rust/files/0003-Adjust-dependency-resolution-errors-to-be-more-consi.patch
@@ -0,0 +1,68 @@
+From 02ef7616b6f5d192032c250982362c0ae0f06b45 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Thu, 14 Sep 2017 23:42:21 -0500
+Subject: [PATCH 3/8] Adjust dependency-resolution errors to be more consistent
+
+---
+ src/librustc/middle/dependency_format.rs | 10 +++++-----
+ src/test/compile-fail/cdylib-deps-must-be-static.rs | 2 +-
+ src/test/compile-fail/rmeta_lib.rs | 2 +-
+ 3 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/librustc/middle/dependency_format.rs b/src/librustc/middle/dependency_format.rs
+index 8d9a72723f..c8da696c37 100644
+--- a/src/librustc/middle/dependency_format.rs
++++ b/src/librustc/middle/dependency_format.rs
+@@ -161,7 +161,8 @@ fn calculate_type<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
+ if sess.cstore.dep_kind(cnum).macros_only() { continue }
+ let src = sess.cstore.used_crate_source(cnum);
+ if src.rlib.is_some() { continue }
+- sess.err(&format!("dependency `{}` not found in rlib format",
++ sess.err(&format!("crate `{}` required to be available in rlib format, \
++ but was not found in this form",
+ sess.cstore.crate_name(cnum)));
+ }
+ return Vec::new();
+@@ -245,10 +246,9 @@ fn calculate_type<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
+ Linkage::Static => "rlib",
+ _ => "dylib",
+ };
+- let name = sess.cstore.crate_name(cnum);
+- sess.err(&format!("crate `{}` required to be available in {}, \
+- but it was not available in this form",
+- name, kind));
++ sess.err(&format!("crate `{}` required to be available in {} format, \
++ but was not found in this form",
++ sess.cstore.crate_name(cnum), kind));
+ }
+ }
+ }
+diff --git a/src/test/compile-fail/cdylib-deps-must-be-static.rs b/src/test/compile-fail/cdylib-deps-must-be-static.rs
+index 853507cbc6..bf7189c21f 100644
+--- a/src/test/compile-fail/cdylib-deps-must-be-static.rs
++++ b/src/test/compile-fail/cdylib-deps-must-be-static.rs
+@@ -8,7 +8,7 @@
+ // option. This file may not be copied, modified, or distributed
+ // except according to those terms.
+
+-// error-pattern: dependency `cdylib_dep` not found in rlib format
++// error-pattern: crate `cdylib_dep` required to be available in rlib format, but was not found
+ // aux-build:cdylib-dep.rs
+ // ignore-musl
+ // ignore-emscripten
+diff --git a/src/test/compile-fail/rmeta_lib.rs b/src/test/compile-fail/rmeta_lib.rs
+index 3b7d1f3cc9..a61ff05e8c 100644
+--- a/src/test/compile-fail/rmeta_lib.rs
++++ b/src/test/compile-fail/rmeta_lib.rs
+@@ -10,7 +10,7 @@
+
+ // aux-build:rmeta_meta.rs
+ // no-prefer-dynamic
+-// error-pattern: crate `rmeta_meta` required to be available in rlib, but it was not available
++// error-pattern: crate `rmeta_meta` required to be available in rlib format, but was not found
+
+ // Check that building a non-metadata crate fails if a dependent crate is
+ // metadata-only.
+--
+2.13.6
+
diff --git a/dev-lang/rust/files/0004-Require-static-native-libraries-when-linking-static-.patch b/dev-lang/rust/files/0004-Require-static-native-libraries-when-linking-static-.patch
new file mode 100644
index 0000000..b58c08d
--- /dev/null
+++ b/dev-lang/rust/files/0004-Require-static-native-libraries-when-linking-static-.patch
@@ -0,0 +1,44 @@
+From b6ace9145b6ec3540b17c7253ed3b042eb8aee5e Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Fri, 8 Sep 2017 00:05:18 -0500
+Subject: [PATCH 4/8] Require static native libraries when linking static
+ executables
+
+---
+ src/librustc_trans/back/link.rs | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs
+index 5de48fbce9..4b4b5846af 100644
+--- a/src/librustc_trans/back/link.rs
++++ b/src/librustc_trans/back/link.rs
+@@ -1312,8 +1312,8 @@ fn add_upstream_rust_crates(cmd: &mut Linker,
+ }
+ }
+
+-// Link in all of our upstream crates' native dependencies. Remember that
+-// all of these upstream native dependencies are all non-static
++// Link in all of our upstream crates' native dependencies. Remember that when
++// linking libraries, these upstream native dependencies are all non-static
+ // dependencies. We've got two cases then:
+ //
+ // 1. The upstream crate is an rlib. In this case we *must* link in the
+@@ -1350,7 +1350,14 @@ fn add_upstream_native_libraries(cmd: &mut Linker, sess: &Session, crate_type: c
+ continue
+ }
+ match lib.kind {
+- NativeLibraryKind::NativeUnknown => cmd.link_dylib(&lib.name.as_str()),
++ NativeLibraryKind::NativeUnknown => {
++ // When creating executables, match library linkage to that of the executable.
++ if crate_type == config::CrateTypeExecutable && sess.crt_static() {
++ cmd.link_staticlib(&lib.name.as_str())
++ } else {
++ cmd.link_dylib(&lib.name.as_str())
++ }
++ },
+ NativeLibraryKind::NativeFramework => cmd.link_framework(&lib.name.as_str()),
+ NativeLibraryKind::NativeStaticNobundle => {
+ // Link "static-nobundle" native libs only if the crate they originate from
+--
+2.13.6
+
diff --git a/dev-lang/rust/files/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch b/dev-lang/rust/files/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
new file mode 100644
index 0000000..985d007
--- /dev/null
+++ b/dev-lang/rust/files/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -0,0 +1,416 @@
+From 40709f672f29ad2c9454615d3d0741f78cec7447 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Fri, 8 Sep 2017 22:11:14 -0500
+Subject: [PATCH 5/8] Remove -nostdlib and musl_root from musl targets
+
+---
+ configure | 6 ----
+ src/bootstrap/bin/rustc.rs | 10 -------
+ src/bootstrap/cc.rs | 27 ++----------------
+ src/bootstrap/compile.rs | 31 ---------------------
+ src/bootstrap/config.rs | 35 ------------------------
+ src/bootstrap/lib.rs | 8 ------
+ src/bootstrap/sanity.rs | 29 --------------------
+ src/ci/docker/cross/Dockerfile | 5 +---
+ src/ci/docker/dist-i586-gnu-i686-musl/Dockerfile | 1 -
+ src/ci/docker/dist-x86_64-musl/Dockerfile | 1 -
+ src/librustc_back/target/linux_musl_base.rs | 15 ----------
+ 12 files changed, 4 insertions(+), 170 deletions(-)
+
+diff --git a/configure b/configure
+index 664b473b2c..eead8a9b7b 100755
+--- a/configure
++++ b/configure
+@@ -481,12 +481,6 @@ valopt armv7-linux-androideabi-ndk "" "armv7-linux-androideabi NDK standalone pa
+ valopt aarch64-linux-android-ndk "" "aarch64-linux-android NDK standalone path"
+ valopt x86_64-linux-android-ndk "" "x86_64-linux-android NDK standalone path"
+ valopt nacl-cross-path "" "NaCl SDK path (Pepper Canary is recommended). Must be absolute!"
+-valopt musl-root "/usr/local" "MUSL root installation directory (deprecated)"
+-valopt musl-root-x86_64 "" "x86_64-unknown-linux-musl install directory"
+-valopt musl-root-i686 "" "i686-unknown-linux-musl install directory"
+-valopt musl-root-arm "" "arm-unknown-linux-musleabi install directory"
+-valopt musl-root-armhf "" "arm-unknown-linux-musleabihf install directory"
+-valopt musl-root-armv7 "" "armv7-unknown-linux-musleabihf install directory"
+ valopt extra-filename "" "Additional data that is hashed and passed to the -C extra-filename flag"
+ valopt qemu-armhf-rootfs "" "rootfs in qemu testing, you probably don't want to use this"
+ valopt qemu-aarch64-rootfs "" "rootfs in qemu testing, you probably don't want to use this"
+diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
+index 0baca9e58f..7b12956f74 100644
+--- a/src/bootstrap/bin/rustc.rs
++++ b/src/bootstrap/bin/rustc.rs
+@@ -30,7 +30,6 @@
+ extern crate bootstrap;
+
+ use std::env;
+-use std::ffi::OsString;
+ use std::io;
+ use std::io::prelude::*;
+ use std::str::FromStr;
+@@ -113,15 +112,6 @@ fn main() {
+ cmd.arg("-Cprefer-dynamic");
+ }
+
+- // Help the libc crate compile by assisting it in finding the MUSL
+- // native libraries.
+- if let Some(s) = env::var_os("MUSL_ROOT") {
+- let mut root = OsString::from("native=");
+- root.push(&s);
+- root.push("/lib");
+- cmd.arg("-L").arg(&root);
+- }
+-
+ // Pass down extra flags, commonly used to configure `-Clinker` when
+ // cross compiling.
+ if let Ok(s) = env::var("RUSTC_FLAGS") {
+diff --git a/src/bootstrap/cc.rs b/src/bootstrap/cc.rs
+index 0f25da8a23..b808fd86da 100644
+--- a/src/bootstrap/cc.rs
++++ b/src/bootstrap/cc.rs
+@@ -53,7 +53,7 @@ pub fn find(build: &mut Build) {
+ if let Some(cc) = config.and_then(|c| c.cc.as_ref()) {
+ cfg.compiler(cc);
+ } else {
+- set_compiler(&mut cfg, "gcc", target, config, build);
++ set_compiler(&mut cfg, "gcc", target, config);
+ }
+
+ let compiler = cfg.get_compiler();
+@@ -74,7 +74,7 @@ pub fn find(build: &mut Build) {
+ if let Some(cxx) = config.and_then(|c| c.cxx.as_ref()) {
+ cfg.compiler(cxx);
+ } else {
+- set_compiler(&mut cfg, "g++", host, config, build);
++ set_compiler(&mut cfg, "g++", host, config);
+ }
+ let compiler = cfg.get_compiler();
+ build.verbose(&format!("CXX_{} = {:?}", host, compiler.path()));
+@@ -85,8 +85,7 @@ pub fn find(build: &mut Build) {
+ fn set_compiler(cfg: &mut gcc::Config,
+ gnu_compiler: &str,
+ target: Interned<String>,
+- config: Option<&Target>,
+- build: &Build) {
++ config: Option<&Target>) {
+ match &*target {
+ // When compiling for android we may have the NDK configured in the
+ // config.toml in which case we look there. Otherwise the default
+@@ -122,26 +121,6 @@ fn set_compiler(cfg: &mut gcc::Config,
+ }
+ }
+
+- "mips-unknown-linux-musl" => {
+- if cfg.get_compiler().path().to_str() == Some("gcc") {
+- cfg.compiler("mips-linux-musl-gcc");
+- }
+- }
+- "mipsel-unknown-linux-musl" => {
+- if cfg.get_compiler().path().to_str() == Some("gcc") {
+- cfg.compiler("mipsel-linux-musl-gcc");
+- }
+- }
+-
+- t if t.contains("musl") => {
+- if let Some(root) = build.musl_root(target) {
+- let guess = root.join("bin/musl-gcc");
+- if guess.exists() {
+- cfg.compiler(guess);
+- }
+- }
+- }
+-
+ _ => {}
+ }
+ }
+diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
+index 335e1690a2..ab3a8a66ea 100644
+--- a/src/bootstrap/compile.rs
++++ b/src/bootstrap/compile.rs
+@@ -78,13 +78,6 @@ impl Step for Std {
+ });
+ println!("Uplifting stage1 std ({} -> {})", from.host, target);
+
+- // Even if we're not building std this stage, the new sysroot must
+- // still contain the musl startup objects.
+- if target.contains("musl") && !target.contains("mips") {
+- let libdir = builder.sysroot_libdir(compiler, target);
+- copy_musl_third_party_objects(build, target, &libdir);
+- }
+-
+ builder.ensure(StdLink {
+ compiler: from,
+ target_compiler: compiler,
+@@ -97,11 +90,6 @@ impl Step for Std {
+ println!("Building stage{} std artifacts ({} -> {})", compiler.stage,
+ &compiler.host, target);
+
+- if target.contains("musl") && !target.contains("mips") {
+- let libdir = builder.sysroot_libdir(compiler, target);
+- copy_musl_third_party_objects(build, target, &libdir);
+- }
+-
+ let out_dir = build.cargo_out(compiler, Mode::Libstd, target);
+ build.clear_if_dirty(&out_dir, &builder.rustc(compiler));
+ let mut cargo = builder.cargo(compiler, Mode::Libstd, target, "build");
+@@ -118,20 +106,6 @@ impl Step for Std {
+ }
+ }
+
+-/// Copies the crt(1,i,n).o startup objects
+-///
+-/// Since musl supports fully static linking, we can cross link for it even
+-/// with a glibc-targeting toolchain, given we have the appropriate startup
+-/// files. As those shipped with glibc won't work, copy the ones provided by
+-/// musl so we have them on linux-gnu hosts.
+-fn copy_musl_third_party_objects(build: &Build,
+- target: Interned<String>,
+- into: &Path) {
+- for &obj in &["crt1.o", "crti.o", "crtn.o"] {
+- copy(&build.musl_root(target).unwrap().join("lib").join(obj), &into.join(obj));
+- }
+-}
+-
+ /// Configure cargo to compile the standard library, adding appropriate env vars
+ /// and such.
+ pub fn std_cargo(build: &Build,
+@@ -173,11 +147,6 @@ pub fn std_cargo(build: &Build,
+ cargo.env("JEMALLOC_OVERRIDE", jemalloc);
+ }
+ }
+- if target.contains("musl") {
+- if let Some(p) = build.musl_root(target) {
+- cargo.env("MUSL_ROOT", p);
+- }
+- }
+ }
+
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
+index f43035fbfe..7f9cca3905 100644
+--- a/src/bootstrap/config.rs
++++ b/src/bootstrap/config.rs
+@@ -111,8 +111,6 @@ pub struct Config {
+ pub low_priority: bool,
+ pub channel: String,
+ pub quiet_tests: bool,
+- // Fallback musl-root for all targets
+- pub musl_root: Option<PathBuf>,
+ pub prefix: Option<PathBuf>,
+ pub sysconfdir: Option<PathBuf>,
+ pub docdir: Option<PathBuf>,
+@@ -144,7 +142,6 @@ pub struct Target {
+ pub cxx: Option<PathBuf>,
+ pub ndk: Option<PathBuf>,
+ pub crt_static: Option<bool>,
+- pub musl_root: Option<PathBuf>,
+ pub qemu_rootfs: Option<PathBuf>,
+ }
+
+@@ -259,7 +256,6 @@ struct Rust {
+ default_linker: Option<String>,
+ default_ar: Option<String>,
+ channel: Option<String>,
+- musl_root: Option<String>,
+ rpath: Option<bool>,
+ optimize_tests: Option<bool>,
+ debuginfo_tests: Option<bool>,
+@@ -277,7 +273,6 @@ struct TomlTarget {
+ cxx: Option<String>,
+ android_ndk: Option<String>,
+ crt_static: Option<bool>,
+- musl_root: Option<String>,
+ qemu_rootfs: Option<String>,
+ }
+
+@@ -424,7 +419,6 @@ impl Config {
+ set(&mut config.ignore_git, rust.ignore_git);
+ config.rustc_default_linker = rust.default_linker.clone();
+ config.rustc_default_ar = rust.default_ar.clone();
+- config.musl_root = rust.musl_root.clone().map(PathBuf::from);
+
+ match rust.codegen_units {
+ Some(0) => config.rust_codegen_units = num_cpus::get() as u32,
+@@ -449,7 +443,6 @@ impl Config {
+ target.cxx = cfg.cxx.clone().map(PathBuf::from);
+ target.cc = cfg.cc.clone().map(PathBuf::from);
+ target.crt_static = cfg.crt_static.clone();
+- target.musl_root = cfg.musl_root.clone().map(PathBuf::from);
+ target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from);
+
+ config.target_config.insert(INTERNER.intern_string(triple.clone()), target);
+@@ -564,34 +557,6 @@ impl Config {
+ "CFG_EXPERIMENTAL_TARGETS" if value.len() > 0 => {
+ self.llvm_experimental_targets = Some(value.to_string());
+ }
+- "CFG_MUSL_ROOT" if value.len() > 0 => {
+- self.musl_root = Some(parse_configure_path(value));
+- }
+- "CFG_MUSL_ROOT_X86_64" if value.len() > 0 => {
+- let target = INTERNER.intern_str("x86_64-unknown-linux-musl");
+- let target = self.target_config.entry(target).or_insert(Target::default());
+- target.musl_root = Some(parse_configure_path(value));
+- }
+- "CFG_MUSL_ROOT_I686" if value.len() > 0 => {
+- let target = INTERNER.intern_str("i686-unknown-linux-musl");
+- let target = self.target_config.entry(target).or_insert(Target::default());
+- target.musl_root = Some(parse_configure_path(value));
+- }
+- "CFG_MUSL_ROOT_ARM" if value.len() > 0 => {
+- let target = INTERNER.intern_str("arm-unknown-linux-musleabi");
+- let target = self.target_config.entry(target).or_insert(Target::default());
+- target.musl_root = Some(parse_configure_path(value));
+- }
+- "CFG_MUSL_ROOT_ARMHF" if value.len() > 0 => {
+- let target = INTERNER.intern_str("arm-unknown-linux-musleabihf");
+- let target = self.target_config.entry(target).or_insert(Target::default());
+- target.musl_root = Some(parse_configure_path(value));
+- }
+- "CFG_MUSL_ROOT_ARMV7" if value.len() > 0 => {
+- let target = INTERNER.intern_str("armv7-unknown-linux-musleabihf");
+- let target = self.target_config.entry(target).or_insert(Target::default());
+- target.musl_root = Some(parse_configure_path(value));
+- }
+ "CFG_DEFAULT_AR" if value.len() > 0 => {
+ self.rustc_default_ar = Some(value.to_string());
+ }
+diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
+index 84a9e56b64..90f905163d 100644
+--- a/src/bootstrap/lib.rs
++++ b/src/bootstrap/lib.rs
+@@ -665,14 +665,6 @@ impl Build {
+ }
+ }
+
+- /// Returns the "musl root" for this `target`, if defined
+- fn musl_root(&self, target: Interned<String>) -> Option<&Path> {
+- self.config.target_config.get(&target)
+- .and_then(|t| t.musl_root.as_ref())
+- .or(self.config.musl_root.as_ref())
+- .map(|p| &**p)
+- }
+-
+ /// Returns whether the target will be tested using the `remote-test-client`
+ /// and `remote-test-server` binaries.
+ fn remote_tested(&self, target: Interned<String>) -> bool {
+diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
+index 54208d8bb5..e1ba41c165 100644
+--- a/src/bootstrap/sanity.rs
++++ b/src/bootstrap/sanity.rs
+@@ -21,7 +21,6 @@
+ use std::collections::HashMap;
+ use std::env;
+ use std::ffi::{OsString, OsStr};
+-use std::fs;
+ use std::process::Command;
+ use std::path::PathBuf;
+
+@@ -168,34 +167,6 @@ pub fn check(build: &mut Build) {
+ panic!("the iOS target is only supported on macOS");
+ }
+
+- // Make sure musl-root is valid
+- if target.contains("musl") && !target.contains("mips") {
+- // If this is a native target (host is also musl) and no musl-root is given,
+- // fall back to the system toolchain in /usr before giving up
+- if build.musl_root(*target).is_none() && build.config.build == *target {
+- let target = build.config.target_config.entry(target.clone())
+- .or_insert(Default::default());
+- target.musl_root = Some("/usr".into());
+- }
+- match build.musl_root(*target) {
+- Some(root) => {
+- if fs::metadata(root.join("lib/libc.a")).is_err() {
+- panic!("couldn't find libc.a in musl dir: {}",
+- root.join("lib").display());
+- }
+- if fs::metadata(root.join("lib/libunwind.a")).is_err() {
+- panic!("couldn't find libunwind.a in musl dir: {}",
+- root.join("lib").display());
+- }
+- }
+- None => {
+- panic!("when targeting MUSL either the rust.musl-root \
+- option or the target.$TARGET.musl-root option must \
+- be specified in config.toml")
+- }
+- }
+- }
+-
+ if target.contains("msvc") {
+ // There are three builds of cmake on windows: MSVC, MinGW, and
+ // Cygwin. The Cygwin build does not have generators for Visual
+diff --git a/src/ci/docker/cross/Dockerfile b/src/ci/docker/cross/Dockerfile
+index a83bbe9c60..0d931e4314 100644
+--- a/src/ci/docker/cross/Dockerfile
++++ b/src/ci/docker/cross/Dockerfile
+@@ -59,10 +59,7 @@ ENV STAGING_DIR=/tmp
+
+ ENV RUST_CONFIGURE_ARGS \
+ --enable-extended \
+- --target=$TARGETS \
+- --musl-root-arm=/usr/local/arm-linux-musleabi \
+- --musl-root-armhf=/usr/local/arm-linux-musleabihf \
+- --musl-root-armv7=/usr/local/armv7-linux-musleabihf
++ --target=$TARGETS
+ ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
+
+ # sccache
+diff --git a/src/ci/docker/dist-i586-gnu-i686-musl/Dockerfile b/src/ci/docker/dist-i586-gnu-i686-musl/Dockerfile
+index efde3ff529..518ece660b 100644
+--- a/src/ci/docker/dist-i586-gnu-i686-musl/Dockerfile
++++ b/src/ci/docker/dist-i586-gnu-i686-musl/Dockerfile
+@@ -25,7 +25,6 @@ RUN sh /scripts/sccache.sh
+
+ ENV RUST_CONFIGURE_ARGS \
+ --target=i686-unknown-linux-musl,i586-unknown-linux-gnu \
+- --musl-root-i686=/musl-i686 \
+ --enable-extended
+
+ # Newer binutils broke things on some vms/distros (i.e., linking against
+diff --git a/src/ci/docker/dist-x86_64-musl/Dockerfile b/src/ci/docker/dist-x86_64-musl/Dockerfile
+index 91ed6bfe1f..9859cfeee9 100644
+--- a/src/ci/docker/dist-x86_64-musl/Dockerfile
++++ b/src/ci/docker/dist-x86_64-musl/Dockerfile
+@@ -25,7 +25,6 @@ RUN sh /scripts/sccache.sh
+
+ ENV RUST_CONFIGURE_ARGS \
+ --target=x86_64-unknown-linux-musl \
+- --musl-root-x86_64=/musl-x86_64 \
+ --enable-extended
+
+ # Newer binutils broke things on some vms/distros (i.e., linking against
+diff --git a/src/librustc_back/target/linux_musl_base.rs b/src/librustc_back/target/linux_musl_base.rs
+index 6e5e139715..d99cb55cc5 100644
+--- a/src/librustc_back/target/linux_musl_base.rs
++++ b/src/librustc_back/target/linux_musl_base.rs
+@@ -14,10 +14,6 @@ use target::TargetOptions;
+ pub fn opts() -> TargetOptions {
+ let mut base = super::linux_base::opts();
+
+- // Make sure that the linker/gcc really don't pull in anything, including
+- // default objects, libs, etc.
+- base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-nostdlib".to_string());
+-
+ // At least when this was tested, the linker would not add the
+ // `GNU_EH_FRAME` program header to executables generated, which is required
+ // when unwinding to locate the unwinding information. I'm not sure why this
+@@ -49,17 +45,6 @@ pub fn opts() -> TargetOptions {
+ base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,-(".to_string());
+ base.post_link_args.insert(LinkerFlavor::Gcc, vec!["-Wl,-)".to_string()]);
+
+- // When generating a statically linked executable there's generally some
+- // small setup needed which is listed in these files. These are provided by
+- // a musl toolchain and are linked by default by the `musl-gcc` script. Note
+- // that `gcc` also does this by default, it just uses some different files.
+- //
+- // Each target directory for musl has these object files included in it so
+- // they'll be included from there.
+- base.pre_link_objects_exe.push("crt1.o".to_string());
+- base.pre_link_objects_exe.push("crti.o".to_string());
+- base.post_link_objects.push("crtn.o".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.13.6
+
diff --git a/dev-lang/rust/files/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch b/dev-lang/rust/files/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
new file mode 100644
index 0000000..c12e6df
--- /dev/null
+++ b/dev-lang/rust/files/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
@@ -0,0 +1,24 @@
+From cbd6ddb6036758c54a89e578b2fad183b2d50e8d Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sat, 9 Sep 2017 00:14:16 -0500
+Subject: [PATCH 6/8] Prefer libgcc_eh over libunwind for musl
+
+---
+ src/libunwind/lib.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs
+index 461b49aa36..aeb4686ba7 100644
+--- a/src/libunwind/lib.rs
++++ b/src/libunwind/lib.rs
+@@ -29,6 +29,6 @@ mod libunwind;
+ pub use libunwind::*;
+
+ #[cfg(all(target_env = "musl", not(target_arch = "mips")))]
+-#[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
++#[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
+ #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
+ extern {}
+--
+2.13.6
+
diff --git a/dev-lang/rust/files/0007-Fix-LLVM-build.patch b/dev-lang/rust/files/0007-Fix-LLVM-build.patch
new file mode 100644
index 0000000..d435bfb
--- /dev/null
+++ b/dev-lang/rust/files/0007-Fix-LLVM-build.patch
@@ -0,0 +1,26 @@
+From ede5ae2d6278c7309601d2bb2dde55e5c91fbac2 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Fri, 8 Sep 2017 00:04:29 -0500
+Subject: [PATCH 7/8] Fix LLVM build
+
+---
+ src/bootstrap/lib.rs | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
+index 90f905163d..4d7f2f9a62 100644
+--- a/src/bootstrap/lib.rs
++++ b/src/bootstrap/lib.rs
+@@ -603,7 +603,8 @@ impl Build {
+ // gcc-rs because the build scripts will determine that for themselves.
+ let mut base = self.cc[&target].0.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<_>>();
+
+ // If we're compiling on macOS then we add a few unconditional flags
+--
+2.13.6
+
diff --git a/dev-lang/rust/files/0008-Add-openssl-configuration-for-musl-targets.patch b/dev-lang/rust/files/0008-Add-openssl-configuration-for-musl-targets.patch
new file mode 100644
index 0000000..691661b
--- /dev/null
+++ b/dev-lang/rust/files/0008-Add-openssl-configuration-for-musl-targets.patch
@@ -0,0 +1,40 @@
+From 6fe9d7428e87bd13d96895cc56568104fe2cc112 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Mon, 11 Sep 2017 11:21:56 -0500
+Subject: [PATCH 8/8] Add openssl configuration for musl targets
+
+---
+ src/bootstrap/native.rs | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
+index 58148c7c8b..6cd5b011a5 100644
+--- a/src/bootstrap/native.rs
++++ b/src/bootstrap/native.rs
+@@ -401,17 +401,22 @@ impl Step for Openssl {
+ "arm-linux-androideabi" => "android",
+ "arm-unknown-linux-gnueabi" => "linux-armv4",
+ "arm-unknown-linux-gnueabihf" => "linux-armv4",
+- "armv7-linux-androideabi" => "android-armv7",
++ "arm-unknown-linux-musleabi" => "linux-armv4",
++ "arm-unknown-linux-musleabihf" => "linux-armv4",
++ "armv7-linux-androideabi" => "android-armv4",
+ "armv7-unknown-linux-gnueabihf" => "linux-armv4",
++ "armv7-unknown-linux-musleabihf" => "linux-armv4",
+ "i686-apple-darwin" => "darwin-i386-cc",
+ "i686-linux-android" => "android-x86",
+ "i686-unknown-freebsd" => "BSD-x86-elf",
+ "i686-unknown-linux-gnu" => "linux-elf",
+ "i686-unknown-linux-musl" => "linux-elf",
+ "mips-unknown-linux-gnu" => "linux-mips32",
++ "mips-unknown-linux-musl" => "linux-mips32",
+ "mips64-unknown-linux-gnuabi64" => "linux64-mips64",
+ "mips64el-unknown-linux-gnuabi64" => "linux64-mips64",
+ "mipsel-unknown-linux-gnu" => "linux-mips32",
++ "mipsel-unknown-linux-musl" => "linux-mips32",
+ "powerpc-unknown-linux-gnu" => "linux-ppc",
+ "powerpc64-unknown-linux-gnu" => "linux-ppc64",
+ "powerpc64le-unknown-linux-gnu" => "linux-ppc64le",
+--
+2.13.6
+
diff --git a/dev-lang/rust/files/0009-liblibc.patch b/dev-lang/rust/files/0009-liblibc.patch
new file mode 100644
index 0000000..d9d9c3b
--- /dev/null
+++ b/dev-lang/rust/files/0009-liblibc.patch
@@ -0,0 +1,16 @@
+diff --git a/src/liblibc/src/unix/mod.rs b/src/liblibc/src/unix/mod.rs
+index 62fc7f5e..d0a7c188 100644
+--- a/src/liblibc/src/unix/mod.rs
++++ b/src/liblibc/src/unix/mod.rs
+@@ -209,9 +209,8 @@ cfg_if! {
+ } else if #[cfg(all(not(stdbuild), feature = "use_std"))] {
+ // cargo build, don't pull in anything extra as the libstd dep
+ // already pulls in all libs.
+- } else if #[cfg(any(all(target_env = "musl", not(target_arch = "mips"))))] {
+- #[link(name = "c", kind = "static", cfg(target_feature = "crt-static"))]
+- #[link(name = "c", cfg(not(target_feature = "crt-static")))]
++ } else if #[cfg(target_env = "musl")] {
++ #[link(name = "c")]
+ extern {}
+ } else if #[cfg(target_os = "emscripten")] {
+ #[link(name = "c")]
diff --git a/dev-lang/rust/files/0010-static-linking-default.patch b/dev-lang/rust/files/0010-static-linking-default.patch
new file mode 100644
index 0000000..57836ad
--- /dev/null
+++ b/dev-lang/rust/files/0010-static-linking-default.patch
@@ -0,0 +1,13 @@
+diff --git a/src/librustc_back/target/linux_musl_base.rs b/src/librustc_back/target/linux_musl_base.rs
+index d99cb55cc5..bb786bf0f3 100644
+--- a/src/librustc_back/target/linux_musl_base.rs
++++ b/src/librustc_back/target/linux_musl_base.rs
+@@ -45,8 +45,6 @@ pub fn opts() -> TargetOptions {
+ base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,-(".to_string());
+ base.post_link_args.insert(LinkerFlavor::Gcc, vec!["-Wl,-)".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.
+ base.crt_static_respected = true;
+
diff --git a/dev-lang/rust/files/llvm-musl-fixes.patch b/dev-lang/rust/files/llvm-musl-fixes.patch
new file mode 100644
index 0000000..c683835
--- /dev/null
+++ b/dev-lang/rust/files/llvm-musl-fixes.patch
@@ -0,0 +1,33 @@
+diff --git a/src/llvm/include/llvm/Analysis/TargetLibraryInfo.def b/src/llvm/include/llvm/Analysis/TargetLibraryInfo.def
+index 7798e3c..ade2b96 100644
+--- a/src/llvm/include/llvm/Analysis/TargetLibraryInfo.def
++++ b/src/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/src/llvm/lib/Support/DynamicLibrary.cpp b/src/llvm/lib/Support/DynamicLibrary.cpp
+index 9a7aeb5..e98ad80 100644
+--- a/src/llvm/lib/Support/DynamicLibrary.cpp
++++ b/src/llvm/lib/Support/DynamicLibrary.cpp
+@@ -143,7 +143,7 @@ void* DynamicLibrary::SearchForAddressOfSymbol(const char *symbolName) {
+ // On linux we have a weird situation. The stderr/out/in symbols are both
+ // macros and global variables because of standards requirements. So, we
+ // boldly use the EXPLICIT_SYMBOL macro without checking for a #define first.
+-#if defined(__linux__) and !defined(__ANDROID__)
++#if defined(__linux__) && defined(__GLIBC__)
+ {
+ EXPLICIT_SYMBOL(stderr);
+ EXPLICIT_SYMBOL(stdout);
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
new file mode 100644
index 0000000..f170659
--- /dev/null
+++ b/dev-lang/rust/metadata.xml
@@ -0,0 +1,13 @@
+<?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="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations</flag>
+ <flag name="system-llvm">Use system <pkg>sys-devel/llvm</pkg> in
+ place of the bundled one</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/rust/rust-1.21.0.ebuild b/dev-lang/rust/rust-1.21.0.ebuild
new file mode 100644
index 0000000..b10900c
--- /dev/null
+++ b/dev-lang/rust/rust-1.21.0.ebuild
@@ -0,0 +1,234 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+LLVM_MAX_SLOT=4
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-any-r1 versionator toolchain-funcs llvm
+
+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"
+ KEYWORDS=""
+else
+ ABI_VER="$(get_version_component_range 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+case "${CHOST}" in
+ armv7a-hardfloat-*)
+ RUSTARCH=armv7 ;;
+ arm*)
+ RUSTARCH=arm ;;
+ *)
+ RUSTARCH=${CHOST%%-*} ;;
+esac
+case "${CHOST}" in
+ armv7a-hardfloat-*)
+ RUSTLIBC=${ELIBC/glibc/gnu}eabihf ;;
+ arm*)
+ RUSTLIBC=${ELIBC/glibc/gnu}eabi ;;
+ *)
+ RUSTLIBC=${ELIBC/glibc/gnu} ;;
+esac
+RUSTHOST=${RUSTARCH}-unknown-${KERNEL}-${RUSTLIBC}
+STAGE0_VERSION="1.$(($(get_version_component_range 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
+ amd64? (
+ elibc_glibc? ( https://static.rust-lang.org/dist/rust-${STAGE0_VERSION}-x86_64-unknown-linux-gnu.tar.xz )
+ elibc_musl? ( https://portage.smaeul.xyz/distfiles/rust-${STAGE0_VERSION}-x86_64-unknown-linux-musl.tar.xz )
+ )
+ arm? (
+ elibc_glibc? (
+ https://static.rust-lang.org/dist/rust-${STAGE0_VERSION}-arm-unknown-linux-gnueabi.tar.xz
+ https://static.rust-lang.org/dist/rust-${STAGE0_VERSION}-armv7-unknown-linux-gnueabihf.tar.xz
+ )
+ elibc_musl? (
+ https://portage.smaeul.xyz/distfiles/rust-${STAGE0_VERSION}-arm-unknown-linux-musleabi.tar.xz
+ https://portage.smaeul.xyz/distfiles/rust-${STAGE0_VERSION}-armv7-unknown-linux-musleabihf.tar.xz
+ )
+ )
+ x86? (
+ elibc_glibc? ( https://static.rust-lang.org/dist/rust-${STAGE0_VERSION}-i686-unknown-linux-gnu.tar.xz )
+ elibc_musl? ( https://portage.smaeul.xyz/distfiles/rust-${STAGE0_VERSION}-i686-unknown-linux-musl.tar.xz )
+ )
+"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="debug doc jemalloc system-llvm"
+REQUIRED_USE=""
+
+RDEPEND="
+ system-llvm? ( sys-devel/llvm:4 )
+"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ >=sys-devel/gcc-4.7
+ !system-llvm? (
+ >=dev-util/cmake-3.4.3
+ dev-util/ninja
+ )
+"
+
+PDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ dev-util/cargo"
+
+PATCHES=(
+ "${FILESDIR}/0001-Explicitly-run-perl-for-OpenSSL-Configure.patch"
+ "${FILESDIR}/0002-Require-rlibs-for-dependent-crates-when-linking-stat.patch"
+ "${FILESDIR}/0003-Adjust-dependency-resolution-errors-to-be-more-consi.patch"
+ "${FILESDIR}/0004-Require-static-native-libraries-when-linking-static-.patch"
+ "${FILESDIR}/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch"
+ "${FILESDIR}/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch"
+ "${FILESDIR}/0007-Fix-LLVM-build.patch"
+ "${FILESDIR}/0008-Add-openssl-configuration-for-musl-targets.patch"
+ "${FILESDIR}/0009-liblibc.patch"
+ "${FILESDIR}/0010-static-linking-default.patch"
+ "${FILESDIR}/llvm-musl-fixes.patch"
+)
+
+S="${WORKDIR}/${MY_P}-src"
+
+toml_usex() {
+ usex "$1" true false
+}
+
+pkg_setup() {
+ export RUST_BACKTRACE=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
+
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ "${WORKDIR}/rust-${STAGE0_VERSION}-${RUSTHOST}/install.sh" \
+ --prefix="${WORKDIR}/stage0" \
+ --components=rust-std-${RUSTHOST},rustc,cargo \
+ --disable-ldconfig \
+ || die
+}
+
+src_configure() {
+ cat <<- EOF > "${S}"/config.toml
+ [llvm]
+ ninja = true
+ optimize = $(toml_usex !debug)
+ assertions = $(toml_usex debug)
+ [build]
+ build = "${RUSTHOST}"
+ host = ["${RUSTHOST}"]
+ target = ["${RUSTHOST}"]
+ cargo = "${WORKDIR}/stage0/bin/cargo"
+ rustc = "${WORKDIR}/stage0/bin/rustc"
+ docs = $(toml_usex doc)
+ compiler-docs = $(toml_usex doc)
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ verbose = 2
+ [install]
+ prefix = "${EPREFIX}/usr"
+ libdir = "$(get_libdir)/${P}"
+ mandir = "share/${P}/man"
+ docdir = "share/doc/${P}"
+ [rust]
+ optimize = $(toml_usex !debug)
+ debug-assertions = $(toml_usex debug)
+ debuginfo = $(toml_usex debug)
+ use-jemalloc = $(toml_usex jemalloc)
+ channel = "${SLOT%%/*}"
+ rpath = false
+ optimize-tests = $(toml_usex !debug)
+ [dist]
+ src-tarball = false
+ [target.${RUSTHOST}]
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ crt-static = false
+ EOF
+ use system-llvm && cat <<- EOF >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "$LLVM_MAX_SLOT")/bin/llvm-config"
+ EOF
+}
+
+src_compile() {
+ ./x.py build || die
+}
+
+src_install() {
+ env DESTDIR="${D}" ./x.py install || die
+
+ rm "${D}/usr/$(get_libdir)/${P}/rustlib/components" || die
+ rm "${D}/usr/$(get_libdir)/${P}/rustlib/install.log" || die
+ rm "${D}/usr/$(get_libdir)/${P}/rustlib/manifest-rust-std-${RUSTHOST}" || die
+ rm "${D}/usr/$(get_libdir)/${P}/rustlib/manifest-rustc" || die
+ rm "${D}/usr/$(get_libdir)/${P}/rustlib/rust-installer-version" || die
+ rm "${D}/usr/$(get_libdir)/${P}/rustlib/uninstall.sh" || die
+
+ mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
+ mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
+ mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
+ mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
+
+ dodoc COPYRIGHT
+
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/usr/$(get_libdir)/${P}"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-lldb
+ EOF
+ dodir /etc/env.d/rust
+ 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 now,"
+ elog "for your convenience it is installed under /usr/bin/rust-gdb-${PV}."
+
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; 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 has_version 'app-shells/zsh'; then
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust unset --if-invalid
+}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/musl:master commit in: dev-lang/rust/, dev-lang/rust/files/
@ 2018-01-24 22:07 Aric Belsito
0 siblings, 0 replies; 8+ messages in thread
From: Aric Belsito @ 2018-01-24 22:07 UTC (permalink / raw
To: gentoo-commits
commit: 79829bb772f3a7fe32784745b72f2e956d2bfe95
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Wed Jan 24 22:06:55 2018 +0000
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Wed Jan 24 22:06:55 2018 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=79829bb7
dev-lang/rust: version bump to 1.23.0
yet another hybrid ebuild between ::gentoo and ::smauel
dev-lang/rust/Manifest | 9 +
...tic-native-libraries-when-linking-static-.patch | 44 +++
...-nostdlib-and-musl_root-from-musl-targets.patch | 408 +++++++++++++++++++++
...sl-targets-to-link-dynamically-by-default.patch | 25 ++
...-Prefer-libgcc_eh-over-libunwind-for-musl.patch | 24 ++
dev-lang/rust/files/0005-Fix-LLVM-build.patch | 26 ++
.../files/0006-Fix-rustdoc-for-cross-targets.patch | 36 ++
...dd-openssl-configuration-for-musl-targets.patch | 41 +++
.../0008-Don-t-pass-CFLAGS-to-the-C-compiler.patch | 36 ++
dev-lang/rust/metadata.xml | 3 +-
dev-lang/rust/rust-1.23.0.ebuild | 247 +++++++++++++
11 files changed, 898 insertions(+), 1 deletion(-)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index ef6f419..71e99e1 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -6,4 +6,13 @@ DIST rust-1.20.0-i686-unknown-linux-gnu.tar.xz 64411000 BLAKE2B bc5aaece728f2d58
DIST rust-1.20.0-i686-unknown-linux-musl.tar.xz 59060784 BLAKE2B 5633d0e86e7d47ebdd7fb6e324193221fc33320480e310102faa8d6b113fcbd0f2b21f7e071bd8f320cc4678fcd3c09bf64315f746dbb5775480d65b021c4c87 SHA512 602fc7c656e9c44c8a2b591a276bb68624862d6b1e48746ad4e04d11d33198b7c07b3266b1a0c551c2ae03137cb185593ed077126f57ff3a1c6059ec0dae5c2f
DIST rust-1.20.0-x86_64-unknown-linux-gnu.tar.xz 68410500 BLAKE2B 777bf0c248f86da0eb75bd38f1069652b1637692ed4d96921b8c3d62a2711cae60586f23ba4f0c48f5a42678fd77629b8dc3a27c7141d5fe8653ad3891943e8b SHA512 5e397b1d3f7ef2ef7f11a7d48ad309f17220751246d5bf3e7301cca1c1a81864be49a7b78e122bb3bc66938971b73c8db443ba9e969880544e61af4061a5d96e
DIST rust-1.20.0-x86_64-unknown-linux-musl.tar.xz 56417968 BLAKE2B 12b5b32226f944672e3ce535cb046e627e7781840f8680193b1aa10746f03e8e1efe43bd3ca2abfc65daabeac93eef10b3b9107cbaa4e04eb2824cbc26eeaefa SHA512 32f9e36b84606879a91b802a8f73502fbc4f3079177b13d3c0fbe4a784745526e0eab2ba93ae2f0c38042c8fe434370774080223c7fa3d839cb4666c3f26c0b1
+DIST rust-1.23.0-arm-unknown-linux-gnueabi.tar.xz 76055908 BLAKE2B bf4cdb7e270bf6589c03f0fea3e1280b01b575179bb38b6f0f4058df3adf1576aafb91be09b9971f5c7b071ecd0aa4793505f2cdbe7bd426aec11f74fc793afa SHA512 8701d72cdbb5ffc1bd5cb279be493bb31ce5741a139185f2976939c84eccd950ac976c23a8d622e5a58c5511f94b775b99c82f697a30896fadf790a7aab844c4
+DIST rust-1.23.0-arm-unknown-linux-musleabi.tar.xz 73839144 BLAKE2B d4bb7dd08c57375daa8b39a10bae42109863d37321e5ecfc284b13b09e1dd2cb09265ba130b5e698fc5862c7b80237f5d7e8057e286c806aa41545ef3507b111 SHA512 a4dc1df817d700954897b2476e794923cb9ff9c2e1c5b1b18ee41f02d8ba1161c136183ee7d8487364bb2e82a3cfdb119f28828f40a4cac8c417c73f71d26b5a
+DIST rust-1.23.0-armv7-unknown-linux-gnueabihf.tar.xz 76508532 BLAKE2B 5c42972bdf9da7fdf6eee7389a4604290249e8077523e1eb50175453672c24766f4e4a6e0c2ab17a60a233ed4059758a791c02da905680498ec3bd3986221796 SHA512 2ef07187d78060005e99676cf1f168e7a8861e9f104c95056cfe8784a7fa35b14f0b69ba4adc8be4173ef8d4ce7554f92487385a09602343ab65fcf749fbe35c
+DIST rust-1.23.0-armv7-unknown-linux-musleabihf.tar.xz 73651660 BLAKE2B bf710fb93c1d7756a00fbc33991b15e6a6ada4d5bc10bb0fc3370fafe9cdb41c65efec6d6f15a53d6a77c543234efaad069c4579fa29d65e206126e173f3961d SHA512 e5493ba5867dfcdd545b866342c066a719252e0edf2f84122ec2bea425ab6126eab3ecd168c0e07b6e8b3244e62db77a3ee230a9181bbc2eac5e2122305e53a5
+DIST rust-1.23.0-i686-unknown-linux-gnu.tar.xz 79540368 BLAKE2B 5df0fb0fa904e7daa871968c752bc8ac0375eed67c76129a188bc5bd663b18c6735e5118e283109a5581f948ccaa52ab7a88e7ebc1d6b4f6fdf5e24a48ac0c58 SHA512 6863a512100ae0369d0a5c4242d45fda9b83a2ad6c3e6691f4f0d1e071dca7003c55873cc03a9d09305adae24667e654bda66a8ad3246f4df2d7a2fc0fc4d7a7
+DIST rust-1.23.0-i686-unknown-linux-musl.tar.xz 77706812 BLAKE2B d30d4359c94ce8c44a2654e9a41a8fcb5d98d330d46e6e0a98500745895f8ded97a8395970c278078b325648d6ee13af7b538a58b41a6d3b027533a40e270767 SHA512 2127391e224c5a286fdadfd46125373b13a406833634c990f94f256fa0dbf6cdf2536b93206332b1ca2c55c893c2cfbc735e96a6c1439fddf8bba87359cab313
+DIST rust-1.23.0-x86_64-unknown-linux-gnu.tar.xz 82693116 BLAKE2B e327f7b97f7c359f88b4f5a678d8c110c9b50183c96bc8efe767114c83bffcf86a6632d22e9148c48ce97687393f5d5cb5439d66c0ee53853f007b2f730881f0 SHA512 a5a3aa11d04e81305d33ed50fe657dcebb8c3a1f71a0a2b54372439ff6b1b4b7d2abd9c579b27950be67921cbb41586346824faf71495fb4f3f505ed8a48ccc9
+DIST rust-1.23.0-x86_64-unknown-linux-musl.tar.xz 74604492 BLAKE2B 6ba1c3e850f4dd3202c0a24fdc13ebce588152eaf61054d5a2f0ed8fffc4ef66a7507400dbb5156b3422cd45e6cbe6bf73a2a21e35bf0df93acf1dceed3c04c7 SHA512 3d3e864691c74c94b79e459ec47f3d4e2f7d2bb1cecb20f7469ac09bf8e0385a8803848c66c5834c1e95bf2888bed883deff236da4fa3c6d854099f57d2e3998
DIST rustc-1.21.0-src.tar.xz 34212448 BLAKE2B 608fa85f4391f3f15db2d1b6f88df8f6811ba460d727c2ed366972f884dd3856711ed50ab0320d939885004d72a8d604be0aa8a65e6d61bd2e1ce33b5aee01be SHA512 63b5c247ef7028c59bb246b96cb9917476d6d13cf68b37956e290248a1e53de3e4dbfad1dcae3c5c2cacc73c9dd212c50e45902c7d913fadeaac81db630bc951
+DIST rustc-1.23.0-src.tar.xz 38490016 BLAKE2B 85baeb5535cb95f7d4ceff71580d59d5ce3a5b13adaa067ffbfc7db26e947d1c0b939dad4846c279cc8d174cbf61bd331b9298236ce03630cedffcd6cc8a4e8c SHA512 2e605121dd5152c1a898b263d634b0ac55c7ea79c7fbc9f72c432e68fb397618a267283f3dfb0f77d5e189720d788b1937e8114a1f71bdb10ddd4cbaae92fa80
diff --git a/dev-lang/rust/files/0001-Require-static-native-libraries-when-linking-static-.patch b/dev-lang/rust/files/0001-Require-static-native-libraries-when-linking-static-.patch
new file mode 100644
index 0000000..8175c4c
--- /dev/null
+++ b/dev-lang/rust/files/0001-Require-static-native-libraries-when-linking-static-.patch
@@ -0,0 +1,44 @@
+From abd07ed6ab514ef00d450640a659861af06f308e Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Fri, 8 Sep 2017 00:05:18 -0500
+Subject: [PATCH 1/8] Require static native libraries when linking static
+ executables
+
+---
+ src/librustc_trans/back/link.rs | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs
+index e0eef1f576..e46b25f987 100644
+--- a/src/librustc_trans/back/link.rs
++++ b/src/librustc_trans/back/link.rs
+@@ -1302,8 +1302,8 @@ fn add_upstream_rust_crates(cmd: &mut Linker,
+ }
+ }
+
+-// Link in all of our upstream crates' native dependencies. Remember that
+-// all of these upstream native dependencies are all non-static
++// Link in all of our upstream crates' native dependencies. Remember that when
++// linking libraries, these upstream native dependencies are all non-static
+ // dependencies. We've got two cases then:
+ //
+ // 1. The upstream crate is an rlib. In this case we *must* link in the
+@@ -1343,7 +1343,14 @@ fn add_upstream_native_libraries(cmd: &mut Linker,
+ continue
+ }
+ match lib.kind {
+- NativeLibraryKind::NativeUnknown => cmd.link_dylib(&lib.name.as_str()),
++ NativeLibraryKind::NativeUnknown => {
++ // When creating executables, match library linkage to that of the executable.
++ if crate_type == config::CrateTypeExecutable && sess.crt_static() {
++ cmd.link_staticlib(&lib.name.as_str())
++ } else {
++ cmd.link_dylib(&lib.name.as_str())
++ }
++ },
+ NativeLibraryKind::NativeFramework => cmd.link_framework(&lib.name.as_str()),
+ NativeLibraryKind::NativeStaticNobundle => {
+ // Link "static-nobundle" native libs only if the crate they originate from
+--
+2.13.6
+
diff --git a/dev-lang/rust/files/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch b/dev-lang/rust/files/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
new file mode 100644
index 0000000..4c99e42
--- /dev/null
+++ b/dev-lang/rust/files/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -0,0 +1,408 @@
+From 3f14fcbb1dc6a11ed82724d6c006325243122bfb Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Fri, 8 Sep 2017 22:11:14 -0500
+Subject: [PATCH 2/8] Remove -nostdlib and musl_root from musl targets
+
+---
+ config.toml.example | 6 -----
+ src/bootstrap/bin/rustc.rs | 10 --------
+ src/bootstrap/cc_detect.rs | 27 +++------------------
+ src/bootstrap/compile.rs | 31 ------------------------
+ src/bootstrap/config.rs | 7 ------
+ src/bootstrap/configure.py | 14 -----------
+ src/bootstrap/lib.rs | 8 ------
+ src/bootstrap/sanity.rs | 29 ----------------------
+ src/ci/docker/cross/Dockerfile | 6 +----
+ src/ci/docker/dist-i586-gnu-i686-musl/Dockerfile | 1 -
+ src/ci/docker/dist-x86_64-musl/Dockerfile | 1 -
+ src/librustc_back/target/linux_musl_base.rs | 15 ------------
+ 12 files changed, 4 insertions(+), 151 deletions(-)
+
+diff --git a/config.toml.example b/config.toml.example
+index df0142b8d4..9cb6fc5c9e 100644
+--- a/config.toml.example
++++ b/config.toml.example
+@@ -348,12 +348,6 @@
+ # only use static libraries. If unset, the target's default linkage is used.
+ #crt-static = false
+
+-# The root location of the MUSL installation directory. The library directory
+-# will also need to contain libunwind.a for an unwinding implementation. Note
+-# that this option only makes sense for MUSL targets that produce statically
+-# linked binaries
+-#musl-root = "..."
+-
+ # Used in testing for configuring where the QEMU images are located, you
+ # probably don't want to use this.
+ #qemu-rootfs = "..."
+diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
+index 16a23eb364..84b68dd9f4 100644
+--- a/src/bootstrap/bin/rustc.rs
++++ b/src/bootstrap/bin/rustc.rs
+@@ -30,7 +30,6 @@
+ extern crate bootstrap;
+
+ use std::env;
+-use std::ffi::OsString;
+ use std::str::FromStr;
+ use std::path::PathBuf;
+ use std::process::{Command, ExitStatus};
+@@ -111,15 +110,6 @@ fn main() {
+ cmd.arg("-Cprefer-dynamic");
+ }
+
+- // Help the libc crate compile by assisting it in finding the MUSL
+- // native libraries.
+- if let Some(s) = env::var_os("MUSL_ROOT") {
+- let mut root = OsString::from("native=");
+- root.push(&s);
+- root.push("/lib");
+- cmd.arg("-L").arg(&root);
+- }
+-
+ // Override linker if necessary.
+ if let Ok(target_linker) = env::var("RUSTC_TARGET_LINKER") {
+ cmd.arg(format!("-Clinker={}", target_linker));
+diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
+index e531fdaf29..3f49a2cfec 100644
+--- a/src/bootstrap/cc_detect.rs
++++ b/src/bootstrap/cc_detect.rs
+@@ -84,7 +84,7 @@ pub fn find(build: &mut Build) {
+ if let Some(cc) = config.and_then(|c| c.cc.as_ref()) {
+ cfg.compiler(cc);
+ } else {
+- set_compiler(&mut cfg, Language::C, target, config, build);
++ set_compiler(&mut cfg, Language::C, target, config);
+ }
+
+ let compiler = cfg.get_compiler();
+@@ -112,7 +112,7 @@ pub fn find(build: &mut Build) {
+ if let Some(cxx) = config.and_then(|c| c.cxx.as_ref()) {
+ cfg.compiler(cxx);
+ } else {
+- set_compiler(&mut cfg, Language::CPlusPlus, host, config, build);
++ set_compiler(&mut cfg, Language::CPlusPlus, host, config);
+ }
+ let compiler = cfg.get_compiler();
+ build.verbose(&format!("CXX_{} = {:?}", host, compiler.path()));
+@@ -123,8 +123,7 @@ pub fn find(build: &mut Build) {
+ fn set_compiler(cfg: &mut cc::Build,
+ compiler: Language,
+ target: Interned<String>,
+- config: Option<&Target>,
+- build: &Build) {
++ config: Option<&Target>) {
+ match &*target {
+ // When compiling for android we may have the NDK configured in the
+ // config.toml in which case we look there. Otherwise the default
+@@ -161,26 +160,6 @@ fn set_compiler(cfg: &mut cc::Build,
+ }
+ }
+
+- "mips-unknown-linux-musl" => {
+- if cfg.get_compiler().path().to_str() == Some("gcc") {
+- cfg.compiler("mips-linux-musl-gcc");
+- }
+- }
+- "mipsel-unknown-linux-musl" => {
+- if cfg.get_compiler().path().to_str() == Some("gcc") {
+- cfg.compiler("mipsel-linux-musl-gcc");
+- }
+- }
+-
+- t if t.contains("musl") => {
+- if let Some(root) = build.musl_root(target) {
+- let guess = root.join("bin/musl-gcc");
+- if guess.exists() {
+- cfg.compiler(guess);
+- }
+- }
+- }
+-
+ _ => {}
+ }
+ }
+diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
+index db013691bb..9e9badab9b 100644
+--- a/src/bootstrap/compile.rs
++++ b/src/bootstrap/compile.rs
+@@ -78,13 +78,6 @@ impl Step for Std {
+ });
+ println!("Uplifting stage1 std ({} -> {})", from.host, target);
+
+- // Even if we're not building std this stage, the new sysroot must
+- // still contain the musl startup objects.
+- if target.contains("musl") && !target.contains("mips") {
+- let libdir = builder.sysroot_libdir(compiler, target);
+- copy_musl_third_party_objects(build, target, &libdir);
+- }
+-
+ builder.ensure(StdLink {
+ compiler: from,
+ target_compiler: compiler,
+@@ -97,11 +90,6 @@ impl Step for Std {
+ println!("Building stage{} std artifacts ({} -> {})", compiler.stage,
+ &compiler.host, target);
+
+- if target.contains("musl") && !target.contains("mips") {
+- let libdir = builder.sysroot_libdir(compiler, target);
+- copy_musl_third_party_objects(build, target, &libdir);
+- }
+-
+ let out_dir = build.stage_out(compiler, Mode::Libstd);
+ build.clear_if_dirty(&out_dir, &builder.rustc(compiler));
+ let mut cargo = builder.cargo(compiler, Mode::Libstd, target, "build");
+@@ -118,20 +106,6 @@ impl Step for Std {
+ }
+ }
+
+-/// Copies the crt(1,i,n).o startup objects
+-///
+-/// Since musl supports fully static linking, we can cross link for it even
+-/// with a glibc-targeting toolchain, given we have the appropriate startup
+-/// files. As those shipped with glibc won't work, copy the ones provided by
+-/// musl so we have them on linux-gnu hosts.
+-fn copy_musl_third_party_objects(build: &Build,
+- target: Interned<String>,
+- into: &Path) {
+- for &obj in &["crt1.o", "crti.o", "crtn.o"] {
+- copy(&build.musl_root(target).unwrap().join("lib").join(obj), &into.join(obj));
+- }
+-}
+-
+ /// Configure cargo to compile the standard library, adding appropriate env vars
+ /// and such.
+ pub fn std_cargo(build: &Build,
+@@ -173,11 +147,6 @@ pub fn std_cargo(build: &Build,
+ cargo.env("JEMALLOC_OVERRIDE", jemalloc);
+ }
+ }
+- if target.contains("musl") {
+- if let Some(p) = build.musl_root(target) {
+- cargo.env("MUSL_ROOT", p);
+- }
+- }
+ }
+
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
+index 35e62f17f2..cf85233c2c 100644
+--- a/src/bootstrap/config.rs
++++ b/src/bootstrap/config.rs
+@@ -112,8 +112,6 @@ pub struct Config {
+ pub channel: String,
+ pub quiet_tests: bool,
+ pub test_miri: bool,
+- // Fallback musl-root for all targets
+- pub musl_root: Option<PathBuf>,
+ pub prefix: Option<PathBuf>,
+ pub sysconfdir: Option<PathBuf>,
+ pub docdir: Option<PathBuf>,
+@@ -147,7 +145,6 @@ pub struct Target {
+ pub linker: Option<PathBuf>,
+ pub ndk: Option<PathBuf>,
+ pub crt_static: Option<bool>,
+- pub musl_root: Option<PathBuf>,
+ pub qemu_rootfs: Option<PathBuf>,
+ }
+
+@@ -269,7 +266,6 @@ struct Rust {
+ backtrace: Option<bool>,
+ default_linker: Option<String>,
+ channel: Option<String>,
+- musl_root: Option<String>,
+ rpath: Option<bool>,
+ optimize_tests: Option<bool>,
+ debuginfo_tests: Option<bool>,
+@@ -293,7 +289,6 @@ struct TomlTarget {
+ linker: Option<String>,
+ android_ndk: Option<String>,
+ crt_static: Option<bool>,
+- musl_root: Option<String>,
+ qemu_rootfs: Option<String>,
+ }
+
+@@ -471,7 +466,6 @@ impl Config {
+ set(&mut config.quiet_tests, rust.quiet_tests);
+ set(&mut config.test_miri, rust.test_miri);
+ config.rustc_default_linker = rust.default_linker.clone();
+- config.musl_root = rust.musl_root.clone().map(PathBuf::from);
+
+ match rust.codegen_units {
+ Some(0) => config.rust_codegen_units = Some(num_cpus::get() as u32),
+@@ -498,7 +492,6 @@ impl Config {
+ target.ar = cfg.ar.clone().map(PathBuf::from);
+ target.linker = cfg.linker.clone().map(PathBuf::from);
+ target.crt_static = cfg.crt_static.clone();
+- target.musl_root = cfg.musl_root.clone().map(PathBuf::from);
+ target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from);
+
+ config.target_config.insert(INTERNER.intern_string(triple.clone()), target);
+diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
+index 579422c979..ff06a24d9c 100755
+--- a/src/bootstrap/configure.py
++++ b/src/bootstrap/configure.py
+@@ -103,20 +103,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
+ "aarch64-linux-android NDK standalone path")
+ v("x86_64-linux-android-ndk", "target.x86_64-linux-android.android-ndk",
+ "x86_64-linux-android NDK standalone path")
+-v("musl-root", "target.x86_64-unknown-linux-musl.musl-root",
+- "MUSL root installation directory (deprecated)")
+-v("musl-root-x86_64", "target.x86_64-unknown-linux-musl.musl-root",
+- "x86_64-unknown-linux-musl install directory")
+-v("musl-root-i686", "target.i686-unknown-linux-musl.musl-root",
+- "i686-unknown-linux-musl install directory")
+-v("musl-root-arm", "target.arm-unknown-linux-musleabi.musl-root",
+- "arm-unknown-linux-musleabi install directory")
+-v("musl-root-armhf", "target.arm-unknown-linux-musleabihf.musl-root",
+- "arm-unknown-linux-musleabihf install directory")
+-v("musl-root-armv7", "target.armv7-unknown-linux-musleabihf.musl-root",
+- "armv7-unknown-linux-musleabihf install directory")
+-v("musl-root-aarch64", "target.aarch64-unknown-linux-musl.musl-root",
+- "aarch64-unknown-linux-musl install directory")
+ v("qemu-armhf-rootfs", "target.arm-unknown-linux-gnueabihf.qemu-rootfs",
+ "rootfs in qemu testing, you probably don't want to use this")
+ v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs",
+diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
+index 6832992259..edb7d3ce43 100644
+--- a/src/bootstrap/lib.rs
++++ b/src/bootstrap/lib.rs
+@@ -694,14 +694,6 @@ impl Build {
+ }
+ }
+
+- /// Returns the "musl root" for this `target`, if defined
+- fn musl_root(&self, target: Interned<String>) -> Option<&Path> {
+- self.config.target_config.get(&target)
+- .and_then(|t| t.musl_root.as_ref())
+- .or(self.config.musl_root.as_ref())
+- .map(|p| &**p)
+- }
+-
+ /// Returns whether the target will be tested using the `remote-test-client`
+ /// and `remote-test-server` binaries.
+ fn remote_tested(&self, target: Interned<String>) -> bool {
+diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
+index 8b23be69a8..187b30da9d 100644
+--- a/src/bootstrap/sanity.rs
++++ b/src/bootstrap/sanity.rs
+@@ -21,7 +21,6 @@
+ use std::collections::HashMap;
+ use std::env;
+ use std::ffi::{OsString, OsStr};
+-use std::fs;
+ use std::process::Command;
+ use std::path::PathBuf;
+
+@@ -168,34 +167,6 @@ pub fn check(build: &mut Build) {
+ panic!("the iOS target is only supported on macOS");
+ }
+
+- // Make sure musl-root is valid
+- if target.contains("musl") && !target.contains("mips") {
+- // If this is a native target (host is also musl) and no musl-root is given,
+- // fall back to the system toolchain in /usr before giving up
+- if build.musl_root(*target).is_none() && build.config.build == *target {
+- let target = build.config.target_config.entry(target.clone())
+- .or_insert(Default::default());
+- target.musl_root = Some("/usr".into());
+- }
+- match build.musl_root(*target) {
+- Some(root) => {
+- if fs::metadata(root.join("lib/libc.a")).is_err() {
+- panic!("couldn't find libc.a in musl dir: {}",
+- root.join("lib").display());
+- }
+- if fs::metadata(root.join("lib/libunwind.a")).is_err() {
+- panic!("couldn't find libunwind.a in musl dir: {}",
+- root.join("lib").display());
+- }
+- }
+- None => {
+- panic!("when targeting MUSL either the rust.musl-root \
+- option or the target.$TARGET.musl-root option must \
+- be specified in config.toml")
+- }
+- }
+- }
+-
+ if target.contains("msvc") {
+ // There are three builds of cmake on windows: MSVC, MinGW, and
+ // Cygwin. The Cygwin build does not have generators for Visual
+diff --git a/src/ci/docker/cross/Dockerfile b/src/ci/docker/cross/Dockerfile
+index 05745709a0..3f5422b0ae 100644
+--- a/src/ci/docker/cross/Dockerfile
++++ b/src/ci/docker/cross/Dockerfile
+@@ -61,11 +61,7 @@ ENV STAGING_DIR=/tmp
+
+ ENV RUST_CONFIGURE_ARGS \
+ --enable-extended \
+- --target=$TARGETS \
+- --musl-root-arm=/usr/local/arm-linux-musleabi \
+- --musl-root-armhf=/usr/local/arm-linux-musleabihf \
+- --musl-root-armv7=/usr/local/armv7-linux-musleabihf \
+- --musl-root-aarch64=/usr/local/aarch64-linux-musl
++ --target=$TARGETS
+ ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
+
+ # sccache
+diff --git a/src/ci/docker/dist-i586-gnu-i686-musl/Dockerfile b/src/ci/docker/dist-i586-gnu-i686-musl/Dockerfile
+index 2fb1219681..e2e3599be0 100644
+--- a/src/ci/docker/dist-i586-gnu-i686-musl/Dockerfile
++++ b/src/ci/docker/dist-i586-gnu-i686-musl/Dockerfile
+@@ -25,7 +25,6 @@ RUN sh /scripts/sccache.sh
+
+ ENV RUST_CONFIGURE_ARGS \
+ --target=i686-unknown-linux-musl,i586-unknown-linux-gnu \
+- --musl-root-i686=/musl-i686 \
+ --enable-extended
+
+ # Newer binutils broke things on some vms/distros (i.e., linking against
+diff --git a/src/ci/docker/dist-x86_64-musl/Dockerfile b/src/ci/docker/dist-x86_64-musl/Dockerfile
+index 91ed6bfe1f..9859cfeee9 100644
+--- a/src/ci/docker/dist-x86_64-musl/Dockerfile
++++ b/src/ci/docker/dist-x86_64-musl/Dockerfile
+@@ -25,7 +25,6 @@ RUN sh /scripts/sccache.sh
+
+ ENV RUST_CONFIGURE_ARGS \
+ --target=x86_64-unknown-linux-musl \
+- --musl-root-x86_64=/musl-x86_64 \
+ --enable-extended
+
+ # Newer binutils broke things on some vms/distros (i.e., linking against
+diff --git a/src/librustc_back/target/linux_musl_base.rs b/src/librustc_back/target/linux_musl_base.rs
+index 6e5e139715..d99cb55cc5 100644
+--- a/src/librustc_back/target/linux_musl_base.rs
++++ b/src/librustc_back/target/linux_musl_base.rs
+@@ -14,10 +14,6 @@ use target::TargetOptions;
+ pub fn opts() -> TargetOptions {
+ let mut base = super::linux_base::opts();
+
+- // Make sure that the linker/gcc really don't pull in anything, including
+- // default objects, libs, etc.
+- base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-nostdlib".to_string());
+-
+ // At least when this was tested, the linker would not add the
+ // `GNU_EH_FRAME` program header to executables generated, which is required
+ // when unwinding to locate the unwinding information. I'm not sure why this
+@@ -49,17 +45,6 @@ pub fn opts() -> TargetOptions {
+ base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,-(".to_string());
+ base.post_link_args.insert(LinkerFlavor::Gcc, vec!["-Wl,-)".to_string()]);
+
+- // When generating a statically linked executable there's generally some
+- // small setup needed which is listed in these files. These are provided by
+- // a musl toolchain and are linked by default by the `musl-gcc` script. Note
+- // that `gcc` also does this by default, it just uses some different files.
+- //
+- // Each target directory for musl has these object files included in it so
+- // they'll be included from there.
+- base.pre_link_objects_exe.push("crt1.o".to_string());
+- base.pre_link_objects_exe.push("crti.o".to_string());
+- base.post_link_objects.push("crtn.o".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.13.6
+
diff --git a/dev-lang/rust/files/0003-Switch-musl-targets-to-link-dynamically-by-default.patch b/dev-lang/rust/files/0003-Switch-musl-targets-to-link-dynamically-by-default.patch
new file mode 100644
index 0000000..b3a0df9
--- /dev/null
+++ b/dev-lang/rust/files/0003-Switch-musl-targets-to-link-dynamically-by-default.patch
@@ -0,0 +1,25 @@
+From 77f657181d30e7195188b2d0c6cd55c11aa079ac Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Thu, 30 Nov 2017 08:15:51 -0600
+Subject: [PATCH 3/8] Switch musl targets to link dynamically by default
+
+---
+ src/librustc_back/target/linux_musl_base.rs | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/librustc_back/target/linux_musl_base.rs b/src/librustc_back/target/linux_musl_base.rs
+index d99cb55cc5..bb786bf0f3 100644
+--- a/src/librustc_back/target/linux_musl_base.rs
++++ b/src/librustc_back/target/linux_musl_base.rs
+@@ -45,8 +45,6 @@ pub fn opts() -> TargetOptions {
+ base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,-(".to_string());
+ base.post_link_args.insert(LinkerFlavor::Gcc, vec!["-Wl,-)".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.
+ base.crt_static_respected = true;
+
+--
+2.13.6
+
diff --git a/dev-lang/rust/files/0004-Prefer-libgcc_eh-over-libunwind-for-musl.patch b/dev-lang/rust/files/0004-Prefer-libgcc_eh-over-libunwind-for-musl.patch
new file mode 100644
index 0000000..a15680f
--- /dev/null
+++ b/dev-lang/rust/files/0004-Prefer-libgcc_eh-over-libunwind-for-musl.patch
@@ -0,0 +1,24 @@
+From 807918c554f688305ab4a2f7ee439652832e12df Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sat, 9 Sep 2017 00:14:16 -0500
+Subject: [PATCH 4/8] Prefer libgcc_eh over libunwind for musl
+
+---
+ src/libunwind/lib.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs
+index 5bb1eb96dc..5be689f50f 100644
+--- a/src/libunwind/lib.rs
++++ b/src/libunwind/lib.rs
+@@ -36,6 +36,6 @@ cfg_if! {
+ }
+
+ #[cfg(all(target_env = "musl", not(target_arch = "mips")))]
+-#[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
++#[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
+ #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
+ extern {}
+--
+2.13.6
+
diff --git a/dev-lang/rust/files/0005-Fix-LLVM-build.patch b/dev-lang/rust/files/0005-Fix-LLVM-build.patch
new file mode 100644
index 0000000..97e7f3b
--- /dev/null
+++ b/dev-lang/rust/files/0005-Fix-LLVM-build.patch
@@ -0,0 +1,26 @@
+From 1fa880e13931269c187319f0d535ef194c098894 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Fri, 8 Sep 2017 00:04:29 -0500
+Subject: [PATCH 5/8] Fix LLVM build
+
+---
+ src/bootstrap/lib.rs | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
+index edb7d3ce43..7ee3cd3e22 100644
+--- a/src/bootstrap/lib.rs
++++ b/src/bootstrap/lib.rs
+@@ -636,7 +636,8 @@ impl Build {
+ // cc-rs because the build scripts will determine that for themselves.
+ let mut base = self.cc[&target].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<_>>();
+
+ // If we're compiling on macOS then we add a few unconditional flags
+--
+2.13.6
+
diff --git a/dev-lang/rust/files/0006-Fix-rustdoc-for-cross-targets.patch b/dev-lang/rust/files/0006-Fix-rustdoc-for-cross-targets.patch
new file mode 100644
index 0000000..390f202
--- /dev/null
+++ b/dev-lang/rust/files/0006-Fix-rustdoc-for-cross-targets.patch
@@ -0,0 +1,36 @@
+From da75097b4c83ee27358136c67cdf1c9c3ba795f7 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sat, 2 Dec 2017 17:25:44 -0600
+Subject: [PATCH 6/8] Fix rustdoc for cross targets
+
+musl can't handle wrong-architecture libraries in LD_LIBRARY_PATH.
+---
+ src/bootstrap/bin/rustdoc.rs | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
+index 4e975adc97..a9df1b71ce 100644
+--- a/src/bootstrap/bin/rustdoc.rs
++++ b/src/bootstrap/bin/rustdoc.rs
+@@ -27,9 +27,6 @@ fn main() {
+ let stage = env::var("RUSTC_STAGE").expect("RUSTC_STAGE was not set");
+ let sysroot = env::var_os("RUSTC_SYSROOT").expect("RUSTC_SYSROOT was not set");
+
+- let mut dylib_path = bootstrap::util::dylib_path();
+- dylib_path.insert(0, PathBuf::from(libdir));
+-
+ let mut cmd = Command::new(rustdoc);
+ cmd.args(&args)
+ .arg("--cfg")
+@@ -39,7 +36,7 @@ fn main() {
+ .arg("--sysroot")
+ .arg(sysroot)
+ .env(bootstrap::util::dylib_path_var(),
+- env::join_paths(&dylib_path).unwrap());
++ PathBuf::from(libdir));
+
+ // Force all crates compiled by this compiler to (a) be unstable and (b)
+ // allow the `rustc_private` feature to link to other unstable crates
+--
+2.13.6
+
diff --git a/dev-lang/rust/files/0007-Add-openssl-configuration-for-musl-targets.patch b/dev-lang/rust/files/0007-Add-openssl-configuration-for-musl-targets.patch
new file mode 100644
index 0000000..82848c6
--- /dev/null
+++ b/dev-lang/rust/files/0007-Add-openssl-configuration-for-musl-targets.patch
@@ -0,0 +1,41 @@
+From c919f6ce3c9ac32dbad42946a62f97bd20fe607e Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Mon, 11 Sep 2017 11:21:56 -0500
+Subject: [PATCH 7/8] Add openssl configuration for musl targets
+
+---
+ src/bootstrap/native.rs | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
+index fce6755aea..22e03ff64a 100644
+--- a/src/bootstrap/native.rs
++++ b/src/bootstrap/native.rs
+@@ -430,8 +430,11 @@ impl Step for Openssl {
+ "arm-linux-androideabi" => "android",
+ "arm-unknown-linux-gnueabi" => "linux-armv4",
+ "arm-unknown-linux-gnueabihf" => "linux-armv4",
+- "armv7-linux-androideabi" => "android-armv7",
++ "arm-unknown-linux-musleabi" => "linux-armv4",
++ "arm-unknown-linux-musleabihf" => "linux-armv4",
++ "armv7-linux-androideabi" => "android-armv4",
+ "armv7-unknown-linux-gnueabihf" => "linux-armv4",
++ "armv7-unknown-linux-musleabihf" => "linux-armv4",
+ "i686-apple-darwin" => "darwin-i386-cc",
+ "i686-linux-android" => "android-x86",
+ "i686-unknown-freebsd" => "BSD-x86-elf",
+@@ -439,9 +442,11 @@ impl Step for Openssl {
+ "i686-unknown-linux-musl" => "linux-elf",
+ "i686-unknown-netbsd" => "BSD-x86-elf",
+ "mips-unknown-linux-gnu" => "linux-mips32",
++ "mips-unknown-linux-musl" => "linux-mips32",
+ "mips64-unknown-linux-gnuabi64" => "linux64-mips64",
+ "mips64el-unknown-linux-gnuabi64" => "linux64-mips64",
+ "mipsel-unknown-linux-gnu" => "linux-mips32",
++ "mipsel-unknown-linux-musl" => "linux-mips32",
+ "powerpc-unknown-linux-gnu" => "linux-ppc",
+ "powerpc64-unknown-linux-gnu" => "linux-ppc64",
+ "powerpc64le-unknown-linux-gnu" => "linux-ppc64le",
+--
+2.13.6
+
diff --git a/dev-lang/rust/files/0008-Don-t-pass-CFLAGS-to-the-C-compiler.patch b/dev-lang/rust/files/0008-Don-t-pass-CFLAGS-to-the-C-compiler.patch
new file mode 100644
index 0000000..1d769b5
--- /dev/null
+++ b/dev-lang/rust/files/0008-Don-t-pass-CFLAGS-to-the-C-compiler.patch
@@ -0,0 +1,36 @@
+From c386995b5515ca3116e249876ec7916e64f18a90 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Wed, 10 Jan 2018 13:36:41 -0600
+Subject: [PATCH 8/8] Don't pass CFLAGS to the C++ compiler
+
+---
+ src/bootstrap/builder.rs | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
+index c76900882b..008a0a0410 100644
+--- a/src/bootstrap/builder.rs
++++ b/src/bootstrap/builder.rs
+@@ -583,7 +583,7 @@ impl<'a> Builder<'a> {
+
+ let cflags = self.cflags(target).join(" ");
+ cargo.env(format!("CFLAGS_{}", target), cflags.clone())
+- .env("CFLAGS", cflags.clone());
++ .env("CFLAGS", cflags);
+
+ if let Some(ar) = self.ar(target) {
+ let ranlib = format!("{} s", ar.display());
+@@ -595,9 +595,7 @@ impl<'a> Builder<'a> {
+
+ if let Ok(cxx) = self.cxx(target) {
+ cargo.env(format!("CXX_{}", target), cxx)
+- .env("CXX", cxx)
+- .env(format!("CXXFLAGS_{}", target), cflags.clone())
+- .env("CXXFLAGS", cflags);
++ .env("CXX", cxx);
+ }
+ }
+
+--
+2.13.6
+
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
index f170659..facbbab 100644
--- a/dev-lang/rust/metadata.xml
+++ b/dev-lang/rust/metadata.xml
@@ -6,8 +6,9 @@
<name>Rust Project</name>
</maintainer>
<use>
- <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations</flag>
<flag name="system-llvm">Use system <pkg>sys-devel/llvm</pkg> in
place of the bundled one</flag>
+ <flag name="jemalloc">Use <pkg>sys-libs/jemalloc</pkg> as the
+ standard memory allocator</flag>
</use>
</pkgmetadata>
diff --git a/dev-lang/rust/rust-1.23.0.ebuild b/dev-lang/rust/rust-1.23.0.ebuild
new file mode 100644
index 0000000..cf9be2c
--- /dev/null
+++ b/dev-lang/rust/rust-1.23.0.ebuild
@@ -0,0 +1,247 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+LLVM_MAX_SLOT=4
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-any-r1 versionator toolchain-funcs llvm
+
+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"
+ KEYWORDS=""
+else
+ ABI_VER="$(get_version_component_range 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+case "${CHOST}" in
+ armv7a-hardfloat-*)
+ RUSTARCH=armv7 ;;
+ arm*)
+ RUSTARCH=arm ;;
+ *)
+ RUSTARCH=${CHOST%%-*} ;;
+esac
+case "${CHOST}" in
+ armv7a-hardfloat-*)
+ RUSTLIBC=${ELIBC/glibc/gnu}eabihf ;;
+ arm*)
+ RUSTLIBC=${ELIBC/glibc/gnu}eabi ;;
+ *)
+ RUSTLIBC=${ELIBC/glibc/gnu} ;;
+esac
+RUSTHOST=${RUSTARCH}-unknown-${KERNEL}-${RUSTLIBC}
+STAGE0_VERSION="1.$(($(get_version_component_range 2) - 0)).0"
+CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="http://www.rust-lang.org/"
+
+SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
+ amd64? (
+ elibc_glibc? ( https://static.rust-lang.org/dist/rust-${STAGE0_VERSION}-x86_64-unknown-linux-gnu.tar.xz )
+ elibc_musl? ( https://portage.smaeul.xyz/distfiles/rust-${STAGE0_VERSION}-x86_64-unknown-linux-musl.tar.xz )
+ )
+ arm? (
+ elibc_glibc? (
+ https://static.rust-lang.org/dist/rust-${STAGE0_VERSION}-arm-unknown-linux-gnueabi.tar.xz
+ https://static.rust-lang.org/dist/rust-${STAGE0_VERSION}-armv7-unknown-linux-gnueabihf.tar.xz
+ )
+ elibc_musl? (
+ https://portage.smaeul.xyz/distfiles/rust-${STAGE0_VERSION}-arm-unknown-linux-musleabi.tar.xz
+ https://portage.smaeul.xyz/distfiles/rust-${STAGE0_VERSION}-armv7-unknown-linux-musleabihf.tar.xz
+ )
+ )
+ x86? (
+ elibc_glibc? ( https://static.rust-lang.org/dist/rust-${STAGE0_VERSION}-i686-unknown-linux-gnu.tar.xz )
+ elibc_musl? ( https://portage.smaeul.xyz/distfiles/rust-${STAGE0_VERSION}-i686-unknown-linux-musl.tar.xz )
+ )
+"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="debug doc jemalloc system-llvm"
+
+RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ jemalloc? ( dev-libs/jemalloc )
+ system-llvm? ( sys-devel/llvm:4 )
+"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ !system-llvm? (
+ >=dev-util/cmake-3.4.3
+ dev-util/ninja
+ )
+"
+PDEPEND=">=dev-util/cargo-${CARGO_DEPEND_VERSION}"
+
+PATCHES=(
+ "${FILESDIR}/0001-Require-static-native-libraries-when-linking-static-.patch"
+ "${FILESDIR}/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch"
+ "${FILESDIR}/0003-Switch-musl-targets-to-link-dynamically-by-default.patch"
+ "${FILESDIR}/0004-Prefer-libgcc_eh-over-libunwind-for-musl.patch"
+ "${FILESDIR}/0005-Fix-LLVM-build.patch"
+ "${FILESDIR}/0006-Fix-rustdoc-for-cross-targets.patch"
+ "${FILESDIR}/0007-Add-openssl-configuration-for-musl-targets.patch"
+ "${FILESDIR}/0008-Don-t-pass-CFLAGS-to-the-C-compiler.patch"
+ "${FILESDIR}/0009-liblibc.patch"
+ "${FILESDIR}/llvm-musl-fixes.patch"
+)
+
+S="${WORKDIR}/${MY_P}-src"
+
+toml_usex() {
+ usex "$1" true false
+}
+
+pkg_setup() {
+ export RUST_BACKTRACE=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
+
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ "${WORKDIR}/rust-${STAGE0_VERSION}-${RUSTHOST}/install.sh" \
+ --prefix="${WORKDIR}/stage0" \
+ --components=rust-std-${RUSTHOST},rustc,cargo \
+ --disable-ldconfig \
+ || die
+}
+
+src_configure() {
+ cat <<- EOF > "${S}"/config.toml
+ [llvm]
+ ninja = true
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ [build]
+ build = "${RUSTHOST}"
+ host = ["${RUSTHOST}"]
+ target = ["${RUSTHOST}"]
+ cargo = "${WORKDIR}/stage0/bin/cargo"
+ rustc = "${WORKDIR}/stage0/bin/rustc"
+ docs = $(toml_usex doc)
+ compiler-docs = $(toml_usex doc)
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ verbose = 2
+ [install]
+ prefix = "${EPREFIX}/usr"
+ libdir = "$(get_libdir)"
+ docdir = "share/doc/${P}"
+ mandir = "share/${P}/man"
+ [rust]
+ optimize = $(toml_usex !debug)
+ debuginfo = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ use-jemalloc = $(toml_usex jemalloc)
+ default-linker = "$(tc-getCC)"
+ channel = "${SLOT%%/*}"
+ rpath = false
+ optimize-tests = $(toml_usex !debug)
+ [dist]
+ src-tarball = false
+ [target.${RUSTHOST}]
+ cc = "$(tc-getBUILD_CC)"
+ cxx = "$(tc-getBUILD_CXX)"
+ linker = "$(tc-getCC)"
+ ar = "$(tc-getAR)"
+ EOF
+ use system-llvm && cat <<- EOF >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "$LLVM_MAX_SLOT")/bin/llvm-config"
+ EOF
+}
+
+src_compile() {
+ ./x.py build || die
+}
+
+src_install() {
+ env DESTDIR="${D}" ./x.py install || die
+
+ rm "${D}/usr/$(get_libdir)/rustlib/components" || die
+ rm "${D}/usr/$(get_libdir)/rustlib/install.log" || die
+ rm "${D}/usr/$(get_libdir)/rustlib/manifest-rust-std-${RUSTHOST}" || die
+ rm "${D}/usr/$(get_libdir)/rustlib/manifest-rustc" || die
+ rm "${D}/usr/$(get_libdir)/rustlib/rust-installer-version" || die
+ rm "${D}/usr/$(get_libdir)/rustlib/uninstall.sh" || die
+
+ mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
+ mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
+ mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
+ mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
+
+ if use doc; then
+ rm "${D}/usr/$(get_libdir)/rustlib/manifest-rust-docs" || die
+ dodir "/usr/share/doc/${P}"
+ mv "${D}/usr/share/doc/rust"/* "${D}/usr/share/doc/${P}" || die
+ rmdir "${D}/usr/share/doc/rust" || die
+ fi
+
+ rm "${D}/usr/share/doc/${P}/LICENSE-APACHE" || die
+ rm "${D}/usr/share/doc/${P}/LICENSE-MIT" || die
+
+ docompress "/usr/share/${P}/man"
+
+ cat <<-EOF > "${T}"/50${P}
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-lldb
+ EOF
+ dodir /etc/env.d/rust
+ 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 || has_version app-editors/emacs-vcs; 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 has_version 'app-shells/zsh'; then
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust unset --if-invalid
+}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/musl:master commit in: dev-lang/rust/, dev-lang/rust/files/
@ 2018-06-19 20:02 Aric Belsito
0 siblings, 0 replies; 8+ messages in thread
From: Aric Belsito @ 2018-06-19 20:02 UTC (permalink / raw
To: gentoo-commits
commit: e52ec2c80a6be879a6acab0f71399d684e322258
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Tue Jun 19 20:01:39 2018 +0000
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Tue Jun 19 20:01:39 2018 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=e52ec2c8
dev-lang/rust: add patch for libressl 2.7.0
this is only an issue with USE="extended"
.../rust/files/rust-1.26.0-libressl-2.7.0.patch | 481 +++++++++++++++++++++
dev-lang/rust/rust-1.26.2.ebuild | 6 +-
2 files changed, 483 insertions(+), 4 deletions(-)
diff --git a/dev-lang/rust/files/rust-1.26.0-libressl-2.7.0.patch b/dev-lang/rust/files/rust-1.26.0-libressl-2.7.0.patch
new file mode 100644
index 0000000..190ad0c
--- /dev/null
+++ b/dev-lang/rust/files/rust-1.26.0-libressl-2.7.0.patch
@@ -0,0 +1,481 @@
+--- a/src/vendor/libgit2-sys/libgit2/src/streams/openssl.c 2018-05-07 18:50:07 UTC
++++ b/src/vendor/libgit2-sys/libgit2/src/streams/openssl.c
+@@ -104,7 +104,8 @@ int git_openssl_stream_global_init(void)
+ ssl_opts |= SSL_OP_NO_COMPRESSION;
+ #endif
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ SSL_load_error_strings();
+ OpenSSL_add_ssl_algorithms();
+ #else
+--- a/src/vendor/libgit2-sys/libgit2/src/streams/openssl.h 2018-05-07 18:50:07 UTC
++++ b/src/vendor/libgit2-sys/libgit2/src/streams/openssl.h
+@@ -31,7 +31,8 @@ extern int git_openssl__set_cert_location(const char *
+
+
+
+-# if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
++# if OPENSSL_VERSION_NUMBER < 0x10100000L || \
++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+
+ GIT_INLINE(BIO_METHOD*) BIO_meth_new(int type, const char *name)
+ {
+--- a/src/vendor/openssl-sys/build.rs 2018-05-07 18:50:12 UTC
++++ b/src/vendor/openssl-sys/build.rs
+@@ -323,8 +323,10 @@ fn validate_headers(include_dirs: &[PathBuf]) -> Versi
+ #include <openssl/opensslv.h>
+ #include <openssl/opensslconf.h>
+
+-#if LIBRESSL_VERSION_NUMBER >= 0x20700000
++#if LIBRESSL_VERSION_NUMBER >= 0x20800000
+ RUST_LIBRESSL_NEW
++#elif LIBRESSL_VERSION_NUMBER >= 0x20700000
++RUST_LIBRESSL_27X
+ #elif LIBRESSL_VERSION_NUMBER >= 0x20603000
+ RUST_LIBRESSL_26X
+ #elif LIBRESSL_VERSION_NUMBER >= 0x20602000
+@@ -473,6 +475,13 @@ See rust-openssl README for more information:
+ println!("cargo:libressl_version=26x");
+ println!("cargo:version=101");
+ Version::Libressl
++ } else if expanded.contains("RUST_LIBRESSL_27X") {
++ println!("cargo:rustc-cfg=libressl");
++ println!("cargo:rustc-cfg=libressl27");
++ println!("cargo:libressl=true");
++ println!("cargo:libressl_version=27x");
++ println!("cargo:version=101");
++ Version::Libressl
+ } else if expanded.contains("RUST_OPENSSL_111") {
+ println!("cargo:rustc-cfg=ossl111");
+ println!("cargo:rustc-cfg=ossl110");
+@@ -501,7 +510,7 @@ See rust-openssl README for more information:
+ "
+
+ This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
+-and 2.6, but a different version of OpenSSL was found. The build is now aborting
++through 2.7, but a different version of OpenSSL was found. The build is now aborting
+ due to this version mismatch.
+
+ "
+--- a/src/vendor/openssl-sys/src/lib.rs 2018-05-07 18:50:12 UTC
++++ b/src/vendor/openssl-sys/src/lib.rs
+@@ -221,6 +221,7 @@ pub const PEM_R_NO_START_LINE: c_int = 108;
+ pub const EVP_MAX_MD_SIZE: c_uint = 64;
+ pub const EVP_PKEY_RSA: c_int = NID_rsaEncryption;
+ pub const EVP_PKEY_HMAC: c_int = NID_hmac;
++pub const EVP_PKEY_CMAC: c_int = NID_cmac;
+ pub const EVP_PKEY_DSA: c_int = NID_dsa;
+ pub const EVP_PKEY_DH: c_int = NID_dhKeyAgreement;
+ pub const EVP_PKEY_EC: c_int = NID_X9_62_id_ecPublicKey;
+@@ -228,9 +229,29 @@ pub const EVP_PKEY_EC: c_int = NID_X9_62_id_ecPublicKe
+ pub const EVP_PKEY_ALG_CTRL: c_int = 0x1000;
+
+ pub const EVP_PKEY_CTRL_RSA_PADDING: c_int = EVP_PKEY_ALG_CTRL + 1;
++pub const EVP_PKEY_CTRL_RSA_PSS_SALTLEN: c_int = EVP_PKEY_ALG_CTRL + 2;
+
++pub const EVP_PKEY_CTRL_RSA_MGF1_MD: c_int = EVP_PKEY_ALG_CTRL + 5;
+ pub const EVP_PKEY_CTRL_GET_RSA_PADDING: c_int = EVP_PKEY_ALG_CTRL + 6;
+
++pub const EVP_PKEY_CTRL_SET_MAC_KEY: c_int = 6;
++pub const EVP_PKEY_CTRL_CIPHER: c_int = 12;
++
++pub const EVP_PKEY_OP_KEYGEN: c_int = 1 << 2;
++pub const EVP_PKEY_OP_SIGN: c_int = 1 << 3;
++pub const EVP_PKEY_OP_VERIFY: c_int = 1 << 4;
++pub const EVP_PKEY_OP_VERIFYRECOVER: c_int = 1 << 5;
++pub const EVP_PKEY_OP_SIGNCTX: c_int = 1 << 6;
++pub const EVP_PKEY_OP_VERIFYCTX: c_int = 1 << 7;
++pub const EVP_PKEY_OP_ENCRYPT: c_int = 1 << 8;
++pub const EVP_PKEY_OP_DECRYPT: c_int = 1 << 9;
++
++pub const EVP_PKEY_OP_TYPE_SIG: c_int = EVP_PKEY_OP_SIGN | EVP_PKEY_OP_VERIFY
++ | EVP_PKEY_OP_VERIFYRECOVER | EVP_PKEY_OP_SIGNCTX
++ | EVP_PKEY_OP_VERIFYCTX;
++
++pub const EVP_PKEY_OP_TYPE_CRYPT: c_int = EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT;
++
+ pub const EVP_CTRL_GCM_SET_IVLEN: c_int = 0x9;
+ pub const EVP_CTRL_GCM_GET_TAG: c_int = 0x10;
+ pub const EVP_CTRL_GCM_SET_TAG: c_int = 0x11;
+@@ -1200,9 +1221,16 @@ pub const RSA_SSLV23_PADDING: c_int = 2;
+ pub const RSA_NO_PADDING: c_int = 3;
+ pub const RSA_PKCS1_OAEP_PADDING: c_int = 4;
+ pub const RSA_X931_PADDING: c_int = 5;
++pub const RSA_PKCS1_PSS_PADDING: c_int = 6;
+
+ pub const SHA_LBLOCK: c_int = 16;
+
++pub const SSL3_AD_ILLEGAL_PARAMETER: c_int = 47;
++pub const SSL_AD_ILLEGAL_PARAMETER: c_int = SSL3_AD_ILLEGAL_PARAMETER;
++
++pub const TLS1_AD_DECODE_ERROR: c_int = 50;
++pub const SSL_AD_DECODE_ERROR: c_int = TLS1_AD_DECODE_ERROR;
++
+ pub const TLS1_AD_UNRECOGNIZED_NAME: c_int = 112;
+ pub const SSL_AD_UNRECOGNIZED_NAME: c_int = TLS1_AD_UNRECOGNIZED_NAME;
+
+@@ -1249,14 +1277,14 @@ pub const SSL_VERIFY_NONE: c_int = 0;
+ pub const SSL_VERIFY_PEER: c_int = 1;
+ pub const SSL_VERIFY_FAIL_IF_NO_PEER_CERT: c_int = 2;
+
+-#[cfg(not(any(libressl261, libressl262, libressl26x, ossl101)))]
++#[cfg(not(any(libressl261, libressl262, libressl26x, libressl27, ossl101)))]
+ pub const SSL_OP_TLSEXT_PADDING: c_ulong = 0x00000010;
+-#[cfg(any(libressl261, libressl262, libressl26x))]
++#[cfg(any(libressl261, libressl262, libressl26x, libressl27))]
+ pub const SSL_OP_TLSEXT_PADDING: c_ulong = 0x0;
+ pub const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: c_ulong = 0x00000800;
+-#[cfg(not(any(libressl261, libressl262, libressl26x)))]
++#[cfg(not(any(libressl261, libressl262, libressl26x, libressl27)))]
+ pub const SSL_OP_CRYPTOPRO_TLSEXT_BUG: c_ulong = 0x80000000;
+-#[cfg(any(libressl261, libressl262, libressl26x))]
++#[cfg(any(libressl261, libressl262, libressl26x, libressl27))]
+ pub const SSL_OP_CRYPTOPRO_TLSEXT_BUG: c_ulong = 0x0;
+ pub const SSL_OP_LEGACY_SERVER_CONNECT: c_ulong = 0x00000004;
+ #[cfg(not(libressl))]
+@@ -1477,6 +1505,28 @@ pub unsafe fn EVP_PKEY_CTX_get_rsa_padding(ctx: *mut E
+ )
+ }
+
++pub unsafe fn EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx: *mut EVP_PKEY_CTX, len: c_int) -> c_int {
++ EVP_PKEY_CTX_ctrl(
++ ctx,
++ EVP_PKEY_RSA,
++ EVP_PKEY_OP_SIGN | EVP_PKEY_OP_VERIFY,
++ EVP_PKEY_CTRL_RSA_PSS_SALTLEN,
++ len,
++ ptr::null_mut(),
++ )
++}
++
++pub unsafe fn EVP_PKEY_CTX_set_rsa_mgf1_md(ctx: *mut EVP_PKEY_CTX, md: *mut EVP_MD) -> c_int {
++ EVP_PKEY_CTX_ctrl(
++ ctx,
++ EVP_PKEY_RSA,
++ EVP_PKEY_OP_TYPE_SIG | EVP_PKEY_OP_TYPE_CRYPT,
++ EVP_PKEY_CTRL_RSA_MGF1_MD,
++ 0,
++ md as *mut c_void,
++ )
++}
++
+ pub unsafe fn SSL_CTX_set_mode(ctx: *mut SSL_CTX, op: c_long) -> c_long {
+ SSL_CTX_ctrl(ctx, SSL_CTRL_MODE, op, ptr::null_mut())
+ }
+@@ -1605,6 +1655,7 @@ extern "C" {
+
+ pub fn ASN1_INTEGER_get(dest: *const ASN1_INTEGER) -> c_long;
+ pub fn ASN1_INTEGER_set(dest: *mut ASN1_INTEGER, value: c_long) -> c_int;
++ pub fn ASN1_INTEGER_to_BN(ai: *const ASN1_INTEGER, bn: *mut BIGNUM) -> *mut BIGNUM;
+ pub fn ASN1_GENERALIZEDTIME_free(tm: *mut ASN1_GENERALIZEDTIME);
+ pub fn ASN1_GENERALIZEDTIME_print(b: *mut BIO, tm: *const ASN1_GENERALIZEDTIME) -> c_int;
+ pub fn ASN1_STRING_type_new(ty: c_int) -> *mut ASN1_STRING;
+@@ -1876,6 +1927,20 @@ extern "C" {
+ ctx: *mut BN_CTX,
+ ) -> c_int;
+
++ pub fn ECDSA_SIG_new() -> *mut ECDSA_SIG;
++ pub fn ECDSA_SIG_free(sig: *mut ECDSA_SIG);
++ pub fn ECDSA_do_verify(
++ dgst: *const c_uchar,
++ dgst_len: c_int,
++ sig: *const ECDSA_SIG,
++ eckey: *mut EC_KEY,
++ ) -> c_int;
++ pub fn ECDSA_do_sign(
++ dgst: *const c_uchar,
++ dgst_len: c_int,
++ eckey: *mut EC_KEY,
++ ) -> *mut ECDSA_SIG;
++
+ pub fn ERR_peek_last_error() -> c_ulong;
+ pub fn ERR_get_error() -> c_ulong;
+ pub fn ERR_get_error_line_data(
+@@ -1904,6 +1969,7 @@ extern "C" {
+ pub fn EVP_aes_128_xts() -> *const EVP_CIPHER;
+ pub fn EVP_aes_128_ctr() -> *const EVP_CIPHER;
+ pub fn EVP_aes_128_gcm() -> *const EVP_CIPHER;
++ pub fn EVP_aes_128_ccm() -> *const EVP_CIPHER;
+ pub fn EVP_aes_128_cfb1() -> *const EVP_CIPHER;
+ pub fn EVP_aes_128_cfb128() -> *const EVP_CIPHER;
+ pub fn EVP_aes_128_cfb8() -> *const EVP_CIPHER;
+@@ -1912,6 +1978,7 @@ extern "C" {
+ pub fn EVP_aes_256_xts() -> *const EVP_CIPHER;
+ pub fn EVP_aes_256_ctr() -> *const EVP_CIPHER;
+ pub fn EVP_aes_256_gcm() -> *const EVP_CIPHER;
++ pub fn EVP_aes_256_ccm() -> *const EVP_CIPHER;
+ pub fn EVP_aes_256_cfb1() -> *const EVP_CIPHER;
+ pub fn EVP_aes_256_cfb128() -> *const EVP_CIPHER;
+ pub fn EVP_aes_256_cfb8() -> *const EVP_CIPHER;
+@@ -2023,6 +2090,7 @@ extern "C" {
+ pub fn EVP_PKEY_get1_DH(k: *mut EVP_PKEY) -> *mut DH;
+ pub fn EVP_PKEY_get1_EC_KEY(k: *mut EVP_PKEY) -> *mut EC_KEY;
+ pub fn EVP_PKEY_cmp(a: *const EVP_PKEY, b: *const EVP_PKEY) -> c_int;
++ pub fn EVP_PKEY_id(pkey: *const EVP_PKEY) -> c_int;
+ pub fn EVP_PKEY_new_mac_key(
+ type_: c_int,
+ e: *mut ENGINE,
+@@ -2040,6 +2108,7 @@ extern "C" {
+ ) -> *mut EVP_PKEY;
+
+ pub fn EVP_PKEY_CTX_new(k: *mut EVP_PKEY, e: *mut ENGINE) -> *mut EVP_PKEY_CTX;
++ pub fn EVP_PKEY_CTX_new_id(id: c_int, e: *mut ENGINE) -> *mut EVP_PKEY_CTX;
+ pub fn EVP_PKEY_CTX_free(ctx: *mut EVP_PKEY_CTX);
+ pub fn EVP_PKEY_CTX_ctrl(
+ ctx: *mut EVP_PKEY_CTX,
+@@ -2050,6 +2119,9 @@ extern "C" {
+ p2: *mut c_void,
+ ) -> c_int;
+
++ pub fn EVP_PKEY_keygen_init(ctx: *mut EVP_PKEY_CTX) -> c_int;
++ pub fn EVP_PKEY_keygen(ctx: *mut EVP_PKEY_CTX, key: *mut *mut EVP_PKEY) -> c_int;
++
+ pub fn HMAC_CTX_copy(dst: *mut HMAC_CTX, src: *mut HMAC_CTX) -> c_int;
+
+ pub fn OBJ_obj2nid(o: *const ASN1_OBJECT) -> c_int;
+@@ -2059,6 +2131,7 @@ extern "C" {
+ a: *const ASN1_OBJECT,
+ no_name: c_int,
+ ) -> c_int;
++ pub fn OBJ_nid2sn(nid: c_int) -> *const c_char;
+
+ pub fn OCSP_BASICRESP_new() -> *mut OCSP_BASICRESP;
+ pub fn OCSP_BASICRESP_free(r: *mut OCSP_BASICRESP);
+@@ -2605,6 +2678,7 @@ extern "C" {
+ pub fn X509_sign(x: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) -> c_int;
+ pub fn X509_get_pubkey(x: *mut X509) -> *mut EVP_PKEY;
+ pub fn X509_to_X509_REQ(x: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) -> *mut X509_REQ;
++ pub fn X509_verify_cert(ctx: *mut X509_STORE_CTX) -> c_int;
+ pub fn X509_verify_cert_error_string(n: c_long) -> *const c_char;
+ pub fn X509_get1_ocsp(x: *mut X509) -> *mut stack_st_OPENSSL_STRING;
+ pub fn X509_check_issued(issuer: *mut X509, subject: *mut X509) -> c_int;
+@@ -2638,6 +2712,14 @@ extern "C" {
+ pub fn X509_STORE_add_cert(store: *mut X509_STORE, x: *mut X509) -> c_int;
+ pub fn X509_STORE_set_default_paths(store: *mut X509_STORE) -> c_int;
+
++ pub fn X509_STORE_CTX_new() -> *mut X509_STORE_CTX;
++ pub fn X509_STORE_CTX_cleanup(ctx: *mut X509_STORE_CTX);
++ pub fn X509_STORE_CTX_init(
++ ctx: *mut X509_STORE_CTX,
++ store: *mut X509_STORE,
++ x509: *mut X509,
++ chain: *mut stack_st_X509,
++ ) -> c_int;
+ pub fn X509_STORE_CTX_free(ctx: *mut X509_STORE_CTX);
+ pub fn X509_STORE_CTX_get_current_cert(ctx: *mut X509_STORE_CTX) -> *mut X509;
+ pub fn X509_STORE_CTX_get_error(ctx: *mut X509_STORE_CTX) -> c_int;
+@@ -2772,30 +2854,25 @@ extern "C" {
+
+ pub fn SSL_CTX_set_cookie_generate_cb(
+ s: *mut SSL_CTX,
+- cb: Option<extern "C" fn(
+- ssl: *mut SSL,
+- cookie: *mut c_uchar,
+- cookie_len: *mut c_uint
+- ) -> c_int>
++ cb: Option<
++ extern "C" fn(ssl: *mut SSL, cookie: *mut c_uchar, cookie_len: *mut c_uint) -> c_int,
++ >,
+ );
+
+ #[cfg(ossl110)]
+ pub fn SSL_CTX_set_cookie_verify_cb(
+ s: *mut SSL_CTX,
+- cb: Option<extern "C" fn(
+- ssl: *mut SSL,
+- cookie: *const c_uchar,
+- cookie_len: c_uint
+- ) -> c_int>
++ cb: Option<
++ extern "C" fn(ssl: *mut SSL, cookie: *const c_uchar, cookie_len: c_uint) -> c_int,
++ >,
+ );
+
+ #[cfg(not(ossl110))]
+ pub fn SSL_CTX_set_cookie_verify_cb(
+ s: *mut SSL_CTX,
+- cb: Option<extern "C" fn(
+- ssl: *mut SSL,
+- cookie: *mut c_uchar,
+- cookie_len: c_uint
+- ) -> c_int>
++ cb: Option<extern "C" fn(ssl: *mut SSL, cookie: *mut c_uchar, cookie_len: c_uint) -> c_int>,
+ );
++
++ pub fn EVP_MD_size(md: *const EVP_MD) -> c_int;
++ pub fn EVP_get_cipherbyname(name: *const c_char) -> *const EVP_CIPHER;
+ }
+--- a/src/vendor/openssl-sys/src/libressl/mod.rs 2018-05-07 18:50:12 UTC
++++ b/src/vendor/openssl-sys/src/libressl/mod.rs
+@@ -134,6 +134,12 @@ pub struct DSA {
+ }
+
+ #[repr(C)]
++pub struct ECDSA_SIG {
++ pub r: *mut ::BIGNUM,
++ pub s: *mut ::BIGNUM,
++}
++
++#[repr(C)]
+ pub struct EVP_PKEY {
+ pub type_: c_int,
+ pub save_type: c_int,
+@@ -331,9 +337,9 @@ pub const SSL_CTRL_OPTIONS: c_int = 32;
+ pub const SSL_CTRL_CLEAR_OPTIONS: c_int = 77;
+ pub const SSL_CTRL_SET_ECDH_AUTO: c_int = 94;
+
+-#[cfg(any(libressl261, libressl262, libressl26x))]
++#[cfg(any(libressl261, libressl262, libressl26x, libressl27))]
+ pub const SSL_OP_ALL: c_ulong = 0x4;
+-#[cfg(not(any(libressl261, libressl262, libressl26x)))]
++#[cfg(not(any(libressl261, libressl262, libressl26x, libressl27)))]
+ pub const SSL_OP_ALL: c_ulong = 0x80000014;
+ pub const SSL_OP_CISCO_ANYCONNECT: c_ulong = 0x0;
+ pub const SSL_OP_NO_COMPRESSION: c_ulong = 0x0;
+@@ -346,9 +352,9 @@ pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: c_ulong =
+ pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: c_ulong = 0x0;
+ pub const SSL_OP_TLS_D5_BUG: c_ulong = 0x0;
+ pub const SSL_OP_TLS_BLOCK_PADDING_BUG: c_ulong = 0x0;
+-#[cfg(any(libressl261, libressl262, libressl26x))]
++#[cfg(any(libressl261, libressl262, libressl26x, libressl27))]
+ pub const SSL_OP_SINGLE_ECDH_USE: c_ulong = 0x0;
+-#[cfg(not(any(libressl261, libressl262, libressl26x)))]
++#[cfg(not(any(libressl261, libressl262, libressl26x, libressl27)))]
+ pub const SSL_OP_SINGLE_ECDH_USE: c_ulong = 0x00080000;
+ pub const SSL_OP_SINGLE_DH_USE: c_ulong = 0x00100000;
+ pub const SSL_OP_NO_SSLv2: c_ulong = 0x0;
+--- a/src/vendor/openssl-sys/src/ossl10x.rs 2018-05-07 18:50:12 UTC
++++ b/src/vendor/openssl-sys/src/ossl10x.rs
+@@ -129,6 +129,12 @@ pub struct DSA {
+ }
+
+ #[repr(C)]
++pub struct ECDSA_SIG {
++ pub r: *mut BIGNUM,
++ pub s: *mut BIGNUM
++}
++
++#[repr(C)]
+ pub struct EVP_PKEY {
+ pub type_: c_int,
+ pub save_type: c_int,
+@@ -969,4 +975,7 @@ extern "C" {
+
+ pub fn SSLeay() -> c_ulong;
+ pub fn SSLeay_version(key: c_int) -> *const c_char;
++
++ #[cfg(ossl102)]
++ pub fn SSL_extension_supported(ext_type: c_uint) -> c_int;
+ }
+--- a/src/vendor/openssl-sys/src/ossl110.rs 2018-05-07 18:50:12 UTC
++++ b/src/vendor/openssl-sys/src/ossl110.rs
+@@ -8,6 +8,7 @@ pub enum BIO_METHOD {}
+ pub enum CRYPTO_EX_DATA {}
+ pub enum DH {}
+ pub enum DSA {}
++pub enum ECDSA_SIG {}
+ pub enum EVP_CIPHER {}
+ pub enum EVP_MD_CTX {}
+ pub enum EVP_PKEY {}
+@@ -363,4 +364,10 @@ extern "C" {
+ ) -> *mut PKCS12;
+ pub fn X509_REQ_get_version(req: *const X509_REQ) -> c_long;
+ pub fn X509_REQ_get_subject_name(req: *const X509_REQ) -> *mut ::X509_NAME;
++ pub fn SSL_extension_supported(ext_type: c_uint) -> c_int;
++ pub fn ECDSA_SIG_get0(sig: *const ECDSA_SIG, pr: *mut *const BIGNUM, ps: *mut *const BIGNUM);
++ pub fn ECDSA_SIG_set0(sig: *mut ECDSA_SIG, pr: *mut BIGNUM, ps: *mut BIGNUM) -> c_int;
++
++ pub fn SSL_CIPHER_get_cipher_nid(c: *const ::SSL_CIPHER) -> c_int;
++ pub fn SSL_CIPHER_get_digest_nid(c: *const ::SSL_CIPHER) -> c_int;
+ }
+--- a/src/vendor/openssl-sys/src/ossl111.rs 2018-05-07 18:50:12 UTC
++++ b/src/vendor/openssl-sys/src/ossl111.rs
+@@ -1,15 +1,84 @@
+-use libc::{c_char, c_int, c_ulong};
++use libc::{c_char, c_uchar, c_int, c_uint, c_ulong, size_t, c_void};
+
+ pub type SSL_CTX_keylog_cb_func =
+ Option<unsafe extern "C" fn(ssl: *const ::SSL, line: *const c_char)>;
+
+-pub const SSL_COOKIE_LENGTH: c_int = 255;
++pub type SSL_custom_ext_add_cb_ex =
++ Option<unsafe extern "C" fn(ssl: *mut ::SSL, ext_type: c_uint,
++ context: c_uint,
++ out: *mut *const c_uchar,
++ outlen: *mut size_t, x: *mut ::X509,
++ chainidx: size_t, al: *mut c_int,
++ add_arg: *mut c_void) -> c_int>;
+
++pub type SSL_custom_ext_free_cb_ex =
++ Option<unsafe extern "C" fn(ssl: *mut ::SSL, ext_type: c_uint,
++ context: c_uint,
++ out: *mut *const c_uchar,
++ add_arg: *mut c_void)>;
++
++pub type SSL_custom_ext_parse_cb_ex =
++ Option<unsafe extern "C" fn(ssl: *mut ::SSL, ext_type: c_uint,
++ context: c_uint,
++ input: *const c_uchar,
++ inlen: size_t, x: *mut ::X509,
++ chainidx: size_t, al: *mut c_int,
++ parse_arg: *mut c_void) -> c_int>;
++
++pub const SSL_COOKIE_LENGTH: c_int = 4096;
++
+ pub const SSL_OP_ENABLE_MIDDLEBOX_COMPAT: c_ulong = 0x00100000;
+
+ pub const TLS1_3_VERSION: c_int = 0x304;
+
++pub const SSL_EXT_TLS_ONLY: c_uint = 0x0001;
++/* This extension is only allowed in DTLS */
++pub const SSL_EXT_DTLS_ONLY: c_uint = 0x0002;
++/* Some extensions may be allowed in DTLS but we don't implement them for it */
++pub const SSL_EXT_TLS_IMPLEMENTATION_ONLY: c_uint = 0x0004;
++/* Most extensions are not defined for SSLv3 but EXT_TYPE_renegotiate is */
++pub const SSL_EXT_SSL3_ALLOWED: c_uint = 0x0008;
++/* Extension is only defined for TLS1.2 and below */
++pub const SSL_EXT_TLS1_2_AND_BELOW_ONLY: c_uint = 0x0010;
++/* Extension is only defined for TLS1.3 and above */
++pub const SSL_EXT_TLS1_3_ONLY: c_uint = 0x0020;
++/* Ignore this extension during parsing if we are resuming */
++pub const SSL_EXT_IGNORE_ON_RESUMPTION: c_uint = 0x0040;
++pub const SSL_EXT_CLIENT_HELLO: c_uint = 0x0080;
++/* Really means TLS1.2 or below */
++pub const SSL_EXT_TLS1_2_SERVER_HELLO: c_uint = 0x0100;
++pub const SSL_EXT_TLS1_3_SERVER_HELLO: c_uint = 0x0200;
++pub const SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS: c_uint = 0x0400;
++pub const SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST: c_uint = 0x0800;
++pub const SSL_EXT_TLS1_3_CERTIFICATE: c_uint = 0x1000;
++pub const SSL_EXT_TLS1_3_NEW_SESSION_TICKET: c_uint = 0x2000;
++pub const SSL_EXT_TLS1_3_CERTIFICATE_REQUEST: c_uint = 0x4000;
++
++
+ extern "C" {
+ pub fn SSL_CTX_set_keylog_callback(ctx: *mut ::SSL_CTX, cb: SSL_CTX_keylog_cb_func);
++ pub fn SSL_CTX_add_custom_ext(ctx: *mut ::SSL_CTX, ext_type: c_uint, context: c_uint,
++ add_cb: SSL_custom_ext_add_cb_ex,
++ free_cb: SSL_custom_ext_free_cb_ex,
++ add_arg: *mut c_void,
++ parse_cb: SSL_custom_ext_parse_cb_ex,
++ parse_arg: *mut c_void) -> c_int;
+ pub fn SSL_stateless(s: *mut ::SSL) -> c_int;
++ pub fn SSL_CIPHER_get_handshake_digest(cipher: *const ::SSL_CIPHER) -> *const ::EVP_MD;
++ pub fn SSL_CTX_set_stateless_cookie_generate_cb(
++ s: *mut ::SSL_CTX,
++ cb: Option<unsafe extern "C" fn(
++ ssl: *mut ::SSL,
++ cookie: *mut c_uchar,
++ cookie_len: *mut size_t
++ ) -> c_int>
++ );
++ pub fn SSL_CTX_set_stateless_cookie_verify_cb(
++ s: *mut ::SSL_CTX,
++ cb: Option<unsafe extern "C" fn(
++ ssl: *mut ::SSL,
++ cookie: *const c_uchar,
++ cookie_len: size_t
++ ) -> c_int>
++ );
+ }
diff --git a/dev-lang/rust/rust-1.26.2.ebuild b/dev-lang/rust/rust-1.26.2.ebuild
index 54b0444..3b52683 100644
--- a/dev-lang/rust/rust-1.26.2.ebuild
+++ b/dev-lang/rust/rust-1.26.2.ebuild
@@ -68,10 +68,7 @@ RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
jemalloc? ( dev-libs/jemalloc )
system-llvm? ( sys-devel/llvm )
extended? (
- libressl? (
- >=dev-libs/libressl-2.5.0:=
- <dev-libs/libressl-2.7.0:=
- )
+ libressl? ( dev-libs/libressl:0= )
!libressl? ( dev-libs/openssl:0= )
net-libs/http-parser:0/2.8.0
net-libs/libssh2:=
@@ -107,6 +104,7 @@ PATCHES=(
"${FILESDIR}/1.26.2/0008-Don-t-pass-CFLAGS-to-the-C-compiler.patch"
"${FILESDIR}/1.25.0/0009-liblibc.patch"
"${FILESDIR}/1.25.0/0010-llvm.patch"
+ "${FILESDIR}/rust-1.26.0-libressl-2.7.0.patch"
)
S="${WORKDIR}/${MY_P}-src"
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/musl:master commit in: dev-lang/rust/, dev-lang/rust/files/
@ 2019-11-06 22:58 Jory Pratt
0 siblings, 0 replies; 8+ messages in thread
From: Jory Pratt @ 2019-11-06 22:58 UTC (permalink / raw
To: gentoo-commits
commit: bb3caa60e2f9a6d7a983423bc60b38ea510d398e
Author: stefson <herrtimson <AT> yahoo <DOT> de>
AuthorDate: Tue Oct 29 21:29:06 2019 +0000
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Wed Nov 6 22:57:44 2019 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=bb3caa60
dev-lang/rust: reimport rust-1.34.2 from github.com/smaeul/portage-overlay/
it's old, but uses the now stable llvm-8 and is suitable for building esr
more important: it doesn't suffer from a bug where cflags are bleeding
into the compile env when adding cross compile crates, this makes it a
good base for exploring these unknown waters.
if you're going to use with system-llvm, please check out the nifty
patchset and drop those targeting llvm into /etc/portage/patches/
Signed-off-by: Steffen Kuhn <nielson2 <AT> yandex.com>
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>
dev-lang/rust/Manifest | 7 +
.../0001-Don-t-pass-CFLAGS-to-the-C-compiler.patch | 26 ++
dev-lang/rust/files/0002-Fix-LLVM-build.patch | 26 ++
...tdoc-to-work-when-cross-compiling-on-musl.patch | 36 ++
...tic-native-libraries-when-linking-static-.patch | 56 +++
...-nostdlib-and-musl_root-from-musl-targets.patch | 388 +++++++++++++++++++++
...-Prefer-libgcc_eh-over-libunwind-for-musl.patch | 24 ++
...untest-Fix-proc-macro-tests-on-musl-hosts.patch | 37 ++
...rect-minimum-system-LLVM-version-in-tests.patch | 206 +++++++++++
...-extern-for-plugins-Don-t-assume-multilib.patch | 30 ++
...t-crates-are-unstable-Fix-test-when-rpath.patch | 25 ++
...11-Ignore-broken-and-non-applicable-tests.patch | 104 ++++++
...-Link-stage-2-tools-dynamically-to-libstd.patch | 27 ++
...3-Move-debugger-scripts-to-usr-share-rust.patch | 53 +++
.../rust/files/0014-Add-gentoo-target-specs.patch | 179 ++++++++++
dev-lang/rust/files/0030-liblibc-linkage.patch | 33 ++
dev-lang/rust/files/0040-rls-atomics.patch | 58 +++
dev-lang/rust/files/0050-llvm.patch | 20 ++
dev-lang/rust/files/0051-llvm-D45520.patch | 101 ++++++
dev-lang/rust/files/0052-llvm-D52013.patch | 15 +
dev-lang/rust/files/0053-llvm-secureplt.patch | 28 ++
.../files/0060-fix-build-with-libressl-2.9.1.patch | 35 ++
dev-lang/rust/metadata.xml | 17 +
dev-lang/rust/rust-1.34.2.ebuild | 337 ++++++++++++++++++
24 files changed, 1868 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
new file mode 100644
index 0000000..8111391
--- /dev/null
+++ b/dev-lang/rust/Manifest
@@ -0,0 +1,7 @@
+DIST rust-1.33.0-aarch64-gentoo-linux-musl.tar.xz 103260664 BLAKE2B 2eeecf50ab275abc5679e4be56c3322c1967bbb1926e375910df1d3b5aee042cbb37c56ecede542668a63360bc9db82ec731a927a180399df99b30ff09b70c15 SHA512 de9ae088cc4ca76fc619dc8de4fe7f362bc8039c03d9b09ab905b7e551ef0b0fa2d678a984200efddfee542adf5f5a951bd24788a39940bace03d3fe829f4747
+DIST rust-1.33.0-armv7a-unknown-linux-musleabihf.tar.xz 102032976 BLAKE2B 9f00a004d575962ca3dd3d0d70190210111e9347f35e6858fc30a085495d48a03751645bfdb4940c7db2dc8bf74d08611dfec05fe53e5022e7360ed51c39f33a SHA512 45b5af051663c7ee7ff7c663af57dfbaaa3c9f69dd22c36134534e77a715d1acc101891f4a7e798fcab38e8accd284cc15df35da20552872894bc6da6dab89ff
+DIST rust-1.33.0-i686-gentoo-linux-musl.tar.xz 116133752 BLAKE2B a9cf13caa12da6ad20bbcbb592d3fa423eb6f90d50c9af41db17cb2f587d0ef90d19652e75742da49d8e187c8e393137998e384b5d9686cfff28553c7aab1f71 SHA512 eaef8169451b02cdee67fe40def8d0ab0d91e527ad4964b8bdafca8677bd2bcea265ba3be5a90c99589b8639ca3e026a540d295a5233f73da873e56e9ffea83f
+DIST rust-1.33.0-powerpc-gentoo-linux-musl.tar.xz 104602692 BLAKE2B bef7cacfd7d9e411f18f6b64403c3bdc33bb17270f966aa9cb6ff99e80d8da9bd1346e8c3e3081df7bee3f367d3940b3badd6aeec6859f4a3de75cfeb108de1a SHA512 2314b5d31c9cc31b28a3668ebd4e1a88a4f090c60b141c8e3e4fb06b4c311ef64ab9217acbdb34417e1f3aaf74fda2087ba90ad70075b7197471bf8bfc804370
+DIST rust-1.33.0-powerpc64-gentoo-linux-musl.tar.xz 98455708 BLAKE2B fde1ca61ddcfe1091aa2c39ffb9ea47ef4ef2b63557059eeda4df6c90bcf30b22bf09e0bd301d7993d27d18e0c5dbc84db123613a8ac31c68abcb56d1b3892bc SHA512 9dbe37abd4edd519ac3596d405b9af7a4a3de1da56161bed66f9f2f40d505beaa9d7c998c6775d6c86d4e086e5cb085f65702b6be7a182663c1e0c6b2095a242
+DIST rust-1.33.0-x86_64-gentoo-linux-musl.tar.xz 113838416 BLAKE2B 2d118520a118746ca16aac7b336e03805c3a02df20b2abdd2e9f6a4fcc062c17b0d057347447027287f8fdceeaa34a171835e6f22d45098097b540c97cee23a1 SHA512 cd2a6277af99cfaf84f5d293a09e0af9189e1d9148bc4031dd32620f0eb086695e175c6a04e6cceb673af976566114e4a75d42654505d295135a8fc95eb2f850
+DIST rustc-1.34.2-src.tar.xz 95048792 BLAKE2B e81e4bfda87ddfb09ab8a74792346970aa440c678d2bb1279c329db4929282f761ada6fea9d81ceeecfd513613025c8e636487626fc36bd0b33559e045bb1b15 SHA512 f1bd2b226d90aae8a4657e6117b9a8451d4ce8129f79cc0fce0da7613a3b7800e690bc0ede8fec20a2f5f32c13fa8e22ac97d3838e0d36936793535a75d9c381
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
new file mode 100644
index 0000000..f4df88e
--- /dev/null
+++ b/dev-lang/rust/files/0001-Don-t-pass-CFLAGS-to-the-C-compiler.patch
@@ -0,0 +1,26 @@
+From 4b5cdf991eb8776927a2730ed73446559856b468 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/14] 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 a471af2576..f4273729bb 100644
+--- a/src/bootstrap/builder.rs
++++ b/src/bootstrap/builder.rs
+@@ -1068,8 +1068,7 @@ impl<'a> Builder<'a> {
+ if let Ok(cxx) = self.cxx(target) {
+ let cxx = ccacheify(&cxx);
+ cargo
+- .env(format!("CXX_{}", target), &cxx)
+- .env(format!("CXXFLAGS_{}", target), cflags);
++ .env(format!("CXX_{}", target), &cxx);
+ }
+ }
+
+--
+2.21.0
+
diff --git a/dev-lang/rust/files/0002-Fix-LLVM-build.patch b/dev-lang/rust/files/0002-Fix-LLVM-build.patch
new file mode 100644
index 0000000..0a8ecec
--- /dev/null
+++ b/dev-lang/rust/files/0002-Fix-LLVM-build.patch
@@ -0,0 +1,26 @@
+From 22fac16a9a1651eb9ac121761583ff6031a15077 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/14] Fix LLVM build
+
+---
+ src/bootstrap/lib.rs | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
+index 7e6fbdff12..f1e7f05aa9 100644
+--- a/src/bootstrap/lib.rs
++++ b/src/bootstrap/lib.rs
+@@ -764,7 +764,8 @@ impl Build {
+ // cc-rs because the build scripts will determine that for themselves.
+ let mut base = self.cc[&target].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.21.0
+
diff --git a/dev-lang/rust/files/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch b/dev-lang/rust/files/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch
new file mode 100644
index 0000000..087dea2
--- /dev/null
+++ b/dev-lang/rust/files/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch
@@ -0,0 +1,36 @@
+From c4565fab697249c4233c97f7855fe692a5a880a4 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sat, 2 Dec 2017 17:25:44 -0600
+Subject: [PATCH 03/14] Allow rustdoc to work when cross-compiling on musl
+
+musl can't handle foreign-architecture libraries in LD_LIBRARY_PATH.
+---
+ src/bootstrap/bin/rustdoc.rs | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
+index 52b5971f0a..c779e35e26 100644
+--- a/src/bootstrap/bin/rustdoc.rs
++++ b/src/bootstrap/bin/rustdoc.rs
+@@ -23,9 +23,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(rustdoc) instead of cfg(dox), remove the `--cfg dox`
+ //arguments here
+ let mut cmd = Command::new(rustdoc);
+@@ -37,7 +34,7 @@ fn main() {
+ .arg("--sysroot")
+ .arg(sysroot)
+ .env(bootstrap::util::dylib_path_var(),
+- env::join_paths(&dylib_path).unwrap());
++ 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
+--
+2.21.0
+
diff --git a/dev-lang/rust/files/0004-Require-static-native-libraries-when-linking-static-.patch b/dev-lang/rust/files/0004-Require-static-native-libraries-when-linking-static-.patch
new file mode 100644
index 0000000..6238e50
--- /dev/null
+++ b/dev-lang/rust/files/0004-Require-static-native-libraries-when-linking-static-.patch
@@ -0,0 +1,56 @@
+From 859624e56281aff33673dcceb34698bd30eceea3 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Fri, 8 Sep 2017 00:05:18 -0500
+Subject: [PATCH 04/14] Require 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.
+
+Fixes #54243
+---
+ src/librustc_codegen_llvm/back/link.rs | 18 ++++++++++++++----
+ 1 file changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/src/librustc_codegen_llvm/back/link.rs b/src/librustc_codegen_llvm/back/link.rs
+index 819f7f9410..49adc5dfca 100644
+--- a/src/librustc_codegen_llvm/back/link.rs
++++ b/src/librustc_codegen_llvm/back/link.rs
+@@ -1413,9 +1413,7 @@ fn add_upstream_rust_crates(cmd: &mut dyn Linker,
+ }
+ }
+
+-// 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.
+@@ -1458,7 +1456,19 @@ fn add_upstream_native_libraries(cmd: &mut dyn Linker,
+ continue
+ }
+ match lib.kind {
+- NativeLibraryKind::NativeUnknown => cmd.link_dylib(&name.as_str()),
++ NativeLibraryKind::NativeUnknown => {
++ // 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()
++ && !sess.target.target.options.crt_static_allows_dylibs
++ {
++ cmd.link_staticlib(&name.as_str())
++ } else {
++ cmd.link_dylib(&name.as_str())
++ }
++ },
+ NativeLibraryKind::NativeFramework => cmd.link_framework(&name.as_str()),
+ NativeLibraryKind::NativeStaticNobundle => {
+ // Link "static-nobundle" native libs only if the crate they originate from
+--
+2.21.0
+
diff --git a/dev-lang/rust/files/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch b/dev-lang/rust/files/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
new file mode 100644
index 0000000..b8ca293
--- /dev/null
+++ b/dev-lang/rust/files/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -0,0 +1,388 @@
+From d84f9863017bd4bb38c5a2063c679dc3132ecf28 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Fri, 8 Sep 2017 22:11:14 -0500
+Subject: [PATCH 05/14] Remove -nostdlib and musl_root from musl targets
+
+---
+ config.toml.example | 6 ----
+ src/bootstrap/bin/rustc.rs | 12 --------
+ src/bootstrap/cc_detect.rs | 27 ++----------------
+ src/bootstrap/compile.rs | 21 --------------
+ src/bootstrap/config.rs | 7 -----
+ src/bootstrap/configure.py | 22 ---------------
+ src/bootstrap/lib.rs | 8 ------
+ src/bootstrap/sanity.rs | 28 -------------------
+ .../dist-i586-gnu-i586-i686-musl/Dockerfile | 2 --
+ src/ci/docker/dist-various-1/Dockerfile | 7 -----
+ src/ci/docker/dist-x86_64-musl/Dockerfile | 1 -
+ src/librustc_target/spec/linux_musl_base.rs | 16 -----------
+ 12 files changed, 3 insertions(+), 154 deletions(-)
+
+diff --git a/config.toml.example b/config.toml.example
+index f45db37c33..50692bf74a 100644
+--- a/config.toml.example
++++ b/config.toml.example
+@@ -470,12 +470,6 @@
+ # only use static libraries. If unset, the target's default linkage is used.
+ #crt-static = false
+
+-# The root location of the MUSL installation directory. The library directory
+-# will also need to contain libunwind.a for an unwinding implementation. Note
+-# that this option only makes sense for MUSL targets that produce statically
+-# linked binaries
+-#musl-root = "..."
+-
+ # Used in testing for configuring where the QEMU images are located, you
+ # probably don't want to use this.
+ #qemu-rootfs = "..."
+diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
+index b6afe317a0..0eace41a5a 100644
+--- a/src/bootstrap/bin/rustc.rs
++++ b/src/bootstrap/bin/rustc.rs
+@@ -18,7 +18,6 @@
+ #![deny(warnings)]
+
+ use std::env;
+-use std::ffi::OsString;
+ use std::io;
+ use std::path::PathBuf;
+ use std::process::Command;
+@@ -114,17 +113,6 @@ fn main() {
+ cmd.arg("-Cprefer-dynamic");
+ }
+
+- // Help the libc crate compile by assisting it in finding the MUSL
+- // native libraries.
+- if let Some(s) = env::var_os("MUSL_ROOT") {
+- if target.contains("musl") {
+- let mut root = OsString::from("native=");
+- root.push(&s);
+- root.push("/lib");
+- cmd.arg("-L").arg(&root);
+- }
+- }
+-
+ // Override linker if necessary.
+ if let Ok(target_linker) = env::var("RUSTC_TARGET_LINKER") {
+ cmd.arg(format!("-Clinker={}", target_linker));
+diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
+index dfc243b705..848d1d4b2b 100644
+--- a/src/bootstrap/cc_detect.rs
++++ b/src/bootstrap/cc_detect.rs
+@@ -84,7 +84,7 @@ pub fn find(build: &mut Build) {
+ if let Some(cc) = config.and_then(|c| c.cc.as_ref()) {
+ cfg.compiler(cc);
+ } else {
+- set_compiler(&mut cfg, Language::C, target, config, build);
++ set_compiler(&mut cfg, Language::C, target, config);
+ }
+
+ let compiler = cfg.get_compiler();
+@@ -113,7 +113,7 @@ pub fn find(build: &mut Build) {
+ if let Some(cxx) = config.and_then(|c| c.cxx.as_ref()) {
+ cfg.compiler(cxx);
+ } else {
+- set_compiler(&mut cfg, Language::CPlusPlus, host, config, build);
++ set_compiler(&mut cfg, Language::CPlusPlus, host, config);
+ }
+ let compiler = cfg.get_compiler();
+ build.verbose(&format!("CXX_{} = {:?}", host, compiler.path()));
+@@ -124,8 +124,7 @@ pub fn find(build: &mut Build) {
+ fn set_compiler(cfg: &mut cc::Build,
+ compiler: Language,
+ target: Interned<String>,
+- config: Option<&Target>,
+- build: &Build) {
++ config: Option<&Target>) {
+ match &*target {
+ // When compiling for android we may have the NDK configured in the
+ // config.toml in which case we look there. Otherwise the default
+@@ -165,26 +164,6 @@ fn set_compiler(cfg: &mut cc::Build,
+ }
+ }
+
+- "mips-unknown-linux-musl" => {
+- if cfg.get_compiler().path().to_str() == Some("gcc") {
+- cfg.compiler("mips-linux-musl-gcc");
+- }
+- }
+- "mipsel-unknown-linux-musl" => {
+- if cfg.get_compiler().path().to_str() == Some("gcc") {
+- cfg.compiler("mipsel-linux-musl-gcc");
+- }
+- }
+-
+- t if t.contains("musl") => {
+- if let Some(root) = build.musl_root(target) {
+- let guess = root.join("bin/musl-gcc");
+- if guess.exists() {
+- cfg.compiler(guess);
+- }
+- }
+- }
+-
+ _ => {}
+ }
+ }
+diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
+index 249a183189..bfc62c762a 100644
+--- a/src/bootstrap/compile.rs
++++ b/src/bootstrap/compile.rs
+@@ -114,21 +114,6 @@ impl Step for Std {
+ fn copy_third_party_objects(builder: &Builder<'_>, compiler: &Compiler, target: Interned<String>) {
+ let libdir = builder.sysroot_libdir(*compiler, target);
+
+- // Copies the crt(1,i,n).o startup objects
+- //
+- // Since musl supports fully static linking, we can cross link for it even
+- // with a glibc-targeting toolchain, given we have the appropriate startup
+- // files. As those shipped with glibc won't work, copy the ones provided by
+- // musl so we have them on linux-gnu hosts.
+- if target.contains("musl") {
+- for &obj in &["crt1.o", "crti.o", "crtn.o"] {
+- builder.copy(
+- &builder.musl_root(target).unwrap().join("lib").join(obj),
+- &libdir.join(obj),
+- );
+- }
+- }
+-
+ // Copies libunwind.a compiled to be linked wit x86_64-fortanix-unknown-sgx.
+ //
+ // This target needs to be linked to Fortanix's port of llvm's libunwind.
+@@ -182,12 +167,6 @@ pub fn std_cargo(builder: &Builder<'_>,
+ cargo.arg("--features").arg(features)
+ .arg("--manifest-path")
+ .arg(builder.src.join("src/libstd/Cargo.toml"));
+-
+- if target.contains("musl") {
+- if let Some(p) = builder.musl_root(target) {
+- cargo.env("MUSL_ROOT", p);
+- }
+- }
+ }
+ }
+
+diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
+index 7d3e584f1a..3f0113e11a 100644
+--- a/src/bootstrap/config.rs
++++ b/src/bootstrap/config.rs
+@@ -132,8 +132,6 @@ pub struct Config {
+ pub print_step_timings: bool,
+ pub missing_tools: bool,
+
+- // Fallback musl-root for all targets
+- pub musl_root: Option<PathBuf>,
+ pub prefix: Option<PathBuf>,
+ pub sysconfdir: Option<PathBuf>,
+ pub datadir: Option<PathBuf>,
+@@ -168,7 +166,6 @@ pub struct Target {
+ pub linker: Option<PathBuf>,
+ pub ndk: Option<PathBuf>,
+ pub crt_static: Option<bool>,
+- pub musl_root: Option<PathBuf>,
+ pub qemu_rootfs: Option<PathBuf>,
+ pub no_std: bool,
+ }
+@@ -304,7 +301,6 @@ struct Rust {
+ backtrace: Option<bool>,
+ default_linker: Option<String>,
+ channel: Option<String>,
+- musl_root: Option<String>,
+ rpath: Option<bool>,
+ optimize_tests: Option<bool>,
+ debuginfo_tests: Option<bool>,
+@@ -343,7 +339,6 @@ struct TomlTarget {
+ linker: Option<String>,
+ android_ndk: Option<String>,
+ crt_static: Option<bool>,
+- musl_root: Option<String>,
+ qemu_rootfs: Option<String>,
+ }
+
+@@ -562,7 +557,6 @@ impl Config {
+ set(&mut config.llvm_tools_enabled, rust.llvm_tools);
+ config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
+ config.rustc_default_linker = rust.default_linker.clone();
+- config.musl_root = rust.musl_root.clone().map(PathBuf::from);
+ config.save_toolstates = rust.save_toolstates.clone().map(PathBuf::from);
+ set(&mut config.deny_warnings, rust.deny_warnings.or(flags.warnings));
+ set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
+@@ -605,7 +599,6 @@ impl Config {
+ target.ranlib = cfg.ranlib.clone().map(PathBuf::from);
+ target.linker = cfg.linker.clone().map(PathBuf::from);
+ target.crt_static = cfg.crt_static.clone();
+- target.musl_root = cfg.musl_root.clone().map(PathBuf::from);
+ target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from);
+
+ config.target_config.insert(INTERNER.intern_string(triple.clone()), target);
+diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
+index b2d8f2d8eb..c3bb94938f 100755
+--- a/src/bootstrap/configure.py
++++ b/src/bootstrap/configure.py
+@@ -109,28 +109,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
+ "aarch64-linux-android NDK standalone path")
+ v("x86_64-linux-android-ndk", "target.x86_64-linux-android.android-ndk",
+ "x86_64-linux-android NDK standalone path")
+-v("musl-root", "target.x86_64-unknown-linux-musl.musl-root",
+- "MUSL root installation directory (deprecated)")
+-v("musl-root-x86_64", "target.x86_64-unknown-linux-musl.musl-root",
+- "x86_64-unknown-linux-musl install directory")
+-v("musl-root-i586", "target.i586-unknown-linux-musl.musl-root",
+- "i586-unknown-linux-musl install directory")
+-v("musl-root-i686", "target.i686-unknown-linux-musl.musl-root",
+- "i686-unknown-linux-musl install directory")
+-v("musl-root-arm", "target.arm-unknown-linux-musleabi.musl-root",
+- "arm-unknown-linux-musleabi install directory")
+-v("musl-root-armhf", "target.arm-unknown-linux-musleabihf.musl-root",
+- "arm-unknown-linux-musleabihf install directory")
+-v("musl-root-armv5te", "target.armv5te-unknown-linux-musleabi.musl-root",
+- "armv5te-unknown-linux-musleabi install directory")
+-v("musl-root-armv7", "target.armv7-unknown-linux-musleabihf.musl-root",
+- "armv7-unknown-linux-musleabihf install directory")
+-v("musl-root-aarch64", "target.aarch64-unknown-linux-musl.musl-root",
+- "aarch64-unknown-linux-musl install directory")
+-v("musl-root-mips", "target.mips-unknown-linux-musl.musl-root",
+- "mips-unknown-linux-musl install directory")
+-v("musl-root-mipsel", "target.mipsel-unknown-linux-musl.musl-root",
+- "mipsel-unknown-linux-musl install directory")
+ v("qemu-armhf-rootfs", "target.arm-unknown-linux-gnueabihf.qemu-rootfs",
+ "rootfs in qemu testing, you probably don't want to use this")
+ v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs",
+diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
+index f1e7f05aa9..4ee1444db3 100644
+--- a/src/bootstrap/lib.rs
++++ b/src/bootstrap/lib.rs
+@@ -842,14 +842,6 @@ impl Build {
+ }
+ }
+
+- /// Returns the "musl root" for this `target`, if defined
+- fn musl_root(&self, target: Interned<String>) -> Option<&Path> {
+- self.config.target_config.get(&target)
+- .and_then(|t| t.musl_root.as_ref())
+- .or(self.config.musl_root.as_ref())
+- .map(|p| &**p)
+- }
+-
+ /// Returns `true` if this is a no-std `target`, if defined
+ fn no_std(&self, target: Interned<String>) -> Option<bool> {
+ self.config.target_config.get(&target)
+diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
+index ff4fb85bbf..ff45200bde 100644
+--- a/src/bootstrap/sanity.rs
++++ b/src/bootstrap/sanity.rs
+@@ -169,34 +169,6 @@ pub fn check(build: &mut Build) {
+ }
+ }
+
+- // Make sure musl-root is valid
+- if target.contains("musl") {
+- // If this is a native target (host is also musl) and no musl-root is given,
+- // fall back to the system toolchain in /usr before giving up
+- if build.musl_root(*target).is_none() && build.config.build == *target {
+- let target = build.config.target_config.entry(target.clone())
+- .or_default();
+- target.musl_root = Some("/usr".into());
+- }
+- match build.musl_root(*target) {
+- Some(root) => {
+- if fs::metadata(root.join("lib/libc.a")).is_err() {
+- panic!("couldn't find libc.a in musl dir: {}",
+- root.join("lib").display());
+- }
+- if fs::metadata(root.join("lib/libunwind.a")).is_err() {
+- panic!("couldn't find libunwind.a in musl dir: {}",
+- root.join("lib").display());
+- }
+- }
+- None => {
+- panic!("when targeting MUSL either the rust.musl-root \
+- option or the target.$TARGET.musl-root option must \
+- be specified in config.toml")
+- }
+- }
+- }
+-
+ if target.contains("msvc") {
+ // There are three builds of cmake on windows: MSVC, MinGW, and
+ // Cygwin. The Cygwin build does not have generators for Visual
+diff --git a/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile b/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile
+index ba2d32a929..412c37fdd1 100644
+--- a/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile
++++ b/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile
+@@ -30,8 +30,6 @@ COPY scripts/sccache.sh /scripts/
+ RUN sh /scripts/sccache.sh
+
+ ENV RUST_CONFIGURE_ARGS \
+- --musl-root-i586=/musl-i586 \
+- --musl-root-i686=/musl-i686 \
+ --enable-extended \
+ --disable-docs
+
+diff --git a/src/ci/docker/dist-various-1/Dockerfile b/src/ci/docker/dist-various-1/Dockerfile
+index f80293b182..52f28df826 100644
+--- a/src/ci/docker/dist-various-1/Dockerfile
++++ b/src/ci/docker/dist-various-1/Dockerfile
+@@ -130,13 +130,6 @@ ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
+ CXX_thumbv7neon_unknown_linux_gnueabihf=arm-linux-gnueabihf-g++
+
+ ENV RUST_CONFIGURE_ARGS \
+- --musl-root-armv5te=/musl-armv5te \
+- --musl-root-arm=/musl-arm \
+- --musl-root-armhf=/musl-armhf \
+- --musl-root-armv7=/musl-armv7 \
+- --musl-root-aarch64=/musl-aarch64 \
+- --musl-root-mips=/musl-mips \
+- --musl-root-mipsel=/musl-mipsel \
+ --enable-emscripten \
+ --disable-docs
+
+diff --git a/src/ci/docker/dist-x86_64-musl/Dockerfile b/src/ci/docker/dist-x86_64-musl/Dockerfile
+index 06f8a2fbba..f5dd379528 100644
+--- a/src/ci/docker/dist-x86_64-musl/Dockerfile
++++ b/src/ci/docker/dist-x86_64-musl/Dockerfile
+@@ -30,7 +30,6 @@ COPY scripts/sccache.sh /scripts/
+ RUN sh /scripts/sccache.sh
+
+ ENV RUST_CONFIGURE_ARGS \
+- --musl-root-x86_64=/musl-x86_64 \
+ --enable-extended \
+ --disable-docs
+
+diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/spec/linux_musl_base.rs
+index e294e63982..58ae91a96a 100644
+--- a/src/librustc_target/spec/linux_musl_base.rs
++++ b/src/librustc_target/spec/linux_musl_base.rs
+@@ -3,28 +3,12 @@ use crate::spec::{LinkerFlavor, TargetOptions};
+ pub fn opts() -> TargetOptions {
+ let mut base = super::linux_base::opts();
+
+- // Make sure that the linker/gcc really don't pull in anything, including
+- // default objects, libs, etc.
+- base.pre_link_args_crt.insert(LinkerFlavor::Gcc, Vec::new());
+- base.pre_link_args_crt.get_mut(&LinkerFlavor::Gcc).unwrap().push("-nostdlib".to_string());
+-
+ // At least when this was tested, the linker would not add the
+ // `GNU_EH_FRAME` program header to executables generated, which is required
+ // when unwinding to locate the unwinding information. I'm not sure why this
+ // argument is *not* necessary for normal builds, but it can't hurt!
+ base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,--eh-frame-hdr".to_string());
+
+- // When generating a statically linked executable there's generally some
+- // small setup needed which is listed in these files. These are provided by
+- // a musl toolchain and are linked by default by the `musl-gcc` script. Note
+- // that `gcc` also does this by default, it just uses some different files.
+- //
+- // Each target directory for musl has these object files included in it so
+- // they'll be included from there.
+- base.pre_link_objects_exe_crt.push("crt1.o".to_string());
+- base.pre_link_objects_exe_crt.push("crti.o".to_string());
+- base.post_link_objects_crt.push("crtn.o".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.21.0
+
diff --git a/dev-lang/rust/files/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch b/dev-lang/rust/files/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
new file mode 100644
index 0000000..ea8a7a0
--- /dev/null
+++ b/dev-lang/rust/files/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
@@ -0,0 +1,24 @@
+From af88a145ea4fbcda9f1d16a53a341282d2129b07 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sat, 9 Sep 2017 00:14:16 -0500
+Subject: [PATCH 06/14] Prefer libgcc_eh over libunwind for musl
+
+---
+ src/libunwind/lib.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs
+index 0ccffea317..935175dd8d 100644
+--- a/src/libunwind/lib.rs
++++ b/src/libunwind/lib.rs
+@@ -26,6 +26,6 @@ cfg_if! {
+ }
+
+ #[cfg(target_env = "musl")]
+-#[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
++#[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
+ #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
+ extern {}
+--
+2.21.0
+
diff --git a/dev-lang/rust/files/0007-runtest-Fix-proc-macro-tests-on-musl-hosts.patch b/dev-lang/rust/files/0007-runtest-Fix-proc-macro-tests-on-musl-hosts.patch
new file mode 100644
index 0000000..06eebb9
--- /dev/null
+++ b/dev-lang/rust/files/0007-runtest-Fix-proc-macro-tests-on-musl-hosts.patch
@@ -0,0 +1,37 @@
+From a7c6bcd4834952f3f5b0483dd71b47407d9fb186 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 16 Sep 2018 16:40:04 +0000
+Subject: [PATCH 07/14] runtest: Fix proc-macro tests on musl hosts
+
+---
+ src/tools/compiletest/src/runtest.rs | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
+index 7781ce74f4..5d73545b1f 100644
+--- a/src/tools/compiletest/src/runtest.rs
++++ b/src/tools/compiletest/src/runtest.rs
+@@ -1604,7 +1604,6 @@ impl<'test> TestCx<'test> {
+ None
+ } else if self.config.target.contains("cloudabi")
+ || self.config.target.contains("emscripten")
+- || (self.config.target.contains("musl") && !aux_props.force_host)
+ || self.config.target.contains("wasm32")
+ {
+ // We primarily compile all auxiliary libraries as dynamic libraries
+@@ -1612,10 +1611,8 @@ impl<'test> TestCx<'test> {
+ // for the test suite (otherwise including libstd statically in all
+ // executables takes up quite a bit of space).
+ //
+- // For targets like MUSL or Emscripten, however, there is no support for
+- // dynamic libraries so we just go back to building a normal library. Note,
+- // however, that for MUSL if the library is built with `force_host` then
+- // it's ok to be a dylib as the host should always support dylibs.
++ // For targets like Emscripten, however, there is no support for
++ // dynamic libraries so we just go back to building a normal library.
+ Some("lib")
+ } else {
+ Some("dylib")
+--
+2.21.0
+
diff --git a/dev-lang/rust/files/0008-Correct-minimum-system-LLVM-version-in-tests.patch b/dev-lang/rust/files/0008-Correct-minimum-system-LLVM-version-in-tests.patch
new file mode 100644
index 0000000..1da2bec
--- /dev/null
+++ b/dev-lang/rust/files/0008-Correct-minimum-system-LLVM-version-in-tests.patch
@@ -0,0 +1,206 @@
+From b038aa4b514a520c3ad2a6ab0e518cb8d45c4ca0 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Fri, 22 Mar 2019 17:08:06 -0500
+Subject: [PATCH 08/14] Correct minimum system LLVM version in tests
+
+Since commit 9452a8dfa3ba, the new debug info format is only generated
+for LLVM 8 and newer versions. However, the tests still assume that LLVM
+7 will use the new debug info format. Fix the tests (and a comment in
+the code) to match the actual version check.
+---
+ src/librustc_codegen_llvm/debuginfo/metadata.rs | 8 +++++---
+ src/test/codegen/enum-debug-clike.rs | 2 +-
+ src/test/codegen/enum-debug-niche-2.rs | 2 +-
+ src/test/codegen/enum-debug-niche.rs | 2 +-
+ src/test/codegen/enum-debug-tagged.rs | 2 +-
+ src/test/debuginfo/borrowed-enum.rs | 2 +-
+ .../debuginfo/generic-enum-with-different-disr-sizes.rs | 2 +-
+ src/test/debuginfo/generic-struct-style-enum.rs | 2 +-
+ src/test/debuginfo/generic-tuple-style-enum.rs | 2 +-
+ src/test/debuginfo/recursive-struct.rs | 2 +-
+ src/test/debuginfo/struct-style-enum.rs | 2 +-
+ src/test/debuginfo/tuple-style-enum.rs | 2 +-
+ src/test/debuginfo/unique-enum.rs | 2 +-
+ 13 files changed, 17 insertions(+), 15 deletions(-)
+
+diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs
+index ddcbf29da8..8efa025e3d 100644
+--- a/src/librustc_codegen_llvm/debuginfo/metadata.rs
++++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs
+@@ -1156,12 +1156,14 @@ fn prepare_union_metadata(
+ // Enums
+ //=-----------------------------------------------------------------------------
+
+-// DWARF variant support is only available starting in LLVM 7.
++// DWARF variant support is only available starting in LLVM 8.
+ // Although the earlier enum debug info output did not work properly
+ // in all situations, it is better for the time being to continue to
+ // sometimes emit the old style rather than emit something completely
+-// useless when rust is compiled against LLVM 6 or older. This
+-// function decides which representation will be emitted.
++// useless when rust is compiled against LLVM 6 or older. LLVM 7
++// contains an early version of the DWARF variant support, and will
++// crash when handling the new debug info format. This function
++// decides which representation will be emitted.
+ fn use_enum_fallback(cx: &CodegenCx<'_, '_>) -> bool {
+ // On MSVC we have to use the fallback mode, because LLVM doesn't
+ // lower variant parts to PDB.
+diff --git a/src/test/codegen/enum-debug-clike.rs b/src/test/codegen/enum-debug-clike.rs
+index 62cfef5a84..f268c8bcbc 100644
+--- a/src/test/codegen/enum-debug-clike.rs
++++ b/src/test/codegen/enum-debug-clike.rs
+@@ -4,7 +4,7 @@
+
+ // ignore-tidy-linelength
+ // ignore-windows
+-// min-system-llvm-version 7.0
++// min-system-llvm-version 8.0
+
+ // compile-flags: -g -C no-prepopulate-passes
+
+diff --git a/src/test/codegen/enum-debug-niche-2.rs b/src/test/codegen/enum-debug-niche-2.rs
+index 369fa1fcfd..aa6cbf66b4 100644
+--- a/src/test/codegen/enum-debug-niche-2.rs
++++ b/src/test/codegen/enum-debug-niche-2.rs
+@@ -4,7 +4,7 @@
+
+ // ignore-tidy-linelength
+ // ignore-windows
+-// min-system-llvm-version 7.0
++// min-system-llvm-version 8.0
+
+ // compile-flags: -g -C no-prepopulate-passes
+
+diff --git a/src/test/codegen/enum-debug-niche.rs b/src/test/codegen/enum-debug-niche.rs
+index 1273a785ba..93eebde7b8 100644
+--- a/src/test/codegen/enum-debug-niche.rs
++++ b/src/test/codegen/enum-debug-niche.rs
+@@ -4,7 +4,7 @@
+
+ // ignore-tidy-linelength
+ // ignore-windows
+-// min-system-llvm-version 7.0
++// min-system-llvm-version 8.0
+
+ // compile-flags: -g -C no-prepopulate-passes
+
+diff --git a/src/test/codegen/enum-debug-tagged.rs b/src/test/codegen/enum-debug-tagged.rs
+index 5c37e40c27..84976ce97a 100644
+--- a/src/test/codegen/enum-debug-tagged.rs
++++ b/src/test/codegen/enum-debug-tagged.rs
+@@ -4,7 +4,7 @@
+
+ // ignore-tidy-linelength
+ // ignore-windows
+-// min-system-llvm-version 7.0
++// min-system-llvm-version 8.0
+
+ // compile-flags: -g -C no-prepopulate-passes
+
+diff --git a/src/test/debuginfo/borrowed-enum.rs b/src/test/debuginfo/borrowed-enum.rs
+index e27a31dd0e..63c11f59c1 100644
+--- a/src/test/debuginfo/borrowed-enum.rs
++++ b/src/test/debuginfo/borrowed-enum.rs
+@@ -1,7 +1,7 @@
+ // ignore-tidy-linelength
+
+ // Require LLVM with DW_TAG_variant_part and a gdb or lldb that can read it.
+-// min-system-llvm-version: 7.0
++// min-system-llvm-version: 8.0
+ // min-gdb-version: 8.2
+ // rust-lldb
+
+diff --git a/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs b/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
+index 9392aa7097..e26294cb73 100644
+--- a/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
++++ b/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
+@@ -3,7 +3,7 @@
+ // min-lldb-version: 310
+
+ // Require LLVM with DW_TAG_variant_part and a gdb that can read it.
+-// min-system-llvm-version: 7.0
++// min-system-llvm-version: 8.0
+ // min-gdb-version: 8.2
+
+ // compile-flags:-g
+diff --git a/src/test/debuginfo/generic-struct-style-enum.rs b/src/test/debuginfo/generic-struct-style-enum.rs
+index 3e59347030..3dc5cb807b 100644
+--- a/src/test/debuginfo/generic-struct-style-enum.rs
++++ b/src/test/debuginfo/generic-struct-style-enum.rs
+@@ -2,7 +2,7 @@
+ // min-lldb-version: 310
+
+ // Require LLVM with DW_TAG_variant_part and a gdb that can read it.
+-// min-system-llvm-version: 7.0
++// min-system-llvm-version: 8.0
+ // min-gdb-version: 8.2
+
+ // compile-flags:-g
+diff --git a/src/test/debuginfo/generic-tuple-style-enum.rs b/src/test/debuginfo/generic-tuple-style-enum.rs
+index 3c136add07..b16634ee6d 100644
+--- a/src/test/debuginfo/generic-tuple-style-enum.rs
++++ b/src/test/debuginfo/generic-tuple-style-enum.rs
+@@ -2,7 +2,7 @@
+
+ // Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
+ // read it.
+-// min-system-llvm-version: 7.0
++// min-system-llvm-version: 8.0
+ // min-gdb-version: 8.2
+ // rust-lldb
+
+diff --git a/src/test/debuginfo/recursive-struct.rs b/src/test/debuginfo/recursive-struct.rs
+index c3d2bea913..8fb83b7956 100644
+--- a/src/test/debuginfo/recursive-struct.rs
++++ b/src/test/debuginfo/recursive-struct.rs
+@@ -2,7 +2,7 @@
+ // ignore-lldb
+
+ // Require LLVM with DW_TAG_variant_part and a gdb that can read it.
+-// min-system-llvm-version: 7.0
++// min-system-llvm-version: 8.0
+ // min-gdb-version: 8.2
+
+ // compile-flags:-g
+diff --git a/src/test/debuginfo/struct-style-enum.rs b/src/test/debuginfo/struct-style-enum.rs
+index 1654c93209..5843b076b1 100644
+--- a/src/test/debuginfo/struct-style-enum.rs
++++ b/src/test/debuginfo/struct-style-enum.rs
+@@ -2,7 +2,7 @@
+
+ // Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
+ // read it.
+-// min-system-llvm-version: 7.0
++// min-system-llvm-version: 8.0
+ // min-gdb-version: 8.2
+ // rust-lldb
+
+diff --git a/src/test/debuginfo/tuple-style-enum.rs b/src/test/debuginfo/tuple-style-enum.rs
+index fd76bcb0af..4d9727a388 100644
+--- a/src/test/debuginfo/tuple-style-enum.rs
++++ b/src/test/debuginfo/tuple-style-enum.rs
+@@ -2,7 +2,7 @@
+
+ // Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
+ // read it.
+-// min-system-llvm-version: 7.0
++// min-system-llvm-version: 8.0
+ // min-gdb-version: 8.2
+ // rust-lldb
+
+diff --git a/src/test/debuginfo/unique-enum.rs b/src/test/debuginfo/unique-enum.rs
+index da0d06213e..32bd93f1ed 100644
+--- a/src/test/debuginfo/unique-enum.rs
++++ b/src/test/debuginfo/unique-enum.rs
+@@ -2,7 +2,7 @@
+
+ // Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
+ // read it.
+-// min-system-llvm-version: 7.0
++// min-system-llvm-version: 8.0
+ // min-gdb-version: 8.2
+ // rust-lldb
+
+--
+2.21.0
+
diff --git a/dev-lang/rust/files/0009-test-use-extern-for-plugins-Don-t-assume-multilib.patch b/dev-lang/rust/files/0009-test-use-extern-for-plugins-Don-t-assume-multilib.patch
new file mode 100644
index 0000000..121e3c8
--- /dev/null
+++ b/dev-lang/rust/files/0009-test-use-extern-for-plugins-Don-t-assume-multilib.patch
@@ -0,0 +1,30 @@
+From ecfd3927df50b811ef1dff61abbdeed15daf7cd2 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sat, 6 Oct 2018 04:01:48 +0000
+Subject: [PATCH 09/14] 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 3976da3113..567a8d3157 100644
+--- a/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile
++++ b/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile
+@@ -5,12 +5,7 @@
+ # ignore-bitrig
+ # 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.21.0
+
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
new file mode 100644
index 0000000..029544a
--- /dev/null
+++ b/dev-lang/rust/files/0010-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
@@ -0,0 +1,25 @@
+From 91e0c28a5642ef1eead598910e4a6bff071c9a4d 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/14] 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 a35174b3c2..9e77070685 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:
+- python2.7 test.py
++ env '$(HOST_RPATH_ENV)' python2.7 test.py
+--
+2.21.0
+
diff --git a/dev-lang/rust/files/0011-Ignore-broken-and-non-applicable-tests.patch b/dev-lang/rust/files/0011-Ignore-broken-and-non-applicable-tests.patch
new file mode 100644
index 0000000..59d6b71
--- /dev/null
+++ b/dev-lang/rust/files/0011-Ignore-broken-and-non-applicable-tests.patch
@@ -0,0 +1,104 @@
+From 0495caf6d9c4745ba3cedbdbb4dd690571e1cec0 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 16 Sep 2018 16:38:48 +0000
+Subject: [PATCH 11/14] 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
+simd-intrinsic-generic-select.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/run-pass/env-funky-keys.rs | 1 +
+ src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs | 2 ++
+ src/test/run-pass/simd/simd-intrinsic-generic-select.rs | 2 ++
+ 7 files changed, 12 insertions(+)
+
+diff --git a/src/test/codegen/sparc-struct-abi.rs b/src/test/codegen/sparc-struct-abi.rs
+index 78e5b14a21..6f93e93286 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 f124ca2ab6..363b18f098 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 5876fbc94b..5f167ece1a 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 9e77070685..6d92ec5cec 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/run-pass/env-funky-keys.rs b/src/test/run-pass/env-funky-keys.rs
+index 79f32bd6c2..fc171687c9 100644
+--- a/src/test/run-pass/env-funky-keys.rs
++++ b/src/test/run-pass/env-funky-keys.rs
+@@ -1,5 +1,6 @@
+ // Ignore this test on Android, because it segfaults there.
+
++// ignore-test
+ // ignore-android
+ // ignore-windows
+ // ignore-cloudabi no execve
+diff --git a/src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs b/src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs
+index b28f742a92..3ee4ccce73 100644
+--- a/src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs
++++ b/src/test/run-pass/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.
+
+diff --git a/src/test/run-pass/simd/simd-intrinsic-generic-select.rs b/src/test/run-pass/simd/simd-intrinsic-generic-select.rs
+index f79b140494..39080c8c90 100644
+--- a/src/test/run-pass/simd/simd-intrinsic-generic-select.rs
++++ b/src/test/run-pass/simd/simd-intrinsic-generic-select.rs
+@@ -2,6 +2,8 @@
+ #![allow(non_camel_case_types)]
+
+ // ignore-emscripten
++// ignore-powerpc
++// ignore-powerpc64
+
+ // Test that the simd_select intrinsics produces correct results.
+
+--
+2.21.0
+
diff --git a/dev-lang/rust/files/0012-Link-stage-2-tools-dynamically-to-libstd.patch b/dev-lang/rust/files/0012-Link-stage-2-tools-dynamically-to-libstd.patch
new file mode 100644
index 0000000..e4cac48
--- /dev/null
+++ b/dev-lang/rust/files/0012-Link-stage-2-tools-dynamically-to-libstd.patch
@@ -0,0 +1,27 @@
+From d7e94a443cd0876d384ccbc36a6eb21cfc3636d4 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Mon, 24 Sep 2018 23:42:23 +0000
+Subject: [PATCH 12/14] Link stage 2 tools dynamically to libstd
+
+---
+ src/bootstrap/tool.rs | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
+index fc1a17d546..880c2d52ba 100644
+--- a/src/bootstrap/tool.rs
++++ b/src/bootstrap/tool.rs
+@@ -207,7 +207,9 @@ pub fn prepare_tool_cargo(
+
+ // We don't want to build tools dynamically as they'll be running across
+ // stages and such and it's just easier if they're not dynamically linked.
+- cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
++ if compiler.stage < 2 {
++ cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
++ }
+
+ if source_type == SourceType::Submodule {
+ cargo.env("RUSTC_EXTERNAL_TOOL", "1");
+--
+2.21.0
+
diff --git a/dev-lang/rust/files/0013-Move-debugger-scripts-to-usr-share-rust.patch b/dev-lang/rust/files/0013-Move-debugger-scripts-to-usr-share-rust.patch
new file mode 100644
index 0000000..8f5b2fb
--- /dev/null
+++ b/dev-lang/rust/files/0013-Move-debugger-scripts-to-usr-share-rust.patch
@@ -0,0 +1,53 @@
+From b3b713b954619af8768ad21bd73700291e9d7b58 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Mon, 17 Sep 2018 02:09:10 +0000
+Subject: [PATCH 13/14] Move debugger scripts to /usr/share/rust
+
+---
+ src/bootstrap/dist.rs | 2 +-
+ src/etc/rust-gdb | 2 +-
+ src/etc/rust-lldb | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
+index 2dae3f9135..642e4bfba8 100644
+--- a/src/bootstrap/dist.rs
++++ b/src/bootstrap/dist.rs
+@@ -595,7 +595,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 23ba93da8e..dc51b16c57 100755
+--- a/src/etc/rust-gdb
++++ b/src/etc/rust-gdb
+@@ -4,7 +4,7 @@ set -e
+
+ # 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-lldb b/src/etc/rust-lldb
+index 424302d495..460e119210 100755
+--- a/src/etc/rust-lldb
++++ b/src/etc/rust-lldb
+@@ -26,7 +26,7 @@ display the contents of local variables!"
+ fi
+
+ # Prepare commands that will be loaded before any file on the command line has been loaded
+-script_import="command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_rust_formatters.py\""
++script_import="command script import \"$RUSTC_SYSROOT/share/rust/lldb_rust_formatters.py\""
+ category_definition="type summary add --no-value --python-function lldb_rust_formatters.print_val -x \".*\" --category Rust"
+ category_enable="type category enable Rust"
+
+--
+2.21.0
+
diff --git a/dev-lang/rust/files/0014-Add-gentoo-target-specs.patch b/dev-lang/rust/files/0014-Add-gentoo-target-specs.patch
new file mode 100644
index 0000000..36afe06
--- /dev/null
+++ b/dev-lang/rust/files/0014-Add-gentoo-target-specs.patch
@@ -0,0 +1,179 @@
+From d4b28cd40d12ef2a801658176b31c6663c25d66f Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Mon, 17 Sep 2018 02:29:06 +0000
+Subject: [PATCH 14/14] Add gentoo target specs
+
+---
+ .../spec/aarch64_gentoo_linux_musl.rs | 11 +++++++++++
+ .../spec/arm_gentoo_linux_musleabi.rs | 11 +++++++++++
+ .../spec/armv7a_gentoo_linux_musleabihf.rs | 11 +++++++++++
+ src/librustc_target/spec/i686_gentoo_linux_musl.rs | 13 +++++++++++++
+ src/librustc_target/spec/mod.rs | 11 ++++++++++-
+ .../spec/powerpc64_gentoo_linux_musl.rs | 11 +++++++++++
+ .../spec/powerpc_gentoo_linux_musl.rs | 13 +++++++++++++
+ .../spec/x86_64_gentoo_linux_musl.rs | 11 +++++++++++
+ 8 files changed, 91 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 0000000000..420fe7cde7
+--- /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 0000000000..d47ca84164
+--- /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 0000000000..f5c85855c1
+--- /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 0000000000..be4d7b8523
+--- /dev/null
++++ b/src/librustc_target/spec/i686_gentoo_linux_musl.rs
+@@ -0,0 +1,13 @@
++use crate::spec::{LinkerFlavor, 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;
++ base.options.post_link_args.insert(LinkerFlavor::Gcc,
++ vec!["-Wl,--as-needed".to_string(), "-lssp_nonshared".to_string()]);
++
++ Ok(base)
++}
+diff --git a/src/librustc_target/spec/mod.rs b/src/librustc_target/spec/mod.rs
+index bef2afc7b6..42bd26ce0c 100644
+--- a/src/librustc_target/spec/mod.rs
++++ b/src/librustc_target/spec/mod.rs
+@@ -327,7 +327,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),
+@@ -348,7 +358,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 0000000000..e840bb27bb
+--- /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 0000000000..905c5214d4
+--- /dev/null
++++ b/src/librustc_target/spec/powerpc_gentoo_linux_musl.rs
+@@ -0,0 +1,13 @@
++use crate::spec::{LinkerFlavor, 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;
++ base.options.post_link_args.insert(LinkerFlavor::Gcc,
++ vec!["-Wl,--as-needed".to_string(), "-lssp_nonshared".to_string()]);
++
++ 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 0000000000..f33047358b
+--- /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.21.0
+
diff --git a/dev-lang/rust/files/0030-liblibc-linkage.patch b/dev-lang/rust/files/0030-liblibc-linkage.patch
new file mode 100644
index 0000000..6863209
--- /dev/null
+++ b/dev-lang/rust/files/0030-liblibc-linkage.patch
@@ -0,0 +1,33 @@
+--- rustc-1.34.2-src/vendor/libc/src/lib.rs
++++ rustc-1.34.2-src/vendor/libc/src/lib.rs
+@@ -153,6 +153,7 @@
+ #![cfg_attr(feature = "rustc-dep-of-std", feature(cfg_target_vendor))]
+ #![cfg_attr(feature = "rustc-dep-of-std", feature(link_cfg, repr_packed))]
+ #![cfg_attr(feature = "rustc-dep-of-std", feature(no_core))]
++#![cfg_attr(feature = "rustc-dep-of-std", feature(static_nobundle))]
+ #![cfg_attr(feature = "rustc-dep-of-std", no_core)]
+ #![cfg_attr(feature = "rustc-dep-of-std", allow(warnings))]
+ #![cfg_attr(not(any(feature = "use_std", feature = "rustc-dep-of-std")), no_std)]
+--- rustc-1.34.2-src/vendor/libc/src/unix/mod.rs
++++ rustc-1.34.2-src/vendor/libc/src/unix/mod.rs
+@@ -287,11 +287,11 @@ cfg_if! {
+ // cargo build, don't pull in anything extra as the libstd dep
+ // already pulls in all libs.
+ } else if #[cfg(target_env = "musl")] {
++ #[link(name = "c")]
++ extern {}
+ #[cfg_attr(feature = "rustc-dep-of-std",
+- link(name = "c", kind = "static",
++ link(name = "gcc", kind = "static-nobundle",
+ cfg(target_feature = "crt-static")))]
+- #[cfg_attr(feature = "rustc-dep-of-std",
+- link(name = "c", cfg(not(target_feature = "crt-static"))))]
+ extern {}
+ } else if #[cfg(target_os = "emscripten")] {
+ #[link(name = "c")]
+--- rustc-1.34.2-src/vendor/libc/.cargo-checksum.json
++++ rustc-1.34.2-src/vendor/libc/.cargo-checksum.json
+@@ -1 +1 @@
+-{"files":{"Cargo.toml":"e1bbf88a55a1ba674f5192fe1585b57a51751ee6c5aa7edeb87df8027c3bb912","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"40ddea9181e5374cf535aae33ad4ace80bd9b1beea8f881ff8d2b777da9489b2","build.rs":"2d1cbe87e0478de12a15a230d7ef0997020ba845b5b7d221d74cd2ce3fe0e720","src/cloudabi/aarch64.rs":"b8550bf1fd7344972aa4db29441486f39f31482d0327534981dbb75959c29114","src/cloudabi/arm.rs":"c197e2781c2839808bd6fcef219a29705b27b992d3ef920e9cf6ac96e2022bbf","src/cloudabi/mod.rs":"640375751825b8d4adf4fb089a53c4d883f265f96b07daf06f2dcf3acf6639c9","src/cloudabi/x86.rs":"33eb97f272d2201f3838ae74d444583c7de8f67856852ca375293b20bbd05636","src/cloudabi/x86_64.rs":"400d85d4fe39e26cf2e6ece9ee31c75fe9e88c4bcf4d836ca9f765c05c9c5be3","src/dox.rs":"b4b96dcba47797a6160c07f29982dd15d48fd2813d7d1000484bd9adc4a89de1","src/fuchsia/aarch64.rs":"40dce617877e606e92353491e1
913711b1ecfa510bb983156f4a8460f490419e","src/fuchsia/mod.rs":"784dee21605f00a41d7cae1fc3d782646a84515a687a4952700eae51cc3840f0","src/fuchsia/x86_64.rs":"b4a3eff94dcf1ffe41e6500468ca2cff0e97ddbcc75fe079b6ac7adb1e493f56","src/lib.rs":"d456d34fc58c8d194f8f24201b4021860f61c5f125904bb8dcc954d1f813f6b7","src/macros.rs":"29d61c13523328c4742a7290dbb7d718ce198740824592e029199e9df5429b20","src/redox/mod.rs":"87cb35a988be84d45e79206f7cb5d098e8e7c5a1825cfcd0bd663453dedc3103","src/redox/net.rs":"f2e1922883f208cb46c00744da4a68feccfbec576c6981978ad404e46f818c8b","src/sgx.rs":"18d33a470d06c15b00be5a3bf45b6e51da6104ae7437f50c0eccbd3b79994389","src/switch.rs":"00365ed196519b260fc99a32f02d60b3fb1aaf0484654b19fec8c25bc1687420","src/unix/bsd/apple/b32.rs":"da60c99ee3d773f9c0767b93ccf18b67ad67576e2c58e2e86d05b23c23fd989a","src/unix/bsd/apple/b64.rs":"0cc15406c3a91abde65b28c7783ccab7801474ecc51c78dbd1d7332d4b834390","src/unix/bsd/apple/mod.rs":"b0e2d1f7fdb71d7a02bc5994c66a5ae660955227a0c0f808172a30b38fd40
299","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"6c69319675328d4d16939c9c2aba3fb8ca9381a8b390d18d766949307090304b","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"97132e2097411034271b8c927ecc94a208a361564680972a6c82998bd30a9826","src/unix/bsd/freebsdlike/freebsd/mod.rs":"6bbb3c3cf0753f32a2e61ac0f011a6c5e870a0814a6ed4eb9bb9dcdc58a9dca3","src/unix/bsd/freebsdlike/freebsd/x86.rs":"54311d3ebf2bb091ab22361e377e6ef9224aec2ecfe459fbfcedde4932db9c58","src/unix/bsd/freebsdlike/freebsd/x86_64.rs":"97132e2097411034271b8c927ecc94a208a361564680972a6c82998bd30a9826","src/unix/bsd/freebsdlike/mod.rs":"596def64669e2f27cffebca8e5c682ee7d576f84f8f99771c27e86ce8e818221","src/unix/bsd/mod.rs":"0c846b3a2c9390dfe090603f1ad643b107cc7e7605866c5399aa81dfea4e74bd","src/unix/bsd/netbsdlike/mod.rs":"9f55f35f8e4e26c7c63eaf67ddda0e40cc2abbabc2a68750809162e6f80144f1","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"f455848cd03cb80897776f2355dbd14bbb3aa88b1aa6aec22122ec47cdbd0f20","src/unix/bsd/netbsdlike/netbsd/arm.r
s":"4c9eac982c385165f475ef3a80770fd634c6dde8fb400b3cb7e08c9bb7498af6","src/unix/bsd/netbsdlike/netbsd/mod.rs":"88617ada3bc740c5262926b9c45d7f51120d358522f051f0afdf7465edd13c29","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"183818c62dff72db6ee1d329d90ad8727628775ed5cd823c8485c6769003c91e","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"4db043327fb2615af2fb0f999d162310bea2294e7d050806e19a46b083561f16","src/unix/bsd/netbsdlike/netbsd/x86.rs":"979c4cbacbde37b9053f2c9df4b8f87d37b255436ef4a383e1e5f40ee21180d6","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"741353a1c6451efb0c7c7c486fd2cb54e3d36fd1c3dd280f6432d8858b0a5356","src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs":"4d2ad2e885d83ad3134add61580f49a8e58cb03284ae328273a9e2e104a4d084","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs":"6e6f15e81597d85d83ca0eeb154e4f8b8e7f9cbb6a9cfa176601f78642ef94f9","src/unix/bsd/netbsdl
ike/openbsdlike/mod.rs":"6320b7bc7283dbc2a07cfb8b5a793c0153535601d050f33c1ff5e4a5cc57c2be","src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs":"820092e397c7ec259cd2de8f2444083a8e57071c02d73d678701dfa7807726e9","src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs":"6adc0dcb1b358ef91bbeb5512e19ba6f40adc77b7d259cb11641a69426fc5ea2","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs":"44b7ea81cf363777b29935da175e702cbf45ed78f7498ae57faf44aa32335085","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs":"97956c3a53aa07a2edf8865252f980dade0d34e930adca0e870e7344d7e2b0bb","src/unix/haiku/b32.rs":"69ae47fc52c6880e85416b4744500d5655c9ec6131cb737f3b649fceaadce15a","src/unix/haiku/b64.rs":"73e64db09275a8da8d50a13cce2cfa2b136036ddf3a930d2939f337fc995900b","src/unix/haiku/mod.rs":"b00fa310b6d835cb613a02101c7b1a72c636faec316586587cb63aebdcb9de8f","src/unix/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/unix/hermit/mod.rs":"248c0b0abaa7d56a7dc3293e
67a0ce70a4ef8c83638bda8aa222ad8bb0ef6801","src/unix/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/unix/mod.rs":"c5f3c6d74ac8e8ef83374b6115bab7c6e57297336a7635aa4c47462649b00dfb","src/unix/newlib/aarch64/mod.rs":"c408a990f22fb4292a824f38367e9b517e6e6f8623328397ee631cc88b3d1f7d","src/unix/newlib/arm/mod.rs":"2b6dba2e697ab9b4f4bc4dd5f28057249e9b596d1cb395a9322ec87605c4a5c4","src/unix/newlib/mod.rs":"eea5f1eb720184d9a00be966e4161fddb3733362fc349182e85b1599ba4e825f","src/unix/notbsd/android/b32/arm.rs":"3625a32c7e58cfe683a53486fbe3d42d4e28f00bea31e19cb46ed2bb0b6a140b","src/unix/notbsd/android/b32/mod.rs":"2fbe398c1fb5251dda6213741a193e50aae4622807cb255d1dd2e82b536f0c65","src/unix/notbsd/android/b32/x86.rs":"ae2b7f1d6278caddc007749bb1d09ca33f7593478a0fd7fe98b457dae86c7814","src/unix/notbsd/android/b64/aarch64.rs":"63d65629d79371814910f691672ef593d20244ee09be26f1ebe07ee6212d0163","src/unix/notbsd/android/b64/mod.rs":"90d4f6b063fd4de42fd302cbc9d99
02fd99ac1d71dc48cb8bc6ad7b4c902e481","src/unix/notbsd/android/b64/x86_64.rs":"5547aef8dcbaa5a932559f34606fd8d89f6c9c15173d2b1412c12d39b3c1045f","src/unix/notbsd/android/mod.rs":"19013f41ac8ccac034eb48777a4041d69342edb9ca25d4e0bb9c5938f62eef3e","src/unix/notbsd/emscripten.rs":"9ed47a0a5020c8f72d9496f87ef0da669c1ed2b85980013100c466f18cd8a4c5","src/unix/notbsd/linux/mips/mips32.rs":"a483ddfd10765b7d5090dc21686eee8842649cd21236828a42d634114885f5f9","src/unix/notbsd/linux/mips/mips64.rs":"9fff696e3943cf206b549d1ae13fa361828e9a8454e2d5730eeaa1c172ff370d","src/unix/notbsd/linux/mips/mod.rs":"d18a40011e9090a4a2a1f27e5bd96eb2503ac352f4809648e15841083d7f3a68","src/unix/notbsd/linux/mod.rs":"d84e95d36f9477fa1aa694bf18a919ba20e65aa71539c3f3dc06e8f92acee521","src/unix/notbsd/linux/musl/b32/arm.rs":"fdf170e03812072785ec531f1ae810d0c4feb9b29d0c316681b9f7affe1262c0","src/unix/notbsd/linux/musl/b32/mips.rs":"afa4981d93f29b3fb0083a73ce1323f7dce1392f90d5cf1966b1fae10d510033","src/unix/notbsd/linux/mus
l/b32/mod.rs":"540928f168f145c136f9dd729ffa12b9d1838d9fe664fc642365d17d7fae648f","src/unix/notbsd/linux/musl/b32/powerpc.rs":"16c615770a96f155540511f58b5a8070c9c7a43e12bdfed83996690e7558bcb5","src/unix/notbsd/linux/musl/b32/x86.rs":"3abf1610c68c37f407cdd0f93563c3542c024219e0e8c9888266a6ee014e0c87","src/unix/notbsd/linux/musl/b64/aarch64.rs":"d98643408c2837387988f78adc95c90ad21196a6f8f879e3d33d7e8ccf612640","src/unix/notbsd/linux/musl/b64/mod.rs":"d9285cd705e2e92552a08c9aa69b810e7e1bd0e9da6edf069c678af285579661","src/unix/notbsd/linux/musl/b64/powerpc64.rs":"544d8a7f6d6d84143df8a4c3537c9a3a36bf3d338d7a1c15689b94492498d8d7","src/unix/notbsd/linux/musl/b64/x86_64.rs":"25340999290a63d564ec149532c905f59c312ec369f8806d6b15df66fa1b8857","src/unix/notbsd/linux/musl/mod.rs":"4e582af62a11e8a5235ccbeabe5b1003fc17705e606c1ed9b21b931a470681fc","src/unix/notbsd/linux/other/b32/arm.rs":"d9892f7350b2978335f734f1cd2d7fed60f0f2e66aa05bee3f69549c031f8b14","src/unix/notbsd/linux/other/b32/mod.rs":"2621
1878c6481861e11393625620edaa0700cac41f55f0118c0f0bd42c1b7520","src/unix/notbsd/linux/other/b32/powerpc.rs":"253fcd2f9978525285be1903cc08f3fec2dc3b12d1660a33e2995b4f6b810d1c","src/unix/notbsd/linux/other/b32/x86.rs":"49376e3ed0f3ff95c230ac20751911fe3c608dfe15c7c118b069fd7a954d8db9","src/unix/notbsd/linux/other/b64/aarch64.rs":"1124ab5e974718b94fa40ae0f1772fb1c537910ef3e018b7c6c94a38b83dd742","src/unix/notbsd/linux/other/b64/mod.rs":"63e1a3fdf5f4d1b9820934ab344c91aed5e458e7e05908535d2e942d51a08bf8","src/unix/notbsd/linux/other/b64/not_x32.rs":"fa8636fb93eab230ed53bdec0a06f5b81d6d982cc0800103563c8c1eefcdb2d9","src/unix/notbsd/linux/other/b64/powerpc64.rs":"a771d982ed8a9458e1f2f039f959b5075b22443159875ba5612eebba96661c24","src/unix/notbsd/linux/other/b64/sparc64.rs":"0caffe5924886f3aed187531dfe78189b3df40adb96782ec4b471647ff83e9b1","src/unix/notbsd/linux/other/b64/x32.rs":"06a26c5120ced30fc015c220799b67c4401be2f13fc6c7361bebd3d37ff4982d","src/unix/notbsd/linux/other/b64/x86_64.rs":"70d0
cec088630502128c1c28ffef9dcc0fd9c0644f6a71b1325961d075625226","src/unix/notbsd/linux/other/mod.rs":"fe76beac87fc549b076078a0fa3e2ecd4c13b0e6e4fcb34a89e16c6584f5259b","src/unix/notbsd/linux/s390x.rs":"9e990574dfc22b6eb91bcc7c6f8297f9ad42f9183efb366a818be88180a3fac3","src/unix/notbsd/mod.rs":"a0fdecac118b70fb670f0fcccaa7f826440873448a96dd557fb1fe52cf391e89","src/unix/solaris/mod.rs":"7950a26f3eb0b7bc8e71f524cc2e05832b759fe2ce12a58e0c1957e0ec1286dc","src/unix/uclibc/mips/mips32.rs":"9739c5fb47f389a0394ef08ee30da97a3de0a1300020731a8cc0a033616011b2","src/unix/uclibc/mips/mips64.rs":"230583280bbc7b3c7fcdb61244f51fa1af5944ca127c7cf83c598fe2313713d0","src/unix/uclibc/mips/mod.rs":"2d76e6cfeb2b7f7c59231a6e099f1aed811a45659e62153aaf00c220b9488a9d","src/unix/uclibc/mod.rs":"521818507cef958376edfd8401c35db7ee1c51ee3cf106ad962002104a184cf5","src/unix/uclibc/x86_64/l4re.rs":"68fd3a833fd1f7caf784a084224f384bdbdfb8b5a14ef94c4f5155409afb3439","src/unix/uclibc/x86_64/mod.rs":"419182836aedd426a5c9e6b8
667058adf86ac8f43af73ce8d00c503f8ff8f414","src/unix/uclibc/x86_64/other.rs":"f03b47842896f2f3ae6f8ebdcbcf0276454f880349d9cf00e3d304f8136893c5","src/windows/gnu.rs":"4d9033162cc6f7d245256c7b165c1ec18a741771fd9b99a55b421e8d14978599","src/windows/mod.rs":"7d74b12f71de86ee517a9cd93b1b38d0551646db0eaf526048abcbdd4bbeb250","src/windows/msvc.rs":"8f46cf66883c794175609a3b2bafaa094d0ba63eb6720ef1b84b175603f1074f"},"package":"023a4cd09b2ff695f9734c1934145a315594b7986398496841c7031a5a1bbdbd"}
+\ No newline at end of file
++{"files":{"Cargo.toml":"e1bbf88a55a1ba674f5192fe1585b57a51751ee6c5aa7edeb87df8027c3bb912","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"40ddea9181e5374cf535aae33ad4ace80bd9b1beea8f881ff8d2b777da9489b2","build.rs":"2d1cbe87e0478de12a15a230d7ef0997020ba845b5b7d221d74cd2ce3fe0e720","src/cloudabi/aarch64.rs":"b8550bf1fd7344972aa4db29441486f39f31482d0327534981dbb75959c29114","src/cloudabi/arm.rs":"c197e2781c2839808bd6fcef219a29705b27b992d3ef920e9cf6ac96e2022bbf","src/cloudabi/mod.rs":"640375751825b8d4adf4fb089a53c4d883f265f96b07daf06f2dcf3acf6639c9","src/cloudabi/x86.rs":"33eb97f272d2201f3838ae74d444583c7de8f67856852ca375293b20bbd05636","src/cloudabi/x86_64.rs":"400d85d4fe39e26cf2e6ece9ee31c75fe9e88c4bcf4d836ca9f765c05c9c5be3","src/dox.rs":"b4b96dcba47797a6160c07f29982dd15d48fd2813d7d1000484bd9adc4a89de1","src/fuchsia/aarch64.rs":"40dce617877e606e92353491e1
913711b1ecfa510bb983156f4a8460f490419e","src/fuchsia/mod.rs":"784dee21605f00a41d7cae1fc3d782646a84515a687a4952700eae51cc3840f0","src/fuchsia/x86_64.rs":"b4a3eff94dcf1ffe41e6500468ca2cff0e97ddbcc75fe079b6ac7adb1e493f56","src/lib.rs":"69850cc2630e101768e05f78b35a0ee29875c519eb4817d5bd2c1d542fae8c1d","src/macros.rs":"29d61c13523328c4742a7290dbb7d718ce198740824592e029199e9df5429b20","src/redox/mod.rs":"87cb35a988be84d45e79206f7cb5d098e8e7c5a1825cfcd0bd663453dedc3103","src/redox/net.rs":"f2e1922883f208cb46c00744da4a68feccfbec576c6981978ad404e46f818c8b","src/sgx.rs":"18d33a470d06c15b00be5a3bf45b6e51da6104ae7437f50c0eccbd3b79994389","src/switch.rs":"00365ed196519b260fc99a32f02d60b3fb1aaf0484654b19fec8c25bc1687420","src/unix/bsd/apple/b32.rs":"da60c99ee3d773f9c0767b93ccf18b67ad67576e2c58e2e86d05b23c23fd989a","src/unix/bsd/apple/b64.rs":"0cc15406c3a91abde65b28c7783ccab7801474ecc51c78dbd1d7332d4b834390","src/unix/bsd/apple/mod.rs":"b0e2d1f7fdb71d7a02bc5994c66a5ae660955227a0c0f808172a30b38fd40
299","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"6c69319675328d4d16939c9c2aba3fb8ca9381a8b390d18d766949307090304b","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"97132e2097411034271b8c927ecc94a208a361564680972a6c82998bd30a9826","src/unix/bsd/freebsdlike/freebsd/mod.rs":"6bbb3c3cf0753f32a2e61ac0f011a6c5e870a0814a6ed4eb9bb9dcdc58a9dca3","src/unix/bsd/freebsdlike/freebsd/x86.rs":"54311d3ebf2bb091ab22361e377e6ef9224aec2ecfe459fbfcedde4932db9c58","src/unix/bsd/freebsdlike/freebsd/x86_64.rs":"97132e2097411034271b8c927ecc94a208a361564680972a6c82998bd30a9826","src/unix/bsd/freebsdlike/mod.rs":"596def64669e2f27cffebca8e5c682ee7d576f84f8f99771c27e86ce8e818221","src/unix/bsd/mod.rs":"0c846b3a2c9390dfe090603f1ad643b107cc7e7605866c5399aa81dfea4e74bd","src/unix/bsd/netbsdlike/mod.rs":"9f55f35f8e4e26c7c63eaf67ddda0e40cc2abbabc2a68750809162e6f80144f1","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"f455848cd03cb80897776f2355dbd14bbb3aa88b1aa6aec22122ec47cdbd0f20","src/unix/bsd/netbsdlike/netbsd/arm.r
s":"4c9eac982c385165f475ef3a80770fd634c6dde8fb400b3cb7e08c9bb7498af6","src/unix/bsd/netbsdlike/netbsd/mod.rs":"88617ada3bc740c5262926b9c45d7f51120d358522f051f0afdf7465edd13c29","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"183818c62dff72db6ee1d329d90ad8727628775ed5cd823c8485c6769003c91e","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"4db043327fb2615af2fb0f999d162310bea2294e7d050806e19a46b083561f16","src/unix/bsd/netbsdlike/netbsd/x86.rs":"979c4cbacbde37b9053f2c9df4b8f87d37b255436ef4a383e1e5f40ee21180d6","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"741353a1c6451efb0c7c7c486fd2cb54e3d36fd1c3dd280f6432d8858b0a5356","src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs":"4d2ad2e885d83ad3134add61580f49a8e58cb03284ae328273a9e2e104a4d084","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs":"6e6f15e81597d85d83ca0eeb154e4f8b8e7f9cbb6a9cfa176601f78642ef94f9","src/unix/bsd/netbsdl
ike/openbsdlike/mod.rs":"6320b7bc7283dbc2a07cfb8b5a793c0153535601d050f33c1ff5e4a5cc57c2be","src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs":"820092e397c7ec259cd2de8f2444083a8e57071c02d73d678701dfa7807726e9","src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs":"6adc0dcb1b358ef91bbeb5512e19ba6f40adc77b7d259cb11641a69426fc5ea2","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs":"44b7ea81cf363777b29935da175e702cbf45ed78f7498ae57faf44aa32335085","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs":"97956c3a53aa07a2edf8865252f980dade0d34e930adca0e870e7344d7e2b0bb","src/unix/haiku/b32.rs":"69ae47fc52c6880e85416b4744500d5655c9ec6131cb737f3b649fceaadce15a","src/unix/haiku/b64.rs":"73e64db09275a8da8d50a13cce2cfa2b136036ddf3a930d2939f337fc995900b","src/unix/haiku/mod.rs":"b00fa310b6d835cb613a02101c7b1a72c636faec316586587cb63aebdcb9de8f","src/unix/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/unix/hermit/mod.rs":"248c0b0abaa7d56a7dc3293e
67a0ce70a4ef8c83638bda8aa222ad8bb0ef6801","src/unix/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/unix/mod.rs":"3c5aad2e7ac5e8781158cd140ed07afb1e0ad5eb7fc4b7b0a7bf7f5d8d2ebe32","src/unix/newlib/aarch64/mod.rs":"c408a990f22fb4292a824f38367e9b517e6e6f8623328397ee631cc88b3d1f7d","src/unix/newlib/arm/mod.rs":"2b6dba2e697ab9b4f4bc4dd5f28057249e9b596d1cb395a9322ec87605c4a5c4","src/unix/newlib/mod.rs":"eea5f1eb720184d9a00be966e4161fddb3733362fc349182e85b1599ba4e825f","src/unix/notbsd/android/b32/arm.rs":"3625a32c7e58cfe683a53486fbe3d42d4e28f00bea31e19cb46ed2bb0b6a140b","src/unix/notbsd/android/b32/mod.rs":"2fbe398c1fb5251dda6213741a193e50aae4622807cb255d1dd2e82b536f0c65","src/unix/notbsd/android/b32/x86.rs":"ae2b7f1d6278caddc007749bb1d09ca33f7593478a0fd7fe98b457dae86c7814","src/unix/notbsd/android/b64/aarch64.rs":"63d65629d79371814910f691672ef593d20244ee09be26f1ebe07ee6212d0163","src/unix/notbsd/android/b64/mod.rs":"90d4f6b063fd4de42fd302cbc9d99
02fd99ac1d71dc48cb8bc6ad7b4c902e481","src/unix/notbsd/android/b64/x86_64.rs":"5547aef8dcbaa5a932559f34606fd8d89f6c9c15173d2b1412c12d39b3c1045f","src/unix/notbsd/android/mod.rs":"19013f41ac8ccac034eb48777a4041d69342edb9ca25d4e0bb9c5938f62eef3e","src/unix/notbsd/emscripten.rs":"9ed47a0a5020c8f72d9496f87ef0da669c1ed2b85980013100c466f18cd8a4c5","src/unix/notbsd/linux/mips/mips32.rs":"a483ddfd10765b7d5090dc21686eee8842649cd21236828a42d634114885f5f9","src/unix/notbsd/linux/mips/mips64.rs":"9fff696e3943cf206b549d1ae13fa361828e9a8454e2d5730eeaa1c172ff370d","src/unix/notbsd/linux/mips/mod.rs":"d18a40011e9090a4a2a1f27e5bd96eb2503ac352f4809648e15841083d7f3a68","src/unix/notbsd/linux/mod.rs":"d84e95d36f9477fa1aa694bf18a919ba20e65aa71539c3f3dc06e8f92acee521","src/unix/notbsd/linux/musl/b32/arm.rs":"fdf170e03812072785ec531f1ae810d0c4feb9b29d0c316681b9f7affe1262c0","src/unix/notbsd/linux/musl/b32/mips.rs":"afa4981d93f29b3fb0083a73ce1323f7dce1392f90d5cf1966b1fae10d510033","src/unix/notbsd/linux/mus
l/b32/mod.rs":"540928f168f145c136f9dd729ffa12b9d1838d9fe664fc642365d17d7fae648f","src/unix/notbsd/linux/musl/b32/powerpc.rs":"16c615770a96f155540511f58b5a8070c9c7a43e12bdfed83996690e7558bcb5","src/unix/notbsd/linux/musl/b32/x86.rs":"3abf1610c68c37f407cdd0f93563c3542c024219e0e8c9888266a6ee014e0c87","src/unix/notbsd/linux/musl/b64/aarch64.rs":"d98643408c2837387988f78adc95c90ad21196a6f8f879e3d33d7e8ccf612640","src/unix/notbsd/linux/musl/b64/mod.rs":"d9285cd705e2e92552a08c9aa69b810e7e1bd0e9da6edf069c678af285579661","src/unix/notbsd/linux/musl/b64/powerpc64.rs":"544d8a7f6d6d84143df8a4c3537c9a3a36bf3d338d7a1c15689b94492498d8d7","src/unix/notbsd/linux/musl/b64/x86_64.rs":"25340999290a63d564ec149532c905f59c312ec369f8806d6b15df66fa1b8857","src/unix/notbsd/linux/musl/mod.rs":"4e582af62a11e8a5235ccbeabe5b1003fc17705e606c1ed9b21b931a470681fc","src/unix/notbsd/linux/other/b32/arm.rs":"d9892f7350b2978335f734f1cd2d7fed60f0f2e66aa05bee3f69549c031f8b14","src/unix/notbsd/linux/other/b32/mod.rs":"2621
1878c6481861e11393625620edaa0700cac41f55f0118c0f0bd42c1b7520","src/unix/notbsd/linux/other/b32/powerpc.rs":"253fcd2f9978525285be1903cc08f3fec2dc3b12d1660a33e2995b4f6b810d1c","src/unix/notbsd/linux/other/b32/x86.rs":"49376e3ed0f3ff95c230ac20751911fe3c608dfe15c7c118b069fd7a954d8db9","src/unix/notbsd/linux/other/b64/aarch64.rs":"1124ab5e974718b94fa40ae0f1772fb1c537910ef3e018b7c6c94a38b83dd742","src/unix/notbsd/linux/other/b64/mod.rs":"63e1a3fdf5f4d1b9820934ab344c91aed5e458e7e05908535d2e942d51a08bf8","src/unix/notbsd/linux/other/b64/not_x32.rs":"fa8636fb93eab230ed53bdec0a06f5b81d6d982cc0800103563c8c1eefcdb2d9","src/unix/notbsd/linux/other/b64/powerpc64.rs":"a771d982ed8a9458e1f2f039f959b5075b22443159875ba5612eebba96661c24","src/unix/notbsd/linux/other/b64/sparc64.rs":"0caffe5924886f3aed187531dfe78189b3df40adb96782ec4b471647ff83e9b1","src/unix/notbsd/linux/other/b64/x32.rs":"06a26c5120ced30fc015c220799b67c4401be2f13fc6c7361bebd3d37ff4982d","src/unix/notbsd/linux/other/b64/x86_64.rs":"70d0
cec088630502128c1c28ffef9dcc0fd9c0644f6a71b1325961d075625226","src/unix/notbsd/linux/other/mod.rs":"fe76beac87fc549b076078a0fa3e2ecd4c13b0e6e4fcb34a89e16c6584f5259b","src/unix/notbsd/linux/s390x.rs":"9e990574dfc22b6eb91bcc7c6f8297f9ad42f9183efb366a818be88180a3fac3","src/unix/notbsd/mod.rs":"a0fdecac118b70fb670f0fcccaa7f826440873448a96dd557fb1fe52cf391e89","src/unix/solaris/mod.rs":"7950a26f3eb0b7bc8e71f524cc2e05832b759fe2ce12a58e0c1957e0ec1286dc","src/unix/uclibc/mips/mips32.rs":"9739c5fb47f389a0394ef08ee30da97a3de0a1300020731a8cc0a033616011b2","src/unix/uclibc/mips/mips64.rs":"230583280bbc7b3c7fcdb61244f51fa1af5944ca127c7cf83c598fe2313713d0","src/unix/uclibc/mips/mod.rs":"2d76e6cfeb2b7f7c59231a6e099f1aed811a45659e62153aaf00c220b9488a9d","src/unix/uclibc/mod.rs":"521818507cef958376edfd8401c35db7ee1c51ee3cf106ad962002104a184cf5","src/unix/uclibc/x86_64/l4re.rs":"68fd3a833fd1f7caf784a084224f384bdbdfb8b5a14ef94c4f5155409afb3439","src/unix/uclibc/x86_64/mod.rs":"419182836aedd426a5c9e6b8
667058adf86ac8f43af73ce8d00c503f8ff8f414","src/unix/uclibc/x86_64/other.rs":"f03b47842896f2f3ae6f8ebdcbcf0276454f880349d9cf00e3d304f8136893c5","src/windows/gnu.rs":"4d9033162cc6f7d245256c7b165c1ec18a741771fd9b99a55b421e8d14978599","src/windows/mod.rs":"7d74b12f71de86ee517a9cd93b1b38d0551646db0eaf526048abcbdd4bbeb250","src/windows/msvc.rs":"8f46cf66883c794175609a3b2bafaa094d0ba63eb6720ef1b84b175603f1074f"},"package":"023a4cd09b2ff695f9734c1934145a315594b7986398496841c7031a5a1bbdbd"}
diff --git a/dev-lang/rust/files/0040-rls-atomics.patch b/dev-lang/rust/files/0040-rls-atomics.patch
new file mode 100644
index 0000000..8e44100
--- /dev/null
+++ b/dev-lang/rust/files/0040-rls-atomics.patch
@@ -0,0 +1,58 @@
+--- a/src/tools/rls/rls/src/cmd.rs
++++ b/src/tools/rls/rls/src/cmd.rs
+@@ -17,7 +17,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,
+@@ -323,8 +323,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.
+--- a/src/tools/rls/rls/src/server/io.rs
++++ b/src/tools/rls/rls/src/server/io.rs
+@@ -17,7 +17,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};
+@@ -182,13 +182,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 {
+ /// Construct 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()) }
+ }
+ }
+
+@@ -205,7 +205,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
new file mode 100644
index 0000000..16f1f28
--- /dev/null
+++ b/dev-lang/rust/files/0050-llvm.patch
@@ -0,0 +1,20 @@
+diff --git a/src/llvm-project/llvm/include/llvm/Analysis/TargetLibraryInfo.def b/src/llvm-project/llvm/include/llvm/Analysis/TargetLibraryInfo.def
+index 579d23004d1..6cd9d2722fb 100644
+--- a/src/llvm-project/llvm/include/llvm/Analysis/TargetLibraryInfo.def
++++ b/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-D45520.patch b/dev-lang/rust/files/0051-llvm-D45520.patch
new file mode 100644
index 0000000..275f03b
--- /dev/null
+++ b/dev-lang/rust/files/0051-llvm-D45520.patch
@@ -0,0 +1,101 @@
+Index: rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
+===================================================================
+--- rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
++++ rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
+@@ -442,13 +442,22 @@
+ // On PPC64, VariantKind is VK_None, but on PPC32, it's VK_PLT, and it must
+ // come at the _end_ of the expression.
+ const MCOperand &Op = MI->getOperand(OpNo);
+- const MCSymbolRefExpr &refExp = cast<MCSymbolRefExpr>(*Op.getExpr());
+- O << refExp.getSymbol().getName();
++ const MCSymbolRefExpr *RefExp = nullptr;
++ const MCConstantExpr *ConstExp = nullptr;
++ if (const MCBinaryExpr *BinExpr = dyn_cast<MCBinaryExpr>(Op.getExpr())) {
++ RefExp = cast<MCSymbolRefExpr>(BinExpr->getLHS());
++ ConstExp = cast<MCConstantExpr>(BinExpr->getRHS());
++ } else
++ RefExp = cast<MCSymbolRefExpr>(Op.getExpr());
++
++ O << RefExp->getSymbol().getName();
+ O << '(';
+ printOperand(MI, OpNo+1, O);
+ O << ')';
+- if (refExp.getKind() != MCSymbolRefExpr::VK_None)
+- O << '@' << MCSymbolRefExpr::getVariantKindName(refExp.getKind());
++ if (RefExp->getKind() != MCSymbolRefExpr::VK_None)
++ O << '@' << MCSymbolRefExpr::getVariantKindName(RefExp->getKind());
++ if (ConstExp != nullptr)
++ O << '+' << ConstExp->getValue();
+ }
+
+ /// showRegistersWithPercentPrefix - Check if this register name should be
+Index: rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+===================================================================
+--- rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
++++ rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+@@ -487,8 +487,14 @@
+ if (!Subtarget->isPPC64() && !Subtarget->isDarwin() &&
+ isPositionIndependent())
+ Kind = MCSymbolRefExpr::VK_PLT;
+- const MCSymbolRefExpr *TlsRef =
++ const MCExpr *TlsRef =
+ MCSymbolRefExpr::create(TlsGetAddr, Kind, OutContext);
++
++ // Add 32768 offset to the symbol so we follow up the latest GOT/PLT ABI.
++ if (Kind == MCSymbolRefExpr::VK_PLT && Subtarget->isSecurePlt())
++ TlsRef = MCBinaryExpr::createAdd(TlsRef,
++ MCConstantExpr::create(32768, OutContext),
++ OutContext);
+ const MachineOperand &MO = MI->getOperand(2);
+ const GlobalValue *GValue = MO.getGlobal();
+ MCSymbol *MOSymbol = getSymbol(GValue);
+Index: rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
+===================================================================
+--- rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
++++ rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
+@@ -4054,7 +4054,20 @@
+ if (trySETCC(N))
+ return;
+ break;
+-
++ // These nodes will be transformed into GETtlsADDR32 node, which
++ // later becomes BL_TLS __tls_get_addr(sym at tlsgd)@PLT
++ case PPCISD::ADDI_TLSLD_L_ADDR:
++ case PPCISD::ADDI_TLSGD_L_ADDR: {
++ const Module *Mod = MF->getFunction().getParent();
++ if (PPCLowering->getPointerTy(CurDAG->getDataLayout()) != MVT::i32 ||
++ !PPCSubTarget->isSecurePlt() || !PPCSubTarget->isTargetELF() ||
++ Mod->getPICLevel() == PICLevel::SmallPIC)
++ break;
++ // Attach global base pointer on GETtlsADDR32 node in order to
++ // generate secure plt code for TLS symbols.
++ getGlobalBaseReg();
++ }
++ break;
+ case PPCISD::CALL: {
+ const Module *M = MF->getFunction().getParent();
+
+Index: rustc-src/src/llvm-project/llvm/test/CodeGen/PowerPC/ppc32-secure-plt-tls.ll
+===================================================================
+--- rustc-src/src/llvm-project/llvm/test/CodeGen/PowerPC/ppc32-secure-plt-tls.ll
++++ rustc-src/src/llvm-project/llvm/test/CodeGen/PowerPC/ppc32-secure-plt-tls.ll
+@@ -0,0 +1,18 @@
++; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -mattr=+secure-plt -relocation-model=pic | FileCheck -check-prefix=SECURE-PLT-TLS %s
++
++@a = thread_local local_unnamed_addr global i32 6, align 4
++define i32 @main() local_unnamed_addr #0 {
++entry:
++ %0 = load i32, i32* @a, align 4
++ ret i32 %0
++}
++
++
++!llvm.module.flags = !{!0}
++!0 = !{i32 7, !"PIC Level", i32 2}
++
++; SECURE-PLT-TLS: mflr 30
++; SECURE-PLT-TLS-NEXT: addis 30, 30, .LTOC-.L0$pb@ha
++; SECURE-PLT-TLS-NEXT: addi 30, 30, .LTOC-.L0$pb@l
++; SECURE-PLT-TLS-NEXT: bl .L{{.*}}
++; SECURE-PLT-TLS: bl __tls_get_addr(a@tlsgd)@PLT+32768
+\ No newline at end of file
diff --git a/dev-lang/rust/files/0052-llvm-D52013.patch b/dev-lang/rust/files/0052-llvm-D52013.patch
new file mode 100644
index 0000000..05ccae6
--- /dev/null
+++ b/dev-lang/rust/files/0052-llvm-D52013.patch
@@ -0,0 +1,15 @@
+Index: rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+===================================================================
+--- rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
++++ rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+@@ -199,6 +199,10 @@
+ case Triple::ppc64le:
+ return PPCTargetMachine::PPC_ABI_ELFv2;
+ case Triple::ppc64:
++ // musl uses ELFv2 ABI on both endians.
++ if (TT.getEnvironment() == Triple::Musl)
++ return PPCTargetMachine::PPC_ABI_ELFv2;
++
+ return PPCTargetMachine::PPC_ABI_ELFv1;
+ default:
+ return PPCTargetMachine::PPC_ABI_UNKNOWN;
diff --git a/dev-lang/rust/files/0053-llvm-secureplt.patch b/dev-lang/rust/files/0053-llvm-secureplt.patch
new file mode 100644
index 0000000..ddf8877
--- /dev/null
+++ b/dev-lang/rust/files/0053-llvm-secureplt.patch
@@ -0,0 +1,28 @@
+diff --git a/src/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp b/src/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
+--- a/src/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
++++ b/src/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
+@@ -138,6 +138,10 @@
+ if (isDarwin())
+ HasLazyResolverStubs = true;
+
++ // Set up musl-specific properties.
++ if (TargetTriple.getEnvironment() == Triple::Musl)
++ SecurePlt = true;
++
+ if (HasSPE && IsPPC64)
+ report_fatal_error( "SPE is only supported for 32-bit targets.\n", false);
+ if (HasSPE && (HasAltivec || HasQPX || HasVSX || HasFPU))
+diff --git a/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+--- a/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
++++ b/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+@@ -222,6 +222,10 @@ static Reloc::Model getEffectiveRelocModel(const Triple &TT,
+ if (TT.getArch() == Triple::ppc64)
+ return Reloc::PIC_;
+
++ // musl needs SecurePlt, which depends on PIC.
++ if (TT.getEnvironment() == Triple::Musl)
++ return Reloc::PIC_;
++
+ // Rest are static by default.
+ return Reloc::Static;
+ }
diff --git a/dev-lang/rust/files/0060-fix-build-with-libressl-2.9.1.patch b/dev-lang/rust/files/0060-fix-build-with-libressl-2.9.1.patch
new file mode 100644
index 0000000..d5375a0
--- /dev/null
+++ b/dev-lang/rust/files/0060-fix-build-with-libressl-2.9.1.patch
@@ -0,0 +1,35 @@
+From a04a24be49e14fe77dfcef647afbbe5ae5e181d1 Mon Sep 17 00:00:00 2001
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Wed, 24 Apr 2019 01:57:40 -0500
+Subject: [PATCH] fix build with libressl-2.9.1
+
+Signed-off-by: Jory Pratt <anarchy@gentoo.org>
+---
+ vendor/openssl-sys/.cargo-checksum.json | 2 +-
+ vendor/openssl-sys/build/main.rs | 1 +
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/vendor/openssl-sys/.cargo-checksum.json b/vendor/openssl-sys/.cargo-checksum.json
+index b5c539431..49a2227bf 100644
+--- a/vendor/openssl-sys/.cargo-checksum.json
++++ b/vendor/openssl-sys/.cargo-checksum.json
+@@ -1 +1 @@
+-{"files":{"Cargo.toml":"b09af0445220130b1b1c45791a316435f7400cf2fab3abe9c419f4f8028cfb9c","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"96a414be6e7e061a21a9e39a61449039f6791225264032641dd044a1a9b88111","build/cfgs.rs":"fae5176c2b149d190c9611b58c5882312b5c0e483d1a404cfdf850473314a58f","build/main.rs":"c8bc352b94d05afeaeb96300341a695c70c3b62c46793a5c035aaf42e22b69d1","src/aes.rs":"660efd70f809cb2f5dbbf527be8f9592911776bab7dafa1fc4cc72dd9a576b67","src/asn1.rs":"4f12d2f4c2a493888db669d1ecfd55df40861a78cae65957f801ed91dc2cae30","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"29aa053b67b47515fd15812aa0a90ff35dd9fa347da2beeba96d6deafeb9d945","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"f6e8a116940755b2b53e3d0d49d1b451fc6e4269831fd1cfcee9d6ed404cf487","src/dh.rs":"520
b282b92fa372a75bc16696dc3ee7a9a5752e517a18862182a3e9f5a976d28","src/dsa.rs":"3c294c5c45235497396ac803b723b3a0cb5bd3609f5dec18338b5b014c2adeb9","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"b22d27b01a70652384866b3d0d01d2f7a0421b2ba2db9268ed379fef4b1ac034","src/err.rs":"81230711e081277e0b6dae4ff21266052d075688c758c2b0720001849ef9192d","src/evp.rs":"13a8a71154545d7c478e156edb21beb219824937aba6b29c6bc6ef895c735a3d","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"17b5a1faa0fe3ab777c8cb0039a3dffd8922b211bf1330c2cd0c3e02f624353c","src/macros.rs":"a7c95174fd4cfeb42f730c7c0744194009520249888dbf43968571219fd6dfa1","src/obj_mac.rs":"9c20609db7115c9edb99185375426169cb5b7caee839d892b556e92285e65309","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"619177f939328597e4bcf9
c41fdf4d0aa9207d779c6e0dafddbe2eab9b1a6a98","src/pem.rs":"3ae1c53dbc126a04c188575294111cc04c215c2f3e031192d5cc05952f011ddf","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"a0bf64f1f8ff9f6e5dbed6c38d8fa2d3d1c5dfcfe6dd3ff79f7737b072ce4681","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"05044d221d8d205010a4e3760c0b5c0e2e923e165db0d65f9a8c9bcedaad9961","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"e69d3b9b8f2f8ae1ed3905a4dbe064ad1b7c1eaf21d7eabb86ecdb5b41e2120a","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"fd85a1683064def0a9e07d803b90102229adc1d58f
a19cf4e56976f0dd7425b9","src/x509.rs":"839be2feb74755ab7df66a024ad27dfa70ce4f7889229d9152ba999f3a54b914","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"66fd646ea4caf5ce81e3c881e88d85462519c4e97a7f82e82ca8ac52ea830ad2"},"package":"1bb974e77de925ef426b6bc82fce15fd45bdcbeb5728bffcfc7cdeeb7ce1c2d6"}
+\ No newline at end of file
++{"files":{"Cargo.toml":"b09af0445220130b1b1c45791a316435f7400cf2fab3abe9c419f4f8028cfb9c","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"96a414be6e7e061a21a9e39a61449039f6791225264032641dd044a1a9b88111","build/cfgs.rs":"fae5176c2b149d190c9611b58c5882312b5c0e483d1a404cfdf850473314a58f","build/main.rs":"4c1c4b208af314ee7217108c5cb22fd51dac1fdb2bbdf901a63454a99741ca2d","src/aes.rs":"660efd70f809cb2f5dbbf527be8f9592911776bab7dafa1fc4cc72dd9a576b67","src/asn1.rs":"4f12d2f4c2a493888db669d1ecfd55df40861a78cae65957f801ed91dc2cae30","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"29aa053b67b47515fd15812aa0a90ff35dd9fa347da2beeba96d6deafeb9d945","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"f6e8a116940755b2b53e3d0d49d1b451fc6e4269831fd1cfcee9d6ed404cf487","src/dh.rs":"520
b282b92fa372a75bc16696dc3ee7a9a5752e517a18862182a3e9f5a976d28","src/dsa.rs":"3c294c5c45235497396ac803b723b3a0cb5bd3609f5dec18338b5b014c2adeb9","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"b22d27b01a70652384866b3d0d01d2f7a0421b2ba2db9268ed379fef4b1ac034","src/err.rs":"81230711e081277e0b6dae4ff21266052d075688c758c2b0720001849ef9192d","src/evp.rs":"13a8a71154545d7c478e156edb21beb219824937aba6b29c6bc6ef895c735a3d","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"17b5a1faa0fe3ab777c8cb0039a3dffd8922b211bf1330c2cd0c3e02f624353c","src/macros.rs":"a7c95174fd4cfeb42f730c7c0744194009520249888dbf43968571219fd6dfa1","src/obj_mac.rs":"9c20609db7115c9edb99185375426169cb5b7caee839d892b556e92285e65309","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"619177f939328597e4bcf9
c41fdf4d0aa9207d779c6e0dafddbe2eab9b1a6a98","src/pem.rs":"3ae1c53dbc126a04c188575294111cc04c215c2f3e031192d5cc05952f011ddf","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"a0bf64f1f8ff9f6e5dbed6c38d8fa2d3d1c5dfcfe6dd3ff79f7737b072ce4681","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"05044d221d8d205010a4e3760c0b5c0e2e923e165db0d65f9a8c9bcedaad9961","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"e69d3b9b8f2f8ae1ed3905a4dbe064ad1b7c1eaf21d7eabb86ecdb5b41e2120a","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"fd85a1683064def0a9e07d803b90102229adc1d58f
a19cf4e56976f0dd7425b9","src/x509.rs":"839be2feb74755ab7df66a024ad27dfa70ce4f7889229d9152ba999f3a54b914","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"66fd646ea4caf5ce81e3c881e88d85462519c4e97a7f82e82ca8ac52ea830ad2"},"package":"1bb974e77de925ef426b6bc82fce15fd45bdcbeb5728bffcfc7cdeeb7ce1c2d6"}
+\ No newline at end of file
+diff --git a/vendor/openssl-sys/build/main.rs b/vendor/openssl-sys/build/main.rs
+index 69def400e..6f08c872d 100644
+--- a/vendor/openssl-sys/build/main.rs
++++ b/vendor/openssl-sys/build/main.rs
+@@ -505,6 +505,7 @@ See rust-openssl README for more information:
+ (8, 1) => ('8', '1'),
+ (8, _) => ('8', 'x'),
+ (9, 0) => ('9', '0'),
++ (9, _) => ('9', 'x'),
+ _ => version_error(),
+ };
+
+--
+2.21.0
+
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
new file mode 100644
index 0000000..cd11337
--- /dev/null
+++ b/dev-lang/rust/metadata.xml
@@ -0,0 +1,17 @@
+<?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="cargo">Install cargo component</flag>
+ <flag name="clippy">Install clippy component</flag>
+ <flag name="system-llvm">Use the system LLVM install</flag>
+ <flag name="rls">Install rls component</flag>
+ <flag name="rustfmt">Install rustfmt component</flag>
+ <flag name="wasm">Build support for the wasm32-unknown-unknown
+ target</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/rust/rust-1.34.2.ebuild b/dev-lang/rust/rust-1.34.2.ebuild
new file mode 100644
index 0000000..84d697e
--- /dev/null
+++ b/dev-lang/rust/rust-1.34.2.ebuild
@@ -0,0 +1,337 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
+
+inherit check-reqs eapi7-ver flag-o-matic llvm multiprocessing python-any-r1 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 ~ppc ~ppc64 ~x86"
+
+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
+ amd64? ( https://portage.smaeul.xyz/distfiles/rust-${RUST_STAGE0_VERSION}-x86_64-gentoo-linux-musl.tar.xz )
+ arm? ( https://portage.smaeul.xyz/distfiles/rust-${RUST_STAGE0_VERSION}-armv7a-unknown-linux-musleabihf.tar.xz )
+ arm64? ( https://portage.smaeul.xyz/distfiles/rust-${RUST_STAGE0_VERSION}-aarch64-gentoo-linux-musl.tar.xz )
+ ppc? ( https://portage.smaeul.xyz/distfiles/rust-${RUST_STAGE0_VERSION}-powerpc-gentoo-linux-musl.tar.xz )
+ ppc64? ( https://portage.smaeul.xyz/distfiles/rust-${RUST_STAGE0_VERSION}-powerpc64-gentoo-linux-musl.tar.xz )
+ x86? ( https://portage.smaeul.xyz/distfiles/rust-${RUST_STAGE0_VERSION}-i686-gentoo-linux-musl.tar.xz )
+"
+
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC 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 rls rustfmt system-llvm ${ALL_LLVM_TARGETS[*]}"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling one than more 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. < 9.
+# 3. Specify LLVM_MAX_SLOT, e.g. 8.
+LLVM_DEPEND="
+ || (
+ >=sys-devel/llvm-8:=[${LLVM_TARGET_USEDEPS// /,}]
+ )
+ <sys-devel/llvm-9:=
+"
+LLVM_MAX_SLOT=8
+
+COMMON_DEPEND="
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ net-libs/http-parser:=
+ net-libs/libssh2:=
+ net-misc/curl:=[ssl]
+ sys-libs/zlib:=
+ system-llvm? (
+ ${LLVM_DEPEND}
+ )
+"
+DEPEND="${COMMON_DEPEND}
+ ${PYTHON_DEPS}
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ !system-llvm? (
+ dev-util/cmake
+ dev-util/ninja
+ )
+"
+RDEPEND="${COMMON_DEPEND}
+ >=app-eselect/eselect-rust-20190311
+ !dev-util/cargo
+ rustfmt? ( !dev-util/rustfmt )"
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+PATCHES=(
+ "${FILESDIR}/0001-Don-t-pass-CFLAGS-to-the-C-compiler.patch"
+ "${FILESDIR}/0002-Fix-LLVM-build.patch"
+ "${FILESDIR}/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch"
+ "${FILESDIR}/0004-Require-static-native-libraries-when-linking-static-.patch"
+ "${FILESDIR}/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch"
+ "${FILESDIR}/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch"
+ "${FILESDIR}/0007-runtest-Fix-proc-macro-tests-on-musl-hosts.patch"
+ "${FILESDIR}/0008-Correct-minimum-system-LLVM-version-in-tests.patch"
+ "${FILESDIR}/0009-test-use-extern-for-plugins-Don-t-assume-multilib.patch"
+ "${FILESDIR}/0010-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch"
+ "${FILESDIR}/0011-Ignore-broken-and-non-applicable-tests.patch"
+ "${FILESDIR}/0012-Link-stage-2-tools-dynamically-to-libstd.patch"
+ "${FILESDIR}/0013-Move-debugger-scripts-to-usr-share-rust.patch"
+ "${FILESDIR}/0014-Add-gentoo-target-specs.patch"
+ "${FILESDIR}/0030-liblibc-linkage.patch"
+ "${FILESDIR}/0040-rls-atomics.patch"
+ "${FILESDIR}/0050-llvm.patch"
+ "${FILESDIR}/0051-llvm-D45520.patch"
+ "${FILESDIR}/0052-llvm-D52013.patch"
+ "${FILESDIR}/0053-llvm-secureplt.patch"
+ "${FILESDIR}/0060-fix-build-with-libressl-2.9.1.patch"
+)
+
+S="${WORKDIR}/${MY_P}-src"
+
+toml_usex() {
+ usex "$1" true false
+}
+
+pre_build_checks() {
+ CHECKREQS_DISK_BUILD="7G"
+ eshopts_push -s extglob
+ if is-flagq '-g?(gdb)?([1-9])'; then
+ CHECKREQS_DISK_BUILD="10G"
+ fi
+ eshopts_pop
+ check-reqs_pkg_setup
+}
+
+pkg_pretend() {
+ pre_build_checks
+}
+
+pkg_setup() {
+ export RUST_BACKTRACE=1
+ pre_build_checks
+ python-any-r1_pkg_setup
+ 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() {
+ default
+
+ "${WORKDIR}/rust-${RUST_STAGE0_VERSION}-${CHOST}/install.sh" \
+ --destdir="${WORKDIR}/stage0" \
+ --prefix=/ \
+ --components=rust-std-$CHOST,rustc,cargo \
+ --disable-ldconfig \
+ || die
+}
+
+src_configure() {
+ local tools='"cargo"'
+
+ for tool in clippy rls rustfmt; do
+ if use $tool; then
+ tools+=", \"$tool\""
+ fi
+ done
+
+ cat <<- EOF > "${S}"/config.toml
+ [llvm]
+ ninja = true
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ targets = "${LLVM_TARGETS// /;}"
+ experimental-targets = ""
+ link-shared = $(toml_usex system-llvm)
+ [build]
+ build = "${CHOST}"
+ host = ["${CHOST}"]
+ target = ["${CHOST}"]
+ cargo = "${WORKDIR}/stage0/bin/cargo"
+ rustc = "${WORKDIR}/stage0/bin/rustc"
+ docs = $(toml_usex doc)
+ compiler-docs = $(toml_usex doc)
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ verbose = 0
+ sanitizers = false
+ profiler = false
+ extended = true
+ tools = [${tools}]
+ [install]
+ prefix = "${EPREFIX}/usr"
+ libdir = "lib"
+ docdir = "share/doc/${P}"
+ mandir = "share/${P}/man"
+ [rust]
+ optimize = $(toml_usex !debug)
+ debuginfo = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ default-linker = "$(tc-getCC)"
+ channel = "stable"
+ rpath = false
+ optimize-tests = $(toml_usex !debug)
+ dist-src = false
+ jemalloc = false
+ [dist]
+ src-tarball = false
+ [target.${CHOST}]
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ar = "$(tc-getAR)"
+ EOF
+ use system-llvm && cat <<- EOF >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "$LLVM_MAX_SLOT")/bin/llvm-config"
+ EOF
+}
+
+src_compile() {
+ "${EPYTHON}" x.py build --config="${S}"/config.toml -j$(makeopts_jobs) --exclude src/tools/miri || die
+}
+
+src_test() {
+ "${EPYTHON}" x.py test -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-fail/pretty \
+ src/test/run-make \
+ src/test/run-make-fulldeps \
+ src/test/run-pass \
+ src/test/run-pass/pretty \
+ src/test/run-pass-fulldeps \
+ src/test/run-pass-fulldeps/pretty \
+ src/test/ui \
+ src/test/ui-fulldeps || die
+}
+
+src_install() {
+ env DESTDIR="${D}" "${EPYTHON}" x.py install || die
+
+ mv "${ED}/usr/bin/cargo" "${ED}/usr/bin/cargo-${PV}" || die
+ 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
+
+ rm "${ED}/usr/lib"/*.so || die
+ rm "${ED}/usr/lib/rustlib/components" || die
+ rm "${ED}/usr/lib/rustlib/install.log" || die
+ rm "${ED}/usr/lib/rustlib"/manifest-* || die
+ rm "${ED}/usr/lib/rustlib/rust-installer-version" || die
+ rm "${ED}/usr/lib/rustlib/uninstall.sh" || die
+
+ if use clippy; then
+ mv "${ED}/usr/bin/cargo-clippy" "${ED}/usr/bin/cargo-clippy-${PV}" || die
+ mv "${ED}/usr/bin/clippy-driver" "${ED}/usr/bin/clippy-driver-${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/cargo-fmt" "${ED}/usr/bin/cargo-fmt-${PV}" || die
+ mv "${ED}/usr/bin/rustfmt" "${ED}/usr/bin/rustfmt-${PV}" || die
+ fi
+
+ if use doc; then
+ dodir "/usr/share/doc/${P}"
+ mv "${ED}/usr/share/doc/rust"/* "${ED}/usr/share/doc/${P}" || die
+ rmdir "${ED}/usr/share/doc/rust" || 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
+
+ docompress "/usr/share/${P}/man"
+
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="${EPREFIX}/usr/lib/rustlib/${CHOST}/lib"
+ MANPATH="${EPREFIX}/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ # 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/cargo-clippy >> "${T}/provider-${P}"
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+ fi
+ if use rls; then
+ echo /usr/bin/rls >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ fi
+ dodir /etc/env.d/rust
+ 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}."
+
+ ewarn "cargo is now installed from dev-lang/rust{,-bin} instead of dev-util/cargo."
+ ewarn "This might have resulted in a dangling symlink for /usr/bin/cargo on some"
+ ewarn "systems. This can be resolved by calling 'sudo eselect rust set ${P}'."
+
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; 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 has_version 'app-shells/zsh'; then
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust unset --if-invalid
+}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/musl:master commit in: dev-lang/rust/, dev-lang/rust/files/
@ 2021-03-13 16:26 Anthony G. Basile
0 siblings, 0 replies; 8+ messages in thread
From: Anthony G. Basile @ 2021-03-13 16:26 UTC (permalink / raw
To: gentoo-commits
commit: 72f75a1d9c85d818088e91722ef3e564bc30f3cc
Author: Dave Hughes <davidhughes205 <AT> gmail <DOT> com>
AuthorDate: Sat Mar 13 05:10:36 2021 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Mar 13 16:26:19 2021 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=72f75a1d
dev-lang/rust: sync with ::smaeul
Package-Manager: Portage-3.0.17, Repoman-3.0.2
RepoMan-Options: --force
Manifest-Sign-Key: 0xA1919C830E9498E0
Signed-off-by: Dave Hughes <davidhughes205 <AT> gmail.com>
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
dev-lang/rust/Manifest | 35 +-
.../0001-Don-t-pass-CFLAGS-to-the-C-compiler.patch | 16 +-
dev-lang/rust/files/0002-Fix-LLVM-build.patch | 27 +-
...tdoc-to-work-when-cross-compiling-on-musl.patch | 36 --
...-Fix-linking-to-zlib-when-cross-compiling.patch | 34 ++
...-Fix-rustdoc-when-cross-compiling-on-musl.patch | 45 ++
...-nostdlib-and-musl_root-from-musl-targets.patch | 388 ---------------
...ative-libraries-when-linking-static-exec.patch} | 41 +-
...-Prefer-libgcc_eh-over-libunwind-for-musl.patch | 24 -
...l_root-and-CRT-fallback-from-musl-targets.patch | 486 +++++++++++++++++++
...-Prefer-libgcc_eh-over-libunwind-for-musl.patch | 38 ++
...untest-Fix-proc-macro-tests-on-musl-hosts.patch | 37 --
...rect-minimum-system-LLVM-version-in-tests.patch | 206 --------
...nk-libssp_nonshared.a-on-all-musl-targets.patch | 29 ++
...t-failed-doctest-output-Fix-normalization.patch | 36 ++
...t-crates-are-unstable-Fix-test-when-rpath.patch | 12 +-
...extern-for-plugins-Don-t-assume-multilib.patch} | 12 +-
...2-Ignore-broken-and-non-applicable-tests.patch} | 59 +--
...-Link-stage-2-tools-dynamically-to-libstd.patch | 27 --
...-Link-stage-2-tools-dynamically-to-libstd.patch | 25 +
...3-Move-debugger-scripts-to-usr-share-rust.patch | 53 --
...4-Move-debugger-scripts-to-usr-share-rust.patch | 69 +++
...cs.patch => 0015-Add-gentoo-target-specs.patch} | 58 ++-
dev-lang/rust/files/0030-libc-linkage.patch | 34 ++
dev-lang/rust/files/0030-liblibc-linkage.patch | 33 --
dev-lang/rust/files/0040-rls-atomics.patch | 20 +-
dev-lang/rust/files/0050-llvm.patch | 6 +-
dev-lang/rust/files/0051-llvm-D45520.patch | 101 ----
dev-lang/rust/files/0051-llvm-powerpc-elfv2.patch | 12 +
dev-lang/rust/files/0052-llvm-D52013.patch | 15 -
dev-lang/rust/files/0053-llvm-secureplt.patch | 28 --
.../files/0060-fix-build-with-libressl-2.9.1.patch | 35 --
...46.0-don-t-create-prefix-at-time-of-check.patch | 31 ++
dev-lang/rust/files/1.47.0-libressl.patch | 44 ++
dev-lang/rust/metadata.xml | 23 +-
dev-lang/rust/rust-1.34.2.ebuild | 337 -------------
dev-lang/rust/rust-1.47.0-r1.ebuild | 531 +++++++++++++++++++++
37 files changed, 1562 insertions(+), 1481 deletions(-)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 8111391..5a289f2 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -1,7 +1,28 @@
-DIST rust-1.33.0-aarch64-gentoo-linux-musl.tar.xz 103260664 BLAKE2B 2eeecf50ab275abc5679e4be56c3322c1967bbb1926e375910df1d3b5aee042cbb37c56ecede542668a63360bc9db82ec731a927a180399df99b30ff09b70c15 SHA512 de9ae088cc4ca76fc619dc8de4fe7f362bc8039c03d9b09ab905b7e551ef0b0fa2d678a984200efddfee542adf5f5a951bd24788a39940bace03d3fe829f4747
-DIST rust-1.33.0-armv7a-unknown-linux-musleabihf.tar.xz 102032976 BLAKE2B 9f00a004d575962ca3dd3d0d70190210111e9347f35e6858fc30a085495d48a03751645bfdb4940c7db2dc8bf74d08611dfec05fe53e5022e7360ed51c39f33a SHA512 45b5af051663c7ee7ff7c663af57dfbaaa3c9f69dd22c36134534e77a715d1acc101891f4a7e798fcab38e8accd284cc15df35da20552872894bc6da6dab89ff
-DIST rust-1.33.0-i686-gentoo-linux-musl.tar.xz 116133752 BLAKE2B a9cf13caa12da6ad20bbcbb592d3fa423eb6f90d50c9af41db17cb2f587d0ef90d19652e75742da49d8e187c8e393137998e384b5d9686cfff28553c7aab1f71 SHA512 eaef8169451b02cdee67fe40def8d0ab0d91e527ad4964b8bdafca8677bd2bcea265ba3be5a90c99589b8639ca3e026a540d295a5233f73da873e56e9ffea83f
-DIST rust-1.33.0-powerpc-gentoo-linux-musl.tar.xz 104602692 BLAKE2B bef7cacfd7d9e411f18f6b64403c3bdc33bb17270f966aa9cb6ff99e80d8da9bd1346e8c3e3081df7bee3f367d3940b3badd6aeec6859f4a3de75cfeb108de1a SHA512 2314b5d31c9cc31b28a3668ebd4e1a88a4f090c60b141c8e3e4fb06b4c311ef64ab9217acbdb34417e1f3aaf74fda2087ba90ad70075b7197471bf8bfc804370
-DIST rust-1.33.0-powerpc64-gentoo-linux-musl.tar.xz 98455708 BLAKE2B fde1ca61ddcfe1091aa2c39ffb9ea47ef4ef2b63557059eeda4df6c90bcf30b22bf09e0bd301d7993d27d18e0c5dbc84db123613a8ac31c68abcb56d1b3892bc SHA512 9dbe37abd4edd519ac3596d405b9af7a4a3de1da56161bed66f9f2f40d505beaa9d7c998c6775d6c86d4e086e5cb085f65702b6be7a182663c1e0c6b2095a242
-DIST rust-1.33.0-x86_64-gentoo-linux-musl.tar.xz 113838416 BLAKE2B 2d118520a118746ca16aac7b336e03805c3a02df20b2abdd2e9f6a4fcc062c17b0d057347447027287f8fdceeaa34a171835e6f22d45098097b540c97cee23a1 SHA512 cd2a6277af99cfaf84f5d293a09e0af9189e1d9148bc4031dd32620f0eb086695e175c6a04e6cceb673af976566114e4a75d42654505d295135a8fc95eb2f850
-DIST rustc-1.34.2-src.tar.xz 95048792 BLAKE2B e81e4bfda87ddfb09ab8a74792346970aa440c678d2bb1279c329db4929282f761ada6fea9d81ceeecfd513613025c8e636487626fc36bd0b33559e045bb1b15 SHA512 f1bd2b226d90aae8a4657e6117b9a8451d4ce8129f79cc0fce0da7613a3b7800e690bc0ede8fec20a2f5f32c13fa8e22ac97d3838e0d36936793535a75d9c381
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+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
+-----BEGIN PGP SIGNATURE-----
+
+iQKTBAEBCAB9FiEEZdLCSnfk9z83VSkfsaMsEcx8U7oFAmBMSUVfFIAAAAAALgAo
+aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDY1
+RDJDMjRBNzdFNEY3M0YzNzU1MjkxRkIxQTMyQzExQ0M3QzUzQkEACgkQsaMsEcx8
+U7p7Ww//RewZS0qjL32uR/Dr/ljrSEY2Yi/YqKxTzdT067ksG017bmboBWVUi6AZ
+92nD8fAiNtUl5nDneW7SD9lQaLdYPUrC+IDHB+z5hh02V1VRXL4FMbyXx/rEmZaw
+sTAUVdooJgG2Hqu0tYe/+YsaTs0j0qizaWrTVaa1hWXUIKf+KK/IePt4p5yj4rpa
+v2KmiW32gEi1Mydch1pBLl9V7HNdqnlnb+A/RCnvHIsv4neEP6s3Y2gbkj7anJ1I
+IXbEcx8iXmIGXPJBjf3JOpfsQ5Ww1mxf89SBPeEChFgV7hcsHih1MZrdSptnUE67
+0dnnbdQlbPeQGXKJWoQ9Ygpbx1k6tAX1j7kj+kRjQlk7jALxA597BcaNTRpX6dEr
+kp/UaJGrjaBQyV8MqapsH/iuh3BZI/OC7p2n9Fcc+WJHuDklWOBFlAac0dwQ2Q1W
+jnWLZfr2E/HM59VbUdZb801Xreh8jWHJRxtS9Y24qI+i2vGQYd1KYxFFn4f2xjb8
+z8s21pYEcHH/anPslqqOqZCO9q+tJdPSinHfwEfbtgsQ93ZnrKa6rl/viKU+2LfQ
+c1vNaoHzqr5ZRNNavts6SFxEF44IqddSQNdaeMSUL6D72w7EJE1c9kIW5vUrP8sc
+tbemF58TNgFX0ABi0Xo0qtXPQKsEtE/e1yrgdFarWKvSUR3I828=
+=4ZOz
+-----END PGP SIGNATURE-----
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
index f4df88e..40bf4dc 100644
--- 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
@@ -1,26 +1,26 @@
-From 4b5cdf991eb8776927a2730ed73446559856b468 Mon Sep 17 00:00:00 2001
+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/14] Don't pass CFLAGS to the C++ compiler
+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 a471af2576..f4273729bb 100644
+index 6446fa7550d..29fec3a5717 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
-@@ -1068,8 +1068,7 @@ impl<'a> Builder<'a> {
+@@ -1244,8 +1244,7 @@ impl<'a> Builder<'a> {
if let Ok(cxx) = self.cxx(target) {
let cxx = ccacheify(&cxx);
cargo
-- .env(format!("CXX_{}", target), &cxx)
-- .env(format!("CXXFLAGS_{}", target), cflags);
-+ .env(format!("CXX_{}", target), &cxx);
+- .env(format!("CXX_{}", target.triple), &cxx)
+- .env(format!("CXXFLAGS_{}", target.triple), cflags);
++ .env(format!("CXX_{}", target.triple), &cxx);
}
}
--
-2.21.0
+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
index 0a8ecec..c04d445 100644
--- a/dev-lang/rust/files/0002-Fix-LLVM-build.patch
+++ b/dev-lang/rust/files/0002-Fix-LLVM-build.patch
@@ -1,26 +1,25 @@
-From 22fac16a9a1651eb9ac121761583ff6031a15077 Mon Sep 17 00:00:00 2001
+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/14] Fix LLVM build
+Subject: [PATCH 02/15] Fix LLVM build
---
- src/bootstrap/lib.rs | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ 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 7e6fbdff12..f1e7f05aa9 100644
+index a42ee11bd6f..77316c734b8 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
-@@ -764,7 +764,8 @@ impl Build {
- // cc-rs because the build scripts will determine that for themselves.
- let mut base = self.cc[&target].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>>();
+@@ -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.21.0
+2.26.2
diff --git a/dev-lang/rust/files/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch b/dev-lang/rust/files/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch
deleted file mode 100644
index 087dea2..0000000
--- a/dev-lang/rust/files/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From c4565fab697249c4233c97f7855fe692a5a880a4 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sat, 2 Dec 2017 17:25:44 -0600
-Subject: [PATCH 03/14] Allow rustdoc to work when cross-compiling on musl
-
-musl can't handle foreign-architecture libraries in LD_LIBRARY_PATH.
----
- src/bootstrap/bin/rustdoc.rs | 5 +----
- 1 file changed, 1 insertion(+), 4 deletions(-)
-
-diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
-index 52b5971f0a..c779e35e26 100644
---- a/src/bootstrap/bin/rustdoc.rs
-+++ b/src/bootstrap/bin/rustdoc.rs
-@@ -23,9 +23,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(rustdoc) instead of cfg(dox), remove the `--cfg dox`
- //arguments here
- let mut cmd = Command::new(rustdoc);
-@@ -37,7 +34,7 @@ fn main() {
- .arg("--sysroot")
- .arg(sysroot)
- .env(bootstrap::util::dylib_path_var(),
-- env::join_paths(&dylib_path).unwrap());
-+ 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
---
-2.21.0
-
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
new file mode 100644
index 0000000..4c9f06c
--- /dev/null
+++ b/dev-lang/rust/files/0003-Fix-linking-to-zlib-when-cross-compiling.patch
@@ -0,0 +1,34 @@
+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
new file mode 100644
index 0000000..c6a7d79
--- /dev/null
+++ b/dev-lang/rust/files/0004-Fix-rustdoc-when-cross-compiling-on-musl.patch
@@ -0,0 +1,45 @@
+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-Remove-nostdlib-and-musl_root-from-musl-targets.patch b/dev-lang/rust/files/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
deleted file mode 100644
index b8ca293..0000000
--- a/dev-lang/rust/files/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
+++ /dev/null
@@ -1,388 +0,0 @@
-From d84f9863017bd4bb38c5a2063c679dc3132ecf28 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Fri, 8 Sep 2017 22:11:14 -0500
-Subject: [PATCH 05/14] Remove -nostdlib and musl_root from musl targets
-
----
- config.toml.example | 6 ----
- src/bootstrap/bin/rustc.rs | 12 --------
- src/bootstrap/cc_detect.rs | 27 ++----------------
- src/bootstrap/compile.rs | 21 --------------
- src/bootstrap/config.rs | 7 -----
- src/bootstrap/configure.py | 22 ---------------
- src/bootstrap/lib.rs | 8 ------
- src/bootstrap/sanity.rs | 28 -------------------
- .../dist-i586-gnu-i586-i686-musl/Dockerfile | 2 --
- src/ci/docker/dist-various-1/Dockerfile | 7 -----
- src/ci/docker/dist-x86_64-musl/Dockerfile | 1 -
- src/librustc_target/spec/linux_musl_base.rs | 16 -----------
- 12 files changed, 3 insertions(+), 154 deletions(-)
-
-diff --git a/config.toml.example b/config.toml.example
-index f45db37c33..50692bf74a 100644
---- a/config.toml.example
-+++ b/config.toml.example
-@@ -470,12 +470,6 @@
- # only use static libraries. If unset, the target's default linkage is used.
- #crt-static = false
-
--# The root location of the MUSL installation directory. The library directory
--# will also need to contain libunwind.a for an unwinding implementation. Note
--# that this option only makes sense for MUSL targets that produce statically
--# linked binaries
--#musl-root = "..."
--
- # Used in testing for configuring where the QEMU images are located, you
- # probably don't want to use this.
- #qemu-rootfs = "..."
-diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
-index b6afe317a0..0eace41a5a 100644
---- a/src/bootstrap/bin/rustc.rs
-+++ b/src/bootstrap/bin/rustc.rs
-@@ -18,7 +18,6 @@
- #![deny(warnings)]
-
- use std::env;
--use std::ffi::OsString;
- use std::io;
- use std::path::PathBuf;
- use std::process::Command;
-@@ -114,17 +113,6 @@ fn main() {
- cmd.arg("-Cprefer-dynamic");
- }
-
-- // Help the libc crate compile by assisting it in finding the MUSL
-- // native libraries.
-- if let Some(s) = env::var_os("MUSL_ROOT") {
-- if target.contains("musl") {
-- let mut root = OsString::from("native=");
-- root.push(&s);
-- root.push("/lib");
-- cmd.arg("-L").arg(&root);
-- }
-- }
--
- // Override linker if necessary.
- if let Ok(target_linker) = env::var("RUSTC_TARGET_LINKER") {
- cmd.arg(format!("-Clinker={}", target_linker));
-diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index dfc243b705..848d1d4b2b 100644
---- a/src/bootstrap/cc_detect.rs
-+++ b/src/bootstrap/cc_detect.rs
-@@ -84,7 +84,7 @@ pub fn find(build: &mut Build) {
- if let Some(cc) = config.and_then(|c| c.cc.as_ref()) {
- cfg.compiler(cc);
- } else {
-- set_compiler(&mut cfg, Language::C, target, config, build);
-+ set_compiler(&mut cfg, Language::C, target, config);
- }
-
- let compiler = cfg.get_compiler();
-@@ -113,7 +113,7 @@ pub fn find(build: &mut Build) {
- if let Some(cxx) = config.and_then(|c| c.cxx.as_ref()) {
- cfg.compiler(cxx);
- } else {
-- set_compiler(&mut cfg, Language::CPlusPlus, host, config, build);
-+ set_compiler(&mut cfg, Language::CPlusPlus, host, config);
- }
- let compiler = cfg.get_compiler();
- build.verbose(&format!("CXX_{} = {:?}", host, compiler.path()));
-@@ -124,8 +124,7 @@ pub fn find(build: &mut Build) {
- fn set_compiler(cfg: &mut cc::Build,
- compiler: Language,
- target: Interned<String>,
-- config: Option<&Target>,
-- build: &Build) {
-+ config: Option<&Target>) {
- match &*target {
- // When compiling for android we may have the NDK configured in the
- // config.toml in which case we look there. Otherwise the default
-@@ -165,26 +164,6 @@ fn set_compiler(cfg: &mut cc::Build,
- }
- }
-
-- "mips-unknown-linux-musl" => {
-- if cfg.get_compiler().path().to_str() == Some("gcc") {
-- cfg.compiler("mips-linux-musl-gcc");
-- }
-- }
-- "mipsel-unknown-linux-musl" => {
-- if cfg.get_compiler().path().to_str() == Some("gcc") {
-- cfg.compiler("mipsel-linux-musl-gcc");
-- }
-- }
--
-- t if t.contains("musl") => {
-- if let Some(root) = build.musl_root(target) {
-- let guess = root.join("bin/musl-gcc");
-- if guess.exists() {
-- cfg.compiler(guess);
-- }
-- }
-- }
--
- _ => {}
- }
- }
-diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index 249a183189..bfc62c762a 100644
---- a/src/bootstrap/compile.rs
-+++ b/src/bootstrap/compile.rs
-@@ -114,21 +114,6 @@ impl Step for Std {
- fn copy_third_party_objects(builder: &Builder<'_>, compiler: &Compiler, target: Interned<String>) {
- let libdir = builder.sysroot_libdir(*compiler, target);
-
-- // Copies the crt(1,i,n).o startup objects
-- //
-- // Since musl supports fully static linking, we can cross link for it even
-- // with a glibc-targeting toolchain, given we have the appropriate startup
-- // files. As those shipped with glibc won't work, copy the ones provided by
-- // musl so we have them on linux-gnu hosts.
-- if target.contains("musl") {
-- for &obj in &["crt1.o", "crti.o", "crtn.o"] {
-- builder.copy(
-- &builder.musl_root(target).unwrap().join("lib").join(obj),
-- &libdir.join(obj),
-- );
-- }
-- }
--
- // Copies libunwind.a compiled to be linked wit x86_64-fortanix-unknown-sgx.
- //
- // This target needs to be linked to Fortanix's port of llvm's libunwind.
-@@ -182,12 +167,6 @@ pub fn std_cargo(builder: &Builder<'_>,
- cargo.arg("--features").arg(features)
- .arg("--manifest-path")
- .arg(builder.src.join("src/libstd/Cargo.toml"));
--
-- if target.contains("musl") {
-- if let Some(p) = builder.musl_root(target) {
-- cargo.env("MUSL_ROOT", p);
-- }
-- }
- }
- }
-
-diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 7d3e584f1a..3f0113e11a 100644
---- a/src/bootstrap/config.rs
-+++ b/src/bootstrap/config.rs
-@@ -132,8 +132,6 @@ pub struct Config {
- pub print_step_timings: bool,
- pub missing_tools: bool,
-
-- // Fallback musl-root for all targets
-- pub musl_root: Option<PathBuf>,
- pub prefix: Option<PathBuf>,
- pub sysconfdir: Option<PathBuf>,
- pub datadir: Option<PathBuf>,
-@@ -168,7 +166,6 @@ pub struct Target {
- pub linker: Option<PathBuf>,
- pub ndk: Option<PathBuf>,
- pub crt_static: Option<bool>,
-- pub musl_root: Option<PathBuf>,
- pub qemu_rootfs: Option<PathBuf>,
- pub no_std: bool,
- }
-@@ -304,7 +301,6 @@ struct Rust {
- backtrace: Option<bool>,
- default_linker: Option<String>,
- channel: Option<String>,
-- musl_root: Option<String>,
- rpath: Option<bool>,
- optimize_tests: Option<bool>,
- debuginfo_tests: Option<bool>,
-@@ -343,7 +339,6 @@ struct TomlTarget {
- linker: Option<String>,
- android_ndk: Option<String>,
- crt_static: Option<bool>,
-- musl_root: Option<String>,
- qemu_rootfs: Option<String>,
- }
-
-@@ -562,7 +557,6 @@ impl Config {
- set(&mut config.llvm_tools_enabled, rust.llvm_tools);
- config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
- config.rustc_default_linker = rust.default_linker.clone();
-- config.musl_root = rust.musl_root.clone().map(PathBuf::from);
- config.save_toolstates = rust.save_toolstates.clone().map(PathBuf::from);
- set(&mut config.deny_warnings, rust.deny_warnings.or(flags.warnings));
- set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
-@@ -605,7 +599,6 @@ impl Config {
- target.ranlib = cfg.ranlib.clone().map(PathBuf::from);
- target.linker = cfg.linker.clone().map(PathBuf::from);
- target.crt_static = cfg.crt_static.clone();
-- target.musl_root = cfg.musl_root.clone().map(PathBuf::from);
- target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from);
-
- config.target_config.insert(INTERNER.intern_string(triple.clone()), target);
-diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
-index b2d8f2d8eb..c3bb94938f 100755
---- a/src/bootstrap/configure.py
-+++ b/src/bootstrap/configure.py
-@@ -109,28 +109,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
- "aarch64-linux-android NDK standalone path")
- v("x86_64-linux-android-ndk", "target.x86_64-linux-android.android-ndk",
- "x86_64-linux-android NDK standalone path")
--v("musl-root", "target.x86_64-unknown-linux-musl.musl-root",
-- "MUSL root installation directory (deprecated)")
--v("musl-root-x86_64", "target.x86_64-unknown-linux-musl.musl-root",
-- "x86_64-unknown-linux-musl install directory")
--v("musl-root-i586", "target.i586-unknown-linux-musl.musl-root",
-- "i586-unknown-linux-musl install directory")
--v("musl-root-i686", "target.i686-unknown-linux-musl.musl-root",
-- "i686-unknown-linux-musl install directory")
--v("musl-root-arm", "target.arm-unknown-linux-musleabi.musl-root",
-- "arm-unknown-linux-musleabi install directory")
--v("musl-root-armhf", "target.arm-unknown-linux-musleabihf.musl-root",
-- "arm-unknown-linux-musleabihf install directory")
--v("musl-root-armv5te", "target.armv5te-unknown-linux-musleabi.musl-root",
-- "armv5te-unknown-linux-musleabi install directory")
--v("musl-root-armv7", "target.armv7-unknown-linux-musleabihf.musl-root",
-- "armv7-unknown-linux-musleabihf install directory")
--v("musl-root-aarch64", "target.aarch64-unknown-linux-musl.musl-root",
-- "aarch64-unknown-linux-musl install directory")
--v("musl-root-mips", "target.mips-unknown-linux-musl.musl-root",
-- "mips-unknown-linux-musl install directory")
--v("musl-root-mipsel", "target.mipsel-unknown-linux-musl.musl-root",
-- "mipsel-unknown-linux-musl install directory")
- v("qemu-armhf-rootfs", "target.arm-unknown-linux-gnueabihf.qemu-rootfs",
- "rootfs in qemu testing, you probably don't want to use this")
- v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs",
-diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index f1e7f05aa9..4ee1444db3 100644
---- a/src/bootstrap/lib.rs
-+++ b/src/bootstrap/lib.rs
-@@ -842,14 +842,6 @@ impl Build {
- }
- }
-
-- /// Returns the "musl root" for this `target`, if defined
-- fn musl_root(&self, target: Interned<String>) -> Option<&Path> {
-- self.config.target_config.get(&target)
-- .and_then(|t| t.musl_root.as_ref())
-- .or(self.config.musl_root.as_ref())
-- .map(|p| &**p)
-- }
--
- /// Returns `true` if this is a no-std `target`, if defined
- fn no_std(&self, target: Interned<String>) -> Option<bool> {
- self.config.target_config.get(&target)
-diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index ff4fb85bbf..ff45200bde 100644
---- a/src/bootstrap/sanity.rs
-+++ b/src/bootstrap/sanity.rs
-@@ -169,34 +169,6 @@ pub fn check(build: &mut Build) {
- }
- }
-
-- // Make sure musl-root is valid
-- if target.contains("musl") {
-- // If this is a native target (host is also musl) and no musl-root is given,
-- // fall back to the system toolchain in /usr before giving up
-- if build.musl_root(*target).is_none() && build.config.build == *target {
-- let target = build.config.target_config.entry(target.clone())
-- .or_default();
-- target.musl_root = Some("/usr".into());
-- }
-- match build.musl_root(*target) {
-- Some(root) => {
-- if fs::metadata(root.join("lib/libc.a")).is_err() {
-- panic!("couldn't find libc.a in musl dir: {}",
-- root.join("lib").display());
-- }
-- if fs::metadata(root.join("lib/libunwind.a")).is_err() {
-- panic!("couldn't find libunwind.a in musl dir: {}",
-- root.join("lib").display());
-- }
-- }
-- None => {
-- panic!("when targeting MUSL either the rust.musl-root \
-- option or the target.$TARGET.musl-root option must \
-- be specified in config.toml")
-- }
-- }
-- }
--
- if target.contains("msvc") {
- // There are three builds of cmake on windows: MSVC, MinGW, and
- // Cygwin. The Cygwin build does not have generators for Visual
-diff --git a/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile b/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile
-index ba2d32a929..412c37fdd1 100644
---- a/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile
-+++ b/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile
-@@ -30,8 +30,6 @@ COPY scripts/sccache.sh /scripts/
- RUN sh /scripts/sccache.sh
-
- ENV RUST_CONFIGURE_ARGS \
-- --musl-root-i586=/musl-i586 \
-- --musl-root-i686=/musl-i686 \
- --enable-extended \
- --disable-docs
-
-diff --git a/src/ci/docker/dist-various-1/Dockerfile b/src/ci/docker/dist-various-1/Dockerfile
-index f80293b182..52f28df826 100644
---- a/src/ci/docker/dist-various-1/Dockerfile
-+++ b/src/ci/docker/dist-various-1/Dockerfile
-@@ -130,13 +130,6 @@ ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
- CXX_thumbv7neon_unknown_linux_gnueabihf=arm-linux-gnueabihf-g++
-
- ENV RUST_CONFIGURE_ARGS \
-- --musl-root-armv5te=/musl-armv5te \
-- --musl-root-arm=/musl-arm \
-- --musl-root-armhf=/musl-armhf \
-- --musl-root-armv7=/musl-armv7 \
-- --musl-root-aarch64=/musl-aarch64 \
-- --musl-root-mips=/musl-mips \
-- --musl-root-mipsel=/musl-mipsel \
- --enable-emscripten \
- --disable-docs
-
-diff --git a/src/ci/docker/dist-x86_64-musl/Dockerfile b/src/ci/docker/dist-x86_64-musl/Dockerfile
-index 06f8a2fbba..f5dd379528 100644
---- a/src/ci/docker/dist-x86_64-musl/Dockerfile
-+++ b/src/ci/docker/dist-x86_64-musl/Dockerfile
-@@ -30,7 +30,6 @@ COPY scripts/sccache.sh /scripts/
- RUN sh /scripts/sccache.sh
-
- ENV RUST_CONFIGURE_ARGS \
-- --musl-root-x86_64=/musl-x86_64 \
- --enable-extended \
- --disable-docs
-
-diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/spec/linux_musl_base.rs
-index e294e63982..58ae91a96a 100644
---- a/src/librustc_target/spec/linux_musl_base.rs
-+++ b/src/librustc_target/spec/linux_musl_base.rs
-@@ -3,28 +3,12 @@ use crate::spec::{LinkerFlavor, TargetOptions};
- pub fn opts() -> TargetOptions {
- let mut base = super::linux_base::opts();
-
-- // Make sure that the linker/gcc really don't pull in anything, including
-- // default objects, libs, etc.
-- base.pre_link_args_crt.insert(LinkerFlavor::Gcc, Vec::new());
-- base.pre_link_args_crt.get_mut(&LinkerFlavor::Gcc).unwrap().push("-nostdlib".to_string());
--
- // At least when this was tested, the linker would not add the
- // `GNU_EH_FRAME` program header to executables generated, which is required
- // when unwinding to locate the unwinding information. I'm not sure why this
- // argument is *not* necessary for normal builds, but it can't hurt!
- base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,--eh-frame-hdr".to_string());
-
-- // When generating a statically linked executable there's generally some
-- // small setup needed which is listed in these files. These are provided by
-- // a musl toolchain and are linked by default by the `musl-gcc` script. Note
-- // that `gcc` also does this by default, it just uses some different files.
-- //
-- // Each target directory for musl has these object files included in it so
-- // they'll be included from there.
-- base.pre_link_objects_exe_crt.push("crt1.o".to_string());
-- base.pre_link_objects_exe_crt.push("crti.o".to_string());
-- base.post_link_objects_crt.push("crtn.o".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.21.0
-
diff --git a/dev-lang/rust/files/0004-Require-static-native-libraries-when-linking-static-.patch b/dev-lang/rust/files/0005-Use-static-native-libraries-when-linking-static-exec.patch
similarity index 56%
rename from dev-lang/rust/files/0004-Require-static-native-libraries-when-linking-static-.patch
rename to dev-lang/rust/files/0005-Use-static-native-libraries-when-linking-static-exec.patch
index 6238e50..5d1836d 100644
--- a/dev-lang/rust/files/0004-Require-static-native-libraries-when-linking-static-.patch
+++ b/dev-lang/rust/files/0005-Use-static-native-libraries-when-linking-static-exec.patch
@@ -1,7 +1,7 @@
-From 859624e56281aff33673dcceb34698bd30eceea3 Mon Sep 17 00:00:00 2001
+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 04/14] Require static native libraries when linking static
+Subject: [PATCH 05/15] Use static native libraries when linking static
executables
On ELF targets like Linux, gcc/ld will create a dynamically-linked
@@ -9,17 +9,15 @@ 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.
-
-Fixes #54243
---
- src/librustc_codegen_llvm/back/link.rs | 18 ++++++++++++++----
- 1 file changed, 14 insertions(+), 4 deletions(-)
+ src/librustc_codegen_ssa/back/link.rs | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
-diff --git a/src/librustc_codegen_llvm/back/link.rs b/src/librustc_codegen_llvm/back/link.rs
-index 819f7f9410..49adc5dfca 100644
---- a/src/librustc_codegen_llvm/back/link.rs
-+++ b/src/librustc_codegen_llvm/back/link.rs
-@@ -1413,9 +1413,7 @@ fn add_upstream_rust_crates(cmd: &mut dyn Linker,
+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>>(
}
}
@@ -30,27 +28,28 @@ index 819f7f9410..49adc5dfca 100644
//
// 1. The upstream crate is an rlib. In this case we *must* link in the
// native dependency because the rlib is just an archive.
-@@ -1458,7 +1456,19 @@ fn add_upstream_native_libraries(cmd: &mut dyn Linker,
- continue
+@@ -2108,7 +2106,20 @@ fn add_upstream_native_libraries(
+ continue;
}
match lib.kind {
-- NativeLibraryKind::NativeUnknown => cmd.link_dylib(&name.as_str()),
-+ NativeLibraryKind::NativeUnknown => {
+- 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()
++ && sess.crt_static(Some(crate_type))
+ && !sess.target.target.options.crt_static_allows_dylibs
+ {
-+ cmd.link_staticlib(&name.as_str())
++ cmd.link_staticlib(name)
+ } else {
-+ cmd.link_dylib(&name.as_str())
++ cmd.link_dylib(name)
+ }
+ },
- NativeLibraryKind::NativeFramework => cmd.link_framework(&name.as_str()),
- NativeLibraryKind::NativeStaticNobundle => {
++ 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.21.0
+2.26.2
diff --git a/dev-lang/rust/files/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch b/dev-lang/rust/files/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
deleted file mode 100644
index ea8a7a0..0000000
--- a/dev-lang/rust/files/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From af88a145ea4fbcda9f1d16a53a341282d2129b07 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sat, 9 Sep 2017 00:14:16 -0500
-Subject: [PATCH 06/14] Prefer libgcc_eh over libunwind for musl
-
----
- src/libunwind/lib.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs
-index 0ccffea317..935175dd8d 100644
---- a/src/libunwind/lib.rs
-+++ b/src/libunwind/lib.rs
-@@ -26,6 +26,6 @@ cfg_if! {
- }
-
- #[cfg(target_env = "musl")]
--#[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
-+#[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
- #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
- extern {}
---
-2.21.0
-
diff --git a/dev-lang/rust/files/0006-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch b/dev-lang/rust/files/0006-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch
new file mode 100644
index 0000000..f241be8
--- /dev/null
+++ b/dev-lang/rust/files/0006-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch
@@ -0,0 +1,486 @@
+From 1e13488d9fc661f8f489609dcfc6ed8b61957ca3 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Fri, 8 Sep 2017 22:11:14 -0500
+Subject: [PATCH 06/15] Remove musl_root and CRT fallback from musl targets
+
+---
+ config.toml.example | 12 --------
+ src/bootstrap/cc_detect.rs | 27 ++----------------
+ src/bootstrap/compile.rs | 28 +------------------
+ src/bootstrap/config.rs | 10 -------
+ src/bootstrap/configure.py | 28 -------------------
+ src/bootstrap/lib.rs | 19 -------------
+ src/bootstrap/sanity.rs | 22 ---------------
+ .../dist-i586-gnu-i586-i686-musl/Dockerfile | 2 --
+ .../host-x86_64/dist-various-1/Dockerfile | 9 ------
+ .../host-x86_64/dist-various-2/Dockerfile | 3 +-
+ .../host-x86_64/dist-x86_64-musl/Dockerfile | 1 -
+ .../host-x86_64/test-various/Dockerfile | 1 -
+ src/librustc_codegen_ssa/back/link.rs | 6 +---
+ src/librustc_target/spec/crt_objects.rs | 18 ------------
+ src/librustc_target/spec/linux_musl_base.rs | 5 ----
+ 15 files changed, 5 insertions(+), 186 deletions(-)
+
+diff --git a/config.toml.example b/config.toml.example
+index 36587cc0784..c74dd740868 100644
+--- a/config.toml.example
++++ b/config.toml.example
+@@ -385,9 +385,6 @@
+ # nightly features
+ #channel = "dev"
+
+-# The root location of the musl installation directory.
+-#musl-root = "..."
+-
+ # By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
+ # platforms to ensure that the compiler is usable by default from the build
+ # directory (as it links to a number of dynamic libraries). This may not be
+@@ -530,15 +527,6 @@
+ # only use static libraries. If unset, the target's default linkage is used.
+ #crt-static = false
+
+-# The root location of the musl installation directory. The library directory
+-# will also need to contain libunwind.a for an unwinding implementation. Note
+-# that this option only makes sense for musl targets that produce statically
+-# linked binaries
+-#musl-root = "..."
+-
+-# The full path to the musl libdir.
+-#musl-libdir = musl-root/lib
+-
+ # The root location of the `wasm32-wasi` sysroot.
+ #wasi-root = "..."
+
+diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
+index 7ff00d85dd2..ae80d8a5963 100644
+--- a/src/bootstrap/cc_detect.rs
++++ b/src/bootstrap/cc_detect.rs
+@@ -42,8 +42,6 @@ fn cc2ar(cc: &Path, target: TargetSelection) -> Option<PathBuf> {
+ Some(PathBuf::from(ar))
+ } else if target.contains("msvc") {
+ None
+- } else if target.contains("musl") {
+- Some(PathBuf::from("ar"))
+ } else if target.contains("openbsd") {
+ Some(PathBuf::from("ar"))
+ } else if target.contains("vxworks") {
+@@ -98,7 +96,7 @@ pub fn find(build: &mut Build) {
+ if let Some(cc) = config.and_then(|c| c.cc.as_ref()) {
+ cfg.compiler(cc);
+ } else {
+- set_compiler(&mut cfg, Language::C, target, config, build);
++ set_compiler(&mut cfg, Language::C, target, config);
+ }
+
+ let compiler = cfg.get_compiler();
+@@ -126,7 +124,7 @@ pub fn find(build: &mut Build) {
+ cfg.compiler(cxx);
+ true
+ } else if build.hosts.contains(&target) || build.build == target {
+- set_compiler(&mut cfg, Language::CPlusPlus, target, config, build);
++ set_compiler(&mut cfg, Language::CPlusPlus, target, config);
+ true
+ } else {
+ false
+@@ -155,7 +153,6 @@ fn set_compiler(
+ compiler: Language,
+ target: TargetSelection,
+ config: Option<&Target>,
+- build: &Build,
+ ) {
+ match &*target.triple {
+ // When compiling for android we may have the NDK configured in the
+@@ -198,26 +195,6 @@ fn set_compiler(
+ }
+ }
+
+- "mips-unknown-linux-musl" => {
+- if cfg.get_compiler().path().to_str() == Some("gcc") {
+- cfg.compiler("mips-linux-musl-gcc");
+- }
+- }
+- "mipsel-unknown-linux-musl" => {
+- if cfg.get_compiler().path().to_str() == Some("gcc") {
+- cfg.compiler("mipsel-linux-musl-gcc");
+- }
+- }
+-
+- t if t.contains("musl") => {
+- if let Some(root) = build.musl_root(target) {
+- let guess = root.join("bin/musl-gcc");
+- if guess.exists() {
+- cfg.compiler(guess);
+- }
+- }
+- }
+-
+ _ => {}
+ }
+ }
+diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
+index 373e240cb8e..0be09300f7c 100644
+--- a/src/bootstrap/compile.rs
++++ b/src/bootstrap/compile.rs
+@@ -166,24 +166,7 @@ fn copy_self_contained_objects(
+
+ // Copies the CRT objects.
+ //
+- // rustc historically provides a more self-contained installation for musl targets
+- // not requiring the presence of a native musl toolchain. For example, it can fall back
+- // to using gcc from a glibc-targeting toolchain for linking.
+- // To do that we have to distribute musl startup objects as a part of Rust toolchain
+- // and link with them manually in the self-contained mode.
+- if target.contains("musl") {
+- let srcdir = builder.musl_libdir(target).unwrap();
+- for &obj in &["crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
+- copy_and_stamp(
+- builder,
+- &libdir_self_contained,
+- &srcdir,
+- obj,
+- &mut target_deps,
+- DependencyType::TargetSelfContained,
+- );
+- }
+- } else if target.ends_with("-wasi") {
++ if target.ends_with("-wasi") {
+ let srcdir = builder.wasi_root(target).unwrap().join("lib/wasm32-wasi");
+ copy_and_stamp(
+ builder,
+@@ -258,15 +241,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+ .arg("--manifest-path")
+ .arg(builder.src.join("library/test/Cargo.toml"));
+
+- // Help the libc crate compile by assisting it in finding various
+- // sysroot native libraries.
+- if target.contains("musl") {
+- if let Some(p) = builder.musl_libdir(target) {
+- let root = format!("native={}", p.to_str().unwrap());
+- cargo.rustflag("-L").rustflag(&root);
+- }
+- }
+-
+ if target.ends_with("-wasi") {
+ if let Some(p) = builder.wasi_root(target) {
+ let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap());
+diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
+index 8b8b01b1153..d4469ed1f96 100644
+--- a/src/bootstrap/config.rs
++++ b/src/bootstrap/config.rs
+@@ -137,8 +137,6 @@ pub struct Config {
+ pub print_step_timings: bool,
+ pub missing_tools: bool,
+
+- // Fallback musl-root for all targets
+- pub musl_root: Option<PathBuf>,
+ pub prefix: Option<PathBuf>,
+ pub sysconfdir: Option<PathBuf>,
+ pub datadir: Option<PathBuf>,
+@@ -235,8 +233,6 @@ pub struct Target {
+ pub linker: Option<PathBuf>,
+ pub ndk: Option<PathBuf>,
+ pub crt_static: Option<bool>,
+- pub musl_root: Option<PathBuf>,
+- pub musl_libdir: Option<PathBuf>,
+ pub wasi_root: Option<PathBuf>,
+ pub qemu_rootfs: Option<PathBuf>,
+ pub no_std: bool,
+@@ -390,7 +386,6 @@ struct Rust {
+ parallel_compiler: Option<bool>,
+ default_linker: Option<String>,
+ channel: Option<String>,
+- musl_root: Option<String>,
+ rpath: Option<bool>,
+ verbose_tests: Option<bool>,
+ optimize_tests: Option<bool>,
+@@ -427,8 +422,6 @@ struct TomlTarget {
+ llvm_filecheck: Option<String>,
+ android_ndk: Option<String>,
+ crt_static: Option<bool>,
+- musl_root: Option<String>,
+- musl_libdir: Option<String>,
+ wasi_root: Option<String>,
+ qemu_rootfs: Option<String>,
+ no_std: Option<bool>,
+@@ -659,7 +652,6 @@ impl Config {
+ set(&mut config.llvm_tools_enabled, rust.llvm_tools);
+ config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
+ config.rustc_default_linker = rust.default_linker.clone();
+- config.musl_root = rust.musl_root.clone().map(PathBuf::from);
+ config.save_toolstates = rust.save_toolstates.clone().map(PathBuf::from);
+ set(&mut config.deny_warnings, flags.deny_warnings.or(rust.deny_warnings));
+ set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
+@@ -699,8 +691,6 @@ impl Config {
+ target.ranlib = cfg.ranlib.clone().map(PathBuf::from);
+ target.linker = cfg.linker.clone().map(PathBuf::from);
+ target.crt_static = cfg.crt_static;
+- target.musl_root = cfg.musl_root.clone().map(PathBuf::from);
+- target.musl_libdir = cfg.musl_libdir.clone().map(PathBuf::from);
+ target.wasi_root = cfg.wasi_root.clone().map(PathBuf::from);
+ target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from);
+
+diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
+index 47673ce1e87..33004e317ce 100755
+--- a/src/bootstrap/configure.py
++++ b/src/bootstrap/configure.py
+@@ -109,34 +109,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
+ "aarch64-linux-android NDK standalone path")
+ v("x86_64-linux-android-ndk", "target.x86_64-linux-android.android-ndk",
+ "x86_64-linux-android NDK standalone path")
+-v("musl-root", "target.x86_64-unknown-linux-musl.musl-root",
+- "MUSL root installation directory (deprecated)")
+-v("musl-root-x86_64", "target.x86_64-unknown-linux-musl.musl-root",
+- "x86_64-unknown-linux-musl install directory")
+-v("musl-root-i586", "target.i586-unknown-linux-musl.musl-root",
+- "i586-unknown-linux-musl install directory")
+-v("musl-root-i686", "target.i686-unknown-linux-musl.musl-root",
+- "i686-unknown-linux-musl install directory")
+-v("musl-root-arm", "target.arm-unknown-linux-musleabi.musl-root",
+- "arm-unknown-linux-musleabi install directory")
+-v("musl-root-armhf", "target.arm-unknown-linux-musleabihf.musl-root",
+- "arm-unknown-linux-musleabihf install directory")
+-v("musl-root-armv5te", "target.armv5te-unknown-linux-musleabi.musl-root",
+- "armv5te-unknown-linux-musleabi install directory")
+-v("musl-root-armv7", "target.armv7-unknown-linux-musleabi.musl-root",
+- "armv7-unknown-linux-musleabi install directory")
+-v("musl-root-armv7hf", "target.armv7-unknown-linux-musleabihf.musl-root",
+- "armv7-unknown-linux-musleabihf install directory")
+-v("musl-root-aarch64", "target.aarch64-unknown-linux-musl.musl-root",
+- "aarch64-unknown-linux-musl install directory")
+-v("musl-root-mips", "target.mips-unknown-linux-musl.musl-root",
+- "mips-unknown-linux-musl install directory")
+-v("musl-root-mipsel", "target.mipsel-unknown-linux-musl.musl-root",
+- "mipsel-unknown-linux-musl install directory")
+-v("musl-root-mips64", "target.mips64-unknown-linux-muslabi64.musl-root",
+- "mips64-unknown-linux-muslabi64 install directory")
+-v("musl-root-mips64el", "target.mips64el-unknown-linux-muslabi64.musl-root",
+- "mips64el-unknown-linux-muslabi64 install directory")
+ v("qemu-armhf-rootfs", "target.arm-unknown-linux-gnueabihf.qemu-rootfs",
+ "rootfs in qemu testing, you probably don't want to use this")
+ v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs",
+diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
+index 77316c734b8..b92da611a51 100644
+--- a/src/bootstrap/lib.rs
++++ b/src/bootstrap/lib.rs
+@@ -875,25 +875,6 @@ impl Build {
+ }
+ }
+
+- /// Returns the "musl root" for this `target`, if defined
+- fn musl_root(&self, target: TargetSelection) -> Option<&Path> {
+- self.config
+- .target_config
+- .get(&target)
+- .and_then(|t| t.musl_root.as_ref())
+- .or_else(|| self.config.musl_root.as_ref())
+- .map(|p| &**p)
+- }
+-
+- /// Returns the "musl libdir" for this `target`.
+- fn musl_libdir(&self, target: TargetSelection) -> Option<PathBuf> {
+- let t = self.config.target_config.get(&target)?;
+- if let libdir @ Some(_) = &t.musl_libdir {
+- return libdir.clone();
+- }
+- self.musl_root(target).map(|root| root.join("lib"))
+- }
+-
+ /// Returns the sysroot for the wasi target, if defined
+ fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
+ self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
+diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
+index f89bef50de9..e22638c533e 100644
+--- a/src/bootstrap/sanity.rs
++++ b/src/bootstrap/sanity.rs
+@@ -195,28 +195,6 @@ pub fn check(build: &mut Build) {
+ }
+ }
+
+- // Make sure musl-root is valid
+- if target.contains("musl") {
+- // If this is a native target (host is also musl) and no musl-root is given,
+- // fall back to the system toolchain in /usr before giving up
+- if build.musl_root(*target).is_none() && build.config.build == *target {
+- let target = build.config.target_config.entry(target.clone()).or_default();
+- target.musl_root = Some("/usr".into());
+- }
+- match build.musl_libdir(*target) {
+- Some(libdir) => {
+- if fs::metadata(libdir.join("libc.a")).is_err() {
+- panic!("couldn't find libc.a in musl libdir: {}", libdir.display());
+- }
+- }
+- None => panic!(
+- "when targeting MUSL either the rust.musl-root \
+- option or the target.$TARGET.musl-root option must \
+- be specified in config.toml"
+- ),
+- }
+- }
+-
+ if target.contains("msvc") {
+ // There are three builds of cmake on windows: MSVC, MinGW, and
+ // Cygwin. The Cygwin build does not have generators for Visual
+diff --git a/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile
+index 162d7a1345c..48f025fd542 100644
+--- a/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile
++++ b/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile
+@@ -30,8 +30,6 @@ COPY scripts/sccache.sh /scripts/
+ RUN sh /scripts/sccache.sh
+
+ ENV RUST_CONFIGURE_ARGS \
+- --musl-root-i586=/musl-i586 \
+- --musl-root-i686=/musl-i686 \
+ --disable-docs
+
+ # Newer binutils broke things on some vms/distros (i.e., linking against
+diff --git a/src/ci/docker/host-x86_64/dist-various-1/Dockerfile b/src/ci/docker/host-x86_64/dist-various-1/Dockerfile
+index fdd777e824b..2b3d090c1ae 100644
+--- a/src/ci/docker/host-x86_64/dist-various-1/Dockerfile
++++ b/src/ci/docker/host-x86_64/dist-various-1/Dockerfile
+@@ -180,15 +180,6 @@ ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
+ CC_riscv64gc_unknown_none_elf=false
+
+ ENV RUST_CONFIGURE_ARGS \
+- --musl-root-armv5te=/musl-armv5te \
+- --musl-root-arm=/musl-arm \
+- --musl-root-armhf=/musl-armhf \
+- --musl-root-armv7hf=/musl-armv7hf \
+- --musl-root-aarch64=/musl-aarch64 \
+- --musl-root-mips=/musl-mips \
+- --musl-root-mipsel=/musl-mipsel \
+- --musl-root-mips64=/musl-mips64 \
+- --musl-root-mips64el=/musl-mips64el \
+ --disable-docs
+
+ ENV SCRIPT \
+diff --git a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile
+index 3081f29aef2..223547bf8cd 100644
+--- a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile
++++ b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile
+@@ -107,7 +107,6 @@ ENV TARGETS=$TARGETS,armv7-unknown-linux-musleabi
+ RUN ln -s /usr/include/asm-generic /usr/local/include/asm
+
+ ENV RUST_CONFIGURE_ARGS --enable-extended --enable-lld --disable-docs \
+- --set target.wasm32-wasi.wasi-root=/wasm32-wasi \
+- --musl-root-armv7=/musl-armv7
++ --set target.wasm32-wasi.wasi-root=/wasm32-wasi
+
+ ENV SCRIPT python3 ../x.py dist --target $TARGETS
+diff --git a/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile
+index ab6515cd1fa..5203d604150 100644
+--- a/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile
++++ b/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile
+@@ -31,7 +31,6 @@ RUN sh /scripts/sccache.sh
+ ENV HOSTS=x86_64-unknown-linux-musl
+
+ ENV RUST_CONFIGURE_ARGS \
+- --musl-root-x86_64=/usr/local/x86_64-linux-musl \
+ --enable-extended \
+ --enable-lld \
+ --set target.x86_64-unknown-linux-musl.crt-static=false \
+diff --git a/src/ci/docker/host-x86_64/test-various/Dockerfile b/src/ci/docker/host-x86_64/test-various/Dockerfile
+index c55a284e137..a808a915fcb 100644
+--- a/src/ci/docker/host-x86_64/test-various/Dockerfile
++++ b/src/ci/docker/host-x86_64/test-various/Dockerfile
+@@ -29,7 +29,6 @@ COPY scripts/sccache.sh /scripts/
+ RUN sh /scripts/sccache.sh
+
+ ENV RUST_CONFIGURE_ARGS \
+- --musl-root-x86_64=/usr/local/x86_64-linux-musl \
+ --set build.nodejs=/node-v14.4.0-linux-x64/bin/node \
+ --set rust.lld
+
+diff --git a/src/librustc_codegen_ssa/back/link.rs b/src/librustc_codegen_ssa/back/link.rs
+index 70bc9d5e980..b35fe073d26 100644
+--- a/src/librustc_codegen_ssa/back/link.rs
++++ b/src/librustc_codegen_ssa/back/link.rs
+@@ -1288,16 +1288,12 @@ fn link_output_kind(sess: &Session, crate_type: CrateType) -> LinkOutputKind {
+
+ /// Whether we link to our own CRT objects instead of relying on gcc to pull them.
+ /// We only provide such support for a very limited number of targets.
+-fn crt_objects_fallback(sess: &Session, crate_type: CrateType) -> bool {
++fn crt_objects_fallback(sess: &Session, _crate_type: CrateType) -> bool {
+ if let Some(self_contained) = sess.opts.debugging_opts.link_self_contained {
+ return self_contained;
+ }
+
+ match sess.target.target.options.crt_objects_fallback {
+- // FIXME: Find a better heuristic for "native musl toolchain is available",
+- // based on host and linker path, for example.
+- // (https://github.com/rust-lang/rust/pull/71769#issuecomment-626330237).
+- Some(CrtObjectsFallback::Musl) => sess.crt_static(Some(crate_type)),
+ // FIXME: Find some heuristic for "native mingw toolchain is available",
+ // likely based on `get_crt_libs_path` (https://github.com/rust-lang/rust/pull/67429).
+ Some(CrtObjectsFallback::Mingw) => {
+diff --git a/src/librustc_target/spec/crt_objects.rs b/src/librustc_target/spec/crt_objects.rs
+index 8991691a9a3..b7e47afd942 100644
+--- a/src/librustc_target/spec/crt_objects.rs
++++ b/src/librustc_target/spec/crt_objects.rs
+@@ -61,21 +61,6 @@ pub(super) fn all(obj: &str) -> CrtObjects {
+ ])
+ }
+
+-pub(super) fn pre_musl_fallback() -> CrtObjects {
+- new(&[
+- (LinkOutputKind::DynamicNoPicExe, &["crt1.o", "crti.o"]),
+- (LinkOutputKind::DynamicPicExe, &["Scrt1.o", "crti.o"]),
+- (LinkOutputKind::StaticNoPicExe, &["crt1.o", "crti.o"]),
+- (LinkOutputKind::StaticPicExe, &["rcrt1.o", "crti.o"]),
+- (LinkOutputKind::DynamicDylib, &["crti.o"]),
+- (LinkOutputKind::StaticDylib, &["crti.o"]),
+- ])
+-}
+-
+-pub(super) fn post_musl_fallback() -> CrtObjects {
+- all("crtn.o")
+-}
+-
+ pub(super) fn pre_mingw_fallback() -> CrtObjects {
+ new(&[
+ (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
+@@ -115,7 +100,6 @@ pub(super) fn post_wasi_fallback() -> CrtObjects {
+ /// Which logic to use to determine whether to fall back to the "self-contained" mode or not.
+ #[derive(Clone, Copy, PartialEq, Hash, Debug)]
+ pub enum CrtObjectsFallback {
+- Musl,
+ Mingw,
+ Wasm,
+ }
+@@ -125,7 +109,6 @@ impl FromStr for CrtObjectsFallback {
+
+ fn from_str(s: &str) -> Result<CrtObjectsFallback, ()> {
+ Ok(match s {
+- "musl" => CrtObjectsFallback::Musl,
+ "mingw" => CrtObjectsFallback::Mingw,
+ "wasm" => CrtObjectsFallback::Wasm,
+ _ => return Err(()),
+@@ -136,7 +119,6 @@ impl FromStr for CrtObjectsFallback {
+ impl ToJson for CrtObjectsFallback {
+ fn to_json(&self) -> Json {
+ match *self {
+- CrtObjectsFallback::Musl => "musl",
+ CrtObjectsFallback::Mingw => "mingw",
+ CrtObjectsFallback::Wasm => "wasm",
+ }
+diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/spec/linux_musl_base.rs
+index b90e91d2901..c5f5f99a96d 100644
+--- a/src/librustc_target/spec/linux_musl_base.rs
++++ b/src/librustc_target/spec/linux_musl_base.rs
+@@ -1,13 +1,8 @@
+-use crate::spec::crt_objects::{self, CrtObjectsFallback};
+ use crate::spec::TargetOptions;
+
+ pub fn opts() -> TargetOptions {
+ let mut base = super::linux_base::opts();
+
+- base.pre_link_objects_fallback = crt_objects::pre_musl_fallback();
+- base.post_link_objects_fallback = crt_objects::post_musl_fallback();
+- base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
+-
+ // 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/0007-Prefer-libgcc_eh-over-libunwind-for-musl.patch b/dev-lang/rust/files/0007-Prefer-libgcc_eh-over-libunwind-for-musl.patch
new file mode 100644
index 0000000..3472588
--- /dev/null
+++ b/dev-lang/rust/files/0007-Prefer-libgcc_eh-over-libunwind-for-musl.patch
@@ -0,0 +1,38 @@
+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/0007-runtest-Fix-proc-macro-tests-on-musl-hosts.patch b/dev-lang/rust/files/0007-runtest-Fix-proc-macro-tests-on-musl-hosts.patch
deleted file mode 100644
index 06eebb9..0000000
--- a/dev-lang/rust/files/0007-runtest-Fix-proc-macro-tests-on-musl-hosts.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From a7c6bcd4834952f3f5b0483dd71b47407d9fb186 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:40:04 +0000
-Subject: [PATCH 07/14] runtest: Fix proc-macro tests on musl hosts
-
----
- src/tools/compiletest/src/runtest.rs | 7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
-
-diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
-index 7781ce74f4..5d73545b1f 100644
---- a/src/tools/compiletest/src/runtest.rs
-+++ b/src/tools/compiletest/src/runtest.rs
-@@ -1604,7 +1604,6 @@ impl<'test> TestCx<'test> {
- None
- } else if self.config.target.contains("cloudabi")
- || self.config.target.contains("emscripten")
-- || (self.config.target.contains("musl") && !aux_props.force_host)
- || self.config.target.contains("wasm32")
- {
- // We primarily compile all auxiliary libraries as dynamic libraries
-@@ -1612,10 +1611,8 @@ impl<'test> TestCx<'test> {
- // for the test suite (otherwise including libstd statically in all
- // executables takes up quite a bit of space).
- //
-- // For targets like MUSL or Emscripten, however, there is no support for
-- // dynamic libraries so we just go back to building a normal library. Note,
-- // however, that for MUSL if the library is built with `force_host` then
-- // it's ok to be a dylib as the host should always support dylibs.
-+ // For targets like Emscripten, however, there is no support for
-+ // dynamic libraries so we just go back to building a normal library.
- Some("lib")
- } else {
- Some("dylib")
---
-2.21.0
-
diff --git a/dev-lang/rust/files/0008-Correct-minimum-system-LLVM-version-in-tests.patch b/dev-lang/rust/files/0008-Correct-minimum-system-LLVM-version-in-tests.patch
deleted file mode 100644
index 1da2bec..0000000
--- a/dev-lang/rust/files/0008-Correct-minimum-system-LLVM-version-in-tests.patch
+++ /dev/null
@@ -1,206 +0,0 @@
-From b038aa4b514a520c3ad2a6ab0e518cb8d45c4ca0 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Fri, 22 Mar 2019 17:08:06 -0500
-Subject: [PATCH 08/14] Correct minimum system LLVM version in tests
-
-Since commit 9452a8dfa3ba, the new debug info format is only generated
-for LLVM 8 and newer versions. However, the tests still assume that LLVM
-7 will use the new debug info format. Fix the tests (and a comment in
-the code) to match the actual version check.
----
- src/librustc_codegen_llvm/debuginfo/metadata.rs | 8 +++++---
- src/test/codegen/enum-debug-clike.rs | 2 +-
- src/test/codegen/enum-debug-niche-2.rs | 2 +-
- src/test/codegen/enum-debug-niche.rs | 2 +-
- src/test/codegen/enum-debug-tagged.rs | 2 +-
- src/test/debuginfo/borrowed-enum.rs | 2 +-
- .../debuginfo/generic-enum-with-different-disr-sizes.rs | 2 +-
- src/test/debuginfo/generic-struct-style-enum.rs | 2 +-
- src/test/debuginfo/generic-tuple-style-enum.rs | 2 +-
- src/test/debuginfo/recursive-struct.rs | 2 +-
- src/test/debuginfo/struct-style-enum.rs | 2 +-
- src/test/debuginfo/tuple-style-enum.rs | 2 +-
- src/test/debuginfo/unique-enum.rs | 2 +-
- 13 files changed, 17 insertions(+), 15 deletions(-)
-
-diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs
-index ddcbf29da8..8efa025e3d 100644
---- a/src/librustc_codegen_llvm/debuginfo/metadata.rs
-+++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs
-@@ -1156,12 +1156,14 @@ fn prepare_union_metadata(
- // Enums
- //=-----------------------------------------------------------------------------
-
--// DWARF variant support is only available starting in LLVM 7.
-+// DWARF variant support is only available starting in LLVM 8.
- // Although the earlier enum debug info output did not work properly
- // in all situations, it is better for the time being to continue to
- // sometimes emit the old style rather than emit something completely
--// useless when rust is compiled against LLVM 6 or older. This
--// function decides which representation will be emitted.
-+// useless when rust is compiled against LLVM 6 or older. LLVM 7
-+// contains an early version of the DWARF variant support, and will
-+// crash when handling the new debug info format. This function
-+// decides which representation will be emitted.
- fn use_enum_fallback(cx: &CodegenCx<'_, '_>) -> bool {
- // On MSVC we have to use the fallback mode, because LLVM doesn't
- // lower variant parts to PDB.
-diff --git a/src/test/codegen/enum-debug-clike.rs b/src/test/codegen/enum-debug-clike.rs
-index 62cfef5a84..f268c8bcbc 100644
---- a/src/test/codegen/enum-debug-clike.rs
-+++ b/src/test/codegen/enum-debug-clike.rs
-@@ -4,7 +4,7 @@
-
- // ignore-tidy-linelength
- // ignore-windows
--// min-system-llvm-version 7.0
-+// min-system-llvm-version 8.0
-
- // compile-flags: -g -C no-prepopulate-passes
-
-diff --git a/src/test/codegen/enum-debug-niche-2.rs b/src/test/codegen/enum-debug-niche-2.rs
-index 369fa1fcfd..aa6cbf66b4 100644
---- a/src/test/codegen/enum-debug-niche-2.rs
-+++ b/src/test/codegen/enum-debug-niche-2.rs
-@@ -4,7 +4,7 @@
-
- // ignore-tidy-linelength
- // ignore-windows
--// min-system-llvm-version 7.0
-+// min-system-llvm-version 8.0
-
- // compile-flags: -g -C no-prepopulate-passes
-
-diff --git a/src/test/codegen/enum-debug-niche.rs b/src/test/codegen/enum-debug-niche.rs
-index 1273a785ba..93eebde7b8 100644
---- a/src/test/codegen/enum-debug-niche.rs
-+++ b/src/test/codegen/enum-debug-niche.rs
-@@ -4,7 +4,7 @@
-
- // ignore-tidy-linelength
- // ignore-windows
--// min-system-llvm-version 7.0
-+// min-system-llvm-version 8.0
-
- // compile-flags: -g -C no-prepopulate-passes
-
-diff --git a/src/test/codegen/enum-debug-tagged.rs b/src/test/codegen/enum-debug-tagged.rs
-index 5c37e40c27..84976ce97a 100644
---- a/src/test/codegen/enum-debug-tagged.rs
-+++ b/src/test/codegen/enum-debug-tagged.rs
-@@ -4,7 +4,7 @@
-
- // ignore-tidy-linelength
- // ignore-windows
--// min-system-llvm-version 7.0
-+// min-system-llvm-version 8.0
-
- // compile-flags: -g -C no-prepopulate-passes
-
-diff --git a/src/test/debuginfo/borrowed-enum.rs b/src/test/debuginfo/borrowed-enum.rs
-index e27a31dd0e..63c11f59c1 100644
---- a/src/test/debuginfo/borrowed-enum.rs
-+++ b/src/test/debuginfo/borrowed-enum.rs
-@@ -1,7 +1,7 @@
- // ignore-tidy-linelength
-
- // Require LLVM with DW_TAG_variant_part and a gdb or lldb that can read it.
--// min-system-llvm-version: 7.0
-+// min-system-llvm-version: 8.0
- // min-gdb-version: 8.2
- // rust-lldb
-
-diff --git a/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs b/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
-index 9392aa7097..e26294cb73 100644
---- a/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
-+++ b/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
-@@ -3,7 +3,7 @@
- // min-lldb-version: 310
-
- // Require LLVM with DW_TAG_variant_part and a gdb that can read it.
--// min-system-llvm-version: 7.0
-+// min-system-llvm-version: 8.0
- // min-gdb-version: 8.2
-
- // compile-flags:-g
-diff --git a/src/test/debuginfo/generic-struct-style-enum.rs b/src/test/debuginfo/generic-struct-style-enum.rs
-index 3e59347030..3dc5cb807b 100644
---- a/src/test/debuginfo/generic-struct-style-enum.rs
-+++ b/src/test/debuginfo/generic-struct-style-enum.rs
-@@ -2,7 +2,7 @@
- // min-lldb-version: 310
-
- // Require LLVM with DW_TAG_variant_part and a gdb that can read it.
--// min-system-llvm-version: 7.0
-+// min-system-llvm-version: 8.0
- // min-gdb-version: 8.2
-
- // compile-flags:-g
-diff --git a/src/test/debuginfo/generic-tuple-style-enum.rs b/src/test/debuginfo/generic-tuple-style-enum.rs
-index 3c136add07..b16634ee6d 100644
---- a/src/test/debuginfo/generic-tuple-style-enum.rs
-+++ b/src/test/debuginfo/generic-tuple-style-enum.rs
-@@ -2,7 +2,7 @@
-
- // Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
- // read it.
--// min-system-llvm-version: 7.0
-+// min-system-llvm-version: 8.0
- // min-gdb-version: 8.2
- // rust-lldb
-
-diff --git a/src/test/debuginfo/recursive-struct.rs b/src/test/debuginfo/recursive-struct.rs
-index c3d2bea913..8fb83b7956 100644
---- a/src/test/debuginfo/recursive-struct.rs
-+++ b/src/test/debuginfo/recursive-struct.rs
-@@ -2,7 +2,7 @@
- // ignore-lldb
-
- // Require LLVM with DW_TAG_variant_part and a gdb that can read it.
--// min-system-llvm-version: 7.0
-+// min-system-llvm-version: 8.0
- // min-gdb-version: 8.2
-
- // compile-flags:-g
-diff --git a/src/test/debuginfo/struct-style-enum.rs b/src/test/debuginfo/struct-style-enum.rs
-index 1654c93209..5843b076b1 100644
---- a/src/test/debuginfo/struct-style-enum.rs
-+++ b/src/test/debuginfo/struct-style-enum.rs
-@@ -2,7 +2,7 @@
-
- // Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
- // read it.
--// min-system-llvm-version: 7.0
-+// min-system-llvm-version: 8.0
- // min-gdb-version: 8.2
- // rust-lldb
-
-diff --git a/src/test/debuginfo/tuple-style-enum.rs b/src/test/debuginfo/tuple-style-enum.rs
-index fd76bcb0af..4d9727a388 100644
---- a/src/test/debuginfo/tuple-style-enum.rs
-+++ b/src/test/debuginfo/tuple-style-enum.rs
-@@ -2,7 +2,7 @@
-
- // Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
- // read it.
--// min-system-llvm-version: 7.0
-+// min-system-llvm-version: 8.0
- // min-gdb-version: 8.2
- // rust-lldb
-
-diff --git a/src/test/debuginfo/unique-enum.rs b/src/test/debuginfo/unique-enum.rs
-index da0d06213e..32bd93f1ed 100644
---- a/src/test/debuginfo/unique-enum.rs
-+++ b/src/test/debuginfo/unique-enum.rs
-@@ -2,7 +2,7 @@
-
- // Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
- // read it.
--// min-system-llvm-version: 7.0
-+// min-system-llvm-version: 8.0
- // min-gdb-version: 8.2
- // rust-lldb
-
---
-2.21.0
-
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
new file mode 100644
index 0000000..969d4c5
--- /dev/null
+++ b/dev-lang/rust/files/0008-Link-libssp_nonshared.a-on-all-musl-targets.patch
@@ -0,0 +1,29 @@
+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
new file mode 100644
index 0000000..8639b2b
--- /dev/null
+++ b/dev-lang/rust/files/0009-test-failed-doctest-output-Fix-normalization.patch
@@ -0,0 +1,36 @@
+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
index 029544a..82772a1 100644
--- 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
@@ -1,7 +1,7 @@
-From 91e0c28a5642ef1eead598910e4a6bff071c9a4d Mon Sep 17 00:00:00 2001
+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/14] test/sysroot-crates-are-unstable: Fix test when rpath
+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
@@ -11,15 +11,15 @@ the sysroot path.
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 a35174b3c2..9e77070685 100644
+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:
-- python2.7 test.py
-+ env '$(HOST_RPATH_ENV)' python2.7 test.py
+- '$(PYTHON)' test.py
++ env '$(HOST_RPATH_ENV)' '$(PYTHON)' test.py
--
-2.21.0
+2.26.2
diff --git a/dev-lang/rust/files/0009-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
similarity index 79%
rename from dev-lang/rust/files/0009-test-use-extern-for-plugins-Don-t-assume-multilib.patch
rename to dev-lang/rust/files/0011-test-use-extern-for-plugins-Don-t-assume-multilib.patch
index 121e3c8..6f5fa8b 100644
--- a/dev-lang/rust/files/0009-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
@@ -1,18 +1,18 @@
-From ecfd3927df50b811ef1dff61abbdeed15daf7cd2 Mon Sep 17 00:00:00 2001
+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 09/14] test/use-extern-for-plugins: Don't assume multilib
+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 3976da3113..567a8d3157 100644
+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
-@@ -5,12 +5,7 @@
- # ignore-bitrig
+@@ -4,12 +4,7 @@
+ # ignore-openbsd
# ignore-sunos
-HOST := $(shell $(RUSTC) -vV | grep 'host:' | sed 's/host: //')
@@ -26,5 +26,5 @@ index 3976da3113..567a8d3157 100644
all:
$(RUSTC) foo.rs -C extra-filename=-host
--
-2.21.0
+2.26.2
diff --git a/dev-lang/rust/files/0011-Ignore-broken-and-non-applicable-tests.patch b/dev-lang/rust/files/0012-Ignore-broken-and-non-applicable-tests.patch
similarity index 55%
rename from dev-lang/rust/files/0011-Ignore-broken-and-non-applicable-tests.patch
rename to dev-lang/rust/files/0012-Ignore-broken-and-non-applicable-tests.patch
index 59d6b71..8569293 100644
--- a/dev-lang/rust/files/0011-Ignore-broken-and-non-applicable-tests.patch
+++ b/dev-lang/rust/files/0012-Ignore-broken-and-non-applicable-tests.patch
@@ -1,13 +1,11 @@
-From 0495caf6d9c4745ba3cedbdbb4dd690571e1cec0 Mon Sep 17 00:00:00 2001
+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 11/14] Ignore broken and non-applicable tests
+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
-simd-intrinsic-generic-select.rs: broken on BE, #59356
sparc-struct-abi: no sparc target
sysroot-crates-are-unstable: can't run rustc without RPATH
---
@@ -15,13 +13,11 @@ sysroot-crates-are-unstable: can't run rustc without RPATH
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/run-pass/env-funky-keys.rs | 1 +
- src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs | 2 ++
- src/test/run-pass/simd/simd-intrinsic-generic-select.rs | 2 ++
- 7 files changed, 12 insertions(+)
+ 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 78e5b14a21..6f93e93286 100644
+index 78e5b14a212..6f93e93286b 100644
--- a/src/test/codegen/sparc-struct-abi.rs
+++ b/src/test/codegen/sparc-struct-abi.rs
@@ -4,6 +4,7 @@
@@ -33,7 +29,7 @@ index 78e5b14a21..6f93e93286 100644
#![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 f124ca2ab6..363b18f098 100644
+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 @@
@@ -43,7 +39,7 @@ index f124ca2ab6..363b18f098 100644
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 5876fbc94b..5f167ece1a 100644
+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 @@
@@ -53,7 +49,7 @@ index 5876fbc94b..5f167ece1a 100644
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 9e77070685..6d92ec5cec 100644
+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 @@
@@ -62,43 +58,18 @@ index 9e77070685..6d92ec5cec 100644
-include ../tools.mk
all:
-diff --git a/src/test/run-pass/env-funky-keys.rs b/src/test/run-pass/env-funky-keys.rs
-index 79f32bd6c2..fc171687c9 100644
---- a/src/test/run-pass/env-funky-keys.rs
-+++ b/src/test/run-pass/env-funky-keys.rs
-@@ -1,5 +1,6 @@
+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/run-pass/simd/simd-intrinsic-generic-bitmask.rs b/src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs
-index b28f742a92..3ee4ccce73 100644
---- a/src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs
-+++ b/src/test/run-pass/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.
-
-diff --git a/src/test/run-pass/simd/simd-intrinsic-generic-select.rs b/src/test/run-pass/simd/simd-intrinsic-generic-select.rs
-index f79b140494..39080c8c90 100644
---- a/src/test/run-pass/simd/simd-intrinsic-generic-select.rs
-+++ b/src/test/run-pass/simd/simd-intrinsic-generic-select.rs
-@@ -2,6 +2,8 @@
- #![allow(non_camel_case_types)]
-
- // ignore-emscripten
-+// ignore-powerpc
-+// ignore-powerpc64
-
- // Test that the simd_select intrinsics produces correct results.
-
--
-2.21.0
+2.26.2
diff --git a/dev-lang/rust/files/0012-Link-stage-2-tools-dynamically-to-libstd.patch b/dev-lang/rust/files/0012-Link-stage-2-tools-dynamically-to-libstd.patch
deleted file mode 100644
index e4cac48..0000000
--- a/dev-lang/rust/files/0012-Link-stage-2-tools-dynamically-to-libstd.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From d7e94a443cd0876d384ccbc36a6eb21cfc3636d4 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 24 Sep 2018 23:42:23 +0000
-Subject: [PATCH 12/14] Link stage 2 tools dynamically to libstd
-
----
- src/bootstrap/tool.rs | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
-index fc1a17d546..880c2d52ba 100644
---- a/src/bootstrap/tool.rs
-+++ b/src/bootstrap/tool.rs
-@@ -207,7 +207,9 @@ pub fn prepare_tool_cargo(
-
- // We don't want to build tools dynamically as they'll be running across
- // stages and such and it's just easier if they're not dynamically linked.
-- cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
-+ if compiler.stage < 2 {
-+ cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
-+ }
-
- if source_type == SourceType::Submodule {
- cargo.env("RUSTC_EXTERNAL_TOOL", "1");
---
-2.21.0
-
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
new file mode 100644
index 0000000..bd16e6c
--- /dev/null
+++ b/dev-lang/rust/files/0013-Link-stage-2-tools-dynamically-to-libstd.patch
@@ -0,0 +1,25 @@
+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/0013-Move-debugger-scripts-to-usr-share-rust.patch b/dev-lang/rust/files/0013-Move-debugger-scripts-to-usr-share-rust.patch
deleted file mode 100644
index 8f5b2fb..0000000
--- a/dev-lang/rust/files/0013-Move-debugger-scripts-to-usr-share-rust.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From b3b713b954619af8768ad21bd73700291e9d7b58 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 17 Sep 2018 02:09:10 +0000
-Subject: [PATCH 13/14] Move debugger scripts to /usr/share/rust
-
----
- src/bootstrap/dist.rs | 2 +-
- src/etc/rust-gdb | 2 +-
- src/etc/rust-lldb | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index 2dae3f9135..642e4bfba8 100644
---- a/src/bootstrap/dist.rs
-+++ b/src/bootstrap/dist.rs
-@@ -595,7 +595,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 23ba93da8e..dc51b16c57 100755
---- a/src/etc/rust-gdb
-+++ b/src/etc/rust-gdb
-@@ -4,7 +4,7 @@ set -e
-
- # 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-lldb b/src/etc/rust-lldb
-index 424302d495..460e119210 100755
---- a/src/etc/rust-lldb
-+++ b/src/etc/rust-lldb
-@@ -26,7 +26,7 @@ display the contents of local variables!"
- fi
-
- # Prepare commands that will be loaded before any file on the command line has been loaded
--script_import="command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_rust_formatters.py\""
-+script_import="command script import \"$RUSTC_SYSROOT/share/rust/lldb_rust_formatters.py\""
- category_definition="type summary add --no-value --python-function lldb_rust_formatters.print_val -x \".*\" --category Rust"
- category_enable="type category enable Rust"
-
---
-2.21.0
-
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
new file mode 100644
index 0000000..ca1a1b4
--- /dev/null
+++ b/dev-lang/rust/files/0014-Move-debugger-scripts-to-usr-share-rust.patch
@@ -0,0 +1,69 @@
+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/0014-Add-gentoo-target-specs.patch b/dev-lang/rust/files/0015-Add-gentoo-target-specs.patch
similarity index 79%
rename from dev-lang/rust/files/0014-Add-gentoo-target-specs.patch
rename to dev-lang/rust/files/0015-Add-gentoo-target-specs.patch
index 36afe06..61a19b9 100644
--- a/dev-lang/rust/files/0014-Add-gentoo-target-specs.patch
+++ b/dev-lang/rust/files/0015-Add-gentoo-target-specs.patch
@@ -1,18 +1,18 @@
-From d4b28cd40d12ef2a801658176b31c6663c25d66f Mon Sep 17 00:00:00 2001
+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 14/14] Add gentoo target specs
+Subject: [PATCH 15/15] Add gentoo target specs
---
- .../spec/aarch64_gentoo_linux_musl.rs | 11 +++++++++++
- .../spec/arm_gentoo_linux_musleabi.rs | 11 +++++++++++
- .../spec/armv7a_gentoo_linux_musleabihf.rs | 11 +++++++++++
- src/librustc_target/spec/i686_gentoo_linux_musl.rs | 13 +++++++++++++
- src/librustc_target/spec/mod.rs | 11 ++++++++++-
- .../spec/powerpc64_gentoo_linux_musl.rs | 11 +++++++++++
- .../spec/powerpc_gentoo_linux_musl.rs | 13 +++++++++++++
- .../spec/x86_64_gentoo_linux_musl.rs | 11 +++++++++++
- 8 files changed, 91 insertions(+), 1 deletion(-)
+ 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
@@ -23,7 +23,7 @@ Subject: [PATCH 14/14] Add gentoo target specs
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 0000000000..420fe7cde7
+index 00000000000..420fe7cde70
--- /dev/null
+++ b/src/librustc_target/spec/aarch64_gentoo_linux_musl.rs
@@ -0,0 +1,11 @@
@@ -40,7 +40,7 @@ index 0000000000..420fe7cde7
+}
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 0000000000..d47ca84164
+index 00000000000..d47ca841647
--- /dev/null
+++ b/src/librustc_target/spec/arm_gentoo_linux_musleabi.rs
@@ -0,0 +1,11 @@
@@ -57,7 +57,7 @@ index 0000000000..d47ca84164
+}
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 0000000000..f5c85855c1
+index 00000000000..f5c85855c18
--- /dev/null
+++ b/src/librustc_target/spec/armv7a_gentoo_linux_musleabihf.rs
@@ -0,0 +1,11 @@
@@ -74,11 +74,11 @@ index 0000000000..f5c85855c1
+}
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 0000000000..be4d7b8523
+index 00000000000..1cd39cd76af
--- /dev/null
+++ b/src/librustc_target/spec/i686_gentoo_linux_musl.rs
-@@ -0,0 +1,13 @@
-+use crate::spec::{LinkerFlavor, TargetResult};
+@@ -0,0 +1,11 @@
++use crate::spec::TargetResult;
+
+pub fn target() -> TargetResult {
+ let mut base = super::i686_unknown_linux_musl::target()?;
@@ -86,17 +86,15 @@ index 0000000000..be4d7b8523
+ base.llvm_target = "i686-gentoo-linux-musl".to_string();
+ base.target_vendor = "gentoo".to_string();
+ base.options.crt_static_default = false;
-+ base.options.post_link_args.insert(LinkerFlavor::Gcc,
-+ vec!["-Wl,--as-needed".to_string(), "-lssp_nonshared".to_string()]);
+
+ Ok(base)
+}
diff --git a/src/librustc_target/spec/mod.rs b/src/librustc_target/spec/mod.rs
-index bef2afc7b6..42bd26ce0c 100644
+index fa29ff3f8d8..a711417e7c1 100644
--- a/src/librustc_target/spec/mod.rs
+++ b/src/librustc_target/spec/mod.rs
-@@ -327,7 +327,17 @@ macro_rules! supported_targets {
- )
+@@ -489,7 +489,17 @@ macro_rules! supported_targets {
+ };
}
+mod arm_unknown_linux_musleabi;
@@ -113,7 +111,7 @@ index bef2afc7b6..42bd26ce0c 100644
("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),
-@@ -348,7 +358,6 @@ supported_targets! {
+@@ -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),
@@ -123,7 +121,7 @@ index bef2afc7b6..42bd26ce0c 100644
("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 0000000000..e840bb27bb
+index 00000000000..e840bb27bbf
--- /dev/null
+++ b/src/librustc_target/spec/powerpc64_gentoo_linux_musl.rs
@@ -0,0 +1,11 @@
@@ -140,11 +138,11 @@ index 0000000000..e840bb27bb
+}
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 0000000000..905c5214d4
+index 00000000000..a623ffed53a
--- /dev/null
+++ b/src/librustc_target/spec/powerpc_gentoo_linux_musl.rs
-@@ -0,0 +1,13 @@
-+use crate::spec::{LinkerFlavor, TargetResult};
+@@ -0,0 +1,11 @@
++use crate::spec::TargetResult;
+
+pub fn target() -> TargetResult {
+ let mut base = super::powerpc_unknown_linux_musl::target()?;
@@ -152,14 +150,12 @@ index 0000000000..905c5214d4
+ base.llvm_target = "powerpc-gentoo-linux-musl".to_string();
+ base.target_vendor = "gentoo".to_string();
+ base.options.crt_static_default = false;
-+ base.options.post_link_args.insert(LinkerFlavor::Gcc,
-+ vec!["-Wl,--as-needed".to_string(), "-lssp_nonshared".to_string()]);
+
+ 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 0000000000..f33047358b
+index 00000000000..f33047358b5
--- /dev/null
+++ b/src/librustc_target/spec/x86_64_gentoo_linux_musl.rs
@@ -0,0 +1,11 @@
@@ -175,5 +171,5 @@ index 0000000000..f33047358b
+ Ok(base)
+}
--
-2.21.0
+2.26.2
diff --git a/dev-lang/rust/files/0030-libc-linkage.patch b/dev-lang/rust/files/0030-libc-linkage.patch
new file mode 100644
index 0000000..5a92904
--- /dev/null
+++ b/dev-lang/rust/files/0030-libc-linkage.patch
@@ -0,0 +1,34 @@
+--- rustc-1.47.0-src/vendor/libc-0.2.74/src/lib.rs
++++ rustc-1.47.0-src/vendor/libc-0.2.74/src/lib.rs
+@@ -27,6 +27,7 @@
+ #![deny(missing_copy_implementations, safe_packed_borrows)]
+ #![no_std]
+ #![cfg_attr(feature = "rustc-dep-of-std", no_core)]
++#![cfg_attr(target_env = "musl", feature(static_nobundle))]
+ #![cfg_attr(target_os = "redox", feature(static_nobundle))]
+ #![cfg_attr(libc_const_extern_fn, feature(const_extern_fn))]
+
+--- rustc-1.47.0-src/vendor/libc-0.2.74/src/unix/mod.rs
++++ rustc-1.47.0-src/vendor/libc-0.2.74/src/unix/mod.rs
+@@ -299,11 +299,11 @@ cfg_if! {
+ // cargo build, don't pull in anything extra as the libstd dep
+ // already pulls in all libs.
+ } else if #[cfg(target_env = "musl")] {
++ #[link(name = "c")]
++ extern {}
+ #[cfg_attr(feature = "rustc-dep-of-std",
+- link(name = "c", kind = "static",
++ link(name = "gcc", kind = "static-nobundle",
+ cfg(target_feature = "crt-static")))]
+- #[cfg_attr(feature = "rustc-dep-of-std",
+- link(name = "c", cfg(not(target_feature = "crt-static"))))]
+ extern {}
+ } else if #[cfg(target_os = "emscripten")] {
+ #[link(name = "c")]
+--- rustc-1.47.0-src/vendor/libc-0.2.74/.cargo-checksum.json
++++ rustc-1.47.0-src/vendor/libc-0.2.74/.cargo-checksum.json
+@@ -1 +1 @@
+-{"files":{"CONTRIBUTING.md":"3a9f0037ad5f1198eada74a9d0363925ef09db664380b0e5a2840f03da260476","Cargo.toml":"128aa804901aaf7c386262cfbba894041bf1b109232d69c3e8b6b01df0a67dd1","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"a8d47ff51ca256f56a8932dba07660672dbfe3004257ca8de708aac1415937a1","README.md":"52f1027a072c02e6e9e1f3d9630ec24e4d57507399c6363afcbcceaa106d152b","build.rs":"ab351d7171b14f8032948e843841ebe8518ed95eb1abf0b1e689700c7cef4bf5","rustfmt.toml":"8a654d5787585ca8f2c20580737336fc327f411a07b0dbd4870adf6e9bdf624f","src/cloudabi/aarch64.rs":"b8550bf1fd7344972aa4db29441486f39f31482d0327534981dbb75959c29114","src/cloudabi/arm.rs":"c197e2781c2839808bd6fcef219a29705b27b992d3ef920e9cf6ac96e2022bbf","src/cloudabi/mod.rs":"d5d4488e8c0b8227f516fe13810f550a2a72af3bdfe769200ad8687c8755bdf6","src/cloudabi/x86.rs":"33eb97f272d2201f3838ae74d444583c7de8f67856852ca375293b20bbd05636","src/cloudabi/x86_64.rs":"400d85d4fe39e26cf2e6ece9ee31c75
fe9e88c4bcf4d836ca9f765c05c9c5be3","src/fixed_width_ints.rs":"34c60f12ec5eeb90f13ec3b954427532111c2446e69617616a97aefc1086a9f1","src/fuchsia/aarch64.rs":"378776a9e40766154a54c94c2a7b4675b5c302a38e6e42da99e67bfbaee60e56","src/fuchsia/align.rs":"ae1cf8f011a99737eabeb14ffff768e60f13b13363d7646744dbb0f443dab3d6","src/fuchsia/mod.rs":"61502b3d124759c7c1bae294c1662036a96718fb3bd329cfa2f12e1c61ac10ad","src/fuchsia/no_align.rs":"303f3f1b255e0088b5715094353cf00476131d8e94e6aebb3f469557771c8b8a","src/fuchsia/x86_64.rs":"93a3632b5cf67d2a6bcb7dc0a558605252d5fe689e0f38d8aa2ec5852255ac87","src/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/hermit/mod.rs":"d3bfce41e4463d4be8020a2d063c9bfa8b665f45f1cc6cbf3163f5d01e7cb21f","src/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/lib.rs":"d80f0a2f77d485601a218e0707474245636d8b23fb3d6c65c9dbd4302ea6674b","src/macros.rs":"83aed048c5053300345fca843b148928b91ed444188c479315
ff6bcabaa0c4e9","src/psp.rs":"a93741ac38660e548eb41b58df39da39944e5c04280a7b09e0be758e79942549","src/sgx.rs":"16a95cdefc81c5ee00d8353a60db363c4cc3e0f75abcd5d0144723f2a306ed1b","src/switch.rs":"9da3dd39b3de45a7928789926e8572d00e1e11a39e6f7289a1349aadce90edba","src/unix/align.rs":"2cdc7c826ef7ae61f5171c5ae8c445a743d86f1a7f2d9d7e4ceeec56d6874f65","src/unix/bsd/apple/b32/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b32/mod.rs":"6a4ce300da0d2b0db04b18548286603ffe4b47d679a41cf60f1902895894aa1f","src/unix/bsd/apple/b64/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b64/mod.rs":"81254d89be1febc5bb20e787d014a624950d56e2e14973df5bbebfdabc95ae20","src/unix/bsd/apple/mod.rs":"19c8598b72272cc61d7f6a05b7fec78958ce86b11d0f5a655e1e58da0bc2af44","src/unix/bsd/freebsdlike/dragonfly/errno.rs":"ae5e8e6b0f610ec015dfcc2928609037d7ea7b94570c72bcc5bdd588424c6259","src/unix/bsd/freebsdlike/dragonfly/mod.rs"
:"0e41b6202c7670ce27201095fc1a2826c9e9ccbbc751e97ae1568871ea481a62","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"14f0bd6693967d4fedec904f7042bd51f2138cb843ec4df18c911b357417cdd2","src/unix/bsd/freebsdlike/freebsd/arm.rs":"59d6a670eea562fb87686e243e0a84603d29a2028a3d4b3f99ccc01bd04d2f47","src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs":"9808d152c1196aa647f1b0f0cf84dac8c930da7d7f897a44975545e3d9d17681","src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs":"16dd3e1a09f123d0aa544b3fd7c123654b4906cac94838fbed7f34a64413c930","src/unix/bsd/freebsdlike/freebsd/freebsd12/b64.rs":"61cbe45f8499bedb168106b686d4f8239472f25c7553b069eec2afe197ff2df6","src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs":"c6152ce3db241d99e350d34352f3f3d167953ef0ee08bfbe2685cb9ebde2e83b","src/unix/bsd/freebsdlike/freebsd/mod.rs":"1ed8971b7de3b0435341a9af1366493d0458e4a00507dd824c4c11f4ce2006af","src/unix/bsd/freebsdlike/freebsd/powerpc64.rs":"2dae3ecc87eac3b11657aa98915def55fc4b5c0de11fe26aae23329a54628a9a","src/un
ix/bsd/freebsdlike/freebsd/x86.rs":"c5005e3249eb7c93cfbac72a9e9272320d80ce7983da990ceb05a447f59a02c5","src/unix/bsd/freebsdlike/freebsd/x86_64/align.rs":"0e1f69a88fca1c32874b1daf5db3d446fefbe518dca497f096cc9168c39dde70","src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs":"6132aa0973454379674ea6cbc77e6eace1e1032dd9f38182071388a036f1bc08","src/unix/bsd/freebsdlike/mod.rs":"0046a4083f01ad67511427f1ac37168f31bef3be10c849d304d39f98d61c1267","src/unix/bsd/mod.rs":"4acdbc0148b672fe015ddd7cae952e5d77691df6941a20f8ca40fd996e6a37dd","src/unix/bsd/netbsdlike/mod.rs":"48dd60524119c1e09b255d5472d091e7e7b2b29eab04be51b4b1e740bd022859","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"b38fc046f9a40fea28bd26328b96629f4d5d63d7524936bd6af1865d401a8716","src/unix/bsd/netbsdlike/netbsd/arm.rs":"58cdbb70b0d6f536551f0f3bb3725d2d75c4690db12c26c034e7d6ec4a924452","src/unix/bsd/netbsdlike/netbsd/mod.rs":"16a9036b6a8b373cdf0576ae99c95430f3f111b6be906a1e1ecff8047e178a86","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"e
e7ff5d89d0ed22f531237b5059aa669df93a3b5c489fa641465ace8d405bf41","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"9489f4b3e4566f43bb12dfb92238960613dac7f6a45cc13068a8d152b902d7d9","src/unix/bsd/netbsdlike/netbsd/x86.rs":"20692320e36bfe028d1a34d16fe12ca77aa909cb02bda167376f98f1a09aefe7","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"135509edeaf3fb3f102d89d51ff1a8f82323497336a8dc7e1f0f23b5c2434b73","src/unix/bsd/netbsdlike/openbsd/aarch64.rs":"1dd5449dd1fd3d51e30ffdeeaece91d0aaf05c710e0ac699fecc5461cfa2c28e","src/unix/bsd/netbsdlike/openbsd/mod.rs":"a2938e72d1c6e3f32fb51e896b63abd0d79e1e360dc53f9254fdac82b21206b9","src/unix/bsd/netbsdlike/openbsd/sparc64.rs":"d04fd287afbaa2c5df9d48c94e8374a532a3ba491b424ddf018270c7312f4085","src/unix/bsd/netbsdlike/openbsd/x86.rs":"6f7f5c4fde2a2259eb547890cbd86570cea04ef85347d7569e94e679448bec87","src/unix/bsd/netbsdlike/openbsd/x86_64.rs":"e59b7fd65f68f8e857eec39e0c03bac1d3af6ddc26c9ba58494336b83659bb9b","src/unix/haiku/b32.rs":"69ae47fc52c6880e85416b474450
0d5655c9ec6131cb737f3b649fceaadce15a","src/unix/haiku/b64.rs":"73e64db09275a8da8d50a13cce2cfa2b136036ddf3a930d2939f337fc995900b","src/unix/haiku/mod.rs":"29863051c296eeb22e7f00a266d6632b6a886b9a791f128e3c554e96213c3a16","src/unix/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/unix/hermit/mod.rs":"fb7e14d0f46ffaa989b5ab68c85184efe6aa04b5381e46866299b1f3258ddce3","src/unix/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/unix/linux_like/android/b32/arm.rs":"155994121906903a2e0afad895f0b3b7546f6e54d6305a3336ce2c4dfafbfdfa","src/unix/linux_like/android/b32/mod.rs":"0325adf3364fed7157fff5b24fabe1b36d806c39ee04ec82dd29a606d28f91f6","src/unix/linux_like/android/b32/x86/align.rs":"812914e4241df82e32b12375ca3374615dc3a4bdd4cf31f0423c5815320c0dab","src/unix/linux_like/android/b32/x86/mod.rs":"5b1e9fcd77ca5f939acb7fb5f5da12f305b0377698d8b8989feb236e26360aa0","src/unix/linux_like/android/b64/aarch64/align.rs":"
2179c3b1608fa4bf68840482bfc2b2fa3ee2faf6fcae3770f9e505cddca35c7b","src/unix/linux_like/android/b64/aarch64/mod.rs":"655116966eb7846b933e5e28b073c329668588cd3c2120cc9ce60c697bd19978","src/unix/linux_like/android/b64/mod.rs":"6a71abfcbbcdae60c916de41cd4688d5f25bdbca83d1d9df49decd56ad726a06","src/unix/linux_like/android/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/android/b64/x86_64/mod.rs":"e84176d838e663d351450bad218715db1fafbb531e47ea0e262cbb45829dae89","src/unix/linux_like/android/mod.rs":"d414f682fd0d138d440300dc53c6b8b069730e19230dabd4c01173c4578c42b5","src/unix/linux_like/emscripten/align.rs":"86c95cbed7a7161b1f23ee06843e7b0e2340ad92b2cb86fe2a8ef3e0e8c36216","src/unix/linux_like/emscripten/mod.rs":"55fb89f5a965a4ad81ee4d02498c32aaed69e6047ce708c2329a602171862a76","src/unix/linux_like/emscripten/no_align.rs":"0128e4aa721a9902754828b61b5ec7d8a86619983ed1e0544a85d35b1051fad6","src/unix/linux_like/linux/align.rs":"dde64
8468764a5deef5566b8016290150acf50ee6a0f8c0678cb2078658bc2fa","src/unix/linux_like/linux/gnu/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/gnu/b32/arm/align.rs":"3fed009dc9af3cc81be7087da9d2d7d1f39845e4497e290259c5cdbae25f039d","src/unix/linux_like/linux/gnu/b32/arm/mod.rs":"6d9ba242111c7be8173b7a7b8cf8c863ba23d839edc9d026c0fd37a4b64460b4","src/unix/linux_like/linux/gnu/b32/mips/align.rs":"429fb5e005cb7143602d430098b6ebfb7d360685b194f333dfd587472ae954ee","src/unix/linux_like/linux/gnu/b32/mips/mod.rs":"e2d2e51fea73210d9705b7eaa37de8baa7152b71ae3a10a316c277345c529b5c","src/unix/linux_like/linux/gnu/b32/mod.rs":"e224551fa50be726bc8a559da32a96294b18743fb5a5b67cdbee4bb6a9eeb796","src/unix/linux_like/linux/gnu/b32/powerpc.rs":"39aae80d2c4ffa845592e16c0a6c910017de19e2b15c1e507c4df10e79ce3e38","src/unix/linux_like/linux/gnu/b32/sparc/align.rs":"21adbed27df73e2d1ed934aaf733a643003d7baf2bde9c48ea440895bcca6d41","src/unix/linux_like/lin
ux/gnu/b32/sparc/mod.rs":"3b4dd40b288788740d2b030171b21f9d0b076ce26d88e0ff62f5d87f09e7c787","src/unix/linux_like/linux/gnu/b32/x86/align.rs":"e4bafdc4a519a7922a81b37a62bbfd1177a2f620890eef8f1fbc47162e9eb413","src/unix/linux_like/linux/gnu/b32/x86/mod.rs":"927d1bd8cb2f053549fc5acfeb1315b7f80b35d7a1904cd76e99651ff32b141e","src/unix/linux_like/linux/gnu/b64/aarch64/align.rs":"2179c3b1608fa4bf68840482bfc2b2fa3ee2faf6fcae3770f9e505cddca35c7b","src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs":"17e9cd23a14bd19700c05a154568fff5897788c0ae151c21dd3bba67aac829d9","src/unix/linux_like/linux/gnu/b64/mips64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/gnu/b64/mips64/mod.rs":"0b5d94f3a2361742b6dd9eb3f543ddf675d3f70dab3402ad179faa6ddaae2218","src/unix/linux_like/linux/gnu/b64/mod.rs":"b90d87f76bff37707a1725551fe45d70d0c106e01b1dbbcd5f60460e0a19b4c3","src/unix/linux_like/linux/gnu/b64/powerpc64/align.rs":"e29c4868bbecfa4a6cd8a2ad06193f3bbc7
8a468cc1dc9df83f002f1268130d9","src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs":"2f279eb268c0aca9a6bd9b4c84139799cd039a64ca1cd2ded68b04c63397be1b","src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs":"bb01828300f02c11c27689522454439d0d02f22d738df88a97367dc87eecf868","src/unix/linux_like/linux/gnu/b64/s390x.rs":"9c449b64b11cbf55d453b324cf9475acb3253f85cb9692f9873b777ed8978ff4","src/unix/linux_like/linux/gnu/b64/sparc64/align.rs":"e29c4868bbecfa4a6cd8a2ad06193f3bbc78a468cc1dc9df83f002f1268130d9","src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs":"a2667a09e526878683fafa02474f81fbc212d861ceeabade17b0ff4d6d49ff9d","src/unix/linux_like/linux/gnu/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs":"e6197537739cb8628cad25827081c8bf6b371c02ad4b2132b30b9ae74143b1ef","src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs":"c1862036556262f076eda2008470b8a351b9c371d70664f54387c46890e8cd18","src/unix/linux_like/
linux/gnu/b64/x86_64/x32.rs":"30f88d0fa9e7807ee4cbe89fd274061f810099567d5e68fa829277d7d27ba708","src/unix/linux_like/linux/gnu/mod.rs":"c7924db757cf898c78029ad3772e6168ec99dd0dd1534df4132f8fe9717afed7","src/unix/linux_like/linux/gnu/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/mod.rs":"3dc8b1980062117edd7bdfdf2279065737f8cdcdcb883f57f23f27a1d0bbb8b2","src/unix/linux_like/linux/musl/b32/arm/align.rs":"3e8ac052c1043764776b54c93ba4260e061df998631737a897d9d47d54f7b80c","src/unix/linux_like/linux/musl/b32/arm/mod.rs":"45062a178b382ab17341a69d027b5c83325c4e79fecf45729ba9c47b1bcdc3da","src/unix/linux_like/linux/musl/b32/hexagon.rs":"7c6c481f70da1fe6ca759f363784e130041f3d87906c45910fc1142b5ef17970","src/unix/linux_like/linux/musl/b32/mips/align.rs":"429fb5e005cb7143602d430098b6ebfb7d360685b194f333dfd587472ae954ee","src/unix/linux_like/linux/musl/b32/mips/mod.rs":"9eb0e4953be5afaa0b9e3ac54c85ed40583cfb8cc0b03264b9bc8f763a8f3254","
src/unix/linux_like/linux/musl/b32/mod.rs":"8ede3985e6243882814ce91e8ce543e7edbafc0cee5932816072b6f14207a671","src/unix/linux_like/linux/musl/b32/powerpc.rs":"cf286cbf4d2076aaa82662ace2b5c333480410fa59af5cb4542d59f04da84b31","src/unix/linux_like/linux/musl/b32/x86/align.rs":"08e77fbd7435d7dec2ff56932433bece3f02e47ce810f89004a275a86d39cbe1","src/unix/linux_like/linux/musl/b32/x86/mod.rs":"9c3b6e98e7710d6c877a4e31726d36416115a58f53fc469bb173b7fe660b39e5","src/unix/linux_like/linux/musl/b64/aarch64/align.rs":"0bf138f84e5327d8339bcd4adf071a6832b516445e597552c82bbd881095e3a8","src/unix/linux_like/linux/musl/b64/aarch64/mod.rs":"7b3fb85a869e00aae3f6af9c36f82f9c70bf8c2b9cccbd931b923602846ea42c","src/unix/linux_like/linux/musl/b64/mips64.rs":"9d0158ac7a913222d0a62239ec043aa1aee73522a7a1e0e191d0642dde35c083","src/unix/linux_like/linux/musl/b64/mod.rs":"8b76e92a1505ad785d4aa0b7739e0b93647a1e81910949b49cedb6c88468be9c","src/unix/linux_like/linux/musl/b64/powerpc64.rs":"ed9b879bb9cdc526ad838158
75edeb4cad4e8829086dfba2578277c265336229","src/unix/linux_like/linux/musl/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/musl/b64/x86_64/mod.rs":"cfeb109c732ac6bc7d2be44069d3652e917a0509b8b545270b756ff2d52e27e8","src/unix/linux_like/linux/musl/mod.rs":"243e32b93641df7a77f970a32c0fb8e4fd4a13720e54e0e42a9da321fd169798","src/unix/linux_like/linux/no_align.rs":"c81ccd1942295d423b43a55b4aa19633c2096fb93bb381a6a29acb93e85aab07","src/unix/linux_like/mod.rs":"e2d60b008a30f2d866be2da6372fe8390e246572d8344447615155f642016882","src/unix/mod.rs":"3196eb15b4f9fa88839f401ee5a8a06875f7da7f244e73323f3c4ca7fb5007b1","src/unix/newlib/aarch64/mod.rs":"bb269c1468a9676442554600e87417079a787fe6220dfc23b3109639259e8710","src/unix/newlib/align.rs":"28aaf87fafbc6b312622719d472d8cf65f9e5467d15339df5f73e66d8502b28a","src/unix/newlib/arm/mod.rs":"c71be856bfd7f576b2db28af9f680211cbe6c1cac7d537bbc8020b39591af07c","src/unix/newlib/mod.rs":"8ab989
db6b21fee81a694c9f9f89014f8e78870d0541368527483c90f07542a7","src/unix/newlib/no_align.rs":"7123dcec13604a11b7765c380ff3a4d0da19c39f4b03919de7857723c0cf1502","src/unix/newlib/xtensa/mod.rs":"4c72003c5e692e648c7e798358c49af6901e68850dbba0624af84c40baf208f5","src/unix/no_align.rs":"c06e95373b9088266e0b14bba0954eef95f93fb2b01d951855e382d22de78e53","src/unix/redox/mod.rs":"89c31827cf348e9a7af387f9e708fc834d04da36cad415d3957d2faa70f2fcbe","src/unix/solarish/compat.rs":"d62a5d3b5bd6adc998cb9bb817a622ef9ec666235bb237bd0f13f8e6a94de576","src/unix/solarish/illumos.rs":"1088c45b238e7d398dbb140d238257d5b5f93aeded98652c3f6747f0c07b4fa7","src/unix/solarish/mod.rs":"ac1d11b1d51649ca1f156d2554951acc2204622bad1e0823cde24328c5fe60aa","src/unix/solarish/solaris.rs":"6000d322ee9f691f38a2cd89b2b8838e51f64c01584143924962b0c598e0985c","src/unix/uclibc/align.rs":"a8540e1cce5913a45bc8d7422b79e86c0b12740e8a679478e0e4d863a31f8cc1","src/unix/uclibc/arm/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec725195
7315afa53a7b9f936","src/unix/uclibc/arm/mod.rs":"d67dd46bc6f417169fc6a23832bde7ccdafc5d1bcb08b10debdd82edaf75d529","src/unix/uclibc/arm/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/uclibc/mips/mips32/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/uclibc/mips/mips32/mod.rs":"a045ebc6619f540adf670b88a987abd2d6e42e440a552e8cfe9f8c77f397e873","src/unix/uclibc/mips/mips32/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/uclibc/mips/mips64/align.rs":"a7bdcb18a37a2d91e64d5fad83ea3edc78f5412adb28f77ab077dbb26dd08b2d","src/unix/uclibc/mips/mips64/mod.rs":"e3085ba56cfbc528d7c3c55065880603238c333b6047ef51c58177508a487fcd","src/unix/uclibc/mips/mips64/no_align.rs":"4a18e3875698c85229599225ac3401a2a40da87e77b2ad4ef47c6fcd5a24ed30","src/unix/uclibc/mips/mod.rs":"1054d0bfeb506b3346b9a4148564beced8a22da0d9c9a612101f6237756795fb","src/unix/uclibc/mod.rs":"18d6c2628ca458ba75e7
43bce75bda6614de99606af4e2e62daf2440d2878f18","src/unix/uclibc/no_align.rs":"3f28637046524618adaa1012e26cb7ffe94b9396e6b518cccdc69d59f274d709","src/unix/uclibc/x86_64/align.rs":"4e34cebb7955e9c98ae2f310be6f8ed16a861fc3817c08543867554aeec9524e","src/unix/uclibc/x86_64/l4re.rs":"bb31053d6403091e11f95ac2203982f279f8b984a19adf30796878c45fdd8c25","src/unix/uclibc/x86_64/mod.rs":"188fbaf06a8e23cac72718b1ef7eb4bd98bdfd946aa708151f3f7e3553b65876","src/unix/uclibc/x86_64/no_align.rs":"2ccc0107a6007c70dc49e656095b64a352ca5d8f9f3e65c1dba634effbc15636","src/unix/uclibc/x86_64/other.rs":"42c3f71e58cabba373f6a55a623f3c31b85049eb64824c09c2b082b3b2d6a0a8","src/vxworks/aarch64.rs":"98f0afdc511cd02557e506c21fed6737585490a1dce7a9d4941d08c437762b99","src/vxworks/arm.rs":"acb7968ce99fe3f4abdf39d98f8133d21a4fba435b8ef7084777cb181d788e88","src/vxworks/mod.rs":"79077f518d234baf6cb76cb742153d174b3ddd43c6eda9238ebb053e08f9f9c7","src/vxworks/powerpc.rs":"acb7968ce99fe3f4abdf39d98f8133d21a4fba435b8ef7084777cb1
81d788e88","src/vxworks/powerpc64.rs":"98f0afdc511cd02557e506c21fed6737585490a1dce7a9d4941d08c437762b99","src/vxworks/x86.rs":"552f007f38317620b23889cb7c49d1d115841252439060122f52f434fbc6e5ba","src/vxworks/x86_64.rs":"018d92be3ad628a129eff9f2f5dfbc0883d8b8e5f2fa917b900a7f98ed6b514a","src/wasi.rs":"486a00bafb5b6bf0538c4d984dab021835295c431cb2ceb7a9a74b499f78ade6","src/windows/gnu/align.rs":"b2c13ec1b9f3b39a75c452c80c951dff9d0215e31d77e883b4502afb31794647","src/windows/gnu/mod.rs":"c7ab9793baaa3b6854d25fdf44266b7953533009e4fa722ca717b71d3e5d2c9d","src/windows/mod.rs":"053c4d3d99c6a8b2fba4df0f8c7266cdd9fbbaa6bddc50cd6f747bef1ff59da9","src/windows/msvc.rs":"2c2bfce66027d88021e7289139ebf5b0db258a7b6443f18872c84dbd4ef57131","tests/const_fn.rs":"cb75a1f0864f926aebe79118fc34d51a0d1ade2c20a394e7774c7e545f21f1f4","triagebot.toml":"a135e10c777cd13459559bdf74fb704c1379af7c9b0f70bc49fa6f5a837daa81"},"package":"a2f02823cf78b754822df5f7f268fb59822e7296276d3e069d8e8cb26a14bd10"}
+\ No newline at end of file
++{"files":{"CONTRIBUTING.md":"3a9f0037ad5f1198eada74a9d0363925ef09db664380b0e5a2840f03da260476","Cargo.toml":"128aa804901aaf7c386262cfbba894041bf1b109232d69c3e8b6b01df0a67dd1","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"a8d47ff51ca256f56a8932dba07660672dbfe3004257ca8de708aac1415937a1","README.md":"52f1027a072c02e6e9e1f3d9630ec24e4d57507399c6363afcbcceaa106d152b","build.rs":"ab351d7171b14f8032948e843841ebe8518ed95eb1abf0b1e689700c7cef4bf5","rustfmt.toml":"8a654d5787585ca8f2c20580737336fc327f411a07b0dbd4870adf6e9bdf624f","src/cloudabi/aarch64.rs":"b8550bf1fd7344972aa4db29441486f39f31482d0327534981dbb75959c29114","src/cloudabi/arm.rs":"c197e2781c2839808bd6fcef219a29705b27b992d3ef920e9cf6ac96e2022bbf","src/cloudabi/mod.rs":"d5d4488e8c0b8227f516fe13810f550a2a72af3bdfe769200ad8687c8755bdf6","src/cloudabi/x86.rs":"33eb97f272d2201f3838ae74d444583c7de8f67856852ca375293b20bbd05636","src/cloudabi/x86_64.rs":"400d85d4fe39e26cf2e6ece9ee31c75
fe9e88c4bcf4d836ca9f765c05c9c5be3","src/fixed_width_ints.rs":"34c60f12ec5eeb90f13ec3b954427532111c2446e69617616a97aefc1086a9f1","src/fuchsia/aarch64.rs":"378776a9e40766154a54c94c2a7b4675b5c302a38e6e42da99e67bfbaee60e56","src/fuchsia/align.rs":"ae1cf8f011a99737eabeb14ffff768e60f13b13363d7646744dbb0f443dab3d6","src/fuchsia/mod.rs":"61502b3d124759c7c1bae294c1662036a96718fb3bd329cfa2f12e1c61ac10ad","src/fuchsia/no_align.rs":"303f3f1b255e0088b5715094353cf00476131d8e94e6aebb3f469557771c8b8a","src/fuchsia/x86_64.rs":"93a3632b5cf67d2a6bcb7dc0a558605252d5fe689e0f38d8aa2ec5852255ac87","src/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/hermit/mod.rs":"d3bfce41e4463d4be8020a2d063c9bfa8b665f45f1cc6cbf3163f5d01e7cb21f","src/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/lib.rs":"2c276c0b8441855978c1c5f3b19131bf36e51921bc048fcd22a033d33cb6cc54","src/macros.rs":"83aed048c5053300345fca843b148928b91ed444188c479315
ff6bcabaa0c4e9","src/psp.rs":"a93741ac38660e548eb41b58df39da39944e5c04280a7b09e0be758e79942549","src/sgx.rs":"16a95cdefc81c5ee00d8353a60db363c4cc3e0f75abcd5d0144723f2a306ed1b","src/switch.rs":"9da3dd39b3de45a7928789926e8572d00e1e11a39e6f7289a1349aadce90edba","src/unix/align.rs":"2cdc7c826ef7ae61f5171c5ae8c445a743d86f1a7f2d9d7e4ceeec56d6874f65","src/unix/bsd/apple/b32/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b32/mod.rs":"6a4ce300da0d2b0db04b18548286603ffe4b47d679a41cf60f1902895894aa1f","src/unix/bsd/apple/b64/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b64/mod.rs":"81254d89be1febc5bb20e787d014a624950d56e2e14973df5bbebfdabc95ae20","src/unix/bsd/apple/mod.rs":"19c8598b72272cc61d7f6a05b7fec78958ce86b11d0f5a655e1e58da0bc2af44","src/unix/bsd/freebsdlike/dragonfly/errno.rs":"ae5e8e6b0f610ec015dfcc2928609037d7ea7b94570c72bcc5bdd588424c6259","src/unix/bsd/freebsdlike/dragonfly/mod.rs"
:"0e41b6202c7670ce27201095fc1a2826c9e9ccbbc751e97ae1568871ea481a62","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"14f0bd6693967d4fedec904f7042bd51f2138cb843ec4df18c911b357417cdd2","src/unix/bsd/freebsdlike/freebsd/arm.rs":"59d6a670eea562fb87686e243e0a84603d29a2028a3d4b3f99ccc01bd04d2f47","src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs":"9808d152c1196aa647f1b0f0cf84dac8c930da7d7f897a44975545e3d9d17681","src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs":"16dd3e1a09f123d0aa544b3fd7c123654b4906cac94838fbed7f34a64413c930","src/unix/bsd/freebsdlike/freebsd/freebsd12/b64.rs":"61cbe45f8499bedb168106b686d4f8239472f25c7553b069eec2afe197ff2df6","src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs":"c6152ce3db241d99e350d34352f3f3d167953ef0ee08bfbe2685cb9ebde2e83b","src/unix/bsd/freebsdlike/freebsd/mod.rs":"1ed8971b7de3b0435341a9af1366493d0458e4a00507dd824c4c11f4ce2006af","src/unix/bsd/freebsdlike/freebsd/powerpc64.rs":"2dae3ecc87eac3b11657aa98915def55fc4b5c0de11fe26aae23329a54628a9a","src/un
ix/bsd/freebsdlike/freebsd/x86.rs":"c5005e3249eb7c93cfbac72a9e9272320d80ce7983da990ceb05a447f59a02c5","src/unix/bsd/freebsdlike/freebsd/x86_64/align.rs":"0e1f69a88fca1c32874b1daf5db3d446fefbe518dca497f096cc9168c39dde70","src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs":"6132aa0973454379674ea6cbc77e6eace1e1032dd9f38182071388a036f1bc08","src/unix/bsd/freebsdlike/mod.rs":"0046a4083f01ad67511427f1ac37168f31bef3be10c849d304d39f98d61c1267","src/unix/bsd/mod.rs":"4acdbc0148b672fe015ddd7cae952e5d77691df6941a20f8ca40fd996e6a37dd","src/unix/bsd/netbsdlike/mod.rs":"48dd60524119c1e09b255d5472d091e7e7b2b29eab04be51b4b1e740bd022859","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"b38fc046f9a40fea28bd26328b96629f4d5d63d7524936bd6af1865d401a8716","src/unix/bsd/netbsdlike/netbsd/arm.rs":"58cdbb70b0d6f536551f0f3bb3725d2d75c4690db12c26c034e7d6ec4a924452","src/unix/bsd/netbsdlike/netbsd/mod.rs":"16a9036b6a8b373cdf0576ae99c95430f3f111b6be906a1e1ecff8047e178a86","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"e
e7ff5d89d0ed22f531237b5059aa669df93a3b5c489fa641465ace8d405bf41","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"9489f4b3e4566f43bb12dfb92238960613dac7f6a45cc13068a8d152b902d7d9","src/unix/bsd/netbsdlike/netbsd/x86.rs":"20692320e36bfe028d1a34d16fe12ca77aa909cb02bda167376f98f1a09aefe7","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"135509edeaf3fb3f102d89d51ff1a8f82323497336a8dc7e1f0f23b5c2434b73","src/unix/bsd/netbsdlike/openbsd/aarch64.rs":"1dd5449dd1fd3d51e30ffdeeaece91d0aaf05c710e0ac699fecc5461cfa2c28e","src/unix/bsd/netbsdlike/openbsd/mod.rs":"a2938e72d1c6e3f32fb51e896b63abd0d79e1e360dc53f9254fdac82b21206b9","src/unix/bsd/netbsdlike/openbsd/sparc64.rs":"d04fd287afbaa2c5df9d48c94e8374a532a3ba491b424ddf018270c7312f4085","src/unix/bsd/netbsdlike/openbsd/x86.rs":"6f7f5c4fde2a2259eb547890cbd86570cea04ef85347d7569e94e679448bec87","src/unix/bsd/netbsdlike/openbsd/x86_64.rs":"e59b7fd65f68f8e857eec39e0c03bac1d3af6ddc26c9ba58494336b83659bb9b","src/unix/haiku/b32.rs":"69ae47fc52c6880e85416b474450
0d5655c9ec6131cb737f3b649fceaadce15a","src/unix/haiku/b64.rs":"73e64db09275a8da8d50a13cce2cfa2b136036ddf3a930d2939f337fc995900b","src/unix/haiku/mod.rs":"29863051c296eeb22e7f00a266d6632b6a886b9a791f128e3c554e96213c3a16","src/unix/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/unix/hermit/mod.rs":"fb7e14d0f46ffaa989b5ab68c85184efe6aa04b5381e46866299b1f3258ddce3","src/unix/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/unix/linux_like/android/b32/arm.rs":"155994121906903a2e0afad895f0b3b7546f6e54d6305a3336ce2c4dfafbfdfa","src/unix/linux_like/android/b32/mod.rs":"0325adf3364fed7157fff5b24fabe1b36d806c39ee04ec82dd29a606d28f91f6","src/unix/linux_like/android/b32/x86/align.rs":"812914e4241df82e32b12375ca3374615dc3a4bdd4cf31f0423c5815320c0dab","src/unix/linux_like/android/b32/x86/mod.rs":"5b1e9fcd77ca5f939acb7fb5f5da12f305b0377698d8b8989feb236e26360aa0","src/unix/linux_like/android/b64/aarch64/align.rs":"
2179c3b1608fa4bf68840482bfc2b2fa3ee2faf6fcae3770f9e505cddca35c7b","src/unix/linux_like/android/b64/aarch64/mod.rs":"655116966eb7846b933e5e28b073c329668588cd3c2120cc9ce60c697bd19978","src/unix/linux_like/android/b64/mod.rs":"6a71abfcbbcdae60c916de41cd4688d5f25bdbca83d1d9df49decd56ad726a06","src/unix/linux_like/android/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/android/b64/x86_64/mod.rs":"e84176d838e663d351450bad218715db1fafbb531e47ea0e262cbb45829dae89","src/unix/linux_like/android/mod.rs":"d414f682fd0d138d440300dc53c6b8b069730e19230dabd4c01173c4578c42b5","src/unix/linux_like/emscripten/align.rs":"86c95cbed7a7161b1f23ee06843e7b0e2340ad92b2cb86fe2a8ef3e0e8c36216","src/unix/linux_like/emscripten/mod.rs":"55fb89f5a965a4ad81ee4d02498c32aaed69e6047ce708c2329a602171862a76","src/unix/linux_like/emscripten/no_align.rs":"0128e4aa721a9902754828b61b5ec7d8a86619983ed1e0544a85d35b1051fad6","src/unix/linux_like/linux/align.rs":"dde64
8468764a5deef5566b8016290150acf50ee6a0f8c0678cb2078658bc2fa","src/unix/linux_like/linux/gnu/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/gnu/b32/arm/align.rs":"3fed009dc9af3cc81be7087da9d2d7d1f39845e4497e290259c5cdbae25f039d","src/unix/linux_like/linux/gnu/b32/arm/mod.rs":"6d9ba242111c7be8173b7a7b8cf8c863ba23d839edc9d026c0fd37a4b64460b4","src/unix/linux_like/linux/gnu/b32/mips/align.rs":"429fb5e005cb7143602d430098b6ebfb7d360685b194f333dfd587472ae954ee","src/unix/linux_like/linux/gnu/b32/mips/mod.rs":"e2d2e51fea73210d9705b7eaa37de8baa7152b71ae3a10a316c277345c529b5c","src/unix/linux_like/linux/gnu/b32/mod.rs":"e224551fa50be726bc8a559da32a96294b18743fb5a5b67cdbee4bb6a9eeb796","src/unix/linux_like/linux/gnu/b32/powerpc.rs":"39aae80d2c4ffa845592e16c0a6c910017de19e2b15c1e507c4df10e79ce3e38","src/unix/linux_like/linux/gnu/b32/sparc/align.rs":"21adbed27df73e2d1ed934aaf733a643003d7baf2bde9c48ea440895bcca6d41","src/unix/linux_like/lin
ux/gnu/b32/sparc/mod.rs":"3b4dd40b288788740d2b030171b21f9d0b076ce26d88e0ff62f5d87f09e7c787","src/unix/linux_like/linux/gnu/b32/x86/align.rs":"e4bafdc4a519a7922a81b37a62bbfd1177a2f620890eef8f1fbc47162e9eb413","src/unix/linux_like/linux/gnu/b32/x86/mod.rs":"927d1bd8cb2f053549fc5acfeb1315b7f80b35d7a1904cd76e99651ff32b141e","src/unix/linux_like/linux/gnu/b64/aarch64/align.rs":"2179c3b1608fa4bf68840482bfc2b2fa3ee2faf6fcae3770f9e505cddca35c7b","src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs":"17e9cd23a14bd19700c05a154568fff5897788c0ae151c21dd3bba67aac829d9","src/unix/linux_like/linux/gnu/b64/mips64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/gnu/b64/mips64/mod.rs":"0b5d94f3a2361742b6dd9eb3f543ddf675d3f70dab3402ad179faa6ddaae2218","src/unix/linux_like/linux/gnu/b64/mod.rs":"b90d87f76bff37707a1725551fe45d70d0c106e01b1dbbcd5f60460e0a19b4c3","src/unix/linux_like/linux/gnu/b64/powerpc64/align.rs":"e29c4868bbecfa4a6cd8a2ad06193f3bbc7
8a468cc1dc9df83f002f1268130d9","src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs":"2f279eb268c0aca9a6bd9b4c84139799cd039a64ca1cd2ded68b04c63397be1b","src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs":"bb01828300f02c11c27689522454439d0d02f22d738df88a97367dc87eecf868","src/unix/linux_like/linux/gnu/b64/s390x.rs":"9c449b64b11cbf55d453b324cf9475acb3253f85cb9692f9873b777ed8978ff4","src/unix/linux_like/linux/gnu/b64/sparc64/align.rs":"e29c4868bbecfa4a6cd8a2ad06193f3bbc78a468cc1dc9df83f002f1268130d9","src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs":"a2667a09e526878683fafa02474f81fbc212d861ceeabade17b0ff4d6d49ff9d","src/unix/linux_like/linux/gnu/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs":"e6197537739cb8628cad25827081c8bf6b371c02ad4b2132b30b9ae74143b1ef","src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs":"c1862036556262f076eda2008470b8a351b9c371d70664f54387c46890e8cd18","src/unix/linux_like/
linux/gnu/b64/x86_64/x32.rs":"30f88d0fa9e7807ee4cbe89fd274061f810099567d5e68fa829277d7d27ba708","src/unix/linux_like/linux/gnu/mod.rs":"c7924db757cf898c78029ad3772e6168ec99dd0dd1534df4132f8fe9717afed7","src/unix/linux_like/linux/gnu/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/mod.rs":"3dc8b1980062117edd7bdfdf2279065737f8cdcdcb883f57f23f27a1d0bbb8b2","src/unix/linux_like/linux/musl/b32/arm/align.rs":"3e8ac052c1043764776b54c93ba4260e061df998631737a897d9d47d54f7b80c","src/unix/linux_like/linux/musl/b32/arm/mod.rs":"45062a178b382ab17341a69d027b5c83325c4e79fecf45729ba9c47b1bcdc3da","src/unix/linux_like/linux/musl/b32/hexagon.rs":"7c6c481f70da1fe6ca759f363784e130041f3d87906c45910fc1142b5ef17970","src/unix/linux_like/linux/musl/b32/mips/align.rs":"429fb5e005cb7143602d430098b6ebfb7d360685b194f333dfd587472ae954ee","src/unix/linux_like/linux/musl/b32/mips/mod.rs":"9eb0e4953be5afaa0b9e3ac54c85ed40583cfb8cc0b03264b9bc8f763a8f3254","
src/unix/linux_like/linux/musl/b32/mod.rs":"8ede3985e6243882814ce91e8ce543e7edbafc0cee5932816072b6f14207a671","src/unix/linux_like/linux/musl/b32/powerpc.rs":"cf286cbf4d2076aaa82662ace2b5c333480410fa59af5cb4542d59f04da84b31","src/unix/linux_like/linux/musl/b32/x86/align.rs":"08e77fbd7435d7dec2ff56932433bece3f02e47ce810f89004a275a86d39cbe1","src/unix/linux_like/linux/musl/b32/x86/mod.rs":"9c3b6e98e7710d6c877a4e31726d36416115a58f53fc469bb173b7fe660b39e5","src/unix/linux_like/linux/musl/b64/aarch64/align.rs":"0bf138f84e5327d8339bcd4adf071a6832b516445e597552c82bbd881095e3a8","src/unix/linux_like/linux/musl/b64/aarch64/mod.rs":"7b3fb85a869e00aae3f6af9c36f82f9c70bf8c2b9cccbd931b923602846ea42c","src/unix/linux_like/linux/musl/b64/mips64.rs":"9d0158ac7a913222d0a62239ec043aa1aee73522a7a1e0e191d0642dde35c083","src/unix/linux_like/linux/musl/b64/mod.rs":"8b76e92a1505ad785d4aa0b7739e0b93647a1e81910949b49cedb6c88468be9c","src/unix/linux_like/linux/musl/b64/powerpc64.rs":"ed9b879bb9cdc526ad838158
75edeb4cad4e8829086dfba2578277c265336229","src/unix/linux_like/linux/musl/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/musl/b64/x86_64/mod.rs":"cfeb109c732ac6bc7d2be44069d3652e917a0509b8b545270b756ff2d52e27e8","src/unix/linux_like/linux/musl/mod.rs":"243e32b93641df7a77f970a32c0fb8e4fd4a13720e54e0e42a9da321fd169798","src/unix/linux_like/linux/no_align.rs":"c81ccd1942295d423b43a55b4aa19633c2096fb93bb381a6a29acb93e85aab07","src/unix/linux_like/mod.rs":"e2d60b008a30f2d866be2da6372fe8390e246572d8344447615155f642016882","src/unix/mod.rs":"c34d511e9bdf7504d4c30d6b60c7364085b3fc6feeacfac2ee92267d3c42fd21","src/unix/newlib/aarch64/mod.rs":"bb269c1468a9676442554600e87417079a787fe6220dfc23b3109639259e8710","src/unix/newlib/align.rs":"28aaf87fafbc6b312622719d472d8cf65f9e5467d15339df5f73e66d8502b28a","src/unix/newlib/arm/mod.rs":"c71be856bfd7f576b2db28af9f680211cbe6c1cac7d537bbc8020b39591af07c","src/unix/newlib/mod.rs":"8ab989
db6b21fee81a694c9f9f89014f8e78870d0541368527483c90f07542a7","src/unix/newlib/no_align.rs":"7123dcec13604a11b7765c380ff3a4d0da19c39f4b03919de7857723c0cf1502","src/unix/newlib/xtensa/mod.rs":"4c72003c5e692e648c7e798358c49af6901e68850dbba0624af84c40baf208f5","src/unix/no_align.rs":"c06e95373b9088266e0b14bba0954eef95f93fb2b01d951855e382d22de78e53","src/unix/redox/mod.rs":"89c31827cf348e9a7af387f9e708fc834d04da36cad415d3957d2faa70f2fcbe","src/unix/solarish/compat.rs":"d62a5d3b5bd6adc998cb9bb817a622ef9ec666235bb237bd0f13f8e6a94de576","src/unix/solarish/illumos.rs":"1088c45b238e7d398dbb140d238257d5b5f93aeded98652c3f6747f0c07b4fa7","src/unix/solarish/mod.rs":"ac1d11b1d51649ca1f156d2554951acc2204622bad1e0823cde24328c5fe60aa","src/unix/solarish/solaris.rs":"6000d322ee9f691f38a2cd89b2b8838e51f64c01584143924962b0c598e0985c","src/unix/uclibc/align.rs":"a8540e1cce5913a45bc8d7422b79e86c0b12740e8a679478e0e4d863a31f8cc1","src/unix/uclibc/arm/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec725195
7315afa53a7b9f936","src/unix/uclibc/arm/mod.rs":"d67dd46bc6f417169fc6a23832bde7ccdafc5d1bcb08b10debdd82edaf75d529","src/unix/uclibc/arm/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/uclibc/mips/mips32/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/uclibc/mips/mips32/mod.rs":"a045ebc6619f540adf670b88a987abd2d6e42e440a552e8cfe9f8c77f397e873","src/unix/uclibc/mips/mips32/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/uclibc/mips/mips64/align.rs":"a7bdcb18a37a2d91e64d5fad83ea3edc78f5412adb28f77ab077dbb26dd08b2d","src/unix/uclibc/mips/mips64/mod.rs":"e3085ba56cfbc528d7c3c55065880603238c333b6047ef51c58177508a487fcd","src/unix/uclibc/mips/mips64/no_align.rs":"4a18e3875698c85229599225ac3401a2a40da87e77b2ad4ef47c6fcd5a24ed30","src/unix/uclibc/mips/mod.rs":"1054d0bfeb506b3346b9a4148564beced8a22da0d9c9a612101f6237756795fb","src/unix/uclibc/mod.rs":"18d6c2628ca458ba75e7
43bce75bda6614de99606af4e2e62daf2440d2878f18","src/unix/uclibc/no_align.rs":"3f28637046524618adaa1012e26cb7ffe94b9396e6b518cccdc69d59f274d709","src/unix/uclibc/x86_64/align.rs":"4e34cebb7955e9c98ae2f310be6f8ed16a861fc3817c08543867554aeec9524e","src/unix/uclibc/x86_64/l4re.rs":"bb31053d6403091e11f95ac2203982f279f8b984a19adf30796878c45fdd8c25","src/unix/uclibc/x86_64/mod.rs":"188fbaf06a8e23cac72718b1ef7eb4bd98bdfd946aa708151f3f7e3553b65876","src/unix/uclibc/x86_64/no_align.rs":"2ccc0107a6007c70dc49e656095b64a352ca5d8f9f3e65c1dba634effbc15636","src/unix/uclibc/x86_64/other.rs":"42c3f71e58cabba373f6a55a623f3c31b85049eb64824c09c2b082b3b2d6a0a8","src/vxworks/aarch64.rs":"98f0afdc511cd02557e506c21fed6737585490a1dce7a9d4941d08c437762b99","src/vxworks/arm.rs":"acb7968ce99fe3f4abdf39d98f8133d21a4fba435b8ef7084777cb181d788e88","src/vxworks/mod.rs":"79077f518d234baf6cb76cb742153d174b3ddd43c6eda9238ebb053e08f9f9c7","src/vxworks/powerpc.rs":"acb7968ce99fe3f4abdf39d98f8133d21a4fba435b8ef7084777cb1
81d788e88","src/vxworks/powerpc64.rs":"98f0afdc511cd02557e506c21fed6737585490a1dce7a9d4941d08c437762b99","src/vxworks/x86.rs":"552f007f38317620b23889cb7c49d1d115841252439060122f52f434fbc6e5ba","src/vxworks/x86_64.rs":"018d92be3ad628a129eff9f2f5dfbc0883d8b8e5f2fa917b900a7f98ed6b514a","src/wasi.rs":"486a00bafb5b6bf0538c4d984dab021835295c431cb2ceb7a9a74b499f78ade6","src/windows/gnu/align.rs":"b2c13ec1b9f3b39a75c452c80c951dff9d0215e31d77e883b4502afb31794647","src/windows/gnu/mod.rs":"c7ab9793baaa3b6854d25fdf44266b7953533009e4fa722ca717b71d3e5d2c9d","src/windows/mod.rs":"053c4d3d99c6a8b2fba4df0f8c7266cdd9fbbaa6bddc50cd6f747bef1ff59da9","src/windows/msvc.rs":"2c2bfce66027d88021e7289139ebf5b0db258a7b6443f18872c84dbd4ef57131","tests/const_fn.rs":"cb75a1f0864f926aebe79118fc34d51a0d1ade2c20a394e7774c7e545f21f1f4","triagebot.toml":"a135e10c777cd13459559bdf74fb704c1379af7c9b0f70bc49fa6f5a837daa81"},"package":"a2f02823cf78b754822df5f7f268fb59822e7296276d3e069d8e8cb26a14bd10"}
+\ No newline at end of file
diff --git a/dev-lang/rust/files/0030-liblibc-linkage.patch b/dev-lang/rust/files/0030-liblibc-linkage.patch
deleted file mode 100644
index 6863209..0000000
--- a/dev-lang/rust/files/0030-liblibc-linkage.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- rustc-1.34.2-src/vendor/libc/src/lib.rs
-+++ rustc-1.34.2-src/vendor/libc/src/lib.rs
-@@ -153,6 +153,7 @@
- #![cfg_attr(feature = "rustc-dep-of-std", feature(cfg_target_vendor))]
- #![cfg_attr(feature = "rustc-dep-of-std", feature(link_cfg, repr_packed))]
- #![cfg_attr(feature = "rustc-dep-of-std", feature(no_core))]
-+#![cfg_attr(feature = "rustc-dep-of-std", feature(static_nobundle))]
- #![cfg_attr(feature = "rustc-dep-of-std", no_core)]
- #![cfg_attr(feature = "rustc-dep-of-std", allow(warnings))]
- #![cfg_attr(not(any(feature = "use_std", feature = "rustc-dep-of-std")), no_std)]
---- rustc-1.34.2-src/vendor/libc/src/unix/mod.rs
-+++ rustc-1.34.2-src/vendor/libc/src/unix/mod.rs
-@@ -287,11 +287,11 @@ cfg_if! {
- // cargo build, don't pull in anything extra as the libstd dep
- // already pulls in all libs.
- } else if #[cfg(target_env = "musl")] {
-+ #[link(name = "c")]
-+ extern {}
- #[cfg_attr(feature = "rustc-dep-of-std",
-- link(name = "c", kind = "static",
-+ link(name = "gcc", kind = "static-nobundle",
- cfg(target_feature = "crt-static")))]
-- #[cfg_attr(feature = "rustc-dep-of-std",
-- link(name = "c", cfg(not(target_feature = "crt-static"))))]
- extern {}
- } else if #[cfg(target_os = "emscripten")] {
- #[link(name = "c")]
---- rustc-1.34.2-src/vendor/libc/.cargo-checksum.json
-+++ rustc-1.34.2-src/vendor/libc/.cargo-checksum.json
-@@ -1 +1 @@
--{"files":{"Cargo.toml":"e1bbf88a55a1ba674f5192fe1585b57a51751ee6c5aa7edeb87df8027c3bb912","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"40ddea9181e5374cf535aae33ad4ace80bd9b1beea8f881ff8d2b777da9489b2","build.rs":"2d1cbe87e0478de12a15a230d7ef0997020ba845b5b7d221d74cd2ce3fe0e720","src/cloudabi/aarch64.rs":"b8550bf1fd7344972aa4db29441486f39f31482d0327534981dbb75959c29114","src/cloudabi/arm.rs":"c197e2781c2839808bd6fcef219a29705b27b992d3ef920e9cf6ac96e2022bbf","src/cloudabi/mod.rs":"640375751825b8d4adf4fb089a53c4d883f265f96b07daf06f2dcf3acf6639c9","src/cloudabi/x86.rs":"33eb97f272d2201f3838ae74d444583c7de8f67856852ca375293b20bbd05636","src/cloudabi/x86_64.rs":"400d85d4fe39e26cf2e6ece9ee31c75fe9e88c4bcf4d836ca9f765c05c9c5be3","src/dox.rs":"b4b96dcba47797a6160c07f29982dd15d48fd2813d7d1000484bd9adc4a89de1","src/fuchsia/aarch64.rs":"40dce617877e606e92353491e1
913711b1ecfa510bb983156f4a8460f490419e","src/fuchsia/mod.rs":"784dee21605f00a41d7cae1fc3d782646a84515a687a4952700eae51cc3840f0","src/fuchsia/x86_64.rs":"b4a3eff94dcf1ffe41e6500468ca2cff0e97ddbcc75fe079b6ac7adb1e493f56","src/lib.rs":"d456d34fc58c8d194f8f24201b4021860f61c5f125904bb8dcc954d1f813f6b7","src/macros.rs":"29d61c13523328c4742a7290dbb7d718ce198740824592e029199e9df5429b20","src/redox/mod.rs":"87cb35a988be84d45e79206f7cb5d098e8e7c5a1825cfcd0bd663453dedc3103","src/redox/net.rs":"f2e1922883f208cb46c00744da4a68feccfbec576c6981978ad404e46f818c8b","src/sgx.rs":"18d33a470d06c15b00be5a3bf45b6e51da6104ae7437f50c0eccbd3b79994389","src/switch.rs":"00365ed196519b260fc99a32f02d60b3fb1aaf0484654b19fec8c25bc1687420","src/unix/bsd/apple/b32.rs":"da60c99ee3d773f9c0767b93ccf18b67ad67576e2c58e2e86d05b23c23fd989a","src/unix/bsd/apple/b64.rs":"0cc15406c3a91abde65b28c7783ccab7801474ecc51c78dbd1d7332d4b834390","src/unix/bsd/apple/mod.rs":"b0e2d1f7fdb71d7a02bc5994c66a5ae660955227a0c0f808172a30b38fd40
299","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"6c69319675328d4d16939c9c2aba3fb8ca9381a8b390d18d766949307090304b","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"97132e2097411034271b8c927ecc94a208a361564680972a6c82998bd30a9826","src/unix/bsd/freebsdlike/freebsd/mod.rs":"6bbb3c3cf0753f32a2e61ac0f011a6c5e870a0814a6ed4eb9bb9dcdc58a9dca3","src/unix/bsd/freebsdlike/freebsd/x86.rs":"54311d3ebf2bb091ab22361e377e6ef9224aec2ecfe459fbfcedde4932db9c58","src/unix/bsd/freebsdlike/freebsd/x86_64.rs":"97132e2097411034271b8c927ecc94a208a361564680972a6c82998bd30a9826","src/unix/bsd/freebsdlike/mod.rs":"596def64669e2f27cffebca8e5c682ee7d576f84f8f99771c27e86ce8e818221","src/unix/bsd/mod.rs":"0c846b3a2c9390dfe090603f1ad643b107cc7e7605866c5399aa81dfea4e74bd","src/unix/bsd/netbsdlike/mod.rs":"9f55f35f8e4e26c7c63eaf67ddda0e40cc2abbabc2a68750809162e6f80144f1","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"f455848cd03cb80897776f2355dbd14bbb3aa88b1aa6aec22122ec47cdbd0f20","src/unix/bsd/netbsdlike/netbsd/arm.r
s":"4c9eac982c385165f475ef3a80770fd634c6dde8fb400b3cb7e08c9bb7498af6","src/unix/bsd/netbsdlike/netbsd/mod.rs":"88617ada3bc740c5262926b9c45d7f51120d358522f051f0afdf7465edd13c29","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"183818c62dff72db6ee1d329d90ad8727628775ed5cd823c8485c6769003c91e","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"4db043327fb2615af2fb0f999d162310bea2294e7d050806e19a46b083561f16","src/unix/bsd/netbsdlike/netbsd/x86.rs":"979c4cbacbde37b9053f2c9df4b8f87d37b255436ef4a383e1e5f40ee21180d6","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"741353a1c6451efb0c7c7c486fd2cb54e3d36fd1c3dd280f6432d8858b0a5356","src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs":"4d2ad2e885d83ad3134add61580f49a8e58cb03284ae328273a9e2e104a4d084","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs":"6e6f15e81597d85d83ca0eeb154e4f8b8e7f9cbb6a9cfa176601f78642ef94f9","src/unix/bsd/netbsdl
ike/openbsdlike/mod.rs":"6320b7bc7283dbc2a07cfb8b5a793c0153535601d050f33c1ff5e4a5cc57c2be","src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs":"820092e397c7ec259cd2de8f2444083a8e57071c02d73d678701dfa7807726e9","src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs":"6adc0dcb1b358ef91bbeb5512e19ba6f40adc77b7d259cb11641a69426fc5ea2","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs":"44b7ea81cf363777b29935da175e702cbf45ed78f7498ae57faf44aa32335085","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs":"97956c3a53aa07a2edf8865252f980dade0d34e930adca0e870e7344d7e2b0bb","src/unix/haiku/b32.rs":"69ae47fc52c6880e85416b4744500d5655c9ec6131cb737f3b649fceaadce15a","src/unix/haiku/b64.rs":"73e64db09275a8da8d50a13cce2cfa2b136036ddf3a930d2939f337fc995900b","src/unix/haiku/mod.rs":"b00fa310b6d835cb613a02101c7b1a72c636faec316586587cb63aebdcb9de8f","src/unix/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/unix/hermit/mod.rs":"248c0b0abaa7d56a7dc3293e
67a0ce70a4ef8c83638bda8aa222ad8bb0ef6801","src/unix/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/unix/mod.rs":"c5f3c6d74ac8e8ef83374b6115bab7c6e57297336a7635aa4c47462649b00dfb","src/unix/newlib/aarch64/mod.rs":"c408a990f22fb4292a824f38367e9b517e6e6f8623328397ee631cc88b3d1f7d","src/unix/newlib/arm/mod.rs":"2b6dba2e697ab9b4f4bc4dd5f28057249e9b596d1cb395a9322ec87605c4a5c4","src/unix/newlib/mod.rs":"eea5f1eb720184d9a00be966e4161fddb3733362fc349182e85b1599ba4e825f","src/unix/notbsd/android/b32/arm.rs":"3625a32c7e58cfe683a53486fbe3d42d4e28f00bea31e19cb46ed2bb0b6a140b","src/unix/notbsd/android/b32/mod.rs":"2fbe398c1fb5251dda6213741a193e50aae4622807cb255d1dd2e82b536f0c65","src/unix/notbsd/android/b32/x86.rs":"ae2b7f1d6278caddc007749bb1d09ca33f7593478a0fd7fe98b457dae86c7814","src/unix/notbsd/android/b64/aarch64.rs":"63d65629d79371814910f691672ef593d20244ee09be26f1ebe07ee6212d0163","src/unix/notbsd/android/b64/mod.rs":"90d4f6b063fd4de42fd302cbc9d99
02fd99ac1d71dc48cb8bc6ad7b4c902e481","src/unix/notbsd/android/b64/x86_64.rs":"5547aef8dcbaa5a932559f34606fd8d89f6c9c15173d2b1412c12d39b3c1045f","src/unix/notbsd/android/mod.rs":"19013f41ac8ccac034eb48777a4041d69342edb9ca25d4e0bb9c5938f62eef3e","src/unix/notbsd/emscripten.rs":"9ed47a0a5020c8f72d9496f87ef0da669c1ed2b85980013100c466f18cd8a4c5","src/unix/notbsd/linux/mips/mips32.rs":"a483ddfd10765b7d5090dc21686eee8842649cd21236828a42d634114885f5f9","src/unix/notbsd/linux/mips/mips64.rs":"9fff696e3943cf206b549d1ae13fa361828e9a8454e2d5730eeaa1c172ff370d","src/unix/notbsd/linux/mips/mod.rs":"d18a40011e9090a4a2a1f27e5bd96eb2503ac352f4809648e15841083d7f3a68","src/unix/notbsd/linux/mod.rs":"d84e95d36f9477fa1aa694bf18a919ba20e65aa71539c3f3dc06e8f92acee521","src/unix/notbsd/linux/musl/b32/arm.rs":"fdf170e03812072785ec531f1ae810d0c4feb9b29d0c316681b9f7affe1262c0","src/unix/notbsd/linux/musl/b32/mips.rs":"afa4981d93f29b3fb0083a73ce1323f7dce1392f90d5cf1966b1fae10d510033","src/unix/notbsd/linux/mus
l/b32/mod.rs":"540928f168f145c136f9dd729ffa12b9d1838d9fe664fc642365d17d7fae648f","src/unix/notbsd/linux/musl/b32/powerpc.rs":"16c615770a96f155540511f58b5a8070c9c7a43e12bdfed83996690e7558bcb5","src/unix/notbsd/linux/musl/b32/x86.rs":"3abf1610c68c37f407cdd0f93563c3542c024219e0e8c9888266a6ee014e0c87","src/unix/notbsd/linux/musl/b64/aarch64.rs":"d98643408c2837387988f78adc95c90ad21196a6f8f879e3d33d7e8ccf612640","src/unix/notbsd/linux/musl/b64/mod.rs":"d9285cd705e2e92552a08c9aa69b810e7e1bd0e9da6edf069c678af285579661","src/unix/notbsd/linux/musl/b64/powerpc64.rs":"544d8a7f6d6d84143df8a4c3537c9a3a36bf3d338d7a1c15689b94492498d8d7","src/unix/notbsd/linux/musl/b64/x86_64.rs":"25340999290a63d564ec149532c905f59c312ec369f8806d6b15df66fa1b8857","src/unix/notbsd/linux/musl/mod.rs":"4e582af62a11e8a5235ccbeabe5b1003fc17705e606c1ed9b21b931a470681fc","src/unix/notbsd/linux/other/b32/arm.rs":"d9892f7350b2978335f734f1cd2d7fed60f0f2e66aa05bee3f69549c031f8b14","src/unix/notbsd/linux/other/b32/mod.rs":"2621
1878c6481861e11393625620edaa0700cac41f55f0118c0f0bd42c1b7520","src/unix/notbsd/linux/other/b32/powerpc.rs":"253fcd2f9978525285be1903cc08f3fec2dc3b12d1660a33e2995b4f6b810d1c","src/unix/notbsd/linux/other/b32/x86.rs":"49376e3ed0f3ff95c230ac20751911fe3c608dfe15c7c118b069fd7a954d8db9","src/unix/notbsd/linux/other/b64/aarch64.rs":"1124ab5e974718b94fa40ae0f1772fb1c537910ef3e018b7c6c94a38b83dd742","src/unix/notbsd/linux/other/b64/mod.rs":"63e1a3fdf5f4d1b9820934ab344c91aed5e458e7e05908535d2e942d51a08bf8","src/unix/notbsd/linux/other/b64/not_x32.rs":"fa8636fb93eab230ed53bdec0a06f5b81d6d982cc0800103563c8c1eefcdb2d9","src/unix/notbsd/linux/other/b64/powerpc64.rs":"a771d982ed8a9458e1f2f039f959b5075b22443159875ba5612eebba96661c24","src/unix/notbsd/linux/other/b64/sparc64.rs":"0caffe5924886f3aed187531dfe78189b3df40adb96782ec4b471647ff83e9b1","src/unix/notbsd/linux/other/b64/x32.rs":"06a26c5120ced30fc015c220799b67c4401be2f13fc6c7361bebd3d37ff4982d","src/unix/notbsd/linux/other/b64/x86_64.rs":"70d0
cec088630502128c1c28ffef9dcc0fd9c0644f6a71b1325961d075625226","src/unix/notbsd/linux/other/mod.rs":"fe76beac87fc549b076078a0fa3e2ecd4c13b0e6e4fcb34a89e16c6584f5259b","src/unix/notbsd/linux/s390x.rs":"9e990574dfc22b6eb91bcc7c6f8297f9ad42f9183efb366a818be88180a3fac3","src/unix/notbsd/mod.rs":"a0fdecac118b70fb670f0fcccaa7f826440873448a96dd557fb1fe52cf391e89","src/unix/solaris/mod.rs":"7950a26f3eb0b7bc8e71f524cc2e05832b759fe2ce12a58e0c1957e0ec1286dc","src/unix/uclibc/mips/mips32.rs":"9739c5fb47f389a0394ef08ee30da97a3de0a1300020731a8cc0a033616011b2","src/unix/uclibc/mips/mips64.rs":"230583280bbc7b3c7fcdb61244f51fa1af5944ca127c7cf83c598fe2313713d0","src/unix/uclibc/mips/mod.rs":"2d76e6cfeb2b7f7c59231a6e099f1aed811a45659e62153aaf00c220b9488a9d","src/unix/uclibc/mod.rs":"521818507cef958376edfd8401c35db7ee1c51ee3cf106ad962002104a184cf5","src/unix/uclibc/x86_64/l4re.rs":"68fd3a833fd1f7caf784a084224f384bdbdfb8b5a14ef94c4f5155409afb3439","src/unix/uclibc/x86_64/mod.rs":"419182836aedd426a5c9e6b8
667058adf86ac8f43af73ce8d00c503f8ff8f414","src/unix/uclibc/x86_64/other.rs":"f03b47842896f2f3ae6f8ebdcbcf0276454f880349d9cf00e3d304f8136893c5","src/windows/gnu.rs":"4d9033162cc6f7d245256c7b165c1ec18a741771fd9b99a55b421e8d14978599","src/windows/mod.rs":"7d74b12f71de86ee517a9cd93b1b38d0551646db0eaf526048abcbdd4bbeb250","src/windows/msvc.rs":"8f46cf66883c794175609a3b2bafaa094d0ba63eb6720ef1b84b175603f1074f"},"package":"023a4cd09b2ff695f9734c1934145a315594b7986398496841c7031a5a1bbdbd"}
-\ No newline at end of file
-+{"files":{"Cargo.toml":"e1bbf88a55a1ba674f5192fe1585b57a51751ee6c5aa7edeb87df8027c3bb912","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"40ddea9181e5374cf535aae33ad4ace80bd9b1beea8f881ff8d2b777da9489b2","build.rs":"2d1cbe87e0478de12a15a230d7ef0997020ba845b5b7d221d74cd2ce3fe0e720","src/cloudabi/aarch64.rs":"b8550bf1fd7344972aa4db29441486f39f31482d0327534981dbb75959c29114","src/cloudabi/arm.rs":"c197e2781c2839808bd6fcef219a29705b27b992d3ef920e9cf6ac96e2022bbf","src/cloudabi/mod.rs":"640375751825b8d4adf4fb089a53c4d883f265f96b07daf06f2dcf3acf6639c9","src/cloudabi/x86.rs":"33eb97f272d2201f3838ae74d444583c7de8f67856852ca375293b20bbd05636","src/cloudabi/x86_64.rs":"400d85d4fe39e26cf2e6ece9ee31c75fe9e88c4bcf4d836ca9f765c05c9c5be3","src/dox.rs":"b4b96dcba47797a6160c07f29982dd15d48fd2813d7d1000484bd9adc4a89de1","src/fuchsia/aarch64.rs":"40dce617877e606e92353491e1
913711b1ecfa510bb983156f4a8460f490419e","src/fuchsia/mod.rs":"784dee21605f00a41d7cae1fc3d782646a84515a687a4952700eae51cc3840f0","src/fuchsia/x86_64.rs":"b4a3eff94dcf1ffe41e6500468ca2cff0e97ddbcc75fe079b6ac7adb1e493f56","src/lib.rs":"69850cc2630e101768e05f78b35a0ee29875c519eb4817d5bd2c1d542fae8c1d","src/macros.rs":"29d61c13523328c4742a7290dbb7d718ce198740824592e029199e9df5429b20","src/redox/mod.rs":"87cb35a988be84d45e79206f7cb5d098e8e7c5a1825cfcd0bd663453dedc3103","src/redox/net.rs":"f2e1922883f208cb46c00744da4a68feccfbec576c6981978ad404e46f818c8b","src/sgx.rs":"18d33a470d06c15b00be5a3bf45b6e51da6104ae7437f50c0eccbd3b79994389","src/switch.rs":"00365ed196519b260fc99a32f02d60b3fb1aaf0484654b19fec8c25bc1687420","src/unix/bsd/apple/b32.rs":"da60c99ee3d773f9c0767b93ccf18b67ad67576e2c58e2e86d05b23c23fd989a","src/unix/bsd/apple/b64.rs":"0cc15406c3a91abde65b28c7783ccab7801474ecc51c78dbd1d7332d4b834390","src/unix/bsd/apple/mod.rs":"b0e2d1f7fdb71d7a02bc5994c66a5ae660955227a0c0f808172a30b38fd40
299","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"6c69319675328d4d16939c9c2aba3fb8ca9381a8b390d18d766949307090304b","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"97132e2097411034271b8c927ecc94a208a361564680972a6c82998bd30a9826","src/unix/bsd/freebsdlike/freebsd/mod.rs":"6bbb3c3cf0753f32a2e61ac0f011a6c5e870a0814a6ed4eb9bb9dcdc58a9dca3","src/unix/bsd/freebsdlike/freebsd/x86.rs":"54311d3ebf2bb091ab22361e377e6ef9224aec2ecfe459fbfcedde4932db9c58","src/unix/bsd/freebsdlike/freebsd/x86_64.rs":"97132e2097411034271b8c927ecc94a208a361564680972a6c82998bd30a9826","src/unix/bsd/freebsdlike/mod.rs":"596def64669e2f27cffebca8e5c682ee7d576f84f8f99771c27e86ce8e818221","src/unix/bsd/mod.rs":"0c846b3a2c9390dfe090603f1ad643b107cc7e7605866c5399aa81dfea4e74bd","src/unix/bsd/netbsdlike/mod.rs":"9f55f35f8e4e26c7c63eaf67ddda0e40cc2abbabc2a68750809162e6f80144f1","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"f455848cd03cb80897776f2355dbd14bbb3aa88b1aa6aec22122ec47cdbd0f20","src/unix/bsd/netbsdlike/netbsd/arm.r
s":"4c9eac982c385165f475ef3a80770fd634c6dde8fb400b3cb7e08c9bb7498af6","src/unix/bsd/netbsdlike/netbsd/mod.rs":"88617ada3bc740c5262926b9c45d7f51120d358522f051f0afdf7465edd13c29","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"183818c62dff72db6ee1d329d90ad8727628775ed5cd823c8485c6769003c91e","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"4db043327fb2615af2fb0f999d162310bea2294e7d050806e19a46b083561f16","src/unix/bsd/netbsdlike/netbsd/x86.rs":"979c4cbacbde37b9053f2c9df4b8f87d37b255436ef4a383e1e5f40ee21180d6","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"741353a1c6451efb0c7c7c486fd2cb54e3d36fd1c3dd280f6432d8858b0a5356","src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs":"4d2ad2e885d83ad3134add61580f49a8e58cb03284ae328273a9e2e104a4d084","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs":"6e6f15e81597d85d83ca0eeb154e4f8b8e7f9cbb6a9cfa176601f78642ef94f9","src/unix/bsd/netbsdl
ike/openbsdlike/mod.rs":"6320b7bc7283dbc2a07cfb8b5a793c0153535601d050f33c1ff5e4a5cc57c2be","src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs":"820092e397c7ec259cd2de8f2444083a8e57071c02d73d678701dfa7807726e9","src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs":"6adc0dcb1b358ef91bbeb5512e19ba6f40adc77b7d259cb11641a69426fc5ea2","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs":"44b7ea81cf363777b29935da175e702cbf45ed78f7498ae57faf44aa32335085","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs":"97956c3a53aa07a2edf8865252f980dade0d34e930adca0e870e7344d7e2b0bb","src/unix/haiku/b32.rs":"69ae47fc52c6880e85416b4744500d5655c9ec6131cb737f3b649fceaadce15a","src/unix/haiku/b64.rs":"73e64db09275a8da8d50a13cce2cfa2b136036ddf3a930d2939f337fc995900b","src/unix/haiku/mod.rs":"b00fa310b6d835cb613a02101c7b1a72c636faec316586587cb63aebdcb9de8f","src/unix/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/unix/hermit/mod.rs":"248c0b0abaa7d56a7dc3293e
67a0ce70a4ef8c83638bda8aa222ad8bb0ef6801","src/unix/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/unix/mod.rs":"3c5aad2e7ac5e8781158cd140ed07afb1e0ad5eb7fc4b7b0a7bf7f5d8d2ebe32","src/unix/newlib/aarch64/mod.rs":"c408a990f22fb4292a824f38367e9b517e6e6f8623328397ee631cc88b3d1f7d","src/unix/newlib/arm/mod.rs":"2b6dba2e697ab9b4f4bc4dd5f28057249e9b596d1cb395a9322ec87605c4a5c4","src/unix/newlib/mod.rs":"eea5f1eb720184d9a00be966e4161fddb3733362fc349182e85b1599ba4e825f","src/unix/notbsd/android/b32/arm.rs":"3625a32c7e58cfe683a53486fbe3d42d4e28f00bea31e19cb46ed2bb0b6a140b","src/unix/notbsd/android/b32/mod.rs":"2fbe398c1fb5251dda6213741a193e50aae4622807cb255d1dd2e82b536f0c65","src/unix/notbsd/android/b32/x86.rs":"ae2b7f1d6278caddc007749bb1d09ca33f7593478a0fd7fe98b457dae86c7814","src/unix/notbsd/android/b64/aarch64.rs":"63d65629d79371814910f691672ef593d20244ee09be26f1ebe07ee6212d0163","src/unix/notbsd/android/b64/mod.rs":"90d4f6b063fd4de42fd302cbc9d99
02fd99ac1d71dc48cb8bc6ad7b4c902e481","src/unix/notbsd/android/b64/x86_64.rs":"5547aef8dcbaa5a932559f34606fd8d89f6c9c15173d2b1412c12d39b3c1045f","src/unix/notbsd/android/mod.rs":"19013f41ac8ccac034eb48777a4041d69342edb9ca25d4e0bb9c5938f62eef3e","src/unix/notbsd/emscripten.rs":"9ed47a0a5020c8f72d9496f87ef0da669c1ed2b85980013100c466f18cd8a4c5","src/unix/notbsd/linux/mips/mips32.rs":"a483ddfd10765b7d5090dc21686eee8842649cd21236828a42d634114885f5f9","src/unix/notbsd/linux/mips/mips64.rs":"9fff696e3943cf206b549d1ae13fa361828e9a8454e2d5730eeaa1c172ff370d","src/unix/notbsd/linux/mips/mod.rs":"d18a40011e9090a4a2a1f27e5bd96eb2503ac352f4809648e15841083d7f3a68","src/unix/notbsd/linux/mod.rs":"d84e95d36f9477fa1aa694bf18a919ba20e65aa71539c3f3dc06e8f92acee521","src/unix/notbsd/linux/musl/b32/arm.rs":"fdf170e03812072785ec531f1ae810d0c4feb9b29d0c316681b9f7affe1262c0","src/unix/notbsd/linux/musl/b32/mips.rs":"afa4981d93f29b3fb0083a73ce1323f7dce1392f90d5cf1966b1fae10d510033","src/unix/notbsd/linux/mus
l/b32/mod.rs":"540928f168f145c136f9dd729ffa12b9d1838d9fe664fc642365d17d7fae648f","src/unix/notbsd/linux/musl/b32/powerpc.rs":"16c615770a96f155540511f58b5a8070c9c7a43e12bdfed83996690e7558bcb5","src/unix/notbsd/linux/musl/b32/x86.rs":"3abf1610c68c37f407cdd0f93563c3542c024219e0e8c9888266a6ee014e0c87","src/unix/notbsd/linux/musl/b64/aarch64.rs":"d98643408c2837387988f78adc95c90ad21196a6f8f879e3d33d7e8ccf612640","src/unix/notbsd/linux/musl/b64/mod.rs":"d9285cd705e2e92552a08c9aa69b810e7e1bd0e9da6edf069c678af285579661","src/unix/notbsd/linux/musl/b64/powerpc64.rs":"544d8a7f6d6d84143df8a4c3537c9a3a36bf3d338d7a1c15689b94492498d8d7","src/unix/notbsd/linux/musl/b64/x86_64.rs":"25340999290a63d564ec149532c905f59c312ec369f8806d6b15df66fa1b8857","src/unix/notbsd/linux/musl/mod.rs":"4e582af62a11e8a5235ccbeabe5b1003fc17705e606c1ed9b21b931a470681fc","src/unix/notbsd/linux/other/b32/arm.rs":"d9892f7350b2978335f734f1cd2d7fed60f0f2e66aa05bee3f69549c031f8b14","src/unix/notbsd/linux/other/b32/mod.rs":"2621
1878c6481861e11393625620edaa0700cac41f55f0118c0f0bd42c1b7520","src/unix/notbsd/linux/other/b32/powerpc.rs":"253fcd2f9978525285be1903cc08f3fec2dc3b12d1660a33e2995b4f6b810d1c","src/unix/notbsd/linux/other/b32/x86.rs":"49376e3ed0f3ff95c230ac20751911fe3c608dfe15c7c118b069fd7a954d8db9","src/unix/notbsd/linux/other/b64/aarch64.rs":"1124ab5e974718b94fa40ae0f1772fb1c537910ef3e018b7c6c94a38b83dd742","src/unix/notbsd/linux/other/b64/mod.rs":"63e1a3fdf5f4d1b9820934ab344c91aed5e458e7e05908535d2e942d51a08bf8","src/unix/notbsd/linux/other/b64/not_x32.rs":"fa8636fb93eab230ed53bdec0a06f5b81d6d982cc0800103563c8c1eefcdb2d9","src/unix/notbsd/linux/other/b64/powerpc64.rs":"a771d982ed8a9458e1f2f039f959b5075b22443159875ba5612eebba96661c24","src/unix/notbsd/linux/other/b64/sparc64.rs":"0caffe5924886f3aed187531dfe78189b3df40adb96782ec4b471647ff83e9b1","src/unix/notbsd/linux/other/b64/x32.rs":"06a26c5120ced30fc015c220799b67c4401be2f13fc6c7361bebd3d37ff4982d","src/unix/notbsd/linux/other/b64/x86_64.rs":"70d0
cec088630502128c1c28ffef9dcc0fd9c0644f6a71b1325961d075625226","src/unix/notbsd/linux/other/mod.rs":"fe76beac87fc549b076078a0fa3e2ecd4c13b0e6e4fcb34a89e16c6584f5259b","src/unix/notbsd/linux/s390x.rs":"9e990574dfc22b6eb91bcc7c6f8297f9ad42f9183efb366a818be88180a3fac3","src/unix/notbsd/mod.rs":"a0fdecac118b70fb670f0fcccaa7f826440873448a96dd557fb1fe52cf391e89","src/unix/solaris/mod.rs":"7950a26f3eb0b7bc8e71f524cc2e05832b759fe2ce12a58e0c1957e0ec1286dc","src/unix/uclibc/mips/mips32.rs":"9739c5fb47f389a0394ef08ee30da97a3de0a1300020731a8cc0a033616011b2","src/unix/uclibc/mips/mips64.rs":"230583280bbc7b3c7fcdb61244f51fa1af5944ca127c7cf83c598fe2313713d0","src/unix/uclibc/mips/mod.rs":"2d76e6cfeb2b7f7c59231a6e099f1aed811a45659e62153aaf00c220b9488a9d","src/unix/uclibc/mod.rs":"521818507cef958376edfd8401c35db7ee1c51ee3cf106ad962002104a184cf5","src/unix/uclibc/x86_64/l4re.rs":"68fd3a833fd1f7caf784a084224f384bdbdfb8b5a14ef94c4f5155409afb3439","src/unix/uclibc/x86_64/mod.rs":"419182836aedd426a5c9e6b8
667058adf86ac8f43af73ce8d00c503f8ff8f414","src/unix/uclibc/x86_64/other.rs":"f03b47842896f2f3ae6f8ebdcbcf0276454f880349d9cf00e3d304f8136893c5","src/windows/gnu.rs":"4d9033162cc6f7d245256c7b165c1ec18a741771fd9b99a55b421e8d14978599","src/windows/mod.rs":"7d74b12f71de86ee517a9cd93b1b38d0551646db0eaf526048abcbdd4bbeb250","src/windows/msvc.rs":"8f46cf66883c794175609a3b2bafaa094d0ba63eb6720ef1b84b175603f1074f"},"package":"023a4cd09b2ff695f9734c1934145a315594b7986398496841c7031a5a1bbdbd"}
diff --git a/dev-lang/rust/files/0040-rls-atomics.patch b/dev-lang/rust/files/0040-rls-atomics.patch
index 8e44100..d9aedb9 100644
--- a/dev-lang/rust/files/0040-rls-atomics.patch
+++ b/dev-lang/rust/files/0040-rls-atomics.patch
@@ -1,6 +1,6 @@
---- a/src/tools/rls/rls/src/cmd.rs
-+++ b/src/tools/rls/rls/src/cmd.rs
-@@ -17,7 +17,7 @@ use crate::config::Config;
+--- 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;
@@ -9,7 +9,7 @@
use lsp_types::{
ClientCapabilities, CodeActionContext, CodeActionParams, CompletionItem,
-@@ -323,8 +323,8 @@ fn url(file_name: &str) -> Url {
+@@ -313,8 +313,8 @@ fn url(file_name: &str) -> Url {
}
fn next_id() -> RequestId {
@@ -20,9 +20,9 @@
}
// Custom reader and output for the RLS server.
---- a/src/tools/rls/rls/src/server/io.rs
-+++ b/src/tools/rls/rls/src/server/io.rs
-@@ -17,7 +17,7 @@ use crate::lsp_data::{LSPNotification, LSPRequest};
+--- 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};
@@ -31,7 +31,7 @@
use std::sync::Arc;
use jsonrpc_core::{self as jsonrpc, response, version, Id};
-@@ -182,13 +182,13 @@ pub trait Output: Sync + Send + Clone + 'static {
+@@ -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 {
@@ -40,14 +40,14 @@
}
impl StdioOutput {
- /// Construct a new `stdout` output.
+ /// 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()) }
}
}
-@@ -205,7 +205,7 @@ impl Output for StdioOutput {
+@@ -194,7 +194,7 @@ impl Output for StdioOutput {
}
fn provide_id(&self) -> RequestId {
diff --git a/dev-lang/rust/files/0050-llvm.patch b/dev-lang/rust/files/0050-llvm.patch
index 16f1f28..f1899f7 100644
--- a/dev-lang/rust/files/0050-llvm.patch
+++ b/dev-lang/rust/files/0050-llvm.patch
@@ -1,7 +1,5 @@
-diff --git a/src/llvm-project/llvm/include/llvm/Analysis/TargetLibraryInfo.def b/src/llvm-project/llvm/include/llvm/Analysis/TargetLibraryInfo.def
-index 579d23004d1..6cd9d2722fb 100644
---- a/src/llvm-project/llvm/include/llvm/Analysis/TargetLibraryInfo.def
-+++ b/src/llvm-project/llvm/include/llvm/Analysis/TargetLibraryInfo.def
+--- 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
diff --git a/dev-lang/rust/files/0051-llvm-D45520.patch b/dev-lang/rust/files/0051-llvm-D45520.patch
deleted file mode 100644
index 275f03b..0000000
--- a/dev-lang/rust/files/0051-llvm-D45520.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-Index: rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
-===================================================================
---- rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
-+++ rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
-@@ -442,13 +442,22 @@
- // On PPC64, VariantKind is VK_None, but on PPC32, it's VK_PLT, and it must
- // come at the _end_ of the expression.
- const MCOperand &Op = MI->getOperand(OpNo);
-- const MCSymbolRefExpr &refExp = cast<MCSymbolRefExpr>(*Op.getExpr());
-- O << refExp.getSymbol().getName();
-+ const MCSymbolRefExpr *RefExp = nullptr;
-+ const MCConstantExpr *ConstExp = nullptr;
-+ if (const MCBinaryExpr *BinExpr = dyn_cast<MCBinaryExpr>(Op.getExpr())) {
-+ RefExp = cast<MCSymbolRefExpr>(BinExpr->getLHS());
-+ ConstExp = cast<MCConstantExpr>(BinExpr->getRHS());
-+ } else
-+ RefExp = cast<MCSymbolRefExpr>(Op.getExpr());
-+
-+ O << RefExp->getSymbol().getName();
- O << '(';
- printOperand(MI, OpNo+1, O);
- O << ')';
-- if (refExp.getKind() != MCSymbolRefExpr::VK_None)
-- O << '@' << MCSymbolRefExpr::getVariantKindName(refExp.getKind());
-+ if (RefExp->getKind() != MCSymbolRefExpr::VK_None)
-+ O << '@' << MCSymbolRefExpr::getVariantKindName(RefExp->getKind());
-+ if (ConstExp != nullptr)
-+ O << '+' << ConstExp->getValue();
- }
-
- /// showRegistersWithPercentPrefix - Check if this register name should be
-Index: rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
-===================================================================
---- rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
-+++ rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
-@@ -487,8 +487,14 @@
- if (!Subtarget->isPPC64() && !Subtarget->isDarwin() &&
- isPositionIndependent())
- Kind = MCSymbolRefExpr::VK_PLT;
-- const MCSymbolRefExpr *TlsRef =
-+ const MCExpr *TlsRef =
- MCSymbolRefExpr::create(TlsGetAddr, Kind, OutContext);
-+
-+ // Add 32768 offset to the symbol so we follow up the latest GOT/PLT ABI.
-+ if (Kind == MCSymbolRefExpr::VK_PLT && Subtarget->isSecurePlt())
-+ TlsRef = MCBinaryExpr::createAdd(TlsRef,
-+ MCConstantExpr::create(32768, OutContext),
-+ OutContext);
- const MachineOperand &MO = MI->getOperand(2);
- const GlobalValue *GValue = MO.getGlobal();
- MCSymbol *MOSymbol = getSymbol(GValue);
-Index: rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
-===================================================================
---- rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
-+++ rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
-@@ -4054,7 +4054,20 @@
- if (trySETCC(N))
- return;
- break;
--
-+ // These nodes will be transformed into GETtlsADDR32 node, which
-+ // later becomes BL_TLS __tls_get_addr(sym at tlsgd)@PLT
-+ case PPCISD::ADDI_TLSLD_L_ADDR:
-+ case PPCISD::ADDI_TLSGD_L_ADDR: {
-+ const Module *Mod = MF->getFunction().getParent();
-+ if (PPCLowering->getPointerTy(CurDAG->getDataLayout()) != MVT::i32 ||
-+ !PPCSubTarget->isSecurePlt() || !PPCSubTarget->isTargetELF() ||
-+ Mod->getPICLevel() == PICLevel::SmallPIC)
-+ break;
-+ // Attach global base pointer on GETtlsADDR32 node in order to
-+ // generate secure plt code for TLS symbols.
-+ getGlobalBaseReg();
-+ }
-+ break;
- case PPCISD::CALL: {
- const Module *M = MF->getFunction().getParent();
-
-Index: rustc-src/src/llvm-project/llvm/test/CodeGen/PowerPC/ppc32-secure-plt-tls.ll
-===================================================================
---- rustc-src/src/llvm-project/llvm/test/CodeGen/PowerPC/ppc32-secure-plt-tls.ll
-+++ rustc-src/src/llvm-project/llvm/test/CodeGen/PowerPC/ppc32-secure-plt-tls.ll
-@@ -0,0 +1,18 @@
-+; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -mattr=+secure-plt -relocation-model=pic | FileCheck -check-prefix=SECURE-PLT-TLS %s
-+
-+@a = thread_local local_unnamed_addr global i32 6, align 4
-+define i32 @main() local_unnamed_addr #0 {
-+entry:
-+ %0 = load i32, i32* @a, align 4
-+ ret i32 %0
-+}
-+
-+
-+!llvm.module.flags = !{!0}
-+!0 = !{i32 7, !"PIC Level", i32 2}
-+
-+; SECURE-PLT-TLS: mflr 30
-+; SECURE-PLT-TLS-NEXT: addis 30, 30, .LTOC-.L0$pb@ha
-+; SECURE-PLT-TLS-NEXT: addi 30, 30, .LTOC-.L0$pb@l
-+; SECURE-PLT-TLS-NEXT: bl .L{{.*}}
-+; SECURE-PLT-TLS: bl __tls_get_addr(a@tlsgd)@PLT+32768
-\ No newline at end of file
diff --git a/dev-lang/rust/files/0051-llvm-powerpc-elfv2.patch b/dev-lang/rust/files/0051-llvm-powerpc-elfv2.patch
new file mode 100644
index 0000000..b5ee930
--- /dev/null
+++ b/dev-lang/rust/files/0051-llvm-powerpc-elfv2.patch
@@ -0,0 +1,12 @@
+--- 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/0052-llvm-D52013.patch b/dev-lang/rust/files/0052-llvm-D52013.patch
deleted file mode 100644
index 05ccae6..0000000
--- a/dev-lang/rust/files/0052-llvm-D52013.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
-===================================================================
---- rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
-+++ rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
-@@ -199,6 +199,10 @@
- case Triple::ppc64le:
- return PPCTargetMachine::PPC_ABI_ELFv2;
- case Triple::ppc64:
-+ // musl uses ELFv2 ABI on both endians.
-+ if (TT.getEnvironment() == Triple::Musl)
-+ return PPCTargetMachine::PPC_ABI_ELFv2;
-+
- return PPCTargetMachine::PPC_ABI_ELFv1;
- default:
- return PPCTargetMachine::PPC_ABI_UNKNOWN;
diff --git a/dev-lang/rust/files/0053-llvm-secureplt.patch b/dev-lang/rust/files/0053-llvm-secureplt.patch
deleted file mode 100644
index ddf8877..0000000
--- a/dev-lang/rust/files/0053-llvm-secureplt.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/src/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp b/src/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
---- a/src/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
-+++ b/src/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
-@@ -138,6 +138,10 @@
- if (isDarwin())
- HasLazyResolverStubs = true;
-
-+ // Set up musl-specific properties.
-+ if (TargetTriple.getEnvironment() == Triple::Musl)
-+ SecurePlt = true;
-+
- if (HasSPE && IsPPC64)
- report_fatal_error( "SPE is only supported for 32-bit targets.\n", false);
- if (HasSPE && (HasAltivec || HasQPX || HasVSX || HasFPU))
-diff --git a/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
---- a/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
-+++ b/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
-@@ -222,6 +222,10 @@ static Reloc::Model getEffectiveRelocModel(const Triple &TT,
- if (TT.getArch() == Triple::ppc64)
- return Reloc::PIC_;
-
-+ // musl needs SecurePlt, which depends on PIC.
-+ if (TT.getEnvironment() == Triple::Musl)
-+ return Reloc::PIC_;
-+
- // Rest are static by default.
- return Reloc::Static;
- }
diff --git a/dev-lang/rust/files/0060-fix-build-with-libressl-2.9.1.patch b/dev-lang/rust/files/0060-fix-build-with-libressl-2.9.1.patch
deleted file mode 100644
index d5375a0..0000000
--- a/dev-lang/rust/files/0060-fix-build-with-libressl-2.9.1.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From a04a24be49e14fe77dfcef647afbbe5ae5e181d1 Mon Sep 17 00:00:00 2001
-From: Jory Pratt <anarchy@gentoo.org>
-Date: Wed, 24 Apr 2019 01:57:40 -0500
-Subject: [PATCH] fix build with libressl-2.9.1
-
-Signed-off-by: Jory Pratt <anarchy@gentoo.org>
----
- vendor/openssl-sys/.cargo-checksum.json | 2 +-
- vendor/openssl-sys/build/main.rs | 1 +
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/vendor/openssl-sys/.cargo-checksum.json b/vendor/openssl-sys/.cargo-checksum.json
-index b5c539431..49a2227bf 100644
---- a/vendor/openssl-sys/.cargo-checksum.json
-+++ b/vendor/openssl-sys/.cargo-checksum.json
-@@ -1 +1 @@
--{"files":{"Cargo.toml":"b09af0445220130b1b1c45791a316435f7400cf2fab3abe9c419f4f8028cfb9c","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"96a414be6e7e061a21a9e39a61449039f6791225264032641dd044a1a9b88111","build/cfgs.rs":"fae5176c2b149d190c9611b58c5882312b5c0e483d1a404cfdf850473314a58f","build/main.rs":"c8bc352b94d05afeaeb96300341a695c70c3b62c46793a5c035aaf42e22b69d1","src/aes.rs":"660efd70f809cb2f5dbbf527be8f9592911776bab7dafa1fc4cc72dd9a576b67","src/asn1.rs":"4f12d2f4c2a493888db669d1ecfd55df40861a78cae65957f801ed91dc2cae30","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"29aa053b67b47515fd15812aa0a90ff35dd9fa347da2beeba96d6deafeb9d945","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"f6e8a116940755b2b53e3d0d49d1b451fc6e4269831fd1cfcee9d6ed404cf487","src/dh.rs":"520
b282b92fa372a75bc16696dc3ee7a9a5752e517a18862182a3e9f5a976d28","src/dsa.rs":"3c294c5c45235497396ac803b723b3a0cb5bd3609f5dec18338b5b014c2adeb9","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"b22d27b01a70652384866b3d0d01d2f7a0421b2ba2db9268ed379fef4b1ac034","src/err.rs":"81230711e081277e0b6dae4ff21266052d075688c758c2b0720001849ef9192d","src/evp.rs":"13a8a71154545d7c478e156edb21beb219824937aba6b29c6bc6ef895c735a3d","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"17b5a1faa0fe3ab777c8cb0039a3dffd8922b211bf1330c2cd0c3e02f624353c","src/macros.rs":"a7c95174fd4cfeb42f730c7c0744194009520249888dbf43968571219fd6dfa1","src/obj_mac.rs":"9c20609db7115c9edb99185375426169cb5b7caee839d892b556e92285e65309","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"619177f939328597e4bcf9
c41fdf4d0aa9207d779c6e0dafddbe2eab9b1a6a98","src/pem.rs":"3ae1c53dbc126a04c188575294111cc04c215c2f3e031192d5cc05952f011ddf","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"a0bf64f1f8ff9f6e5dbed6c38d8fa2d3d1c5dfcfe6dd3ff79f7737b072ce4681","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"05044d221d8d205010a4e3760c0b5c0e2e923e165db0d65f9a8c9bcedaad9961","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"e69d3b9b8f2f8ae1ed3905a4dbe064ad1b7c1eaf21d7eabb86ecdb5b41e2120a","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"fd85a1683064def0a9e07d803b90102229adc1d58f
a19cf4e56976f0dd7425b9","src/x509.rs":"839be2feb74755ab7df66a024ad27dfa70ce4f7889229d9152ba999f3a54b914","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"66fd646ea4caf5ce81e3c881e88d85462519c4e97a7f82e82ca8ac52ea830ad2"},"package":"1bb974e77de925ef426b6bc82fce15fd45bdcbeb5728bffcfc7cdeeb7ce1c2d6"}
-\ No newline at end of file
-+{"files":{"Cargo.toml":"b09af0445220130b1b1c45791a316435f7400cf2fab3abe9c419f4f8028cfb9c","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"96a414be6e7e061a21a9e39a61449039f6791225264032641dd044a1a9b88111","build/cfgs.rs":"fae5176c2b149d190c9611b58c5882312b5c0e483d1a404cfdf850473314a58f","build/main.rs":"4c1c4b208af314ee7217108c5cb22fd51dac1fdb2bbdf901a63454a99741ca2d","src/aes.rs":"660efd70f809cb2f5dbbf527be8f9592911776bab7dafa1fc4cc72dd9a576b67","src/asn1.rs":"4f12d2f4c2a493888db669d1ecfd55df40861a78cae65957f801ed91dc2cae30","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"29aa053b67b47515fd15812aa0a90ff35dd9fa347da2beeba96d6deafeb9d945","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"f6e8a116940755b2b53e3d0d49d1b451fc6e4269831fd1cfcee9d6ed404cf487","src/dh.rs":"520
b282b92fa372a75bc16696dc3ee7a9a5752e517a18862182a3e9f5a976d28","src/dsa.rs":"3c294c5c45235497396ac803b723b3a0cb5bd3609f5dec18338b5b014c2adeb9","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"b22d27b01a70652384866b3d0d01d2f7a0421b2ba2db9268ed379fef4b1ac034","src/err.rs":"81230711e081277e0b6dae4ff21266052d075688c758c2b0720001849ef9192d","src/evp.rs":"13a8a71154545d7c478e156edb21beb219824937aba6b29c6bc6ef895c735a3d","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"17b5a1faa0fe3ab777c8cb0039a3dffd8922b211bf1330c2cd0c3e02f624353c","src/macros.rs":"a7c95174fd4cfeb42f730c7c0744194009520249888dbf43968571219fd6dfa1","src/obj_mac.rs":"9c20609db7115c9edb99185375426169cb5b7caee839d892b556e92285e65309","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"619177f939328597e4bcf9
c41fdf4d0aa9207d779c6e0dafddbe2eab9b1a6a98","src/pem.rs":"3ae1c53dbc126a04c188575294111cc04c215c2f3e031192d5cc05952f011ddf","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"a0bf64f1f8ff9f6e5dbed6c38d8fa2d3d1c5dfcfe6dd3ff79f7737b072ce4681","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"05044d221d8d205010a4e3760c0b5c0e2e923e165db0d65f9a8c9bcedaad9961","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"e69d3b9b8f2f8ae1ed3905a4dbe064ad1b7c1eaf21d7eabb86ecdb5b41e2120a","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"fd85a1683064def0a9e07d803b90102229adc1d58f
a19cf4e56976f0dd7425b9","src/x509.rs":"839be2feb74755ab7df66a024ad27dfa70ce4f7889229d9152ba999f3a54b914","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"66fd646ea4caf5ce81e3c881e88d85462519c4e97a7f82e82ca8ac52ea830ad2"},"package":"1bb974e77de925ef426b6bc82fce15fd45bdcbeb5728bffcfc7cdeeb7ce1c2d6"}
-\ No newline at end of file
-diff --git a/vendor/openssl-sys/build/main.rs b/vendor/openssl-sys/build/main.rs
-index 69def400e..6f08c872d 100644
---- a/vendor/openssl-sys/build/main.rs
-+++ b/vendor/openssl-sys/build/main.rs
-@@ -505,6 +505,7 @@ See rust-openssl README for more information:
- (8, 1) => ('8', '1'),
- (8, _) => ('8', 'x'),
- (9, 0) => ('9', '0'),
-+ (9, _) => ('9', 'x'),
- _ => version_error(),
- };
-
---
-2.21.0
-
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
new file mode 100644
index 0000000..9064a52
--- /dev/null
+++ b/dev-lang/rust/files/1.46.0-don-t-create-prefix-at-time-of-check.patch
@@ -0,0 +1,31 @@
+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
new file mode 100644
index 0000000..07ad0eb
--- /dev/null
+++ b/dev-lang/rust/files/1.47.0-libressl.patch
@@ -0,0 +1,44 @@
+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":"1f38a3ec4029511fecd7a51548965a265f3e7772891b5514e22bfb1d
061b3a90","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":"638fb9
098f6024e82b331eeee50c64cefdb58456dba28ee42560be655a0c2bf6","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":"306047f3f31828fe7
d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","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":"1f38a3ec4029511fecd7a51548965a265f3e7772891b5514e22bfb1d
061b3a90","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":"638fb9
098f6024e82b331eeee50c64cefdb58456dba28ee42560be655a0c2bf6","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":"306047f3f31828fe7
d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","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
index 72d27c6..cd11337 100644
--- a/dev-lang/rust/metadata.xml
+++ b/dev-lang/rust/metadata.xml
@@ -1,14 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>samuel@sholland.org</email>
- <name>Samuel Holland</name>
- </maintainer>
- <use>
- <flag name="clippy">Install clippy component</flag>
- <flag name="system-llvm">Use the system LLVM install</flag>
- <flag name="rls">Install rls component</flag>
- <flag name="rustfmt">Install rustfmt component</flag>
- </use>
+ <maintainer type="project">
+ <email>rust@gentoo.org</email>
+ <name>Rust Project</name>
+ </maintainer>
+ <use>
+ <flag name="cargo">Install cargo component</flag>
+ <flag name="clippy">Install clippy component</flag>
+ <flag name="system-llvm">Use the system LLVM install</flag>
+ <flag name="rls">Install rls component</flag>
+ <flag name="rustfmt">Install rustfmt component</flag>
+ <flag name="wasm">Build support for the wasm32-unknown-unknown
+ target</flag>
+ </use>
</pkgmetadata>
diff --git a/dev-lang/rust/rust-1.34.2.ebuild b/dev-lang/rust/rust-1.34.2.ebuild
deleted file mode 100644
index ca831e7..0000000
--- a/dev-lang/rust/rust-1.34.2.ebuild
+++ /dev/null
@@ -1,337 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python{2_7,3_7} )
-
-inherit check-reqs eapi7-ver flag-o-matic llvm multiprocessing python-any-r1 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 ~ppc ~ppc64 ~x86"
-
-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
- amd64? ( https://portage.smaeul.xyz/distfiles/rust-${RUST_STAGE0_VERSION}-x86_64-gentoo-linux-musl.tar.xz )
- arm? ( https://portage.smaeul.xyz/distfiles/rust-${RUST_STAGE0_VERSION}-armv7a-unknown-linux-musleabihf.tar.xz )
- arm64? ( https://portage.smaeul.xyz/distfiles/rust-${RUST_STAGE0_VERSION}-aarch64-gentoo-linux-musl.tar.xz )
- ppc? ( https://portage.smaeul.xyz/distfiles/rust-${RUST_STAGE0_VERSION}-powerpc-gentoo-linux-musl.tar.xz )
- ppc64? ( https://portage.smaeul.xyz/distfiles/rust-${RUST_STAGE0_VERSION}-powerpc64-gentoo-linux-musl.tar.xz )
- x86? ( https://portage.smaeul.xyz/distfiles/rust-${RUST_STAGE0_VERSION}-i686-gentoo-linux-musl.tar.xz )
-"
-
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC 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 rls rustfmt system-llvm ${ALL_LLVM_TARGETS[*]}"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling one than more 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. < 9.
-# 3. Specify LLVM_MAX_SLOT, e.g. 8.
-LLVM_DEPEND="
- || (
- >=sys-devel/llvm-8:=[${LLVM_TARGET_USEDEPS// /,}]
- )
- <sys-devel/llvm-9:=
-"
-LLVM_MAX_SLOT=8
-
-COMMON_DEPEND="
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- net-libs/http-parser:=
- net-libs/libssh2:=
- net-misc/curl:=[ssl]
- sys-libs/zlib:=
- system-llvm? (
- ${LLVM_DEPEND}
- )
-"
-DEPEND="${COMMON_DEPEND}
- ${PYTHON_DEPS}
- || (
- >=sys-devel/gcc-4.7
- >=sys-devel/clang-3.5
- )
- !system-llvm? (
- dev-util/cmake
- dev-util/ninja
- )
-"
-RDEPEND="${COMMON_DEPEND}
- >=app-eselect/eselect-rust-20190311
- !dev-util/cargo
- rustfmt? ( !dev-util/rustfmt )"
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
- x86? ( cpu_flags_x86_sse2 )
-"
-
-PATCHES=(
- "${FILESDIR}/0001-Don-t-pass-CFLAGS-to-the-C-compiler.patch"
- "${FILESDIR}/0002-Fix-LLVM-build.patch"
- "${FILESDIR}/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch"
- "${FILESDIR}/0004-Require-static-native-libraries-when-linking-static-.patch"
- "${FILESDIR}/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch"
- "${FILESDIR}/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch"
- "${FILESDIR}/0007-runtest-Fix-proc-macro-tests-on-musl-hosts.patch"
- "${FILESDIR}/0008-Correct-minimum-system-LLVM-version-in-tests.patch"
- "${FILESDIR}/0009-test-use-extern-for-plugins-Don-t-assume-multilib.patch"
- "${FILESDIR}/0010-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch"
- "${FILESDIR}/0011-Ignore-broken-and-non-applicable-tests.patch"
- "${FILESDIR}/0012-Link-stage-2-tools-dynamically-to-libstd.patch"
- "${FILESDIR}/0013-Move-debugger-scripts-to-usr-share-rust.patch"
- "${FILESDIR}/0014-Add-gentoo-target-specs.patch"
- "${FILESDIR}/0030-liblibc-linkage.patch"
- "${FILESDIR}/0040-rls-atomics.patch"
- "${FILESDIR}/0050-llvm.patch"
- "${FILESDIR}/0051-llvm-D45520.patch"
- "${FILESDIR}/0052-llvm-D52013.patch"
- "${FILESDIR}/0053-llvm-secureplt.patch"
- "${FILESDIR}/0060-fix-build-with-libressl-2.9.1.patch"
-)
-
-S="${WORKDIR}/${MY_P}-src"
-
-toml_usex() {
- usex "$1" true false
-}
-
-pre_build_checks() {
- CHECKREQS_DISK_BUILD="7G"
- eshopts_push -s extglob
- if is-flagq '-g?(gdb)?([1-9])'; then
- CHECKREQS_DISK_BUILD="10G"
- fi
- eshopts_pop
- check-reqs_pkg_setup
-}
-
-pkg_pretend() {
- pre_build_checks
-}
-
-pkg_setup() {
- export RUST_BACKTRACE=1
- pre_build_checks
- python-any-r1_pkg_setup
- 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() {
- default
-
- "${WORKDIR}/rust-${RUST_STAGE0_VERSION}-${CHOST}/install.sh" \
- --destdir="${WORKDIR}/stage0" \
- --prefix=/ \
- --components=rust-std-$CHOST,rustc,cargo \
- --disable-ldconfig \
- || die
-}
-
-src_configure() {
- local tools='"cargo"'
-
- for tool in clippy rls rustfmt; do
- if use $tool; then
- tools+=", \"$tool\""
- fi
- done
-
- cat <<- EOF > "${S}"/config.toml
- [llvm]
- ninja = true
- optimize = $(toml_usex !debug)
- release-debuginfo = $(toml_usex debug)
- assertions = $(toml_usex debug)
- targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
- link-shared = $(toml_usex system-llvm)
- [build]
- build = "${CHOST}"
- host = ["${CHOST}"]
- target = ["${CHOST}"]
- cargo = "${WORKDIR}/stage0/bin/cargo"
- rustc = "${WORKDIR}/stage0/bin/rustc"
- docs = $(toml_usex doc)
- compiler-docs = $(toml_usex doc)
- submodules = false
- python = "${EPYTHON}"
- locked-deps = true
- vendor = true
- verbose = 0
- sanitizers = false
- profiler = false
- extended = true
- tools = [${tools}]
- [install]
- prefix = "${EPREFIX}/usr"
- libdir = "lib"
- docdir = "share/doc/${P}"
- mandir = "share/${P}/man"
- [rust]
- optimize = $(toml_usex !debug)
- debuginfo = $(toml_usex debug)
- debug-assertions = $(toml_usex debug)
- default-linker = "$(tc-getCC)"
- channel = "stable"
- rpath = false
- optimize-tests = $(toml_usex !debug)
- dist-src = false
- jemalloc = false
- [dist]
- src-tarball = false
- [target.${CHOST}]
- cc = "$(tc-getCC)"
- cxx = "$(tc-getCXX)"
- linker = "$(tc-getCC)"
- ar = "$(tc-getAR)"
- EOF
- use system-llvm && cat <<- EOF >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "$LLVM_MAX_SLOT")/bin/llvm-config"
- EOF
-}
-
-src_compile() {
- "${EPYTHON}" x.py build --config="${S}"/config.toml -j$(makeopts_jobs) --exclude src/tools/miri || die
-}
-
-src_test() {
- "${EPYTHON}" x.py test -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-fail/pretty \
- src/test/run-make \
- src/test/run-make-fulldeps \
- src/test/run-pass \
- src/test/run-pass/pretty \
- src/test/run-pass-fulldeps \
- src/test/run-pass-fulldeps/pretty \
- src/test/ui \
- src/test/ui-fulldeps || die
-}
-
-src_install() {
- env DESTDIR="${D}" "${EPYTHON}" x.py install || die
-
- mv "${ED}/usr/bin/cargo" "${ED}/usr/bin/cargo-${PV}" || die
- 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
-
- rm "${ED}/usr/lib"/*.so || die
- rm "${ED}/usr/lib/rustlib/components" || die
- rm "${ED}/usr/lib/rustlib/install.log" || die
- rm "${ED}/usr/lib/rustlib"/manifest-* || die
- rm "${ED}/usr/lib/rustlib/rust-installer-version" || die
- rm "${ED}/usr/lib/rustlib/uninstall.sh" || die
-
- if use clippy; then
- mv "${ED}/usr/bin/cargo-clippy" "${ED}/usr/bin/cargo-clippy-${PV}" || die
- mv "${ED}/usr/bin/clippy-driver" "${ED}/usr/bin/clippy-driver-${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/cargo-fmt" "${ED}/usr/bin/cargo-fmt-${PV}" || die
- mv "${ED}/usr/bin/rustfmt" "${ED}/usr/bin/rustfmt-${PV}" || die
- fi
-
- if use doc; then
- dodir "/usr/share/doc/${P}"
- mv "${ED}/usr/share/doc/rust"/* "${ED}/usr/share/doc/${P}" || die
- rmdir "${ED}/usr/share/doc/rust" || 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
-
- docompress "/usr/share/${P}/man"
-
- cat <<-EOF > "${T}"/50${P}
- LDPATH="${EPREFIX}/usr/lib/rustlib/${CHOST}/lib"
- MANPATH="${EPREFIX}/usr/share/${P}/man"
- EOF
- doenvd "${T}"/50${P}
-
- # 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/cargo-clippy >> "${T}/provider-${P}"
- echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
- fi
- if use rls; then
- echo /usr/bin/rls >> "${T}/provider-${P}"
- fi
- if use rustfmt; then
- echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
- echo /usr/bin/rustfmt >> "${T}/provider-${P}"
- fi
- dodir /etc/env.d/rust
- 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}."
-
- ewarn "cargo is now installed from dev-lang/rust{,-bin} instead of dev-util/cargo."
- ewarn "This might have resulted in a dangling symlink for /usr/bin/cargo on some"
- ewarn "systems. This can be resolved by calling 'sudo eselect rust set ${P}'."
-
- if has_version app-editors/emacs || has_version app-editors/emacs-vcs; 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 has_version 'app-shells/zsh'; then
- elog "install app-shells/rust-zshcomp to get zsh completion for rust."
- fi
-}
-
-pkg_postrm() {
- eselect rust unset --if-invalid
-}
diff --git a/dev-lang/rust/rust-1.47.0-r1.ebuild b/dev-lang/rust/rust-1.47.0-r1.ebuild
new file mode 100644
index 0000000..5c2bfe5
--- /dev/null
+++ b/dev-lang/rust/rust-1.47.0-r1.ebuild
@@ -0,0 +1,531 @@
+# 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 ~ppc ~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} ) )
+ )
+"
+
+# 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
+ "${FILESDIR}"/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
+ "${FILESDIR}"/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
+}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/musl:master commit in: dev-lang/rust/, dev-lang/rust/files/
@ 2021-03-13 21:34 Sam James
0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2021-03-13 21:34 UTC (permalink / raw
To: gentoo-commits
commit: 48d382e968f4e4cad77b7c70eb9b3e08c31ffdd1
Author: Dave Hughes <davidhughes205 <AT> gmail <DOT> com>
AuthorDate: Sat Mar 13 05:10:36 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Mar 13 21:34:10 2021 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=48d382e9
dev-lang/rust: sync with ::smaeul
Package-Manager: Portage-3.0.17, Repoman-3.0.2
RepoMan-Options: --force
Manifest-Sign-Key: 0xA1919C830E9498E0
Signed-off-by: Dave Hughes <davidhughes205 <AT> gmail.com>
Closes: https://github.com/gentoo/musl/pull/395
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-lang/rust/Manifest | 35 +-
.../0001-Don-t-pass-CFLAGS-to-the-C-compiler.patch | 16 +-
dev-lang/rust/files/0002-Fix-LLVM-build.patch | 27 +-
...tdoc-to-work-when-cross-compiling-on-musl.patch | 36 --
...-Fix-linking-to-zlib-when-cross-compiling.patch | 34 ++
...-Fix-rustdoc-when-cross-compiling-on-musl.patch | 45 ++
...-nostdlib-and-musl_root-from-musl-targets.patch | 388 ---------------
...ative-libraries-when-linking-static-exec.patch} | 41 +-
...-Prefer-libgcc_eh-over-libunwind-for-musl.patch | 24 -
...l_root-and-CRT-fallback-from-musl-targets.patch | 486 +++++++++++++++++++
...-Prefer-libgcc_eh-over-libunwind-for-musl.patch | 38 ++
...untest-Fix-proc-macro-tests-on-musl-hosts.patch | 37 --
...rect-minimum-system-LLVM-version-in-tests.patch | 206 --------
...nk-libssp_nonshared.a-on-all-musl-targets.patch | 29 ++
...t-failed-doctest-output-Fix-normalization.patch | 36 ++
...t-crates-are-unstable-Fix-test-when-rpath.patch | 12 +-
...extern-for-plugins-Don-t-assume-multilib.patch} | 12 +-
...2-Ignore-broken-and-non-applicable-tests.patch} | 59 +--
...-Link-stage-2-tools-dynamically-to-libstd.patch | 27 --
...-Link-stage-2-tools-dynamically-to-libstd.patch | 25 +
...3-Move-debugger-scripts-to-usr-share-rust.patch | 53 --
...4-Move-debugger-scripts-to-usr-share-rust.patch | 69 +++
...cs.patch => 0015-Add-gentoo-target-specs.patch} | 58 ++-
dev-lang/rust/files/0030-libc-linkage.patch | 34 ++
dev-lang/rust/files/0030-liblibc-linkage.patch | 33 --
dev-lang/rust/files/0040-rls-atomics.patch | 20 +-
dev-lang/rust/files/0050-llvm.patch | 6 +-
dev-lang/rust/files/0051-llvm-D45520.patch | 101 ----
dev-lang/rust/files/0051-llvm-powerpc-elfv2.patch | 12 +
dev-lang/rust/files/0052-llvm-D52013.patch | 15 -
dev-lang/rust/files/0053-llvm-secureplt.patch | 28 --
.../files/0060-fix-build-with-libressl-2.9.1.patch | 35 --
...46.0-don-t-create-prefix-at-time-of-check.patch | 31 ++
dev-lang/rust/files/1.47.0-libressl.patch | 44 ++
dev-lang/rust/metadata.xml | 23 +-
dev-lang/rust/rust-1.34.2.ebuild | 337 -------------
dev-lang/rust/rust-1.47.0-r1.ebuild | 531 +++++++++++++++++++++
37 files changed, 1562 insertions(+), 1481 deletions(-)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 8111391..5a289f2 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -1,7 +1,28 @@
-DIST rust-1.33.0-aarch64-gentoo-linux-musl.tar.xz 103260664 BLAKE2B 2eeecf50ab275abc5679e4be56c3322c1967bbb1926e375910df1d3b5aee042cbb37c56ecede542668a63360bc9db82ec731a927a180399df99b30ff09b70c15 SHA512 de9ae088cc4ca76fc619dc8de4fe7f362bc8039c03d9b09ab905b7e551ef0b0fa2d678a984200efddfee542adf5f5a951bd24788a39940bace03d3fe829f4747
-DIST rust-1.33.0-armv7a-unknown-linux-musleabihf.tar.xz 102032976 BLAKE2B 9f00a004d575962ca3dd3d0d70190210111e9347f35e6858fc30a085495d48a03751645bfdb4940c7db2dc8bf74d08611dfec05fe53e5022e7360ed51c39f33a SHA512 45b5af051663c7ee7ff7c663af57dfbaaa3c9f69dd22c36134534e77a715d1acc101891f4a7e798fcab38e8accd284cc15df35da20552872894bc6da6dab89ff
-DIST rust-1.33.0-i686-gentoo-linux-musl.tar.xz 116133752 BLAKE2B a9cf13caa12da6ad20bbcbb592d3fa423eb6f90d50c9af41db17cb2f587d0ef90d19652e75742da49d8e187c8e393137998e384b5d9686cfff28553c7aab1f71 SHA512 eaef8169451b02cdee67fe40def8d0ab0d91e527ad4964b8bdafca8677bd2bcea265ba3be5a90c99589b8639ca3e026a540d295a5233f73da873e56e9ffea83f
-DIST rust-1.33.0-powerpc-gentoo-linux-musl.tar.xz 104602692 BLAKE2B bef7cacfd7d9e411f18f6b64403c3bdc33bb17270f966aa9cb6ff99e80d8da9bd1346e8c3e3081df7bee3f367d3940b3badd6aeec6859f4a3de75cfeb108de1a SHA512 2314b5d31c9cc31b28a3668ebd4e1a88a4f090c60b141c8e3e4fb06b4c311ef64ab9217acbdb34417e1f3aaf74fda2087ba90ad70075b7197471bf8bfc804370
-DIST rust-1.33.0-powerpc64-gentoo-linux-musl.tar.xz 98455708 BLAKE2B fde1ca61ddcfe1091aa2c39ffb9ea47ef4ef2b63557059eeda4df6c90bcf30b22bf09e0bd301d7993d27d18e0c5dbc84db123613a8ac31c68abcb56d1b3892bc SHA512 9dbe37abd4edd519ac3596d405b9af7a4a3de1da56161bed66f9f2f40d505beaa9d7c998c6775d6c86d4e086e5cb085f65702b6be7a182663c1e0c6b2095a242
-DIST rust-1.33.0-x86_64-gentoo-linux-musl.tar.xz 113838416 BLAKE2B 2d118520a118746ca16aac7b336e03805c3a02df20b2abdd2e9f6a4fcc062c17b0d057347447027287f8fdceeaa34a171835e6f22d45098097b540c97cee23a1 SHA512 cd2a6277af99cfaf84f5d293a09e0af9189e1d9148bc4031dd32620f0eb086695e175c6a04e6cceb673af976566114e4a75d42654505d295135a8fc95eb2f850
-DIST rustc-1.34.2-src.tar.xz 95048792 BLAKE2B e81e4bfda87ddfb09ab8a74792346970aa440c678d2bb1279c329db4929282f761ada6fea9d81ceeecfd513613025c8e636487626fc36bd0b33559e045bb1b15 SHA512 f1bd2b226d90aae8a4657e6117b9a8451d4ce8129f79cc0fce0da7613a3b7800e690bc0ede8fec20a2f5f32c13fa8e22ac97d3838e0d36936793535a75d9c381
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+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
+-----BEGIN PGP SIGNATURE-----
+
+iQKTBAEBCAB9FiEEZdLCSnfk9z83VSkfsaMsEcx8U7oFAmBMSUVfFIAAAAAALgAo
+aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDY1
+RDJDMjRBNzdFNEY3M0YzNzU1MjkxRkIxQTMyQzExQ0M3QzUzQkEACgkQsaMsEcx8
+U7p7Ww//RewZS0qjL32uR/Dr/ljrSEY2Yi/YqKxTzdT067ksG017bmboBWVUi6AZ
+92nD8fAiNtUl5nDneW7SD9lQaLdYPUrC+IDHB+z5hh02V1VRXL4FMbyXx/rEmZaw
+sTAUVdooJgG2Hqu0tYe/+YsaTs0j0qizaWrTVaa1hWXUIKf+KK/IePt4p5yj4rpa
+v2KmiW32gEi1Mydch1pBLl9V7HNdqnlnb+A/RCnvHIsv4neEP6s3Y2gbkj7anJ1I
+IXbEcx8iXmIGXPJBjf3JOpfsQ5Ww1mxf89SBPeEChFgV7hcsHih1MZrdSptnUE67
+0dnnbdQlbPeQGXKJWoQ9Ygpbx1k6tAX1j7kj+kRjQlk7jALxA597BcaNTRpX6dEr
+kp/UaJGrjaBQyV8MqapsH/iuh3BZI/OC7p2n9Fcc+WJHuDklWOBFlAac0dwQ2Q1W
+jnWLZfr2E/HM59VbUdZb801Xreh8jWHJRxtS9Y24qI+i2vGQYd1KYxFFn4f2xjb8
+z8s21pYEcHH/anPslqqOqZCO9q+tJdPSinHfwEfbtgsQ93ZnrKa6rl/viKU+2LfQ
+c1vNaoHzqr5ZRNNavts6SFxEF44IqddSQNdaeMSUL6D72w7EJE1c9kIW5vUrP8sc
+tbemF58TNgFX0ABi0Xo0qtXPQKsEtE/e1yrgdFarWKvSUR3I828=
+=4ZOz
+-----END PGP SIGNATURE-----
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
index f4df88e..40bf4dc 100644
--- 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
@@ -1,26 +1,26 @@
-From 4b5cdf991eb8776927a2730ed73446559856b468 Mon Sep 17 00:00:00 2001
+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/14] Don't pass CFLAGS to the C++ compiler
+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 a471af2576..f4273729bb 100644
+index 6446fa7550d..29fec3a5717 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
-@@ -1068,8 +1068,7 @@ impl<'a> Builder<'a> {
+@@ -1244,8 +1244,7 @@ impl<'a> Builder<'a> {
if let Ok(cxx) = self.cxx(target) {
let cxx = ccacheify(&cxx);
cargo
-- .env(format!("CXX_{}", target), &cxx)
-- .env(format!("CXXFLAGS_{}", target), cflags);
-+ .env(format!("CXX_{}", target), &cxx);
+- .env(format!("CXX_{}", target.triple), &cxx)
+- .env(format!("CXXFLAGS_{}", target.triple), cflags);
++ .env(format!("CXX_{}", target.triple), &cxx);
}
}
--
-2.21.0
+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
index 0a8ecec..c04d445 100644
--- a/dev-lang/rust/files/0002-Fix-LLVM-build.patch
+++ b/dev-lang/rust/files/0002-Fix-LLVM-build.patch
@@ -1,26 +1,25 @@
-From 22fac16a9a1651eb9ac121761583ff6031a15077 Mon Sep 17 00:00:00 2001
+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/14] Fix LLVM build
+Subject: [PATCH 02/15] Fix LLVM build
---
- src/bootstrap/lib.rs | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ 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 7e6fbdff12..f1e7f05aa9 100644
+index a42ee11bd6f..77316c734b8 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
-@@ -764,7 +764,8 @@ impl Build {
- // cc-rs because the build scripts will determine that for themselves.
- let mut base = self.cc[&target].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>>();
+@@ -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.21.0
+2.26.2
diff --git a/dev-lang/rust/files/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch b/dev-lang/rust/files/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch
deleted file mode 100644
index 087dea2..0000000
--- a/dev-lang/rust/files/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From c4565fab697249c4233c97f7855fe692a5a880a4 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sat, 2 Dec 2017 17:25:44 -0600
-Subject: [PATCH 03/14] Allow rustdoc to work when cross-compiling on musl
-
-musl can't handle foreign-architecture libraries in LD_LIBRARY_PATH.
----
- src/bootstrap/bin/rustdoc.rs | 5 +----
- 1 file changed, 1 insertion(+), 4 deletions(-)
-
-diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
-index 52b5971f0a..c779e35e26 100644
---- a/src/bootstrap/bin/rustdoc.rs
-+++ b/src/bootstrap/bin/rustdoc.rs
-@@ -23,9 +23,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(rustdoc) instead of cfg(dox), remove the `--cfg dox`
- //arguments here
- let mut cmd = Command::new(rustdoc);
-@@ -37,7 +34,7 @@ fn main() {
- .arg("--sysroot")
- .arg(sysroot)
- .env(bootstrap::util::dylib_path_var(),
-- env::join_paths(&dylib_path).unwrap());
-+ 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
---
-2.21.0
-
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
new file mode 100644
index 0000000..4c9f06c
--- /dev/null
+++ b/dev-lang/rust/files/0003-Fix-linking-to-zlib-when-cross-compiling.patch
@@ -0,0 +1,34 @@
+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
new file mode 100644
index 0000000..c6a7d79
--- /dev/null
+++ b/dev-lang/rust/files/0004-Fix-rustdoc-when-cross-compiling-on-musl.patch
@@ -0,0 +1,45 @@
+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-Remove-nostdlib-and-musl_root-from-musl-targets.patch b/dev-lang/rust/files/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
deleted file mode 100644
index b8ca293..0000000
--- a/dev-lang/rust/files/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
+++ /dev/null
@@ -1,388 +0,0 @@
-From d84f9863017bd4bb38c5a2063c679dc3132ecf28 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Fri, 8 Sep 2017 22:11:14 -0500
-Subject: [PATCH 05/14] Remove -nostdlib and musl_root from musl targets
-
----
- config.toml.example | 6 ----
- src/bootstrap/bin/rustc.rs | 12 --------
- src/bootstrap/cc_detect.rs | 27 ++----------------
- src/bootstrap/compile.rs | 21 --------------
- src/bootstrap/config.rs | 7 -----
- src/bootstrap/configure.py | 22 ---------------
- src/bootstrap/lib.rs | 8 ------
- src/bootstrap/sanity.rs | 28 -------------------
- .../dist-i586-gnu-i586-i686-musl/Dockerfile | 2 --
- src/ci/docker/dist-various-1/Dockerfile | 7 -----
- src/ci/docker/dist-x86_64-musl/Dockerfile | 1 -
- src/librustc_target/spec/linux_musl_base.rs | 16 -----------
- 12 files changed, 3 insertions(+), 154 deletions(-)
-
-diff --git a/config.toml.example b/config.toml.example
-index f45db37c33..50692bf74a 100644
---- a/config.toml.example
-+++ b/config.toml.example
-@@ -470,12 +470,6 @@
- # only use static libraries. If unset, the target's default linkage is used.
- #crt-static = false
-
--# The root location of the MUSL installation directory. The library directory
--# will also need to contain libunwind.a for an unwinding implementation. Note
--# that this option only makes sense for MUSL targets that produce statically
--# linked binaries
--#musl-root = "..."
--
- # Used in testing for configuring where the QEMU images are located, you
- # probably don't want to use this.
- #qemu-rootfs = "..."
-diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
-index b6afe317a0..0eace41a5a 100644
---- a/src/bootstrap/bin/rustc.rs
-+++ b/src/bootstrap/bin/rustc.rs
-@@ -18,7 +18,6 @@
- #![deny(warnings)]
-
- use std::env;
--use std::ffi::OsString;
- use std::io;
- use std::path::PathBuf;
- use std::process::Command;
-@@ -114,17 +113,6 @@ fn main() {
- cmd.arg("-Cprefer-dynamic");
- }
-
-- // Help the libc crate compile by assisting it in finding the MUSL
-- // native libraries.
-- if let Some(s) = env::var_os("MUSL_ROOT") {
-- if target.contains("musl") {
-- let mut root = OsString::from("native=");
-- root.push(&s);
-- root.push("/lib");
-- cmd.arg("-L").arg(&root);
-- }
-- }
--
- // Override linker if necessary.
- if let Ok(target_linker) = env::var("RUSTC_TARGET_LINKER") {
- cmd.arg(format!("-Clinker={}", target_linker));
-diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index dfc243b705..848d1d4b2b 100644
---- a/src/bootstrap/cc_detect.rs
-+++ b/src/bootstrap/cc_detect.rs
-@@ -84,7 +84,7 @@ pub fn find(build: &mut Build) {
- if let Some(cc) = config.and_then(|c| c.cc.as_ref()) {
- cfg.compiler(cc);
- } else {
-- set_compiler(&mut cfg, Language::C, target, config, build);
-+ set_compiler(&mut cfg, Language::C, target, config);
- }
-
- let compiler = cfg.get_compiler();
-@@ -113,7 +113,7 @@ pub fn find(build: &mut Build) {
- if let Some(cxx) = config.and_then(|c| c.cxx.as_ref()) {
- cfg.compiler(cxx);
- } else {
-- set_compiler(&mut cfg, Language::CPlusPlus, host, config, build);
-+ set_compiler(&mut cfg, Language::CPlusPlus, host, config);
- }
- let compiler = cfg.get_compiler();
- build.verbose(&format!("CXX_{} = {:?}", host, compiler.path()));
-@@ -124,8 +124,7 @@ pub fn find(build: &mut Build) {
- fn set_compiler(cfg: &mut cc::Build,
- compiler: Language,
- target: Interned<String>,
-- config: Option<&Target>,
-- build: &Build) {
-+ config: Option<&Target>) {
- match &*target {
- // When compiling for android we may have the NDK configured in the
- // config.toml in which case we look there. Otherwise the default
-@@ -165,26 +164,6 @@ fn set_compiler(cfg: &mut cc::Build,
- }
- }
-
-- "mips-unknown-linux-musl" => {
-- if cfg.get_compiler().path().to_str() == Some("gcc") {
-- cfg.compiler("mips-linux-musl-gcc");
-- }
-- }
-- "mipsel-unknown-linux-musl" => {
-- if cfg.get_compiler().path().to_str() == Some("gcc") {
-- cfg.compiler("mipsel-linux-musl-gcc");
-- }
-- }
--
-- t if t.contains("musl") => {
-- if let Some(root) = build.musl_root(target) {
-- let guess = root.join("bin/musl-gcc");
-- if guess.exists() {
-- cfg.compiler(guess);
-- }
-- }
-- }
--
- _ => {}
- }
- }
-diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index 249a183189..bfc62c762a 100644
---- a/src/bootstrap/compile.rs
-+++ b/src/bootstrap/compile.rs
-@@ -114,21 +114,6 @@ impl Step for Std {
- fn copy_third_party_objects(builder: &Builder<'_>, compiler: &Compiler, target: Interned<String>) {
- let libdir = builder.sysroot_libdir(*compiler, target);
-
-- // Copies the crt(1,i,n).o startup objects
-- //
-- // Since musl supports fully static linking, we can cross link for it even
-- // with a glibc-targeting toolchain, given we have the appropriate startup
-- // files. As those shipped with glibc won't work, copy the ones provided by
-- // musl so we have them on linux-gnu hosts.
-- if target.contains("musl") {
-- for &obj in &["crt1.o", "crti.o", "crtn.o"] {
-- builder.copy(
-- &builder.musl_root(target).unwrap().join("lib").join(obj),
-- &libdir.join(obj),
-- );
-- }
-- }
--
- // Copies libunwind.a compiled to be linked wit x86_64-fortanix-unknown-sgx.
- //
- // This target needs to be linked to Fortanix's port of llvm's libunwind.
-@@ -182,12 +167,6 @@ pub fn std_cargo(builder: &Builder<'_>,
- cargo.arg("--features").arg(features)
- .arg("--manifest-path")
- .arg(builder.src.join("src/libstd/Cargo.toml"));
--
-- if target.contains("musl") {
-- if let Some(p) = builder.musl_root(target) {
-- cargo.env("MUSL_ROOT", p);
-- }
-- }
- }
- }
-
-diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 7d3e584f1a..3f0113e11a 100644
---- a/src/bootstrap/config.rs
-+++ b/src/bootstrap/config.rs
-@@ -132,8 +132,6 @@ pub struct Config {
- pub print_step_timings: bool,
- pub missing_tools: bool,
-
-- // Fallback musl-root for all targets
-- pub musl_root: Option<PathBuf>,
- pub prefix: Option<PathBuf>,
- pub sysconfdir: Option<PathBuf>,
- pub datadir: Option<PathBuf>,
-@@ -168,7 +166,6 @@ pub struct Target {
- pub linker: Option<PathBuf>,
- pub ndk: Option<PathBuf>,
- pub crt_static: Option<bool>,
-- pub musl_root: Option<PathBuf>,
- pub qemu_rootfs: Option<PathBuf>,
- pub no_std: bool,
- }
-@@ -304,7 +301,6 @@ struct Rust {
- backtrace: Option<bool>,
- default_linker: Option<String>,
- channel: Option<String>,
-- musl_root: Option<String>,
- rpath: Option<bool>,
- optimize_tests: Option<bool>,
- debuginfo_tests: Option<bool>,
-@@ -343,7 +339,6 @@ struct TomlTarget {
- linker: Option<String>,
- android_ndk: Option<String>,
- crt_static: Option<bool>,
-- musl_root: Option<String>,
- qemu_rootfs: Option<String>,
- }
-
-@@ -562,7 +557,6 @@ impl Config {
- set(&mut config.llvm_tools_enabled, rust.llvm_tools);
- config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
- config.rustc_default_linker = rust.default_linker.clone();
-- config.musl_root = rust.musl_root.clone().map(PathBuf::from);
- config.save_toolstates = rust.save_toolstates.clone().map(PathBuf::from);
- set(&mut config.deny_warnings, rust.deny_warnings.or(flags.warnings));
- set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
-@@ -605,7 +599,6 @@ impl Config {
- target.ranlib = cfg.ranlib.clone().map(PathBuf::from);
- target.linker = cfg.linker.clone().map(PathBuf::from);
- target.crt_static = cfg.crt_static.clone();
-- target.musl_root = cfg.musl_root.clone().map(PathBuf::from);
- target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from);
-
- config.target_config.insert(INTERNER.intern_string(triple.clone()), target);
-diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
-index b2d8f2d8eb..c3bb94938f 100755
---- a/src/bootstrap/configure.py
-+++ b/src/bootstrap/configure.py
-@@ -109,28 +109,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
- "aarch64-linux-android NDK standalone path")
- v("x86_64-linux-android-ndk", "target.x86_64-linux-android.android-ndk",
- "x86_64-linux-android NDK standalone path")
--v("musl-root", "target.x86_64-unknown-linux-musl.musl-root",
-- "MUSL root installation directory (deprecated)")
--v("musl-root-x86_64", "target.x86_64-unknown-linux-musl.musl-root",
-- "x86_64-unknown-linux-musl install directory")
--v("musl-root-i586", "target.i586-unknown-linux-musl.musl-root",
-- "i586-unknown-linux-musl install directory")
--v("musl-root-i686", "target.i686-unknown-linux-musl.musl-root",
-- "i686-unknown-linux-musl install directory")
--v("musl-root-arm", "target.arm-unknown-linux-musleabi.musl-root",
-- "arm-unknown-linux-musleabi install directory")
--v("musl-root-armhf", "target.arm-unknown-linux-musleabihf.musl-root",
-- "arm-unknown-linux-musleabihf install directory")
--v("musl-root-armv5te", "target.armv5te-unknown-linux-musleabi.musl-root",
-- "armv5te-unknown-linux-musleabi install directory")
--v("musl-root-armv7", "target.armv7-unknown-linux-musleabihf.musl-root",
-- "armv7-unknown-linux-musleabihf install directory")
--v("musl-root-aarch64", "target.aarch64-unknown-linux-musl.musl-root",
-- "aarch64-unknown-linux-musl install directory")
--v("musl-root-mips", "target.mips-unknown-linux-musl.musl-root",
-- "mips-unknown-linux-musl install directory")
--v("musl-root-mipsel", "target.mipsel-unknown-linux-musl.musl-root",
-- "mipsel-unknown-linux-musl install directory")
- v("qemu-armhf-rootfs", "target.arm-unknown-linux-gnueabihf.qemu-rootfs",
- "rootfs in qemu testing, you probably don't want to use this")
- v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs",
-diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index f1e7f05aa9..4ee1444db3 100644
---- a/src/bootstrap/lib.rs
-+++ b/src/bootstrap/lib.rs
-@@ -842,14 +842,6 @@ impl Build {
- }
- }
-
-- /// Returns the "musl root" for this `target`, if defined
-- fn musl_root(&self, target: Interned<String>) -> Option<&Path> {
-- self.config.target_config.get(&target)
-- .and_then(|t| t.musl_root.as_ref())
-- .or(self.config.musl_root.as_ref())
-- .map(|p| &**p)
-- }
--
- /// Returns `true` if this is a no-std `target`, if defined
- fn no_std(&self, target: Interned<String>) -> Option<bool> {
- self.config.target_config.get(&target)
-diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index ff4fb85bbf..ff45200bde 100644
---- a/src/bootstrap/sanity.rs
-+++ b/src/bootstrap/sanity.rs
-@@ -169,34 +169,6 @@ pub fn check(build: &mut Build) {
- }
- }
-
-- // Make sure musl-root is valid
-- if target.contains("musl") {
-- // If this is a native target (host is also musl) and no musl-root is given,
-- // fall back to the system toolchain in /usr before giving up
-- if build.musl_root(*target).is_none() && build.config.build == *target {
-- let target = build.config.target_config.entry(target.clone())
-- .or_default();
-- target.musl_root = Some("/usr".into());
-- }
-- match build.musl_root(*target) {
-- Some(root) => {
-- if fs::metadata(root.join("lib/libc.a")).is_err() {
-- panic!("couldn't find libc.a in musl dir: {}",
-- root.join("lib").display());
-- }
-- if fs::metadata(root.join("lib/libunwind.a")).is_err() {
-- panic!("couldn't find libunwind.a in musl dir: {}",
-- root.join("lib").display());
-- }
-- }
-- None => {
-- panic!("when targeting MUSL either the rust.musl-root \
-- option or the target.$TARGET.musl-root option must \
-- be specified in config.toml")
-- }
-- }
-- }
--
- if target.contains("msvc") {
- // There are three builds of cmake on windows: MSVC, MinGW, and
- // Cygwin. The Cygwin build does not have generators for Visual
-diff --git a/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile b/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile
-index ba2d32a929..412c37fdd1 100644
---- a/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile
-+++ b/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile
-@@ -30,8 +30,6 @@ COPY scripts/sccache.sh /scripts/
- RUN sh /scripts/sccache.sh
-
- ENV RUST_CONFIGURE_ARGS \
-- --musl-root-i586=/musl-i586 \
-- --musl-root-i686=/musl-i686 \
- --enable-extended \
- --disable-docs
-
-diff --git a/src/ci/docker/dist-various-1/Dockerfile b/src/ci/docker/dist-various-1/Dockerfile
-index f80293b182..52f28df826 100644
---- a/src/ci/docker/dist-various-1/Dockerfile
-+++ b/src/ci/docker/dist-various-1/Dockerfile
-@@ -130,13 +130,6 @@ ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
- CXX_thumbv7neon_unknown_linux_gnueabihf=arm-linux-gnueabihf-g++
-
- ENV RUST_CONFIGURE_ARGS \
-- --musl-root-armv5te=/musl-armv5te \
-- --musl-root-arm=/musl-arm \
-- --musl-root-armhf=/musl-armhf \
-- --musl-root-armv7=/musl-armv7 \
-- --musl-root-aarch64=/musl-aarch64 \
-- --musl-root-mips=/musl-mips \
-- --musl-root-mipsel=/musl-mipsel \
- --enable-emscripten \
- --disable-docs
-
-diff --git a/src/ci/docker/dist-x86_64-musl/Dockerfile b/src/ci/docker/dist-x86_64-musl/Dockerfile
-index 06f8a2fbba..f5dd379528 100644
---- a/src/ci/docker/dist-x86_64-musl/Dockerfile
-+++ b/src/ci/docker/dist-x86_64-musl/Dockerfile
-@@ -30,7 +30,6 @@ COPY scripts/sccache.sh /scripts/
- RUN sh /scripts/sccache.sh
-
- ENV RUST_CONFIGURE_ARGS \
-- --musl-root-x86_64=/musl-x86_64 \
- --enable-extended \
- --disable-docs
-
-diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/spec/linux_musl_base.rs
-index e294e63982..58ae91a96a 100644
---- a/src/librustc_target/spec/linux_musl_base.rs
-+++ b/src/librustc_target/spec/linux_musl_base.rs
-@@ -3,28 +3,12 @@ use crate::spec::{LinkerFlavor, TargetOptions};
- pub fn opts() -> TargetOptions {
- let mut base = super::linux_base::opts();
-
-- // Make sure that the linker/gcc really don't pull in anything, including
-- // default objects, libs, etc.
-- base.pre_link_args_crt.insert(LinkerFlavor::Gcc, Vec::new());
-- base.pre_link_args_crt.get_mut(&LinkerFlavor::Gcc).unwrap().push("-nostdlib".to_string());
--
- // At least when this was tested, the linker would not add the
- // `GNU_EH_FRAME` program header to executables generated, which is required
- // when unwinding to locate the unwinding information. I'm not sure why this
- // argument is *not* necessary for normal builds, but it can't hurt!
- base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,--eh-frame-hdr".to_string());
-
-- // When generating a statically linked executable there's generally some
-- // small setup needed which is listed in these files. These are provided by
-- // a musl toolchain and are linked by default by the `musl-gcc` script. Note
-- // that `gcc` also does this by default, it just uses some different files.
-- //
-- // Each target directory for musl has these object files included in it so
-- // they'll be included from there.
-- base.pre_link_objects_exe_crt.push("crt1.o".to_string());
-- base.pre_link_objects_exe_crt.push("crti.o".to_string());
-- base.post_link_objects_crt.push("crtn.o".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.21.0
-
diff --git a/dev-lang/rust/files/0004-Require-static-native-libraries-when-linking-static-.patch b/dev-lang/rust/files/0005-Use-static-native-libraries-when-linking-static-exec.patch
similarity index 56%
rename from dev-lang/rust/files/0004-Require-static-native-libraries-when-linking-static-.patch
rename to dev-lang/rust/files/0005-Use-static-native-libraries-when-linking-static-exec.patch
index 6238e50..5d1836d 100644
--- a/dev-lang/rust/files/0004-Require-static-native-libraries-when-linking-static-.patch
+++ b/dev-lang/rust/files/0005-Use-static-native-libraries-when-linking-static-exec.patch
@@ -1,7 +1,7 @@
-From 859624e56281aff33673dcceb34698bd30eceea3 Mon Sep 17 00:00:00 2001
+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 04/14] Require static native libraries when linking static
+Subject: [PATCH 05/15] Use static native libraries when linking static
executables
On ELF targets like Linux, gcc/ld will create a dynamically-linked
@@ -9,17 +9,15 @@ 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.
-
-Fixes #54243
---
- src/librustc_codegen_llvm/back/link.rs | 18 ++++++++++++++----
- 1 file changed, 14 insertions(+), 4 deletions(-)
+ src/librustc_codegen_ssa/back/link.rs | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
-diff --git a/src/librustc_codegen_llvm/back/link.rs b/src/librustc_codegen_llvm/back/link.rs
-index 819f7f9410..49adc5dfca 100644
---- a/src/librustc_codegen_llvm/back/link.rs
-+++ b/src/librustc_codegen_llvm/back/link.rs
-@@ -1413,9 +1413,7 @@ fn add_upstream_rust_crates(cmd: &mut dyn Linker,
+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>>(
}
}
@@ -30,27 +28,28 @@ index 819f7f9410..49adc5dfca 100644
//
// 1. The upstream crate is an rlib. In this case we *must* link in the
// native dependency because the rlib is just an archive.
-@@ -1458,7 +1456,19 @@ fn add_upstream_native_libraries(cmd: &mut dyn Linker,
- continue
+@@ -2108,7 +2106,20 @@ fn add_upstream_native_libraries(
+ continue;
}
match lib.kind {
-- NativeLibraryKind::NativeUnknown => cmd.link_dylib(&name.as_str()),
-+ NativeLibraryKind::NativeUnknown => {
+- 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()
++ && sess.crt_static(Some(crate_type))
+ && !sess.target.target.options.crt_static_allows_dylibs
+ {
-+ cmd.link_staticlib(&name.as_str())
++ cmd.link_staticlib(name)
+ } else {
-+ cmd.link_dylib(&name.as_str())
++ cmd.link_dylib(name)
+ }
+ },
- NativeLibraryKind::NativeFramework => cmd.link_framework(&name.as_str()),
- NativeLibraryKind::NativeStaticNobundle => {
++ 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.21.0
+2.26.2
diff --git a/dev-lang/rust/files/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch b/dev-lang/rust/files/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
deleted file mode 100644
index ea8a7a0..0000000
--- a/dev-lang/rust/files/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From af88a145ea4fbcda9f1d16a53a341282d2129b07 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sat, 9 Sep 2017 00:14:16 -0500
-Subject: [PATCH 06/14] Prefer libgcc_eh over libunwind for musl
-
----
- src/libunwind/lib.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs
-index 0ccffea317..935175dd8d 100644
---- a/src/libunwind/lib.rs
-+++ b/src/libunwind/lib.rs
-@@ -26,6 +26,6 @@ cfg_if! {
- }
-
- #[cfg(target_env = "musl")]
--#[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
-+#[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
- #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
- extern {}
---
-2.21.0
-
diff --git a/dev-lang/rust/files/0006-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch b/dev-lang/rust/files/0006-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch
new file mode 100644
index 0000000..f241be8
--- /dev/null
+++ b/dev-lang/rust/files/0006-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch
@@ -0,0 +1,486 @@
+From 1e13488d9fc661f8f489609dcfc6ed8b61957ca3 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Fri, 8 Sep 2017 22:11:14 -0500
+Subject: [PATCH 06/15] Remove musl_root and CRT fallback from musl targets
+
+---
+ config.toml.example | 12 --------
+ src/bootstrap/cc_detect.rs | 27 ++----------------
+ src/bootstrap/compile.rs | 28 +------------------
+ src/bootstrap/config.rs | 10 -------
+ src/bootstrap/configure.py | 28 -------------------
+ src/bootstrap/lib.rs | 19 -------------
+ src/bootstrap/sanity.rs | 22 ---------------
+ .../dist-i586-gnu-i586-i686-musl/Dockerfile | 2 --
+ .../host-x86_64/dist-various-1/Dockerfile | 9 ------
+ .../host-x86_64/dist-various-2/Dockerfile | 3 +-
+ .../host-x86_64/dist-x86_64-musl/Dockerfile | 1 -
+ .../host-x86_64/test-various/Dockerfile | 1 -
+ src/librustc_codegen_ssa/back/link.rs | 6 +---
+ src/librustc_target/spec/crt_objects.rs | 18 ------------
+ src/librustc_target/spec/linux_musl_base.rs | 5 ----
+ 15 files changed, 5 insertions(+), 186 deletions(-)
+
+diff --git a/config.toml.example b/config.toml.example
+index 36587cc0784..c74dd740868 100644
+--- a/config.toml.example
++++ b/config.toml.example
+@@ -385,9 +385,6 @@
+ # nightly features
+ #channel = "dev"
+
+-# The root location of the musl installation directory.
+-#musl-root = "..."
+-
+ # By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
+ # platforms to ensure that the compiler is usable by default from the build
+ # directory (as it links to a number of dynamic libraries). This may not be
+@@ -530,15 +527,6 @@
+ # only use static libraries. If unset, the target's default linkage is used.
+ #crt-static = false
+
+-# The root location of the musl installation directory. The library directory
+-# will also need to contain libunwind.a for an unwinding implementation. Note
+-# that this option only makes sense for musl targets that produce statically
+-# linked binaries
+-#musl-root = "..."
+-
+-# The full path to the musl libdir.
+-#musl-libdir = musl-root/lib
+-
+ # The root location of the `wasm32-wasi` sysroot.
+ #wasi-root = "..."
+
+diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
+index 7ff00d85dd2..ae80d8a5963 100644
+--- a/src/bootstrap/cc_detect.rs
++++ b/src/bootstrap/cc_detect.rs
+@@ -42,8 +42,6 @@ fn cc2ar(cc: &Path, target: TargetSelection) -> Option<PathBuf> {
+ Some(PathBuf::from(ar))
+ } else if target.contains("msvc") {
+ None
+- } else if target.contains("musl") {
+- Some(PathBuf::from("ar"))
+ } else if target.contains("openbsd") {
+ Some(PathBuf::from("ar"))
+ } else if target.contains("vxworks") {
+@@ -98,7 +96,7 @@ pub fn find(build: &mut Build) {
+ if let Some(cc) = config.and_then(|c| c.cc.as_ref()) {
+ cfg.compiler(cc);
+ } else {
+- set_compiler(&mut cfg, Language::C, target, config, build);
++ set_compiler(&mut cfg, Language::C, target, config);
+ }
+
+ let compiler = cfg.get_compiler();
+@@ -126,7 +124,7 @@ pub fn find(build: &mut Build) {
+ cfg.compiler(cxx);
+ true
+ } else if build.hosts.contains(&target) || build.build == target {
+- set_compiler(&mut cfg, Language::CPlusPlus, target, config, build);
++ set_compiler(&mut cfg, Language::CPlusPlus, target, config);
+ true
+ } else {
+ false
+@@ -155,7 +153,6 @@ fn set_compiler(
+ compiler: Language,
+ target: TargetSelection,
+ config: Option<&Target>,
+- build: &Build,
+ ) {
+ match &*target.triple {
+ // When compiling for android we may have the NDK configured in the
+@@ -198,26 +195,6 @@ fn set_compiler(
+ }
+ }
+
+- "mips-unknown-linux-musl" => {
+- if cfg.get_compiler().path().to_str() == Some("gcc") {
+- cfg.compiler("mips-linux-musl-gcc");
+- }
+- }
+- "mipsel-unknown-linux-musl" => {
+- if cfg.get_compiler().path().to_str() == Some("gcc") {
+- cfg.compiler("mipsel-linux-musl-gcc");
+- }
+- }
+-
+- t if t.contains("musl") => {
+- if let Some(root) = build.musl_root(target) {
+- let guess = root.join("bin/musl-gcc");
+- if guess.exists() {
+- cfg.compiler(guess);
+- }
+- }
+- }
+-
+ _ => {}
+ }
+ }
+diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
+index 373e240cb8e..0be09300f7c 100644
+--- a/src/bootstrap/compile.rs
++++ b/src/bootstrap/compile.rs
+@@ -166,24 +166,7 @@ fn copy_self_contained_objects(
+
+ // Copies the CRT objects.
+ //
+- // rustc historically provides a more self-contained installation for musl targets
+- // not requiring the presence of a native musl toolchain. For example, it can fall back
+- // to using gcc from a glibc-targeting toolchain for linking.
+- // To do that we have to distribute musl startup objects as a part of Rust toolchain
+- // and link with them manually in the self-contained mode.
+- if target.contains("musl") {
+- let srcdir = builder.musl_libdir(target).unwrap();
+- for &obj in &["crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
+- copy_and_stamp(
+- builder,
+- &libdir_self_contained,
+- &srcdir,
+- obj,
+- &mut target_deps,
+- DependencyType::TargetSelfContained,
+- );
+- }
+- } else if target.ends_with("-wasi") {
++ if target.ends_with("-wasi") {
+ let srcdir = builder.wasi_root(target).unwrap().join("lib/wasm32-wasi");
+ copy_and_stamp(
+ builder,
+@@ -258,15 +241,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+ .arg("--manifest-path")
+ .arg(builder.src.join("library/test/Cargo.toml"));
+
+- // Help the libc crate compile by assisting it in finding various
+- // sysroot native libraries.
+- if target.contains("musl") {
+- if let Some(p) = builder.musl_libdir(target) {
+- let root = format!("native={}", p.to_str().unwrap());
+- cargo.rustflag("-L").rustflag(&root);
+- }
+- }
+-
+ if target.ends_with("-wasi") {
+ if let Some(p) = builder.wasi_root(target) {
+ let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap());
+diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
+index 8b8b01b1153..d4469ed1f96 100644
+--- a/src/bootstrap/config.rs
++++ b/src/bootstrap/config.rs
+@@ -137,8 +137,6 @@ pub struct Config {
+ pub print_step_timings: bool,
+ pub missing_tools: bool,
+
+- // Fallback musl-root for all targets
+- pub musl_root: Option<PathBuf>,
+ pub prefix: Option<PathBuf>,
+ pub sysconfdir: Option<PathBuf>,
+ pub datadir: Option<PathBuf>,
+@@ -235,8 +233,6 @@ pub struct Target {
+ pub linker: Option<PathBuf>,
+ pub ndk: Option<PathBuf>,
+ pub crt_static: Option<bool>,
+- pub musl_root: Option<PathBuf>,
+- pub musl_libdir: Option<PathBuf>,
+ pub wasi_root: Option<PathBuf>,
+ pub qemu_rootfs: Option<PathBuf>,
+ pub no_std: bool,
+@@ -390,7 +386,6 @@ struct Rust {
+ parallel_compiler: Option<bool>,
+ default_linker: Option<String>,
+ channel: Option<String>,
+- musl_root: Option<String>,
+ rpath: Option<bool>,
+ verbose_tests: Option<bool>,
+ optimize_tests: Option<bool>,
+@@ -427,8 +422,6 @@ struct TomlTarget {
+ llvm_filecheck: Option<String>,
+ android_ndk: Option<String>,
+ crt_static: Option<bool>,
+- musl_root: Option<String>,
+- musl_libdir: Option<String>,
+ wasi_root: Option<String>,
+ qemu_rootfs: Option<String>,
+ no_std: Option<bool>,
+@@ -659,7 +652,6 @@ impl Config {
+ set(&mut config.llvm_tools_enabled, rust.llvm_tools);
+ config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
+ config.rustc_default_linker = rust.default_linker.clone();
+- config.musl_root = rust.musl_root.clone().map(PathBuf::from);
+ config.save_toolstates = rust.save_toolstates.clone().map(PathBuf::from);
+ set(&mut config.deny_warnings, flags.deny_warnings.or(rust.deny_warnings));
+ set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
+@@ -699,8 +691,6 @@ impl Config {
+ target.ranlib = cfg.ranlib.clone().map(PathBuf::from);
+ target.linker = cfg.linker.clone().map(PathBuf::from);
+ target.crt_static = cfg.crt_static;
+- target.musl_root = cfg.musl_root.clone().map(PathBuf::from);
+- target.musl_libdir = cfg.musl_libdir.clone().map(PathBuf::from);
+ target.wasi_root = cfg.wasi_root.clone().map(PathBuf::from);
+ target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from);
+
+diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
+index 47673ce1e87..33004e317ce 100755
+--- a/src/bootstrap/configure.py
++++ b/src/bootstrap/configure.py
+@@ -109,34 +109,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
+ "aarch64-linux-android NDK standalone path")
+ v("x86_64-linux-android-ndk", "target.x86_64-linux-android.android-ndk",
+ "x86_64-linux-android NDK standalone path")
+-v("musl-root", "target.x86_64-unknown-linux-musl.musl-root",
+- "MUSL root installation directory (deprecated)")
+-v("musl-root-x86_64", "target.x86_64-unknown-linux-musl.musl-root",
+- "x86_64-unknown-linux-musl install directory")
+-v("musl-root-i586", "target.i586-unknown-linux-musl.musl-root",
+- "i586-unknown-linux-musl install directory")
+-v("musl-root-i686", "target.i686-unknown-linux-musl.musl-root",
+- "i686-unknown-linux-musl install directory")
+-v("musl-root-arm", "target.arm-unknown-linux-musleabi.musl-root",
+- "arm-unknown-linux-musleabi install directory")
+-v("musl-root-armhf", "target.arm-unknown-linux-musleabihf.musl-root",
+- "arm-unknown-linux-musleabihf install directory")
+-v("musl-root-armv5te", "target.armv5te-unknown-linux-musleabi.musl-root",
+- "armv5te-unknown-linux-musleabi install directory")
+-v("musl-root-armv7", "target.armv7-unknown-linux-musleabi.musl-root",
+- "armv7-unknown-linux-musleabi install directory")
+-v("musl-root-armv7hf", "target.armv7-unknown-linux-musleabihf.musl-root",
+- "armv7-unknown-linux-musleabihf install directory")
+-v("musl-root-aarch64", "target.aarch64-unknown-linux-musl.musl-root",
+- "aarch64-unknown-linux-musl install directory")
+-v("musl-root-mips", "target.mips-unknown-linux-musl.musl-root",
+- "mips-unknown-linux-musl install directory")
+-v("musl-root-mipsel", "target.mipsel-unknown-linux-musl.musl-root",
+- "mipsel-unknown-linux-musl install directory")
+-v("musl-root-mips64", "target.mips64-unknown-linux-muslabi64.musl-root",
+- "mips64-unknown-linux-muslabi64 install directory")
+-v("musl-root-mips64el", "target.mips64el-unknown-linux-muslabi64.musl-root",
+- "mips64el-unknown-linux-muslabi64 install directory")
+ v("qemu-armhf-rootfs", "target.arm-unknown-linux-gnueabihf.qemu-rootfs",
+ "rootfs in qemu testing, you probably don't want to use this")
+ v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs",
+diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
+index 77316c734b8..b92da611a51 100644
+--- a/src/bootstrap/lib.rs
++++ b/src/bootstrap/lib.rs
+@@ -875,25 +875,6 @@ impl Build {
+ }
+ }
+
+- /// Returns the "musl root" for this `target`, if defined
+- fn musl_root(&self, target: TargetSelection) -> Option<&Path> {
+- self.config
+- .target_config
+- .get(&target)
+- .and_then(|t| t.musl_root.as_ref())
+- .or_else(|| self.config.musl_root.as_ref())
+- .map(|p| &**p)
+- }
+-
+- /// Returns the "musl libdir" for this `target`.
+- fn musl_libdir(&self, target: TargetSelection) -> Option<PathBuf> {
+- let t = self.config.target_config.get(&target)?;
+- if let libdir @ Some(_) = &t.musl_libdir {
+- return libdir.clone();
+- }
+- self.musl_root(target).map(|root| root.join("lib"))
+- }
+-
+ /// Returns the sysroot for the wasi target, if defined
+ fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
+ self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
+diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
+index f89bef50de9..e22638c533e 100644
+--- a/src/bootstrap/sanity.rs
++++ b/src/bootstrap/sanity.rs
+@@ -195,28 +195,6 @@ pub fn check(build: &mut Build) {
+ }
+ }
+
+- // Make sure musl-root is valid
+- if target.contains("musl") {
+- // If this is a native target (host is also musl) and no musl-root is given,
+- // fall back to the system toolchain in /usr before giving up
+- if build.musl_root(*target).is_none() && build.config.build == *target {
+- let target = build.config.target_config.entry(target.clone()).or_default();
+- target.musl_root = Some("/usr".into());
+- }
+- match build.musl_libdir(*target) {
+- Some(libdir) => {
+- if fs::metadata(libdir.join("libc.a")).is_err() {
+- panic!("couldn't find libc.a in musl libdir: {}", libdir.display());
+- }
+- }
+- None => panic!(
+- "when targeting MUSL either the rust.musl-root \
+- option or the target.$TARGET.musl-root option must \
+- be specified in config.toml"
+- ),
+- }
+- }
+-
+ if target.contains("msvc") {
+ // There are three builds of cmake on windows: MSVC, MinGW, and
+ // Cygwin. The Cygwin build does not have generators for Visual
+diff --git a/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile
+index 162d7a1345c..48f025fd542 100644
+--- a/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile
++++ b/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile
+@@ -30,8 +30,6 @@ COPY scripts/sccache.sh /scripts/
+ RUN sh /scripts/sccache.sh
+
+ ENV RUST_CONFIGURE_ARGS \
+- --musl-root-i586=/musl-i586 \
+- --musl-root-i686=/musl-i686 \
+ --disable-docs
+
+ # Newer binutils broke things on some vms/distros (i.e., linking against
+diff --git a/src/ci/docker/host-x86_64/dist-various-1/Dockerfile b/src/ci/docker/host-x86_64/dist-various-1/Dockerfile
+index fdd777e824b..2b3d090c1ae 100644
+--- a/src/ci/docker/host-x86_64/dist-various-1/Dockerfile
++++ b/src/ci/docker/host-x86_64/dist-various-1/Dockerfile
+@@ -180,15 +180,6 @@ ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
+ CC_riscv64gc_unknown_none_elf=false
+
+ ENV RUST_CONFIGURE_ARGS \
+- --musl-root-armv5te=/musl-armv5te \
+- --musl-root-arm=/musl-arm \
+- --musl-root-armhf=/musl-armhf \
+- --musl-root-armv7hf=/musl-armv7hf \
+- --musl-root-aarch64=/musl-aarch64 \
+- --musl-root-mips=/musl-mips \
+- --musl-root-mipsel=/musl-mipsel \
+- --musl-root-mips64=/musl-mips64 \
+- --musl-root-mips64el=/musl-mips64el \
+ --disable-docs
+
+ ENV SCRIPT \
+diff --git a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile
+index 3081f29aef2..223547bf8cd 100644
+--- a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile
++++ b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile
+@@ -107,7 +107,6 @@ ENV TARGETS=$TARGETS,armv7-unknown-linux-musleabi
+ RUN ln -s /usr/include/asm-generic /usr/local/include/asm
+
+ ENV RUST_CONFIGURE_ARGS --enable-extended --enable-lld --disable-docs \
+- --set target.wasm32-wasi.wasi-root=/wasm32-wasi \
+- --musl-root-armv7=/musl-armv7
++ --set target.wasm32-wasi.wasi-root=/wasm32-wasi
+
+ ENV SCRIPT python3 ../x.py dist --target $TARGETS
+diff --git a/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile
+index ab6515cd1fa..5203d604150 100644
+--- a/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile
++++ b/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile
+@@ -31,7 +31,6 @@ RUN sh /scripts/sccache.sh
+ ENV HOSTS=x86_64-unknown-linux-musl
+
+ ENV RUST_CONFIGURE_ARGS \
+- --musl-root-x86_64=/usr/local/x86_64-linux-musl \
+ --enable-extended \
+ --enable-lld \
+ --set target.x86_64-unknown-linux-musl.crt-static=false \
+diff --git a/src/ci/docker/host-x86_64/test-various/Dockerfile b/src/ci/docker/host-x86_64/test-various/Dockerfile
+index c55a284e137..a808a915fcb 100644
+--- a/src/ci/docker/host-x86_64/test-various/Dockerfile
++++ b/src/ci/docker/host-x86_64/test-various/Dockerfile
+@@ -29,7 +29,6 @@ COPY scripts/sccache.sh /scripts/
+ RUN sh /scripts/sccache.sh
+
+ ENV RUST_CONFIGURE_ARGS \
+- --musl-root-x86_64=/usr/local/x86_64-linux-musl \
+ --set build.nodejs=/node-v14.4.0-linux-x64/bin/node \
+ --set rust.lld
+
+diff --git a/src/librustc_codegen_ssa/back/link.rs b/src/librustc_codegen_ssa/back/link.rs
+index 70bc9d5e980..b35fe073d26 100644
+--- a/src/librustc_codegen_ssa/back/link.rs
++++ b/src/librustc_codegen_ssa/back/link.rs
+@@ -1288,16 +1288,12 @@ fn link_output_kind(sess: &Session, crate_type: CrateType) -> LinkOutputKind {
+
+ /// Whether we link to our own CRT objects instead of relying on gcc to pull them.
+ /// We only provide such support for a very limited number of targets.
+-fn crt_objects_fallback(sess: &Session, crate_type: CrateType) -> bool {
++fn crt_objects_fallback(sess: &Session, _crate_type: CrateType) -> bool {
+ if let Some(self_contained) = sess.opts.debugging_opts.link_self_contained {
+ return self_contained;
+ }
+
+ match sess.target.target.options.crt_objects_fallback {
+- // FIXME: Find a better heuristic for "native musl toolchain is available",
+- // based on host and linker path, for example.
+- // (https://github.com/rust-lang/rust/pull/71769#issuecomment-626330237).
+- Some(CrtObjectsFallback::Musl) => sess.crt_static(Some(crate_type)),
+ // FIXME: Find some heuristic for "native mingw toolchain is available",
+ // likely based on `get_crt_libs_path` (https://github.com/rust-lang/rust/pull/67429).
+ Some(CrtObjectsFallback::Mingw) => {
+diff --git a/src/librustc_target/spec/crt_objects.rs b/src/librustc_target/spec/crt_objects.rs
+index 8991691a9a3..b7e47afd942 100644
+--- a/src/librustc_target/spec/crt_objects.rs
++++ b/src/librustc_target/spec/crt_objects.rs
+@@ -61,21 +61,6 @@ pub(super) fn all(obj: &str) -> CrtObjects {
+ ])
+ }
+
+-pub(super) fn pre_musl_fallback() -> CrtObjects {
+- new(&[
+- (LinkOutputKind::DynamicNoPicExe, &["crt1.o", "crti.o"]),
+- (LinkOutputKind::DynamicPicExe, &["Scrt1.o", "crti.o"]),
+- (LinkOutputKind::StaticNoPicExe, &["crt1.o", "crti.o"]),
+- (LinkOutputKind::StaticPicExe, &["rcrt1.o", "crti.o"]),
+- (LinkOutputKind::DynamicDylib, &["crti.o"]),
+- (LinkOutputKind::StaticDylib, &["crti.o"]),
+- ])
+-}
+-
+-pub(super) fn post_musl_fallback() -> CrtObjects {
+- all("crtn.o")
+-}
+-
+ pub(super) fn pre_mingw_fallback() -> CrtObjects {
+ new(&[
+ (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
+@@ -115,7 +100,6 @@ pub(super) fn post_wasi_fallback() -> CrtObjects {
+ /// Which logic to use to determine whether to fall back to the "self-contained" mode or not.
+ #[derive(Clone, Copy, PartialEq, Hash, Debug)]
+ pub enum CrtObjectsFallback {
+- Musl,
+ Mingw,
+ Wasm,
+ }
+@@ -125,7 +109,6 @@ impl FromStr for CrtObjectsFallback {
+
+ fn from_str(s: &str) -> Result<CrtObjectsFallback, ()> {
+ Ok(match s {
+- "musl" => CrtObjectsFallback::Musl,
+ "mingw" => CrtObjectsFallback::Mingw,
+ "wasm" => CrtObjectsFallback::Wasm,
+ _ => return Err(()),
+@@ -136,7 +119,6 @@ impl FromStr for CrtObjectsFallback {
+ impl ToJson for CrtObjectsFallback {
+ fn to_json(&self) -> Json {
+ match *self {
+- CrtObjectsFallback::Musl => "musl",
+ CrtObjectsFallback::Mingw => "mingw",
+ CrtObjectsFallback::Wasm => "wasm",
+ }
+diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/spec/linux_musl_base.rs
+index b90e91d2901..c5f5f99a96d 100644
+--- a/src/librustc_target/spec/linux_musl_base.rs
++++ b/src/librustc_target/spec/linux_musl_base.rs
+@@ -1,13 +1,8 @@
+-use crate::spec::crt_objects::{self, CrtObjectsFallback};
+ use crate::spec::TargetOptions;
+
+ pub fn opts() -> TargetOptions {
+ let mut base = super::linux_base::opts();
+
+- base.pre_link_objects_fallback = crt_objects::pre_musl_fallback();
+- base.post_link_objects_fallback = crt_objects::post_musl_fallback();
+- base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
+-
+ // 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/0007-Prefer-libgcc_eh-over-libunwind-for-musl.patch b/dev-lang/rust/files/0007-Prefer-libgcc_eh-over-libunwind-for-musl.patch
new file mode 100644
index 0000000..3472588
--- /dev/null
+++ b/dev-lang/rust/files/0007-Prefer-libgcc_eh-over-libunwind-for-musl.patch
@@ -0,0 +1,38 @@
+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/0007-runtest-Fix-proc-macro-tests-on-musl-hosts.patch b/dev-lang/rust/files/0007-runtest-Fix-proc-macro-tests-on-musl-hosts.patch
deleted file mode 100644
index 06eebb9..0000000
--- a/dev-lang/rust/files/0007-runtest-Fix-proc-macro-tests-on-musl-hosts.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From a7c6bcd4834952f3f5b0483dd71b47407d9fb186 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:40:04 +0000
-Subject: [PATCH 07/14] runtest: Fix proc-macro tests on musl hosts
-
----
- src/tools/compiletest/src/runtest.rs | 7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
-
-diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
-index 7781ce74f4..5d73545b1f 100644
---- a/src/tools/compiletest/src/runtest.rs
-+++ b/src/tools/compiletest/src/runtest.rs
-@@ -1604,7 +1604,6 @@ impl<'test> TestCx<'test> {
- None
- } else if self.config.target.contains("cloudabi")
- || self.config.target.contains("emscripten")
-- || (self.config.target.contains("musl") && !aux_props.force_host)
- || self.config.target.contains("wasm32")
- {
- // We primarily compile all auxiliary libraries as dynamic libraries
-@@ -1612,10 +1611,8 @@ impl<'test> TestCx<'test> {
- // for the test suite (otherwise including libstd statically in all
- // executables takes up quite a bit of space).
- //
-- // For targets like MUSL or Emscripten, however, there is no support for
-- // dynamic libraries so we just go back to building a normal library. Note,
-- // however, that for MUSL if the library is built with `force_host` then
-- // it's ok to be a dylib as the host should always support dylibs.
-+ // For targets like Emscripten, however, there is no support for
-+ // dynamic libraries so we just go back to building a normal library.
- Some("lib")
- } else {
- Some("dylib")
---
-2.21.0
-
diff --git a/dev-lang/rust/files/0008-Correct-minimum-system-LLVM-version-in-tests.patch b/dev-lang/rust/files/0008-Correct-minimum-system-LLVM-version-in-tests.patch
deleted file mode 100644
index 1da2bec..0000000
--- a/dev-lang/rust/files/0008-Correct-minimum-system-LLVM-version-in-tests.patch
+++ /dev/null
@@ -1,206 +0,0 @@
-From b038aa4b514a520c3ad2a6ab0e518cb8d45c4ca0 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Fri, 22 Mar 2019 17:08:06 -0500
-Subject: [PATCH 08/14] Correct minimum system LLVM version in tests
-
-Since commit 9452a8dfa3ba, the new debug info format is only generated
-for LLVM 8 and newer versions. However, the tests still assume that LLVM
-7 will use the new debug info format. Fix the tests (and a comment in
-the code) to match the actual version check.
----
- src/librustc_codegen_llvm/debuginfo/metadata.rs | 8 +++++---
- src/test/codegen/enum-debug-clike.rs | 2 +-
- src/test/codegen/enum-debug-niche-2.rs | 2 +-
- src/test/codegen/enum-debug-niche.rs | 2 +-
- src/test/codegen/enum-debug-tagged.rs | 2 +-
- src/test/debuginfo/borrowed-enum.rs | 2 +-
- .../debuginfo/generic-enum-with-different-disr-sizes.rs | 2 +-
- src/test/debuginfo/generic-struct-style-enum.rs | 2 +-
- src/test/debuginfo/generic-tuple-style-enum.rs | 2 +-
- src/test/debuginfo/recursive-struct.rs | 2 +-
- src/test/debuginfo/struct-style-enum.rs | 2 +-
- src/test/debuginfo/tuple-style-enum.rs | 2 +-
- src/test/debuginfo/unique-enum.rs | 2 +-
- 13 files changed, 17 insertions(+), 15 deletions(-)
-
-diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs
-index ddcbf29da8..8efa025e3d 100644
---- a/src/librustc_codegen_llvm/debuginfo/metadata.rs
-+++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs
-@@ -1156,12 +1156,14 @@ fn prepare_union_metadata(
- // Enums
- //=-----------------------------------------------------------------------------
-
--// DWARF variant support is only available starting in LLVM 7.
-+// DWARF variant support is only available starting in LLVM 8.
- // Although the earlier enum debug info output did not work properly
- // in all situations, it is better for the time being to continue to
- // sometimes emit the old style rather than emit something completely
--// useless when rust is compiled against LLVM 6 or older. This
--// function decides which representation will be emitted.
-+// useless when rust is compiled against LLVM 6 or older. LLVM 7
-+// contains an early version of the DWARF variant support, and will
-+// crash when handling the new debug info format. This function
-+// decides which representation will be emitted.
- fn use_enum_fallback(cx: &CodegenCx<'_, '_>) -> bool {
- // On MSVC we have to use the fallback mode, because LLVM doesn't
- // lower variant parts to PDB.
-diff --git a/src/test/codegen/enum-debug-clike.rs b/src/test/codegen/enum-debug-clike.rs
-index 62cfef5a84..f268c8bcbc 100644
---- a/src/test/codegen/enum-debug-clike.rs
-+++ b/src/test/codegen/enum-debug-clike.rs
-@@ -4,7 +4,7 @@
-
- // ignore-tidy-linelength
- // ignore-windows
--// min-system-llvm-version 7.0
-+// min-system-llvm-version 8.0
-
- // compile-flags: -g -C no-prepopulate-passes
-
-diff --git a/src/test/codegen/enum-debug-niche-2.rs b/src/test/codegen/enum-debug-niche-2.rs
-index 369fa1fcfd..aa6cbf66b4 100644
---- a/src/test/codegen/enum-debug-niche-2.rs
-+++ b/src/test/codegen/enum-debug-niche-2.rs
-@@ -4,7 +4,7 @@
-
- // ignore-tidy-linelength
- // ignore-windows
--// min-system-llvm-version 7.0
-+// min-system-llvm-version 8.0
-
- // compile-flags: -g -C no-prepopulate-passes
-
-diff --git a/src/test/codegen/enum-debug-niche.rs b/src/test/codegen/enum-debug-niche.rs
-index 1273a785ba..93eebde7b8 100644
---- a/src/test/codegen/enum-debug-niche.rs
-+++ b/src/test/codegen/enum-debug-niche.rs
-@@ -4,7 +4,7 @@
-
- // ignore-tidy-linelength
- // ignore-windows
--// min-system-llvm-version 7.0
-+// min-system-llvm-version 8.0
-
- // compile-flags: -g -C no-prepopulate-passes
-
-diff --git a/src/test/codegen/enum-debug-tagged.rs b/src/test/codegen/enum-debug-tagged.rs
-index 5c37e40c27..84976ce97a 100644
---- a/src/test/codegen/enum-debug-tagged.rs
-+++ b/src/test/codegen/enum-debug-tagged.rs
-@@ -4,7 +4,7 @@
-
- // ignore-tidy-linelength
- // ignore-windows
--// min-system-llvm-version 7.0
-+// min-system-llvm-version 8.0
-
- // compile-flags: -g -C no-prepopulate-passes
-
-diff --git a/src/test/debuginfo/borrowed-enum.rs b/src/test/debuginfo/borrowed-enum.rs
-index e27a31dd0e..63c11f59c1 100644
---- a/src/test/debuginfo/borrowed-enum.rs
-+++ b/src/test/debuginfo/borrowed-enum.rs
-@@ -1,7 +1,7 @@
- // ignore-tidy-linelength
-
- // Require LLVM with DW_TAG_variant_part and a gdb or lldb that can read it.
--// min-system-llvm-version: 7.0
-+// min-system-llvm-version: 8.0
- // min-gdb-version: 8.2
- // rust-lldb
-
-diff --git a/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs b/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
-index 9392aa7097..e26294cb73 100644
---- a/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
-+++ b/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
-@@ -3,7 +3,7 @@
- // min-lldb-version: 310
-
- // Require LLVM with DW_TAG_variant_part and a gdb that can read it.
--// min-system-llvm-version: 7.0
-+// min-system-llvm-version: 8.0
- // min-gdb-version: 8.2
-
- // compile-flags:-g
-diff --git a/src/test/debuginfo/generic-struct-style-enum.rs b/src/test/debuginfo/generic-struct-style-enum.rs
-index 3e59347030..3dc5cb807b 100644
---- a/src/test/debuginfo/generic-struct-style-enum.rs
-+++ b/src/test/debuginfo/generic-struct-style-enum.rs
-@@ -2,7 +2,7 @@
- // min-lldb-version: 310
-
- // Require LLVM with DW_TAG_variant_part and a gdb that can read it.
--// min-system-llvm-version: 7.0
-+// min-system-llvm-version: 8.0
- // min-gdb-version: 8.2
-
- // compile-flags:-g
-diff --git a/src/test/debuginfo/generic-tuple-style-enum.rs b/src/test/debuginfo/generic-tuple-style-enum.rs
-index 3c136add07..b16634ee6d 100644
---- a/src/test/debuginfo/generic-tuple-style-enum.rs
-+++ b/src/test/debuginfo/generic-tuple-style-enum.rs
-@@ -2,7 +2,7 @@
-
- // Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
- // read it.
--// min-system-llvm-version: 7.0
-+// min-system-llvm-version: 8.0
- // min-gdb-version: 8.2
- // rust-lldb
-
-diff --git a/src/test/debuginfo/recursive-struct.rs b/src/test/debuginfo/recursive-struct.rs
-index c3d2bea913..8fb83b7956 100644
---- a/src/test/debuginfo/recursive-struct.rs
-+++ b/src/test/debuginfo/recursive-struct.rs
-@@ -2,7 +2,7 @@
- // ignore-lldb
-
- // Require LLVM with DW_TAG_variant_part and a gdb that can read it.
--// min-system-llvm-version: 7.0
-+// min-system-llvm-version: 8.0
- // min-gdb-version: 8.2
-
- // compile-flags:-g
-diff --git a/src/test/debuginfo/struct-style-enum.rs b/src/test/debuginfo/struct-style-enum.rs
-index 1654c93209..5843b076b1 100644
---- a/src/test/debuginfo/struct-style-enum.rs
-+++ b/src/test/debuginfo/struct-style-enum.rs
-@@ -2,7 +2,7 @@
-
- // Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
- // read it.
--// min-system-llvm-version: 7.0
-+// min-system-llvm-version: 8.0
- // min-gdb-version: 8.2
- // rust-lldb
-
-diff --git a/src/test/debuginfo/tuple-style-enum.rs b/src/test/debuginfo/tuple-style-enum.rs
-index fd76bcb0af..4d9727a388 100644
---- a/src/test/debuginfo/tuple-style-enum.rs
-+++ b/src/test/debuginfo/tuple-style-enum.rs
-@@ -2,7 +2,7 @@
-
- // Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
- // read it.
--// min-system-llvm-version: 7.0
-+// min-system-llvm-version: 8.0
- // min-gdb-version: 8.2
- // rust-lldb
-
-diff --git a/src/test/debuginfo/unique-enum.rs b/src/test/debuginfo/unique-enum.rs
-index da0d06213e..32bd93f1ed 100644
---- a/src/test/debuginfo/unique-enum.rs
-+++ b/src/test/debuginfo/unique-enum.rs
-@@ -2,7 +2,7 @@
-
- // Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
- // read it.
--// min-system-llvm-version: 7.0
-+// min-system-llvm-version: 8.0
- // min-gdb-version: 8.2
- // rust-lldb
-
---
-2.21.0
-
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
new file mode 100644
index 0000000..969d4c5
--- /dev/null
+++ b/dev-lang/rust/files/0008-Link-libssp_nonshared.a-on-all-musl-targets.patch
@@ -0,0 +1,29 @@
+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
new file mode 100644
index 0000000..8639b2b
--- /dev/null
+++ b/dev-lang/rust/files/0009-test-failed-doctest-output-Fix-normalization.patch
@@ -0,0 +1,36 @@
+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
index 029544a..82772a1 100644
--- 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
@@ -1,7 +1,7 @@
-From 91e0c28a5642ef1eead598910e4a6bff071c9a4d Mon Sep 17 00:00:00 2001
+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/14] test/sysroot-crates-are-unstable: Fix test when rpath
+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
@@ -11,15 +11,15 @@ the sysroot path.
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 a35174b3c2..9e77070685 100644
+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:
-- python2.7 test.py
-+ env '$(HOST_RPATH_ENV)' python2.7 test.py
+- '$(PYTHON)' test.py
++ env '$(HOST_RPATH_ENV)' '$(PYTHON)' test.py
--
-2.21.0
+2.26.2
diff --git a/dev-lang/rust/files/0009-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
similarity index 79%
rename from dev-lang/rust/files/0009-test-use-extern-for-plugins-Don-t-assume-multilib.patch
rename to dev-lang/rust/files/0011-test-use-extern-for-plugins-Don-t-assume-multilib.patch
index 121e3c8..6f5fa8b 100644
--- a/dev-lang/rust/files/0009-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
@@ -1,18 +1,18 @@
-From ecfd3927df50b811ef1dff61abbdeed15daf7cd2 Mon Sep 17 00:00:00 2001
+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 09/14] test/use-extern-for-plugins: Don't assume multilib
+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 3976da3113..567a8d3157 100644
+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
-@@ -5,12 +5,7 @@
- # ignore-bitrig
+@@ -4,12 +4,7 @@
+ # ignore-openbsd
# ignore-sunos
-HOST := $(shell $(RUSTC) -vV | grep 'host:' | sed 's/host: //')
@@ -26,5 +26,5 @@ index 3976da3113..567a8d3157 100644
all:
$(RUSTC) foo.rs -C extra-filename=-host
--
-2.21.0
+2.26.2
diff --git a/dev-lang/rust/files/0011-Ignore-broken-and-non-applicable-tests.patch b/dev-lang/rust/files/0012-Ignore-broken-and-non-applicable-tests.patch
similarity index 55%
rename from dev-lang/rust/files/0011-Ignore-broken-and-non-applicable-tests.patch
rename to dev-lang/rust/files/0012-Ignore-broken-and-non-applicable-tests.patch
index 59d6b71..8569293 100644
--- a/dev-lang/rust/files/0011-Ignore-broken-and-non-applicable-tests.patch
+++ b/dev-lang/rust/files/0012-Ignore-broken-and-non-applicable-tests.patch
@@ -1,13 +1,11 @@
-From 0495caf6d9c4745ba3cedbdbb4dd690571e1cec0 Mon Sep 17 00:00:00 2001
+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 11/14] Ignore broken and non-applicable tests
+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
-simd-intrinsic-generic-select.rs: broken on BE, #59356
sparc-struct-abi: no sparc target
sysroot-crates-are-unstable: can't run rustc without RPATH
---
@@ -15,13 +13,11 @@ sysroot-crates-are-unstable: can't run rustc without RPATH
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/run-pass/env-funky-keys.rs | 1 +
- src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs | 2 ++
- src/test/run-pass/simd/simd-intrinsic-generic-select.rs | 2 ++
- 7 files changed, 12 insertions(+)
+ 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 78e5b14a21..6f93e93286 100644
+index 78e5b14a212..6f93e93286b 100644
--- a/src/test/codegen/sparc-struct-abi.rs
+++ b/src/test/codegen/sparc-struct-abi.rs
@@ -4,6 +4,7 @@
@@ -33,7 +29,7 @@ index 78e5b14a21..6f93e93286 100644
#![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 f124ca2ab6..363b18f098 100644
+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 @@
@@ -43,7 +39,7 @@ index f124ca2ab6..363b18f098 100644
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 5876fbc94b..5f167ece1a 100644
+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 @@
@@ -53,7 +49,7 @@ index 5876fbc94b..5f167ece1a 100644
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 9e77070685..6d92ec5cec 100644
+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 @@
@@ -62,43 +58,18 @@ index 9e77070685..6d92ec5cec 100644
-include ../tools.mk
all:
-diff --git a/src/test/run-pass/env-funky-keys.rs b/src/test/run-pass/env-funky-keys.rs
-index 79f32bd6c2..fc171687c9 100644
---- a/src/test/run-pass/env-funky-keys.rs
-+++ b/src/test/run-pass/env-funky-keys.rs
-@@ -1,5 +1,6 @@
+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/run-pass/simd/simd-intrinsic-generic-bitmask.rs b/src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs
-index b28f742a92..3ee4ccce73 100644
---- a/src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs
-+++ b/src/test/run-pass/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.
-
-diff --git a/src/test/run-pass/simd/simd-intrinsic-generic-select.rs b/src/test/run-pass/simd/simd-intrinsic-generic-select.rs
-index f79b140494..39080c8c90 100644
---- a/src/test/run-pass/simd/simd-intrinsic-generic-select.rs
-+++ b/src/test/run-pass/simd/simd-intrinsic-generic-select.rs
-@@ -2,6 +2,8 @@
- #![allow(non_camel_case_types)]
-
- // ignore-emscripten
-+// ignore-powerpc
-+// ignore-powerpc64
-
- // Test that the simd_select intrinsics produces correct results.
-
--
-2.21.0
+2.26.2
diff --git a/dev-lang/rust/files/0012-Link-stage-2-tools-dynamically-to-libstd.patch b/dev-lang/rust/files/0012-Link-stage-2-tools-dynamically-to-libstd.patch
deleted file mode 100644
index e4cac48..0000000
--- a/dev-lang/rust/files/0012-Link-stage-2-tools-dynamically-to-libstd.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From d7e94a443cd0876d384ccbc36a6eb21cfc3636d4 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 24 Sep 2018 23:42:23 +0000
-Subject: [PATCH 12/14] Link stage 2 tools dynamically to libstd
-
----
- src/bootstrap/tool.rs | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
-index fc1a17d546..880c2d52ba 100644
---- a/src/bootstrap/tool.rs
-+++ b/src/bootstrap/tool.rs
-@@ -207,7 +207,9 @@ pub fn prepare_tool_cargo(
-
- // We don't want to build tools dynamically as they'll be running across
- // stages and such and it's just easier if they're not dynamically linked.
-- cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
-+ if compiler.stage < 2 {
-+ cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
-+ }
-
- if source_type == SourceType::Submodule {
- cargo.env("RUSTC_EXTERNAL_TOOL", "1");
---
-2.21.0
-
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
new file mode 100644
index 0000000..bd16e6c
--- /dev/null
+++ b/dev-lang/rust/files/0013-Link-stage-2-tools-dynamically-to-libstd.patch
@@ -0,0 +1,25 @@
+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/0013-Move-debugger-scripts-to-usr-share-rust.patch b/dev-lang/rust/files/0013-Move-debugger-scripts-to-usr-share-rust.patch
deleted file mode 100644
index 8f5b2fb..0000000
--- a/dev-lang/rust/files/0013-Move-debugger-scripts-to-usr-share-rust.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From b3b713b954619af8768ad21bd73700291e9d7b58 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 17 Sep 2018 02:09:10 +0000
-Subject: [PATCH 13/14] Move debugger scripts to /usr/share/rust
-
----
- src/bootstrap/dist.rs | 2 +-
- src/etc/rust-gdb | 2 +-
- src/etc/rust-lldb | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index 2dae3f9135..642e4bfba8 100644
---- a/src/bootstrap/dist.rs
-+++ b/src/bootstrap/dist.rs
-@@ -595,7 +595,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 23ba93da8e..dc51b16c57 100755
---- a/src/etc/rust-gdb
-+++ b/src/etc/rust-gdb
-@@ -4,7 +4,7 @@ set -e
-
- # 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-lldb b/src/etc/rust-lldb
-index 424302d495..460e119210 100755
---- a/src/etc/rust-lldb
-+++ b/src/etc/rust-lldb
-@@ -26,7 +26,7 @@ display the contents of local variables!"
- fi
-
- # Prepare commands that will be loaded before any file on the command line has been loaded
--script_import="command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_rust_formatters.py\""
-+script_import="command script import \"$RUSTC_SYSROOT/share/rust/lldb_rust_formatters.py\""
- category_definition="type summary add --no-value --python-function lldb_rust_formatters.print_val -x \".*\" --category Rust"
- category_enable="type category enable Rust"
-
---
-2.21.0
-
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
new file mode 100644
index 0000000..ca1a1b4
--- /dev/null
+++ b/dev-lang/rust/files/0014-Move-debugger-scripts-to-usr-share-rust.patch
@@ -0,0 +1,69 @@
+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/0014-Add-gentoo-target-specs.patch b/dev-lang/rust/files/0015-Add-gentoo-target-specs.patch
similarity index 79%
rename from dev-lang/rust/files/0014-Add-gentoo-target-specs.patch
rename to dev-lang/rust/files/0015-Add-gentoo-target-specs.patch
index 36afe06..61a19b9 100644
--- a/dev-lang/rust/files/0014-Add-gentoo-target-specs.patch
+++ b/dev-lang/rust/files/0015-Add-gentoo-target-specs.patch
@@ -1,18 +1,18 @@
-From d4b28cd40d12ef2a801658176b31c6663c25d66f Mon Sep 17 00:00:00 2001
+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 14/14] Add gentoo target specs
+Subject: [PATCH 15/15] Add gentoo target specs
---
- .../spec/aarch64_gentoo_linux_musl.rs | 11 +++++++++++
- .../spec/arm_gentoo_linux_musleabi.rs | 11 +++++++++++
- .../spec/armv7a_gentoo_linux_musleabihf.rs | 11 +++++++++++
- src/librustc_target/spec/i686_gentoo_linux_musl.rs | 13 +++++++++++++
- src/librustc_target/spec/mod.rs | 11 ++++++++++-
- .../spec/powerpc64_gentoo_linux_musl.rs | 11 +++++++++++
- .../spec/powerpc_gentoo_linux_musl.rs | 13 +++++++++++++
- .../spec/x86_64_gentoo_linux_musl.rs | 11 +++++++++++
- 8 files changed, 91 insertions(+), 1 deletion(-)
+ 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
@@ -23,7 +23,7 @@ Subject: [PATCH 14/14] Add gentoo target specs
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 0000000000..420fe7cde7
+index 00000000000..420fe7cde70
--- /dev/null
+++ b/src/librustc_target/spec/aarch64_gentoo_linux_musl.rs
@@ -0,0 +1,11 @@
@@ -40,7 +40,7 @@ index 0000000000..420fe7cde7
+}
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 0000000000..d47ca84164
+index 00000000000..d47ca841647
--- /dev/null
+++ b/src/librustc_target/spec/arm_gentoo_linux_musleabi.rs
@@ -0,0 +1,11 @@
@@ -57,7 +57,7 @@ index 0000000000..d47ca84164
+}
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 0000000000..f5c85855c1
+index 00000000000..f5c85855c18
--- /dev/null
+++ b/src/librustc_target/spec/armv7a_gentoo_linux_musleabihf.rs
@@ -0,0 +1,11 @@
@@ -74,11 +74,11 @@ index 0000000000..f5c85855c1
+}
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 0000000000..be4d7b8523
+index 00000000000..1cd39cd76af
--- /dev/null
+++ b/src/librustc_target/spec/i686_gentoo_linux_musl.rs
-@@ -0,0 +1,13 @@
-+use crate::spec::{LinkerFlavor, TargetResult};
+@@ -0,0 +1,11 @@
++use crate::spec::TargetResult;
+
+pub fn target() -> TargetResult {
+ let mut base = super::i686_unknown_linux_musl::target()?;
@@ -86,17 +86,15 @@ index 0000000000..be4d7b8523
+ base.llvm_target = "i686-gentoo-linux-musl".to_string();
+ base.target_vendor = "gentoo".to_string();
+ base.options.crt_static_default = false;
-+ base.options.post_link_args.insert(LinkerFlavor::Gcc,
-+ vec!["-Wl,--as-needed".to_string(), "-lssp_nonshared".to_string()]);
+
+ Ok(base)
+}
diff --git a/src/librustc_target/spec/mod.rs b/src/librustc_target/spec/mod.rs
-index bef2afc7b6..42bd26ce0c 100644
+index fa29ff3f8d8..a711417e7c1 100644
--- a/src/librustc_target/spec/mod.rs
+++ b/src/librustc_target/spec/mod.rs
-@@ -327,7 +327,17 @@ macro_rules! supported_targets {
- )
+@@ -489,7 +489,17 @@ macro_rules! supported_targets {
+ };
}
+mod arm_unknown_linux_musleabi;
@@ -113,7 +111,7 @@ index bef2afc7b6..42bd26ce0c 100644
("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),
-@@ -348,7 +358,6 @@ supported_targets! {
+@@ -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),
@@ -123,7 +121,7 @@ index bef2afc7b6..42bd26ce0c 100644
("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 0000000000..e840bb27bb
+index 00000000000..e840bb27bbf
--- /dev/null
+++ b/src/librustc_target/spec/powerpc64_gentoo_linux_musl.rs
@@ -0,0 +1,11 @@
@@ -140,11 +138,11 @@ index 0000000000..e840bb27bb
+}
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 0000000000..905c5214d4
+index 00000000000..a623ffed53a
--- /dev/null
+++ b/src/librustc_target/spec/powerpc_gentoo_linux_musl.rs
-@@ -0,0 +1,13 @@
-+use crate::spec::{LinkerFlavor, TargetResult};
+@@ -0,0 +1,11 @@
++use crate::spec::TargetResult;
+
+pub fn target() -> TargetResult {
+ let mut base = super::powerpc_unknown_linux_musl::target()?;
@@ -152,14 +150,12 @@ index 0000000000..905c5214d4
+ base.llvm_target = "powerpc-gentoo-linux-musl".to_string();
+ base.target_vendor = "gentoo".to_string();
+ base.options.crt_static_default = false;
-+ base.options.post_link_args.insert(LinkerFlavor::Gcc,
-+ vec!["-Wl,--as-needed".to_string(), "-lssp_nonshared".to_string()]);
+
+ 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 0000000000..f33047358b
+index 00000000000..f33047358b5
--- /dev/null
+++ b/src/librustc_target/spec/x86_64_gentoo_linux_musl.rs
@@ -0,0 +1,11 @@
@@ -175,5 +171,5 @@ index 0000000000..f33047358b
+ Ok(base)
+}
--
-2.21.0
+2.26.2
diff --git a/dev-lang/rust/files/0030-libc-linkage.patch b/dev-lang/rust/files/0030-libc-linkage.patch
new file mode 100644
index 0000000..5a92904
--- /dev/null
+++ b/dev-lang/rust/files/0030-libc-linkage.patch
@@ -0,0 +1,34 @@
+--- rustc-1.47.0-src/vendor/libc-0.2.74/src/lib.rs
++++ rustc-1.47.0-src/vendor/libc-0.2.74/src/lib.rs
+@@ -27,6 +27,7 @@
+ #![deny(missing_copy_implementations, safe_packed_borrows)]
+ #![no_std]
+ #![cfg_attr(feature = "rustc-dep-of-std", no_core)]
++#![cfg_attr(target_env = "musl", feature(static_nobundle))]
+ #![cfg_attr(target_os = "redox", feature(static_nobundle))]
+ #![cfg_attr(libc_const_extern_fn, feature(const_extern_fn))]
+
+--- rustc-1.47.0-src/vendor/libc-0.2.74/src/unix/mod.rs
++++ rustc-1.47.0-src/vendor/libc-0.2.74/src/unix/mod.rs
+@@ -299,11 +299,11 @@ cfg_if! {
+ // cargo build, don't pull in anything extra as the libstd dep
+ // already pulls in all libs.
+ } else if #[cfg(target_env = "musl")] {
++ #[link(name = "c")]
++ extern {}
+ #[cfg_attr(feature = "rustc-dep-of-std",
+- link(name = "c", kind = "static",
++ link(name = "gcc", kind = "static-nobundle",
+ cfg(target_feature = "crt-static")))]
+- #[cfg_attr(feature = "rustc-dep-of-std",
+- link(name = "c", cfg(not(target_feature = "crt-static"))))]
+ extern {}
+ } else if #[cfg(target_os = "emscripten")] {
+ #[link(name = "c")]
+--- rustc-1.47.0-src/vendor/libc-0.2.74/.cargo-checksum.json
++++ rustc-1.47.0-src/vendor/libc-0.2.74/.cargo-checksum.json
+@@ -1 +1 @@
+-{"files":{"CONTRIBUTING.md":"3a9f0037ad5f1198eada74a9d0363925ef09db664380b0e5a2840f03da260476","Cargo.toml":"128aa804901aaf7c386262cfbba894041bf1b109232d69c3e8b6b01df0a67dd1","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"a8d47ff51ca256f56a8932dba07660672dbfe3004257ca8de708aac1415937a1","README.md":"52f1027a072c02e6e9e1f3d9630ec24e4d57507399c6363afcbcceaa106d152b","build.rs":"ab351d7171b14f8032948e843841ebe8518ed95eb1abf0b1e689700c7cef4bf5","rustfmt.toml":"8a654d5787585ca8f2c20580737336fc327f411a07b0dbd4870adf6e9bdf624f","src/cloudabi/aarch64.rs":"b8550bf1fd7344972aa4db29441486f39f31482d0327534981dbb75959c29114","src/cloudabi/arm.rs":"c197e2781c2839808bd6fcef219a29705b27b992d3ef920e9cf6ac96e2022bbf","src/cloudabi/mod.rs":"d5d4488e8c0b8227f516fe13810f550a2a72af3bdfe769200ad8687c8755bdf6","src/cloudabi/x86.rs":"33eb97f272d2201f3838ae74d444583c7de8f67856852ca375293b20bbd05636","src/cloudabi/x86_64.rs":"400d85d4fe39e26cf2e6ece9ee31c75
fe9e88c4bcf4d836ca9f765c05c9c5be3","src/fixed_width_ints.rs":"34c60f12ec5eeb90f13ec3b954427532111c2446e69617616a97aefc1086a9f1","src/fuchsia/aarch64.rs":"378776a9e40766154a54c94c2a7b4675b5c302a38e6e42da99e67bfbaee60e56","src/fuchsia/align.rs":"ae1cf8f011a99737eabeb14ffff768e60f13b13363d7646744dbb0f443dab3d6","src/fuchsia/mod.rs":"61502b3d124759c7c1bae294c1662036a96718fb3bd329cfa2f12e1c61ac10ad","src/fuchsia/no_align.rs":"303f3f1b255e0088b5715094353cf00476131d8e94e6aebb3f469557771c8b8a","src/fuchsia/x86_64.rs":"93a3632b5cf67d2a6bcb7dc0a558605252d5fe689e0f38d8aa2ec5852255ac87","src/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/hermit/mod.rs":"d3bfce41e4463d4be8020a2d063c9bfa8b665f45f1cc6cbf3163f5d01e7cb21f","src/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/lib.rs":"d80f0a2f77d485601a218e0707474245636d8b23fb3d6c65c9dbd4302ea6674b","src/macros.rs":"83aed048c5053300345fca843b148928b91ed444188c479315
ff6bcabaa0c4e9","src/psp.rs":"a93741ac38660e548eb41b58df39da39944e5c04280a7b09e0be758e79942549","src/sgx.rs":"16a95cdefc81c5ee00d8353a60db363c4cc3e0f75abcd5d0144723f2a306ed1b","src/switch.rs":"9da3dd39b3de45a7928789926e8572d00e1e11a39e6f7289a1349aadce90edba","src/unix/align.rs":"2cdc7c826ef7ae61f5171c5ae8c445a743d86f1a7f2d9d7e4ceeec56d6874f65","src/unix/bsd/apple/b32/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b32/mod.rs":"6a4ce300da0d2b0db04b18548286603ffe4b47d679a41cf60f1902895894aa1f","src/unix/bsd/apple/b64/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b64/mod.rs":"81254d89be1febc5bb20e787d014a624950d56e2e14973df5bbebfdabc95ae20","src/unix/bsd/apple/mod.rs":"19c8598b72272cc61d7f6a05b7fec78958ce86b11d0f5a655e1e58da0bc2af44","src/unix/bsd/freebsdlike/dragonfly/errno.rs":"ae5e8e6b0f610ec015dfcc2928609037d7ea7b94570c72bcc5bdd588424c6259","src/unix/bsd/freebsdlike/dragonfly/mod.rs"
:"0e41b6202c7670ce27201095fc1a2826c9e9ccbbc751e97ae1568871ea481a62","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"14f0bd6693967d4fedec904f7042bd51f2138cb843ec4df18c911b357417cdd2","src/unix/bsd/freebsdlike/freebsd/arm.rs":"59d6a670eea562fb87686e243e0a84603d29a2028a3d4b3f99ccc01bd04d2f47","src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs":"9808d152c1196aa647f1b0f0cf84dac8c930da7d7f897a44975545e3d9d17681","src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs":"16dd3e1a09f123d0aa544b3fd7c123654b4906cac94838fbed7f34a64413c930","src/unix/bsd/freebsdlike/freebsd/freebsd12/b64.rs":"61cbe45f8499bedb168106b686d4f8239472f25c7553b069eec2afe197ff2df6","src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs":"c6152ce3db241d99e350d34352f3f3d167953ef0ee08bfbe2685cb9ebde2e83b","src/unix/bsd/freebsdlike/freebsd/mod.rs":"1ed8971b7de3b0435341a9af1366493d0458e4a00507dd824c4c11f4ce2006af","src/unix/bsd/freebsdlike/freebsd/powerpc64.rs":"2dae3ecc87eac3b11657aa98915def55fc4b5c0de11fe26aae23329a54628a9a","src/un
ix/bsd/freebsdlike/freebsd/x86.rs":"c5005e3249eb7c93cfbac72a9e9272320d80ce7983da990ceb05a447f59a02c5","src/unix/bsd/freebsdlike/freebsd/x86_64/align.rs":"0e1f69a88fca1c32874b1daf5db3d446fefbe518dca497f096cc9168c39dde70","src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs":"6132aa0973454379674ea6cbc77e6eace1e1032dd9f38182071388a036f1bc08","src/unix/bsd/freebsdlike/mod.rs":"0046a4083f01ad67511427f1ac37168f31bef3be10c849d304d39f98d61c1267","src/unix/bsd/mod.rs":"4acdbc0148b672fe015ddd7cae952e5d77691df6941a20f8ca40fd996e6a37dd","src/unix/bsd/netbsdlike/mod.rs":"48dd60524119c1e09b255d5472d091e7e7b2b29eab04be51b4b1e740bd022859","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"b38fc046f9a40fea28bd26328b96629f4d5d63d7524936bd6af1865d401a8716","src/unix/bsd/netbsdlike/netbsd/arm.rs":"58cdbb70b0d6f536551f0f3bb3725d2d75c4690db12c26c034e7d6ec4a924452","src/unix/bsd/netbsdlike/netbsd/mod.rs":"16a9036b6a8b373cdf0576ae99c95430f3f111b6be906a1e1ecff8047e178a86","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"e
e7ff5d89d0ed22f531237b5059aa669df93a3b5c489fa641465ace8d405bf41","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"9489f4b3e4566f43bb12dfb92238960613dac7f6a45cc13068a8d152b902d7d9","src/unix/bsd/netbsdlike/netbsd/x86.rs":"20692320e36bfe028d1a34d16fe12ca77aa909cb02bda167376f98f1a09aefe7","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"135509edeaf3fb3f102d89d51ff1a8f82323497336a8dc7e1f0f23b5c2434b73","src/unix/bsd/netbsdlike/openbsd/aarch64.rs":"1dd5449dd1fd3d51e30ffdeeaece91d0aaf05c710e0ac699fecc5461cfa2c28e","src/unix/bsd/netbsdlike/openbsd/mod.rs":"a2938e72d1c6e3f32fb51e896b63abd0d79e1e360dc53f9254fdac82b21206b9","src/unix/bsd/netbsdlike/openbsd/sparc64.rs":"d04fd287afbaa2c5df9d48c94e8374a532a3ba491b424ddf018270c7312f4085","src/unix/bsd/netbsdlike/openbsd/x86.rs":"6f7f5c4fde2a2259eb547890cbd86570cea04ef85347d7569e94e679448bec87","src/unix/bsd/netbsdlike/openbsd/x86_64.rs":"e59b7fd65f68f8e857eec39e0c03bac1d3af6ddc26c9ba58494336b83659bb9b","src/unix/haiku/b32.rs":"69ae47fc52c6880e85416b474450
0d5655c9ec6131cb737f3b649fceaadce15a","src/unix/haiku/b64.rs":"73e64db09275a8da8d50a13cce2cfa2b136036ddf3a930d2939f337fc995900b","src/unix/haiku/mod.rs":"29863051c296eeb22e7f00a266d6632b6a886b9a791f128e3c554e96213c3a16","src/unix/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/unix/hermit/mod.rs":"fb7e14d0f46ffaa989b5ab68c85184efe6aa04b5381e46866299b1f3258ddce3","src/unix/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/unix/linux_like/android/b32/arm.rs":"155994121906903a2e0afad895f0b3b7546f6e54d6305a3336ce2c4dfafbfdfa","src/unix/linux_like/android/b32/mod.rs":"0325adf3364fed7157fff5b24fabe1b36d806c39ee04ec82dd29a606d28f91f6","src/unix/linux_like/android/b32/x86/align.rs":"812914e4241df82e32b12375ca3374615dc3a4bdd4cf31f0423c5815320c0dab","src/unix/linux_like/android/b32/x86/mod.rs":"5b1e9fcd77ca5f939acb7fb5f5da12f305b0377698d8b8989feb236e26360aa0","src/unix/linux_like/android/b64/aarch64/align.rs":"
2179c3b1608fa4bf68840482bfc2b2fa3ee2faf6fcae3770f9e505cddca35c7b","src/unix/linux_like/android/b64/aarch64/mod.rs":"655116966eb7846b933e5e28b073c329668588cd3c2120cc9ce60c697bd19978","src/unix/linux_like/android/b64/mod.rs":"6a71abfcbbcdae60c916de41cd4688d5f25bdbca83d1d9df49decd56ad726a06","src/unix/linux_like/android/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/android/b64/x86_64/mod.rs":"e84176d838e663d351450bad218715db1fafbb531e47ea0e262cbb45829dae89","src/unix/linux_like/android/mod.rs":"d414f682fd0d138d440300dc53c6b8b069730e19230dabd4c01173c4578c42b5","src/unix/linux_like/emscripten/align.rs":"86c95cbed7a7161b1f23ee06843e7b0e2340ad92b2cb86fe2a8ef3e0e8c36216","src/unix/linux_like/emscripten/mod.rs":"55fb89f5a965a4ad81ee4d02498c32aaed69e6047ce708c2329a602171862a76","src/unix/linux_like/emscripten/no_align.rs":"0128e4aa721a9902754828b61b5ec7d8a86619983ed1e0544a85d35b1051fad6","src/unix/linux_like/linux/align.rs":"dde64
8468764a5deef5566b8016290150acf50ee6a0f8c0678cb2078658bc2fa","src/unix/linux_like/linux/gnu/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/gnu/b32/arm/align.rs":"3fed009dc9af3cc81be7087da9d2d7d1f39845e4497e290259c5cdbae25f039d","src/unix/linux_like/linux/gnu/b32/arm/mod.rs":"6d9ba242111c7be8173b7a7b8cf8c863ba23d839edc9d026c0fd37a4b64460b4","src/unix/linux_like/linux/gnu/b32/mips/align.rs":"429fb5e005cb7143602d430098b6ebfb7d360685b194f333dfd587472ae954ee","src/unix/linux_like/linux/gnu/b32/mips/mod.rs":"e2d2e51fea73210d9705b7eaa37de8baa7152b71ae3a10a316c277345c529b5c","src/unix/linux_like/linux/gnu/b32/mod.rs":"e224551fa50be726bc8a559da32a96294b18743fb5a5b67cdbee4bb6a9eeb796","src/unix/linux_like/linux/gnu/b32/powerpc.rs":"39aae80d2c4ffa845592e16c0a6c910017de19e2b15c1e507c4df10e79ce3e38","src/unix/linux_like/linux/gnu/b32/sparc/align.rs":"21adbed27df73e2d1ed934aaf733a643003d7baf2bde9c48ea440895bcca6d41","src/unix/linux_like/lin
ux/gnu/b32/sparc/mod.rs":"3b4dd40b288788740d2b030171b21f9d0b076ce26d88e0ff62f5d87f09e7c787","src/unix/linux_like/linux/gnu/b32/x86/align.rs":"e4bafdc4a519a7922a81b37a62bbfd1177a2f620890eef8f1fbc47162e9eb413","src/unix/linux_like/linux/gnu/b32/x86/mod.rs":"927d1bd8cb2f053549fc5acfeb1315b7f80b35d7a1904cd76e99651ff32b141e","src/unix/linux_like/linux/gnu/b64/aarch64/align.rs":"2179c3b1608fa4bf68840482bfc2b2fa3ee2faf6fcae3770f9e505cddca35c7b","src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs":"17e9cd23a14bd19700c05a154568fff5897788c0ae151c21dd3bba67aac829d9","src/unix/linux_like/linux/gnu/b64/mips64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/gnu/b64/mips64/mod.rs":"0b5d94f3a2361742b6dd9eb3f543ddf675d3f70dab3402ad179faa6ddaae2218","src/unix/linux_like/linux/gnu/b64/mod.rs":"b90d87f76bff37707a1725551fe45d70d0c106e01b1dbbcd5f60460e0a19b4c3","src/unix/linux_like/linux/gnu/b64/powerpc64/align.rs":"e29c4868bbecfa4a6cd8a2ad06193f3bbc7
8a468cc1dc9df83f002f1268130d9","src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs":"2f279eb268c0aca9a6bd9b4c84139799cd039a64ca1cd2ded68b04c63397be1b","src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs":"bb01828300f02c11c27689522454439d0d02f22d738df88a97367dc87eecf868","src/unix/linux_like/linux/gnu/b64/s390x.rs":"9c449b64b11cbf55d453b324cf9475acb3253f85cb9692f9873b777ed8978ff4","src/unix/linux_like/linux/gnu/b64/sparc64/align.rs":"e29c4868bbecfa4a6cd8a2ad06193f3bbc78a468cc1dc9df83f002f1268130d9","src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs":"a2667a09e526878683fafa02474f81fbc212d861ceeabade17b0ff4d6d49ff9d","src/unix/linux_like/linux/gnu/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs":"e6197537739cb8628cad25827081c8bf6b371c02ad4b2132b30b9ae74143b1ef","src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs":"c1862036556262f076eda2008470b8a351b9c371d70664f54387c46890e8cd18","src/unix/linux_like/
linux/gnu/b64/x86_64/x32.rs":"30f88d0fa9e7807ee4cbe89fd274061f810099567d5e68fa829277d7d27ba708","src/unix/linux_like/linux/gnu/mod.rs":"c7924db757cf898c78029ad3772e6168ec99dd0dd1534df4132f8fe9717afed7","src/unix/linux_like/linux/gnu/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/mod.rs":"3dc8b1980062117edd7bdfdf2279065737f8cdcdcb883f57f23f27a1d0bbb8b2","src/unix/linux_like/linux/musl/b32/arm/align.rs":"3e8ac052c1043764776b54c93ba4260e061df998631737a897d9d47d54f7b80c","src/unix/linux_like/linux/musl/b32/arm/mod.rs":"45062a178b382ab17341a69d027b5c83325c4e79fecf45729ba9c47b1bcdc3da","src/unix/linux_like/linux/musl/b32/hexagon.rs":"7c6c481f70da1fe6ca759f363784e130041f3d87906c45910fc1142b5ef17970","src/unix/linux_like/linux/musl/b32/mips/align.rs":"429fb5e005cb7143602d430098b6ebfb7d360685b194f333dfd587472ae954ee","src/unix/linux_like/linux/musl/b32/mips/mod.rs":"9eb0e4953be5afaa0b9e3ac54c85ed40583cfb8cc0b03264b9bc8f763a8f3254","
src/unix/linux_like/linux/musl/b32/mod.rs":"8ede3985e6243882814ce91e8ce543e7edbafc0cee5932816072b6f14207a671","src/unix/linux_like/linux/musl/b32/powerpc.rs":"cf286cbf4d2076aaa82662ace2b5c333480410fa59af5cb4542d59f04da84b31","src/unix/linux_like/linux/musl/b32/x86/align.rs":"08e77fbd7435d7dec2ff56932433bece3f02e47ce810f89004a275a86d39cbe1","src/unix/linux_like/linux/musl/b32/x86/mod.rs":"9c3b6e98e7710d6c877a4e31726d36416115a58f53fc469bb173b7fe660b39e5","src/unix/linux_like/linux/musl/b64/aarch64/align.rs":"0bf138f84e5327d8339bcd4adf071a6832b516445e597552c82bbd881095e3a8","src/unix/linux_like/linux/musl/b64/aarch64/mod.rs":"7b3fb85a869e00aae3f6af9c36f82f9c70bf8c2b9cccbd931b923602846ea42c","src/unix/linux_like/linux/musl/b64/mips64.rs":"9d0158ac7a913222d0a62239ec043aa1aee73522a7a1e0e191d0642dde35c083","src/unix/linux_like/linux/musl/b64/mod.rs":"8b76e92a1505ad785d4aa0b7739e0b93647a1e81910949b49cedb6c88468be9c","src/unix/linux_like/linux/musl/b64/powerpc64.rs":"ed9b879bb9cdc526ad838158
75edeb4cad4e8829086dfba2578277c265336229","src/unix/linux_like/linux/musl/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/musl/b64/x86_64/mod.rs":"cfeb109c732ac6bc7d2be44069d3652e917a0509b8b545270b756ff2d52e27e8","src/unix/linux_like/linux/musl/mod.rs":"243e32b93641df7a77f970a32c0fb8e4fd4a13720e54e0e42a9da321fd169798","src/unix/linux_like/linux/no_align.rs":"c81ccd1942295d423b43a55b4aa19633c2096fb93bb381a6a29acb93e85aab07","src/unix/linux_like/mod.rs":"e2d60b008a30f2d866be2da6372fe8390e246572d8344447615155f642016882","src/unix/mod.rs":"3196eb15b4f9fa88839f401ee5a8a06875f7da7f244e73323f3c4ca7fb5007b1","src/unix/newlib/aarch64/mod.rs":"bb269c1468a9676442554600e87417079a787fe6220dfc23b3109639259e8710","src/unix/newlib/align.rs":"28aaf87fafbc6b312622719d472d8cf65f9e5467d15339df5f73e66d8502b28a","src/unix/newlib/arm/mod.rs":"c71be856bfd7f576b2db28af9f680211cbe6c1cac7d537bbc8020b39591af07c","src/unix/newlib/mod.rs":"8ab989
db6b21fee81a694c9f9f89014f8e78870d0541368527483c90f07542a7","src/unix/newlib/no_align.rs":"7123dcec13604a11b7765c380ff3a4d0da19c39f4b03919de7857723c0cf1502","src/unix/newlib/xtensa/mod.rs":"4c72003c5e692e648c7e798358c49af6901e68850dbba0624af84c40baf208f5","src/unix/no_align.rs":"c06e95373b9088266e0b14bba0954eef95f93fb2b01d951855e382d22de78e53","src/unix/redox/mod.rs":"89c31827cf348e9a7af387f9e708fc834d04da36cad415d3957d2faa70f2fcbe","src/unix/solarish/compat.rs":"d62a5d3b5bd6adc998cb9bb817a622ef9ec666235bb237bd0f13f8e6a94de576","src/unix/solarish/illumos.rs":"1088c45b238e7d398dbb140d238257d5b5f93aeded98652c3f6747f0c07b4fa7","src/unix/solarish/mod.rs":"ac1d11b1d51649ca1f156d2554951acc2204622bad1e0823cde24328c5fe60aa","src/unix/solarish/solaris.rs":"6000d322ee9f691f38a2cd89b2b8838e51f64c01584143924962b0c598e0985c","src/unix/uclibc/align.rs":"a8540e1cce5913a45bc8d7422b79e86c0b12740e8a679478e0e4d863a31f8cc1","src/unix/uclibc/arm/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec725195
7315afa53a7b9f936","src/unix/uclibc/arm/mod.rs":"d67dd46bc6f417169fc6a23832bde7ccdafc5d1bcb08b10debdd82edaf75d529","src/unix/uclibc/arm/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/uclibc/mips/mips32/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/uclibc/mips/mips32/mod.rs":"a045ebc6619f540adf670b88a987abd2d6e42e440a552e8cfe9f8c77f397e873","src/unix/uclibc/mips/mips32/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/uclibc/mips/mips64/align.rs":"a7bdcb18a37a2d91e64d5fad83ea3edc78f5412adb28f77ab077dbb26dd08b2d","src/unix/uclibc/mips/mips64/mod.rs":"e3085ba56cfbc528d7c3c55065880603238c333b6047ef51c58177508a487fcd","src/unix/uclibc/mips/mips64/no_align.rs":"4a18e3875698c85229599225ac3401a2a40da87e77b2ad4ef47c6fcd5a24ed30","src/unix/uclibc/mips/mod.rs":"1054d0bfeb506b3346b9a4148564beced8a22da0d9c9a612101f6237756795fb","src/unix/uclibc/mod.rs":"18d6c2628ca458ba75e7
43bce75bda6614de99606af4e2e62daf2440d2878f18","src/unix/uclibc/no_align.rs":"3f28637046524618adaa1012e26cb7ffe94b9396e6b518cccdc69d59f274d709","src/unix/uclibc/x86_64/align.rs":"4e34cebb7955e9c98ae2f310be6f8ed16a861fc3817c08543867554aeec9524e","src/unix/uclibc/x86_64/l4re.rs":"bb31053d6403091e11f95ac2203982f279f8b984a19adf30796878c45fdd8c25","src/unix/uclibc/x86_64/mod.rs":"188fbaf06a8e23cac72718b1ef7eb4bd98bdfd946aa708151f3f7e3553b65876","src/unix/uclibc/x86_64/no_align.rs":"2ccc0107a6007c70dc49e656095b64a352ca5d8f9f3e65c1dba634effbc15636","src/unix/uclibc/x86_64/other.rs":"42c3f71e58cabba373f6a55a623f3c31b85049eb64824c09c2b082b3b2d6a0a8","src/vxworks/aarch64.rs":"98f0afdc511cd02557e506c21fed6737585490a1dce7a9d4941d08c437762b99","src/vxworks/arm.rs":"acb7968ce99fe3f4abdf39d98f8133d21a4fba435b8ef7084777cb181d788e88","src/vxworks/mod.rs":"79077f518d234baf6cb76cb742153d174b3ddd43c6eda9238ebb053e08f9f9c7","src/vxworks/powerpc.rs":"acb7968ce99fe3f4abdf39d98f8133d21a4fba435b8ef7084777cb1
81d788e88","src/vxworks/powerpc64.rs":"98f0afdc511cd02557e506c21fed6737585490a1dce7a9d4941d08c437762b99","src/vxworks/x86.rs":"552f007f38317620b23889cb7c49d1d115841252439060122f52f434fbc6e5ba","src/vxworks/x86_64.rs":"018d92be3ad628a129eff9f2f5dfbc0883d8b8e5f2fa917b900a7f98ed6b514a","src/wasi.rs":"486a00bafb5b6bf0538c4d984dab021835295c431cb2ceb7a9a74b499f78ade6","src/windows/gnu/align.rs":"b2c13ec1b9f3b39a75c452c80c951dff9d0215e31d77e883b4502afb31794647","src/windows/gnu/mod.rs":"c7ab9793baaa3b6854d25fdf44266b7953533009e4fa722ca717b71d3e5d2c9d","src/windows/mod.rs":"053c4d3d99c6a8b2fba4df0f8c7266cdd9fbbaa6bddc50cd6f747bef1ff59da9","src/windows/msvc.rs":"2c2bfce66027d88021e7289139ebf5b0db258a7b6443f18872c84dbd4ef57131","tests/const_fn.rs":"cb75a1f0864f926aebe79118fc34d51a0d1ade2c20a394e7774c7e545f21f1f4","triagebot.toml":"a135e10c777cd13459559bdf74fb704c1379af7c9b0f70bc49fa6f5a837daa81"},"package":"a2f02823cf78b754822df5f7f268fb59822e7296276d3e069d8e8cb26a14bd10"}
+\ No newline at end of file
++{"files":{"CONTRIBUTING.md":"3a9f0037ad5f1198eada74a9d0363925ef09db664380b0e5a2840f03da260476","Cargo.toml":"128aa804901aaf7c386262cfbba894041bf1b109232d69c3e8b6b01df0a67dd1","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"a8d47ff51ca256f56a8932dba07660672dbfe3004257ca8de708aac1415937a1","README.md":"52f1027a072c02e6e9e1f3d9630ec24e4d57507399c6363afcbcceaa106d152b","build.rs":"ab351d7171b14f8032948e843841ebe8518ed95eb1abf0b1e689700c7cef4bf5","rustfmt.toml":"8a654d5787585ca8f2c20580737336fc327f411a07b0dbd4870adf6e9bdf624f","src/cloudabi/aarch64.rs":"b8550bf1fd7344972aa4db29441486f39f31482d0327534981dbb75959c29114","src/cloudabi/arm.rs":"c197e2781c2839808bd6fcef219a29705b27b992d3ef920e9cf6ac96e2022bbf","src/cloudabi/mod.rs":"d5d4488e8c0b8227f516fe13810f550a2a72af3bdfe769200ad8687c8755bdf6","src/cloudabi/x86.rs":"33eb97f272d2201f3838ae74d444583c7de8f67856852ca375293b20bbd05636","src/cloudabi/x86_64.rs":"400d85d4fe39e26cf2e6ece9ee31c75
fe9e88c4bcf4d836ca9f765c05c9c5be3","src/fixed_width_ints.rs":"34c60f12ec5eeb90f13ec3b954427532111c2446e69617616a97aefc1086a9f1","src/fuchsia/aarch64.rs":"378776a9e40766154a54c94c2a7b4675b5c302a38e6e42da99e67bfbaee60e56","src/fuchsia/align.rs":"ae1cf8f011a99737eabeb14ffff768e60f13b13363d7646744dbb0f443dab3d6","src/fuchsia/mod.rs":"61502b3d124759c7c1bae294c1662036a96718fb3bd329cfa2f12e1c61ac10ad","src/fuchsia/no_align.rs":"303f3f1b255e0088b5715094353cf00476131d8e94e6aebb3f469557771c8b8a","src/fuchsia/x86_64.rs":"93a3632b5cf67d2a6bcb7dc0a558605252d5fe689e0f38d8aa2ec5852255ac87","src/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/hermit/mod.rs":"d3bfce41e4463d4be8020a2d063c9bfa8b665f45f1cc6cbf3163f5d01e7cb21f","src/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/lib.rs":"2c276c0b8441855978c1c5f3b19131bf36e51921bc048fcd22a033d33cb6cc54","src/macros.rs":"83aed048c5053300345fca843b148928b91ed444188c479315
ff6bcabaa0c4e9","src/psp.rs":"a93741ac38660e548eb41b58df39da39944e5c04280a7b09e0be758e79942549","src/sgx.rs":"16a95cdefc81c5ee00d8353a60db363c4cc3e0f75abcd5d0144723f2a306ed1b","src/switch.rs":"9da3dd39b3de45a7928789926e8572d00e1e11a39e6f7289a1349aadce90edba","src/unix/align.rs":"2cdc7c826ef7ae61f5171c5ae8c445a743d86f1a7f2d9d7e4ceeec56d6874f65","src/unix/bsd/apple/b32/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b32/mod.rs":"6a4ce300da0d2b0db04b18548286603ffe4b47d679a41cf60f1902895894aa1f","src/unix/bsd/apple/b64/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b64/mod.rs":"81254d89be1febc5bb20e787d014a624950d56e2e14973df5bbebfdabc95ae20","src/unix/bsd/apple/mod.rs":"19c8598b72272cc61d7f6a05b7fec78958ce86b11d0f5a655e1e58da0bc2af44","src/unix/bsd/freebsdlike/dragonfly/errno.rs":"ae5e8e6b0f610ec015dfcc2928609037d7ea7b94570c72bcc5bdd588424c6259","src/unix/bsd/freebsdlike/dragonfly/mod.rs"
:"0e41b6202c7670ce27201095fc1a2826c9e9ccbbc751e97ae1568871ea481a62","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"14f0bd6693967d4fedec904f7042bd51f2138cb843ec4df18c911b357417cdd2","src/unix/bsd/freebsdlike/freebsd/arm.rs":"59d6a670eea562fb87686e243e0a84603d29a2028a3d4b3f99ccc01bd04d2f47","src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs":"9808d152c1196aa647f1b0f0cf84dac8c930da7d7f897a44975545e3d9d17681","src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs":"16dd3e1a09f123d0aa544b3fd7c123654b4906cac94838fbed7f34a64413c930","src/unix/bsd/freebsdlike/freebsd/freebsd12/b64.rs":"61cbe45f8499bedb168106b686d4f8239472f25c7553b069eec2afe197ff2df6","src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs":"c6152ce3db241d99e350d34352f3f3d167953ef0ee08bfbe2685cb9ebde2e83b","src/unix/bsd/freebsdlike/freebsd/mod.rs":"1ed8971b7de3b0435341a9af1366493d0458e4a00507dd824c4c11f4ce2006af","src/unix/bsd/freebsdlike/freebsd/powerpc64.rs":"2dae3ecc87eac3b11657aa98915def55fc4b5c0de11fe26aae23329a54628a9a","src/un
ix/bsd/freebsdlike/freebsd/x86.rs":"c5005e3249eb7c93cfbac72a9e9272320d80ce7983da990ceb05a447f59a02c5","src/unix/bsd/freebsdlike/freebsd/x86_64/align.rs":"0e1f69a88fca1c32874b1daf5db3d446fefbe518dca497f096cc9168c39dde70","src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs":"6132aa0973454379674ea6cbc77e6eace1e1032dd9f38182071388a036f1bc08","src/unix/bsd/freebsdlike/mod.rs":"0046a4083f01ad67511427f1ac37168f31bef3be10c849d304d39f98d61c1267","src/unix/bsd/mod.rs":"4acdbc0148b672fe015ddd7cae952e5d77691df6941a20f8ca40fd996e6a37dd","src/unix/bsd/netbsdlike/mod.rs":"48dd60524119c1e09b255d5472d091e7e7b2b29eab04be51b4b1e740bd022859","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"b38fc046f9a40fea28bd26328b96629f4d5d63d7524936bd6af1865d401a8716","src/unix/bsd/netbsdlike/netbsd/arm.rs":"58cdbb70b0d6f536551f0f3bb3725d2d75c4690db12c26c034e7d6ec4a924452","src/unix/bsd/netbsdlike/netbsd/mod.rs":"16a9036b6a8b373cdf0576ae99c95430f3f111b6be906a1e1ecff8047e178a86","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"e
e7ff5d89d0ed22f531237b5059aa669df93a3b5c489fa641465ace8d405bf41","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"9489f4b3e4566f43bb12dfb92238960613dac7f6a45cc13068a8d152b902d7d9","src/unix/bsd/netbsdlike/netbsd/x86.rs":"20692320e36bfe028d1a34d16fe12ca77aa909cb02bda167376f98f1a09aefe7","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"135509edeaf3fb3f102d89d51ff1a8f82323497336a8dc7e1f0f23b5c2434b73","src/unix/bsd/netbsdlike/openbsd/aarch64.rs":"1dd5449dd1fd3d51e30ffdeeaece91d0aaf05c710e0ac699fecc5461cfa2c28e","src/unix/bsd/netbsdlike/openbsd/mod.rs":"a2938e72d1c6e3f32fb51e896b63abd0d79e1e360dc53f9254fdac82b21206b9","src/unix/bsd/netbsdlike/openbsd/sparc64.rs":"d04fd287afbaa2c5df9d48c94e8374a532a3ba491b424ddf018270c7312f4085","src/unix/bsd/netbsdlike/openbsd/x86.rs":"6f7f5c4fde2a2259eb547890cbd86570cea04ef85347d7569e94e679448bec87","src/unix/bsd/netbsdlike/openbsd/x86_64.rs":"e59b7fd65f68f8e857eec39e0c03bac1d3af6ddc26c9ba58494336b83659bb9b","src/unix/haiku/b32.rs":"69ae47fc52c6880e85416b474450
0d5655c9ec6131cb737f3b649fceaadce15a","src/unix/haiku/b64.rs":"73e64db09275a8da8d50a13cce2cfa2b136036ddf3a930d2939f337fc995900b","src/unix/haiku/mod.rs":"29863051c296eeb22e7f00a266d6632b6a886b9a791f128e3c554e96213c3a16","src/unix/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/unix/hermit/mod.rs":"fb7e14d0f46ffaa989b5ab68c85184efe6aa04b5381e46866299b1f3258ddce3","src/unix/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/unix/linux_like/android/b32/arm.rs":"155994121906903a2e0afad895f0b3b7546f6e54d6305a3336ce2c4dfafbfdfa","src/unix/linux_like/android/b32/mod.rs":"0325adf3364fed7157fff5b24fabe1b36d806c39ee04ec82dd29a606d28f91f6","src/unix/linux_like/android/b32/x86/align.rs":"812914e4241df82e32b12375ca3374615dc3a4bdd4cf31f0423c5815320c0dab","src/unix/linux_like/android/b32/x86/mod.rs":"5b1e9fcd77ca5f939acb7fb5f5da12f305b0377698d8b8989feb236e26360aa0","src/unix/linux_like/android/b64/aarch64/align.rs":"
2179c3b1608fa4bf68840482bfc2b2fa3ee2faf6fcae3770f9e505cddca35c7b","src/unix/linux_like/android/b64/aarch64/mod.rs":"655116966eb7846b933e5e28b073c329668588cd3c2120cc9ce60c697bd19978","src/unix/linux_like/android/b64/mod.rs":"6a71abfcbbcdae60c916de41cd4688d5f25bdbca83d1d9df49decd56ad726a06","src/unix/linux_like/android/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/android/b64/x86_64/mod.rs":"e84176d838e663d351450bad218715db1fafbb531e47ea0e262cbb45829dae89","src/unix/linux_like/android/mod.rs":"d414f682fd0d138d440300dc53c6b8b069730e19230dabd4c01173c4578c42b5","src/unix/linux_like/emscripten/align.rs":"86c95cbed7a7161b1f23ee06843e7b0e2340ad92b2cb86fe2a8ef3e0e8c36216","src/unix/linux_like/emscripten/mod.rs":"55fb89f5a965a4ad81ee4d02498c32aaed69e6047ce708c2329a602171862a76","src/unix/linux_like/emscripten/no_align.rs":"0128e4aa721a9902754828b61b5ec7d8a86619983ed1e0544a85d35b1051fad6","src/unix/linux_like/linux/align.rs":"dde64
8468764a5deef5566b8016290150acf50ee6a0f8c0678cb2078658bc2fa","src/unix/linux_like/linux/gnu/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/gnu/b32/arm/align.rs":"3fed009dc9af3cc81be7087da9d2d7d1f39845e4497e290259c5cdbae25f039d","src/unix/linux_like/linux/gnu/b32/arm/mod.rs":"6d9ba242111c7be8173b7a7b8cf8c863ba23d839edc9d026c0fd37a4b64460b4","src/unix/linux_like/linux/gnu/b32/mips/align.rs":"429fb5e005cb7143602d430098b6ebfb7d360685b194f333dfd587472ae954ee","src/unix/linux_like/linux/gnu/b32/mips/mod.rs":"e2d2e51fea73210d9705b7eaa37de8baa7152b71ae3a10a316c277345c529b5c","src/unix/linux_like/linux/gnu/b32/mod.rs":"e224551fa50be726bc8a559da32a96294b18743fb5a5b67cdbee4bb6a9eeb796","src/unix/linux_like/linux/gnu/b32/powerpc.rs":"39aae80d2c4ffa845592e16c0a6c910017de19e2b15c1e507c4df10e79ce3e38","src/unix/linux_like/linux/gnu/b32/sparc/align.rs":"21adbed27df73e2d1ed934aaf733a643003d7baf2bde9c48ea440895bcca6d41","src/unix/linux_like/lin
ux/gnu/b32/sparc/mod.rs":"3b4dd40b288788740d2b030171b21f9d0b076ce26d88e0ff62f5d87f09e7c787","src/unix/linux_like/linux/gnu/b32/x86/align.rs":"e4bafdc4a519a7922a81b37a62bbfd1177a2f620890eef8f1fbc47162e9eb413","src/unix/linux_like/linux/gnu/b32/x86/mod.rs":"927d1bd8cb2f053549fc5acfeb1315b7f80b35d7a1904cd76e99651ff32b141e","src/unix/linux_like/linux/gnu/b64/aarch64/align.rs":"2179c3b1608fa4bf68840482bfc2b2fa3ee2faf6fcae3770f9e505cddca35c7b","src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs":"17e9cd23a14bd19700c05a154568fff5897788c0ae151c21dd3bba67aac829d9","src/unix/linux_like/linux/gnu/b64/mips64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/gnu/b64/mips64/mod.rs":"0b5d94f3a2361742b6dd9eb3f543ddf675d3f70dab3402ad179faa6ddaae2218","src/unix/linux_like/linux/gnu/b64/mod.rs":"b90d87f76bff37707a1725551fe45d70d0c106e01b1dbbcd5f60460e0a19b4c3","src/unix/linux_like/linux/gnu/b64/powerpc64/align.rs":"e29c4868bbecfa4a6cd8a2ad06193f3bbc7
8a468cc1dc9df83f002f1268130d9","src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs":"2f279eb268c0aca9a6bd9b4c84139799cd039a64ca1cd2ded68b04c63397be1b","src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs":"bb01828300f02c11c27689522454439d0d02f22d738df88a97367dc87eecf868","src/unix/linux_like/linux/gnu/b64/s390x.rs":"9c449b64b11cbf55d453b324cf9475acb3253f85cb9692f9873b777ed8978ff4","src/unix/linux_like/linux/gnu/b64/sparc64/align.rs":"e29c4868bbecfa4a6cd8a2ad06193f3bbc78a468cc1dc9df83f002f1268130d9","src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs":"a2667a09e526878683fafa02474f81fbc212d861ceeabade17b0ff4d6d49ff9d","src/unix/linux_like/linux/gnu/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs":"e6197537739cb8628cad25827081c8bf6b371c02ad4b2132b30b9ae74143b1ef","src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs":"c1862036556262f076eda2008470b8a351b9c371d70664f54387c46890e8cd18","src/unix/linux_like/
linux/gnu/b64/x86_64/x32.rs":"30f88d0fa9e7807ee4cbe89fd274061f810099567d5e68fa829277d7d27ba708","src/unix/linux_like/linux/gnu/mod.rs":"c7924db757cf898c78029ad3772e6168ec99dd0dd1534df4132f8fe9717afed7","src/unix/linux_like/linux/gnu/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/mod.rs":"3dc8b1980062117edd7bdfdf2279065737f8cdcdcb883f57f23f27a1d0bbb8b2","src/unix/linux_like/linux/musl/b32/arm/align.rs":"3e8ac052c1043764776b54c93ba4260e061df998631737a897d9d47d54f7b80c","src/unix/linux_like/linux/musl/b32/arm/mod.rs":"45062a178b382ab17341a69d027b5c83325c4e79fecf45729ba9c47b1bcdc3da","src/unix/linux_like/linux/musl/b32/hexagon.rs":"7c6c481f70da1fe6ca759f363784e130041f3d87906c45910fc1142b5ef17970","src/unix/linux_like/linux/musl/b32/mips/align.rs":"429fb5e005cb7143602d430098b6ebfb7d360685b194f333dfd587472ae954ee","src/unix/linux_like/linux/musl/b32/mips/mod.rs":"9eb0e4953be5afaa0b9e3ac54c85ed40583cfb8cc0b03264b9bc8f763a8f3254","
src/unix/linux_like/linux/musl/b32/mod.rs":"8ede3985e6243882814ce91e8ce543e7edbafc0cee5932816072b6f14207a671","src/unix/linux_like/linux/musl/b32/powerpc.rs":"cf286cbf4d2076aaa82662ace2b5c333480410fa59af5cb4542d59f04da84b31","src/unix/linux_like/linux/musl/b32/x86/align.rs":"08e77fbd7435d7dec2ff56932433bece3f02e47ce810f89004a275a86d39cbe1","src/unix/linux_like/linux/musl/b32/x86/mod.rs":"9c3b6e98e7710d6c877a4e31726d36416115a58f53fc469bb173b7fe660b39e5","src/unix/linux_like/linux/musl/b64/aarch64/align.rs":"0bf138f84e5327d8339bcd4adf071a6832b516445e597552c82bbd881095e3a8","src/unix/linux_like/linux/musl/b64/aarch64/mod.rs":"7b3fb85a869e00aae3f6af9c36f82f9c70bf8c2b9cccbd931b923602846ea42c","src/unix/linux_like/linux/musl/b64/mips64.rs":"9d0158ac7a913222d0a62239ec043aa1aee73522a7a1e0e191d0642dde35c083","src/unix/linux_like/linux/musl/b64/mod.rs":"8b76e92a1505ad785d4aa0b7739e0b93647a1e81910949b49cedb6c88468be9c","src/unix/linux_like/linux/musl/b64/powerpc64.rs":"ed9b879bb9cdc526ad838158
75edeb4cad4e8829086dfba2578277c265336229","src/unix/linux_like/linux/musl/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/musl/b64/x86_64/mod.rs":"cfeb109c732ac6bc7d2be44069d3652e917a0509b8b545270b756ff2d52e27e8","src/unix/linux_like/linux/musl/mod.rs":"243e32b93641df7a77f970a32c0fb8e4fd4a13720e54e0e42a9da321fd169798","src/unix/linux_like/linux/no_align.rs":"c81ccd1942295d423b43a55b4aa19633c2096fb93bb381a6a29acb93e85aab07","src/unix/linux_like/mod.rs":"e2d60b008a30f2d866be2da6372fe8390e246572d8344447615155f642016882","src/unix/mod.rs":"c34d511e9bdf7504d4c30d6b60c7364085b3fc6feeacfac2ee92267d3c42fd21","src/unix/newlib/aarch64/mod.rs":"bb269c1468a9676442554600e87417079a787fe6220dfc23b3109639259e8710","src/unix/newlib/align.rs":"28aaf87fafbc6b312622719d472d8cf65f9e5467d15339df5f73e66d8502b28a","src/unix/newlib/arm/mod.rs":"c71be856bfd7f576b2db28af9f680211cbe6c1cac7d537bbc8020b39591af07c","src/unix/newlib/mod.rs":"8ab989
db6b21fee81a694c9f9f89014f8e78870d0541368527483c90f07542a7","src/unix/newlib/no_align.rs":"7123dcec13604a11b7765c380ff3a4d0da19c39f4b03919de7857723c0cf1502","src/unix/newlib/xtensa/mod.rs":"4c72003c5e692e648c7e798358c49af6901e68850dbba0624af84c40baf208f5","src/unix/no_align.rs":"c06e95373b9088266e0b14bba0954eef95f93fb2b01d951855e382d22de78e53","src/unix/redox/mod.rs":"89c31827cf348e9a7af387f9e708fc834d04da36cad415d3957d2faa70f2fcbe","src/unix/solarish/compat.rs":"d62a5d3b5bd6adc998cb9bb817a622ef9ec666235bb237bd0f13f8e6a94de576","src/unix/solarish/illumos.rs":"1088c45b238e7d398dbb140d238257d5b5f93aeded98652c3f6747f0c07b4fa7","src/unix/solarish/mod.rs":"ac1d11b1d51649ca1f156d2554951acc2204622bad1e0823cde24328c5fe60aa","src/unix/solarish/solaris.rs":"6000d322ee9f691f38a2cd89b2b8838e51f64c01584143924962b0c598e0985c","src/unix/uclibc/align.rs":"a8540e1cce5913a45bc8d7422b79e86c0b12740e8a679478e0e4d863a31f8cc1","src/unix/uclibc/arm/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec725195
7315afa53a7b9f936","src/unix/uclibc/arm/mod.rs":"d67dd46bc6f417169fc6a23832bde7ccdafc5d1bcb08b10debdd82edaf75d529","src/unix/uclibc/arm/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/uclibc/mips/mips32/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/uclibc/mips/mips32/mod.rs":"a045ebc6619f540adf670b88a987abd2d6e42e440a552e8cfe9f8c77f397e873","src/unix/uclibc/mips/mips32/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/uclibc/mips/mips64/align.rs":"a7bdcb18a37a2d91e64d5fad83ea3edc78f5412adb28f77ab077dbb26dd08b2d","src/unix/uclibc/mips/mips64/mod.rs":"e3085ba56cfbc528d7c3c55065880603238c333b6047ef51c58177508a487fcd","src/unix/uclibc/mips/mips64/no_align.rs":"4a18e3875698c85229599225ac3401a2a40da87e77b2ad4ef47c6fcd5a24ed30","src/unix/uclibc/mips/mod.rs":"1054d0bfeb506b3346b9a4148564beced8a22da0d9c9a612101f6237756795fb","src/unix/uclibc/mod.rs":"18d6c2628ca458ba75e7
43bce75bda6614de99606af4e2e62daf2440d2878f18","src/unix/uclibc/no_align.rs":"3f28637046524618adaa1012e26cb7ffe94b9396e6b518cccdc69d59f274d709","src/unix/uclibc/x86_64/align.rs":"4e34cebb7955e9c98ae2f310be6f8ed16a861fc3817c08543867554aeec9524e","src/unix/uclibc/x86_64/l4re.rs":"bb31053d6403091e11f95ac2203982f279f8b984a19adf30796878c45fdd8c25","src/unix/uclibc/x86_64/mod.rs":"188fbaf06a8e23cac72718b1ef7eb4bd98bdfd946aa708151f3f7e3553b65876","src/unix/uclibc/x86_64/no_align.rs":"2ccc0107a6007c70dc49e656095b64a352ca5d8f9f3e65c1dba634effbc15636","src/unix/uclibc/x86_64/other.rs":"42c3f71e58cabba373f6a55a623f3c31b85049eb64824c09c2b082b3b2d6a0a8","src/vxworks/aarch64.rs":"98f0afdc511cd02557e506c21fed6737585490a1dce7a9d4941d08c437762b99","src/vxworks/arm.rs":"acb7968ce99fe3f4abdf39d98f8133d21a4fba435b8ef7084777cb181d788e88","src/vxworks/mod.rs":"79077f518d234baf6cb76cb742153d174b3ddd43c6eda9238ebb053e08f9f9c7","src/vxworks/powerpc.rs":"acb7968ce99fe3f4abdf39d98f8133d21a4fba435b8ef7084777cb1
81d788e88","src/vxworks/powerpc64.rs":"98f0afdc511cd02557e506c21fed6737585490a1dce7a9d4941d08c437762b99","src/vxworks/x86.rs":"552f007f38317620b23889cb7c49d1d115841252439060122f52f434fbc6e5ba","src/vxworks/x86_64.rs":"018d92be3ad628a129eff9f2f5dfbc0883d8b8e5f2fa917b900a7f98ed6b514a","src/wasi.rs":"486a00bafb5b6bf0538c4d984dab021835295c431cb2ceb7a9a74b499f78ade6","src/windows/gnu/align.rs":"b2c13ec1b9f3b39a75c452c80c951dff9d0215e31d77e883b4502afb31794647","src/windows/gnu/mod.rs":"c7ab9793baaa3b6854d25fdf44266b7953533009e4fa722ca717b71d3e5d2c9d","src/windows/mod.rs":"053c4d3d99c6a8b2fba4df0f8c7266cdd9fbbaa6bddc50cd6f747bef1ff59da9","src/windows/msvc.rs":"2c2bfce66027d88021e7289139ebf5b0db258a7b6443f18872c84dbd4ef57131","tests/const_fn.rs":"cb75a1f0864f926aebe79118fc34d51a0d1ade2c20a394e7774c7e545f21f1f4","triagebot.toml":"a135e10c777cd13459559bdf74fb704c1379af7c9b0f70bc49fa6f5a837daa81"},"package":"a2f02823cf78b754822df5f7f268fb59822e7296276d3e069d8e8cb26a14bd10"}
+\ No newline at end of file
diff --git a/dev-lang/rust/files/0030-liblibc-linkage.patch b/dev-lang/rust/files/0030-liblibc-linkage.patch
deleted file mode 100644
index 6863209..0000000
--- a/dev-lang/rust/files/0030-liblibc-linkage.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- rustc-1.34.2-src/vendor/libc/src/lib.rs
-+++ rustc-1.34.2-src/vendor/libc/src/lib.rs
-@@ -153,6 +153,7 @@
- #![cfg_attr(feature = "rustc-dep-of-std", feature(cfg_target_vendor))]
- #![cfg_attr(feature = "rustc-dep-of-std", feature(link_cfg, repr_packed))]
- #![cfg_attr(feature = "rustc-dep-of-std", feature(no_core))]
-+#![cfg_attr(feature = "rustc-dep-of-std", feature(static_nobundle))]
- #![cfg_attr(feature = "rustc-dep-of-std", no_core)]
- #![cfg_attr(feature = "rustc-dep-of-std", allow(warnings))]
- #![cfg_attr(not(any(feature = "use_std", feature = "rustc-dep-of-std")), no_std)]
---- rustc-1.34.2-src/vendor/libc/src/unix/mod.rs
-+++ rustc-1.34.2-src/vendor/libc/src/unix/mod.rs
-@@ -287,11 +287,11 @@ cfg_if! {
- // cargo build, don't pull in anything extra as the libstd dep
- // already pulls in all libs.
- } else if #[cfg(target_env = "musl")] {
-+ #[link(name = "c")]
-+ extern {}
- #[cfg_attr(feature = "rustc-dep-of-std",
-- link(name = "c", kind = "static",
-+ link(name = "gcc", kind = "static-nobundle",
- cfg(target_feature = "crt-static")))]
-- #[cfg_attr(feature = "rustc-dep-of-std",
-- link(name = "c", cfg(not(target_feature = "crt-static"))))]
- extern {}
- } else if #[cfg(target_os = "emscripten")] {
- #[link(name = "c")]
---- rustc-1.34.2-src/vendor/libc/.cargo-checksum.json
-+++ rustc-1.34.2-src/vendor/libc/.cargo-checksum.json
-@@ -1 +1 @@
--{"files":{"Cargo.toml":"e1bbf88a55a1ba674f5192fe1585b57a51751ee6c5aa7edeb87df8027c3bb912","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"40ddea9181e5374cf535aae33ad4ace80bd9b1beea8f881ff8d2b777da9489b2","build.rs":"2d1cbe87e0478de12a15a230d7ef0997020ba845b5b7d221d74cd2ce3fe0e720","src/cloudabi/aarch64.rs":"b8550bf1fd7344972aa4db29441486f39f31482d0327534981dbb75959c29114","src/cloudabi/arm.rs":"c197e2781c2839808bd6fcef219a29705b27b992d3ef920e9cf6ac96e2022bbf","src/cloudabi/mod.rs":"640375751825b8d4adf4fb089a53c4d883f265f96b07daf06f2dcf3acf6639c9","src/cloudabi/x86.rs":"33eb97f272d2201f3838ae74d444583c7de8f67856852ca375293b20bbd05636","src/cloudabi/x86_64.rs":"400d85d4fe39e26cf2e6ece9ee31c75fe9e88c4bcf4d836ca9f765c05c9c5be3","src/dox.rs":"b4b96dcba47797a6160c07f29982dd15d48fd2813d7d1000484bd9adc4a89de1","src/fuchsia/aarch64.rs":"40dce617877e606e92353491e1
913711b1ecfa510bb983156f4a8460f490419e","src/fuchsia/mod.rs":"784dee21605f00a41d7cae1fc3d782646a84515a687a4952700eae51cc3840f0","src/fuchsia/x86_64.rs":"b4a3eff94dcf1ffe41e6500468ca2cff0e97ddbcc75fe079b6ac7adb1e493f56","src/lib.rs":"d456d34fc58c8d194f8f24201b4021860f61c5f125904bb8dcc954d1f813f6b7","src/macros.rs":"29d61c13523328c4742a7290dbb7d718ce198740824592e029199e9df5429b20","src/redox/mod.rs":"87cb35a988be84d45e79206f7cb5d098e8e7c5a1825cfcd0bd663453dedc3103","src/redox/net.rs":"f2e1922883f208cb46c00744da4a68feccfbec576c6981978ad404e46f818c8b","src/sgx.rs":"18d33a470d06c15b00be5a3bf45b6e51da6104ae7437f50c0eccbd3b79994389","src/switch.rs":"00365ed196519b260fc99a32f02d60b3fb1aaf0484654b19fec8c25bc1687420","src/unix/bsd/apple/b32.rs":"da60c99ee3d773f9c0767b93ccf18b67ad67576e2c58e2e86d05b23c23fd989a","src/unix/bsd/apple/b64.rs":"0cc15406c3a91abde65b28c7783ccab7801474ecc51c78dbd1d7332d4b834390","src/unix/bsd/apple/mod.rs":"b0e2d1f7fdb71d7a02bc5994c66a5ae660955227a0c0f808172a30b38fd40
299","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"6c69319675328d4d16939c9c2aba3fb8ca9381a8b390d18d766949307090304b","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"97132e2097411034271b8c927ecc94a208a361564680972a6c82998bd30a9826","src/unix/bsd/freebsdlike/freebsd/mod.rs":"6bbb3c3cf0753f32a2e61ac0f011a6c5e870a0814a6ed4eb9bb9dcdc58a9dca3","src/unix/bsd/freebsdlike/freebsd/x86.rs":"54311d3ebf2bb091ab22361e377e6ef9224aec2ecfe459fbfcedde4932db9c58","src/unix/bsd/freebsdlike/freebsd/x86_64.rs":"97132e2097411034271b8c927ecc94a208a361564680972a6c82998bd30a9826","src/unix/bsd/freebsdlike/mod.rs":"596def64669e2f27cffebca8e5c682ee7d576f84f8f99771c27e86ce8e818221","src/unix/bsd/mod.rs":"0c846b3a2c9390dfe090603f1ad643b107cc7e7605866c5399aa81dfea4e74bd","src/unix/bsd/netbsdlike/mod.rs":"9f55f35f8e4e26c7c63eaf67ddda0e40cc2abbabc2a68750809162e6f80144f1","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"f455848cd03cb80897776f2355dbd14bbb3aa88b1aa6aec22122ec47cdbd0f20","src/unix/bsd/netbsdlike/netbsd/arm.r
s":"4c9eac982c385165f475ef3a80770fd634c6dde8fb400b3cb7e08c9bb7498af6","src/unix/bsd/netbsdlike/netbsd/mod.rs":"88617ada3bc740c5262926b9c45d7f51120d358522f051f0afdf7465edd13c29","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"183818c62dff72db6ee1d329d90ad8727628775ed5cd823c8485c6769003c91e","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"4db043327fb2615af2fb0f999d162310bea2294e7d050806e19a46b083561f16","src/unix/bsd/netbsdlike/netbsd/x86.rs":"979c4cbacbde37b9053f2c9df4b8f87d37b255436ef4a383e1e5f40ee21180d6","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"741353a1c6451efb0c7c7c486fd2cb54e3d36fd1c3dd280f6432d8858b0a5356","src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs":"4d2ad2e885d83ad3134add61580f49a8e58cb03284ae328273a9e2e104a4d084","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs":"6e6f15e81597d85d83ca0eeb154e4f8b8e7f9cbb6a9cfa176601f78642ef94f9","src/unix/bsd/netbsdl
ike/openbsdlike/mod.rs":"6320b7bc7283dbc2a07cfb8b5a793c0153535601d050f33c1ff5e4a5cc57c2be","src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs":"820092e397c7ec259cd2de8f2444083a8e57071c02d73d678701dfa7807726e9","src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs":"6adc0dcb1b358ef91bbeb5512e19ba6f40adc77b7d259cb11641a69426fc5ea2","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs":"44b7ea81cf363777b29935da175e702cbf45ed78f7498ae57faf44aa32335085","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs":"97956c3a53aa07a2edf8865252f980dade0d34e930adca0e870e7344d7e2b0bb","src/unix/haiku/b32.rs":"69ae47fc52c6880e85416b4744500d5655c9ec6131cb737f3b649fceaadce15a","src/unix/haiku/b64.rs":"73e64db09275a8da8d50a13cce2cfa2b136036ddf3a930d2939f337fc995900b","src/unix/haiku/mod.rs":"b00fa310b6d835cb613a02101c7b1a72c636faec316586587cb63aebdcb9de8f","src/unix/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/unix/hermit/mod.rs":"248c0b0abaa7d56a7dc3293e
67a0ce70a4ef8c83638bda8aa222ad8bb0ef6801","src/unix/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/unix/mod.rs":"c5f3c6d74ac8e8ef83374b6115bab7c6e57297336a7635aa4c47462649b00dfb","src/unix/newlib/aarch64/mod.rs":"c408a990f22fb4292a824f38367e9b517e6e6f8623328397ee631cc88b3d1f7d","src/unix/newlib/arm/mod.rs":"2b6dba2e697ab9b4f4bc4dd5f28057249e9b596d1cb395a9322ec87605c4a5c4","src/unix/newlib/mod.rs":"eea5f1eb720184d9a00be966e4161fddb3733362fc349182e85b1599ba4e825f","src/unix/notbsd/android/b32/arm.rs":"3625a32c7e58cfe683a53486fbe3d42d4e28f00bea31e19cb46ed2bb0b6a140b","src/unix/notbsd/android/b32/mod.rs":"2fbe398c1fb5251dda6213741a193e50aae4622807cb255d1dd2e82b536f0c65","src/unix/notbsd/android/b32/x86.rs":"ae2b7f1d6278caddc007749bb1d09ca33f7593478a0fd7fe98b457dae86c7814","src/unix/notbsd/android/b64/aarch64.rs":"63d65629d79371814910f691672ef593d20244ee09be26f1ebe07ee6212d0163","src/unix/notbsd/android/b64/mod.rs":"90d4f6b063fd4de42fd302cbc9d99
02fd99ac1d71dc48cb8bc6ad7b4c902e481","src/unix/notbsd/android/b64/x86_64.rs":"5547aef8dcbaa5a932559f34606fd8d89f6c9c15173d2b1412c12d39b3c1045f","src/unix/notbsd/android/mod.rs":"19013f41ac8ccac034eb48777a4041d69342edb9ca25d4e0bb9c5938f62eef3e","src/unix/notbsd/emscripten.rs":"9ed47a0a5020c8f72d9496f87ef0da669c1ed2b85980013100c466f18cd8a4c5","src/unix/notbsd/linux/mips/mips32.rs":"a483ddfd10765b7d5090dc21686eee8842649cd21236828a42d634114885f5f9","src/unix/notbsd/linux/mips/mips64.rs":"9fff696e3943cf206b549d1ae13fa361828e9a8454e2d5730eeaa1c172ff370d","src/unix/notbsd/linux/mips/mod.rs":"d18a40011e9090a4a2a1f27e5bd96eb2503ac352f4809648e15841083d7f3a68","src/unix/notbsd/linux/mod.rs":"d84e95d36f9477fa1aa694bf18a919ba20e65aa71539c3f3dc06e8f92acee521","src/unix/notbsd/linux/musl/b32/arm.rs":"fdf170e03812072785ec531f1ae810d0c4feb9b29d0c316681b9f7affe1262c0","src/unix/notbsd/linux/musl/b32/mips.rs":"afa4981d93f29b3fb0083a73ce1323f7dce1392f90d5cf1966b1fae10d510033","src/unix/notbsd/linux/mus
l/b32/mod.rs":"540928f168f145c136f9dd729ffa12b9d1838d9fe664fc642365d17d7fae648f","src/unix/notbsd/linux/musl/b32/powerpc.rs":"16c615770a96f155540511f58b5a8070c9c7a43e12bdfed83996690e7558bcb5","src/unix/notbsd/linux/musl/b32/x86.rs":"3abf1610c68c37f407cdd0f93563c3542c024219e0e8c9888266a6ee014e0c87","src/unix/notbsd/linux/musl/b64/aarch64.rs":"d98643408c2837387988f78adc95c90ad21196a6f8f879e3d33d7e8ccf612640","src/unix/notbsd/linux/musl/b64/mod.rs":"d9285cd705e2e92552a08c9aa69b810e7e1bd0e9da6edf069c678af285579661","src/unix/notbsd/linux/musl/b64/powerpc64.rs":"544d8a7f6d6d84143df8a4c3537c9a3a36bf3d338d7a1c15689b94492498d8d7","src/unix/notbsd/linux/musl/b64/x86_64.rs":"25340999290a63d564ec149532c905f59c312ec369f8806d6b15df66fa1b8857","src/unix/notbsd/linux/musl/mod.rs":"4e582af62a11e8a5235ccbeabe5b1003fc17705e606c1ed9b21b931a470681fc","src/unix/notbsd/linux/other/b32/arm.rs":"d9892f7350b2978335f734f1cd2d7fed60f0f2e66aa05bee3f69549c031f8b14","src/unix/notbsd/linux/other/b32/mod.rs":"2621
1878c6481861e11393625620edaa0700cac41f55f0118c0f0bd42c1b7520","src/unix/notbsd/linux/other/b32/powerpc.rs":"253fcd2f9978525285be1903cc08f3fec2dc3b12d1660a33e2995b4f6b810d1c","src/unix/notbsd/linux/other/b32/x86.rs":"49376e3ed0f3ff95c230ac20751911fe3c608dfe15c7c118b069fd7a954d8db9","src/unix/notbsd/linux/other/b64/aarch64.rs":"1124ab5e974718b94fa40ae0f1772fb1c537910ef3e018b7c6c94a38b83dd742","src/unix/notbsd/linux/other/b64/mod.rs":"63e1a3fdf5f4d1b9820934ab344c91aed5e458e7e05908535d2e942d51a08bf8","src/unix/notbsd/linux/other/b64/not_x32.rs":"fa8636fb93eab230ed53bdec0a06f5b81d6d982cc0800103563c8c1eefcdb2d9","src/unix/notbsd/linux/other/b64/powerpc64.rs":"a771d982ed8a9458e1f2f039f959b5075b22443159875ba5612eebba96661c24","src/unix/notbsd/linux/other/b64/sparc64.rs":"0caffe5924886f3aed187531dfe78189b3df40adb96782ec4b471647ff83e9b1","src/unix/notbsd/linux/other/b64/x32.rs":"06a26c5120ced30fc015c220799b67c4401be2f13fc6c7361bebd3d37ff4982d","src/unix/notbsd/linux/other/b64/x86_64.rs":"70d0
cec088630502128c1c28ffef9dcc0fd9c0644f6a71b1325961d075625226","src/unix/notbsd/linux/other/mod.rs":"fe76beac87fc549b076078a0fa3e2ecd4c13b0e6e4fcb34a89e16c6584f5259b","src/unix/notbsd/linux/s390x.rs":"9e990574dfc22b6eb91bcc7c6f8297f9ad42f9183efb366a818be88180a3fac3","src/unix/notbsd/mod.rs":"a0fdecac118b70fb670f0fcccaa7f826440873448a96dd557fb1fe52cf391e89","src/unix/solaris/mod.rs":"7950a26f3eb0b7bc8e71f524cc2e05832b759fe2ce12a58e0c1957e0ec1286dc","src/unix/uclibc/mips/mips32.rs":"9739c5fb47f389a0394ef08ee30da97a3de0a1300020731a8cc0a033616011b2","src/unix/uclibc/mips/mips64.rs":"230583280bbc7b3c7fcdb61244f51fa1af5944ca127c7cf83c598fe2313713d0","src/unix/uclibc/mips/mod.rs":"2d76e6cfeb2b7f7c59231a6e099f1aed811a45659e62153aaf00c220b9488a9d","src/unix/uclibc/mod.rs":"521818507cef958376edfd8401c35db7ee1c51ee3cf106ad962002104a184cf5","src/unix/uclibc/x86_64/l4re.rs":"68fd3a833fd1f7caf784a084224f384bdbdfb8b5a14ef94c4f5155409afb3439","src/unix/uclibc/x86_64/mod.rs":"419182836aedd426a5c9e6b8
667058adf86ac8f43af73ce8d00c503f8ff8f414","src/unix/uclibc/x86_64/other.rs":"f03b47842896f2f3ae6f8ebdcbcf0276454f880349d9cf00e3d304f8136893c5","src/windows/gnu.rs":"4d9033162cc6f7d245256c7b165c1ec18a741771fd9b99a55b421e8d14978599","src/windows/mod.rs":"7d74b12f71de86ee517a9cd93b1b38d0551646db0eaf526048abcbdd4bbeb250","src/windows/msvc.rs":"8f46cf66883c794175609a3b2bafaa094d0ba63eb6720ef1b84b175603f1074f"},"package":"023a4cd09b2ff695f9734c1934145a315594b7986398496841c7031a5a1bbdbd"}
-\ No newline at end of file
-+{"files":{"Cargo.toml":"e1bbf88a55a1ba674f5192fe1585b57a51751ee6c5aa7edeb87df8027c3bb912","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"40ddea9181e5374cf535aae33ad4ace80bd9b1beea8f881ff8d2b777da9489b2","build.rs":"2d1cbe87e0478de12a15a230d7ef0997020ba845b5b7d221d74cd2ce3fe0e720","src/cloudabi/aarch64.rs":"b8550bf1fd7344972aa4db29441486f39f31482d0327534981dbb75959c29114","src/cloudabi/arm.rs":"c197e2781c2839808bd6fcef219a29705b27b992d3ef920e9cf6ac96e2022bbf","src/cloudabi/mod.rs":"640375751825b8d4adf4fb089a53c4d883f265f96b07daf06f2dcf3acf6639c9","src/cloudabi/x86.rs":"33eb97f272d2201f3838ae74d444583c7de8f67856852ca375293b20bbd05636","src/cloudabi/x86_64.rs":"400d85d4fe39e26cf2e6ece9ee31c75fe9e88c4bcf4d836ca9f765c05c9c5be3","src/dox.rs":"b4b96dcba47797a6160c07f29982dd15d48fd2813d7d1000484bd9adc4a89de1","src/fuchsia/aarch64.rs":"40dce617877e606e92353491e1
913711b1ecfa510bb983156f4a8460f490419e","src/fuchsia/mod.rs":"784dee21605f00a41d7cae1fc3d782646a84515a687a4952700eae51cc3840f0","src/fuchsia/x86_64.rs":"b4a3eff94dcf1ffe41e6500468ca2cff0e97ddbcc75fe079b6ac7adb1e493f56","src/lib.rs":"69850cc2630e101768e05f78b35a0ee29875c519eb4817d5bd2c1d542fae8c1d","src/macros.rs":"29d61c13523328c4742a7290dbb7d718ce198740824592e029199e9df5429b20","src/redox/mod.rs":"87cb35a988be84d45e79206f7cb5d098e8e7c5a1825cfcd0bd663453dedc3103","src/redox/net.rs":"f2e1922883f208cb46c00744da4a68feccfbec576c6981978ad404e46f818c8b","src/sgx.rs":"18d33a470d06c15b00be5a3bf45b6e51da6104ae7437f50c0eccbd3b79994389","src/switch.rs":"00365ed196519b260fc99a32f02d60b3fb1aaf0484654b19fec8c25bc1687420","src/unix/bsd/apple/b32.rs":"da60c99ee3d773f9c0767b93ccf18b67ad67576e2c58e2e86d05b23c23fd989a","src/unix/bsd/apple/b64.rs":"0cc15406c3a91abde65b28c7783ccab7801474ecc51c78dbd1d7332d4b834390","src/unix/bsd/apple/mod.rs":"b0e2d1f7fdb71d7a02bc5994c66a5ae660955227a0c0f808172a30b38fd40
299","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"6c69319675328d4d16939c9c2aba3fb8ca9381a8b390d18d766949307090304b","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"97132e2097411034271b8c927ecc94a208a361564680972a6c82998bd30a9826","src/unix/bsd/freebsdlike/freebsd/mod.rs":"6bbb3c3cf0753f32a2e61ac0f011a6c5e870a0814a6ed4eb9bb9dcdc58a9dca3","src/unix/bsd/freebsdlike/freebsd/x86.rs":"54311d3ebf2bb091ab22361e377e6ef9224aec2ecfe459fbfcedde4932db9c58","src/unix/bsd/freebsdlike/freebsd/x86_64.rs":"97132e2097411034271b8c927ecc94a208a361564680972a6c82998bd30a9826","src/unix/bsd/freebsdlike/mod.rs":"596def64669e2f27cffebca8e5c682ee7d576f84f8f99771c27e86ce8e818221","src/unix/bsd/mod.rs":"0c846b3a2c9390dfe090603f1ad643b107cc7e7605866c5399aa81dfea4e74bd","src/unix/bsd/netbsdlike/mod.rs":"9f55f35f8e4e26c7c63eaf67ddda0e40cc2abbabc2a68750809162e6f80144f1","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"f455848cd03cb80897776f2355dbd14bbb3aa88b1aa6aec22122ec47cdbd0f20","src/unix/bsd/netbsdlike/netbsd/arm.r
s":"4c9eac982c385165f475ef3a80770fd634c6dde8fb400b3cb7e08c9bb7498af6","src/unix/bsd/netbsdlike/netbsd/mod.rs":"88617ada3bc740c5262926b9c45d7f51120d358522f051f0afdf7465edd13c29","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"183818c62dff72db6ee1d329d90ad8727628775ed5cd823c8485c6769003c91e","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"4db043327fb2615af2fb0f999d162310bea2294e7d050806e19a46b083561f16","src/unix/bsd/netbsdlike/netbsd/x86.rs":"979c4cbacbde37b9053f2c9df4b8f87d37b255436ef4a383e1e5f40ee21180d6","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"741353a1c6451efb0c7c7c486fd2cb54e3d36fd1c3dd280f6432d8858b0a5356","src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs":"4d2ad2e885d83ad3134add61580f49a8e58cb03284ae328273a9e2e104a4d084","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs":"6e6f15e81597d85d83ca0eeb154e4f8b8e7f9cbb6a9cfa176601f78642ef94f9","src/unix/bsd/netbsdl
ike/openbsdlike/mod.rs":"6320b7bc7283dbc2a07cfb8b5a793c0153535601d050f33c1ff5e4a5cc57c2be","src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs":"820092e397c7ec259cd2de8f2444083a8e57071c02d73d678701dfa7807726e9","src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs":"6adc0dcb1b358ef91bbeb5512e19ba6f40adc77b7d259cb11641a69426fc5ea2","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs":"44b7ea81cf363777b29935da175e702cbf45ed78f7498ae57faf44aa32335085","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs":"97956c3a53aa07a2edf8865252f980dade0d34e930adca0e870e7344d7e2b0bb","src/unix/haiku/b32.rs":"69ae47fc52c6880e85416b4744500d5655c9ec6131cb737f3b649fceaadce15a","src/unix/haiku/b64.rs":"73e64db09275a8da8d50a13cce2cfa2b136036ddf3a930d2939f337fc995900b","src/unix/haiku/mod.rs":"b00fa310b6d835cb613a02101c7b1a72c636faec316586587cb63aebdcb9de8f","src/unix/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/unix/hermit/mod.rs":"248c0b0abaa7d56a7dc3293e
67a0ce70a4ef8c83638bda8aa222ad8bb0ef6801","src/unix/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/unix/mod.rs":"3c5aad2e7ac5e8781158cd140ed07afb1e0ad5eb7fc4b7b0a7bf7f5d8d2ebe32","src/unix/newlib/aarch64/mod.rs":"c408a990f22fb4292a824f38367e9b517e6e6f8623328397ee631cc88b3d1f7d","src/unix/newlib/arm/mod.rs":"2b6dba2e697ab9b4f4bc4dd5f28057249e9b596d1cb395a9322ec87605c4a5c4","src/unix/newlib/mod.rs":"eea5f1eb720184d9a00be966e4161fddb3733362fc349182e85b1599ba4e825f","src/unix/notbsd/android/b32/arm.rs":"3625a32c7e58cfe683a53486fbe3d42d4e28f00bea31e19cb46ed2bb0b6a140b","src/unix/notbsd/android/b32/mod.rs":"2fbe398c1fb5251dda6213741a193e50aae4622807cb255d1dd2e82b536f0c65","src/unix/notbsd/android/b32/x86.rs":"ae2b7f1d6278caddc007749bb1d09ca33f7593478a0fd7fe98b457dae86c7814","src/unix/notbsd/android/b64/aarch64.rs":"63d65629d79371814910f691672ef593d20244ee09be26f1ebe07ee6212d0163","src/unix/notbsd/android/b64/mod.rs":"90d4f6b063fd4de42fd302cbc9d99
02fd99ac1d71dc48cb8bc6ad7b4c902e481","src/unix/notbsd/android/b64/x86_64.rs":"5547aef8dcbaa5a932559f34606fd8d89f6c9c15173d2b1412c12d39b3c1045f","src/unix/notbsd/android/mod.rs":"19013f41ac8ccac034eb48777a4041d69342edb9ca25d4e0bb9c5938f62eef3e","src/unix/notbsd/emscripten.rs":"9ed47a0a5020c8f72d9496f87ef0da669c1ed2b85980013100c466f18cd8a4c5","src/unix/notbsd/linux/mips/mips32.rs":"a483ddfd10765b7d5090dc21686eee8842649cd21236828a42d634114885f5f9","src/unix/notbsd/linux/mips/mips64.rs":"9fff696e3943cf206b549d1ae13fa361828e9a8454e2d5730eeaa1c172ff370d","src/unix/notbsd/linux/mips/mod.rs":"d18a40011e9090a4a2a1f27e5bd96eb2503ac352f4809648e15841083d7f3a68","src/unix/notbsd/linux/mod.rs":"d84e95d36f9477fa1aa694bf18a919ba20e65aa71539c3f3dc06e8f92acee521","src/unix/notbsd/linux/musl/b32/arm.rs":"fdf170e03812072785ec531f1ae810d0c4feb9b29d0c316681b9f7affe1262c0","src/unix/notbsd/linux/musl/b32/mips.rs":"afa4981d93f29b3fb0083a73ce1323f7dce1392f90d5cf1966b1fae10d510033","src/unix/notbsd/linux/mus
l/b32/mod.rs":"540928f168f145c136f9dd729ffa12b9d1838d9fe664fc642365d17d7fae648f","src/unix/notbsd/linux/musl/b32/powerpc.rs":"16c615770a96f155540511f58b5a8070c9c7a43e12bdfed83996690e7558bcb5","src/unix/notbsd/linux/musl/b32/x86.rs":"3abf1610c68c37f407cdd0f93563c3542c024219e0e8c9888266a6ee014e0c87","src/unix/notbsd/linux/musl/b64/aarch64.rs":"d98643408c2837387988f78adc95c90ad21196a6f8f879e3d33d7e8ccf612640","src/unix/notbsd/linux/musl/b64/mod.rs":"d9285cd705e2e92552a08c9aa69b810e7e1bd0e9da6edf069c678af285579661","src/unix/notbsd/linux/musl/b64/powerpc64.rs":"544d8a7f6d6d84143df8a4c3537c9a3a36bf3d338d7a1c15689b94492498d8d7","src/unix/notbsd/linux/musl/b64/x86_64.rs":"25340999290a63d564ec149532c905f59c312ec369f8806d6b15df66fa1b8857","src/unix/notbsd/linux/musl/mod.rs":"4e582af62a11e8a5235ccbeabe5b1003fc17705e606c1ed9b21b931a470681fc","src/unix/notbsd/linux/other/b32/arm.rs":"d9892f7350b2978335f734f1cd2d7fed60f0f2e66aa05bee3f69549c031f8b14","src/unix/notbsd/linux/other/b32/mod.rs":"2621
1878c6481861e11393625620edaa0700cac41f55f0118c0f0bd42c1b7520","src/unix/notbsd/linux/other/b32/powerpc.rs":"253fcd2f9978525285be1903cc08f3fec2dc3b12d1660a33e2995b4f6b810d1c","src/unix/notbsd/linux/other/b32/x86.rs":"49376e3ed0f3ff95c230ac20751911fe3c608dfe15c7c118b069fd7a954d8db9","src/unix/notbsd/linux/other/b64/aarch64.rs":"1124ab5e974718b94fa40ae0f1772fb1c537910ef3e018b7c6c94a38b83dd742","src/unix/notbsd/linux/other/b64/mod.rs":"63e1a3fdf5f4d1b9820934ab344c91aed5e458e7e05908535d2e942d51a08bf8","src/unix/notbsd/linux/other/b64/not_x32.rs":"fa8636fb93eab230ed53bdec0a06f5b81d6d982cc0800103563c8c1eefcdb2d9","src/unix/notbsd/linux/other/b64/powerpc64.rs":"a771d982ed8a9458e1f2f039f959b5075b22443159875ba5612eebba96661c24","src/unix/notbsd/linux/other/b64/sparc64.rs":"0caffe5924886f3aed187531dfe78189b3df40adb96782ec4b471647ff83e9b1","src/unix/notbsd/linux/other/b64/x32.rs":"06a26c5120ced30fc015c220799b67c4401be2f13fc6c7361bebd3d37ff4982d","src/unix/notbsd/linux/other/b64/x86_64.rs":"70d0
cec088630502128c1c28ffef9dcc0fd9c0644f6a71b1325961d075625226","src/unix/notbsd/linux/other/mod.rs":"fe76beac87fc549b076078a0fa3e2ecd4c13b0e6e4fcb34a89e16c6584f5259b","src/unix/notbsd/linux/s390x.rs":"9e990574dfc22b6eb91bcc7c6f8297f9ad42f9183efb366a818be88180a3fac3","src/unix/notbsd/mod.rs":"a0fdecac118b70fb670f0fcccaa7f826440873448a96dd557fb1fe52cf391e89","src/unix/solaris/mod.rs":"7950a26f3eb0b7bc8e71f524cc2e05832b759fe2ce12a58e0c1957e0ec1286dc","src/unix/uclibc/mips/mips32.rs":"9739c5fb47f389a0394ef08ee30da97a3de0a1300020731a8cc0a033616011b2","src/unix/uclibc/mips/mips64.rs":"230583280bbc7b3c7fcdb61244f51fa1af5944ca127c7cf83c598fe2313713d0","src/unix/uclibc/mips/mod.rs":"2d76e6cfeb2b7f7c59231a6e099f1aed811a45659e62153aaf00c220b9488a9d","src/unix/uclibc/mod.rs":"521818507cef958376edfd8401c35db7ee1c51ee3cf106ad962002104a184cf5","src/unix/uclibc/x86_64/l4re.rs":"68fd3a833fd1f7caf784a084224f384bdbdfb8b5a14ef94c4f5155409afb3439","src/unix/uclibc/x86_64/mod.rs":"419182836aedd426a5c9e6b8
667058adf86ac8f43af73ce8d00c503f8ff8f414","src/unix/uclibc/x86_64/other.rs":"f03b47842896f2f3ae6f8ebdcbcf0276454f880349d9cf00e3d304f8136893c5","src/windows/gnu.rs":"4d9033162cc6f7d245256c7b165c1ec18a741771fd9b99a55b421e8d14978599","src/windows/mod.rs":"7d74b12f71de86ee517a9cd93b1b38d0551646db0eaf526048abcbdd4bbeb250","src/windows/msvc.rs":"8f46cf66883c794175609a3b2bafaa094d0ba63eb6720ef1b84b175603f1074f"},"package":"023a4cd09b2ff695f9734c1934145a315594b7986398496841c7031a5a1bbdbd"}
diff --git a/dev-lang/rust/files/0040-rls-atomics.patch b/dev-lang/rust/files/0040-rls-atomics.patch
index 8e44100..d9aedb9 100644
--- a/dev-lang/rust/files/0040-rls-atomics.patch
+++ b/dev-lang/rust/files/0040-rls-atomics.patch
@@ -1,6 +1,6 @@
---- a/src/tools/rls/rls/src/cmd.rs
-+++ b/src/tools/rls/rls/src/cmd.rs
-@@ -17,7 +17,7 @@ use crate::config::Config;
+--- 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;
@@ -9,7 +9,7 @@
use lsp_types::{
ClientCapabilities, CodeActionContext, CodeActionParams, CompletionItem,
-@@ -323,8 +323,8 @@ fn url(file_name: &str) -> Url {
+@@ -313,8 +313,8 @@ fn url(file_name: &str) -> Url {
}
fn next_id() -> RequestId {
@@ -20,9 +20,9 @@
}
// Custom reader and output for the RLS server.
---- a/src/tools/rls/rls/src/server/io.rs
-+++ b/src/tools/rls/rls/src/server/io.rs
-@@ -17,7 +17,7 @@ use crate::lsp_data::{LSPNotification, LSPRequest};
+--- 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};
@@ -31,7 +31,7 @@
use std::sync::Arc;
use jsonrpc_core::{self as jsonrpc, response, version, Id};
-@@ -182,13 +182,13 @@ pub trait Output: Sync + Send + Clone + 'static {
+@@ -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 {
@@ -40,14 +40,14 @@
}
impl StdioOutput {
- /// Construct a new `stdout` output.
+ /// 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()) }
}
}
-@@ -205,7 +205,7 @@ impl Output for StdioOutput {
+@@ -194,7 +194,7 @@ impl Output for StdioOutput {
}
fn provide_id(&self) -> RequestId {
diff --git a/dev-lang/rust/files/0050-llvm.patch b/dev-lang/rust/files/0050-llvm.patch
index 16f1f28..f1899f7 100644
--- a/dev-lang/rust/files/0050-llvm.patch
+++ b/dev-lang/rust/files/0050-llvm.patch
@@ -1,7 +1,5 @@
-diff --git a/src/llvm-project/llvm/include/llvm/Analysis/TargetLibraryInfo.def b/src/llvm-project/llvm/include/llvm/Analysis/TargetLibraryInfo.def
-index 579d23004d1..6cd9d2722fb 100644
---- a/src/llvm-project/llvm/include/llvm/Analysis/TargetLibraryInfo.def
-+++ b/src/llvm-project/llvm/include/llvm/Analysis/TargetLibraryInfo.def
+--- 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
diff --git a/dev-lang/rust/files/0051-llvm-D45520.patch b/dev-lang/rust/files/0051-llvm-D45520.patch
deleted file mode 100644
index 275f03b..0000000
--- a/dev-lang/rust/files/0051-llvm-D45520.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-Index: rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
-===================================================================
---- rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
-+++ rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
-@@ -442,13 +442,22 @@
- // On PPC64, VariantKind is VK_None, but on PPC32, it's VK_PLT, and it must
- // come at the _end_ of the expression.
- const MCOperand &Op = MI->getOperand(OpNo);
-- const MCSymbolRefExpr &refExp = cast<MCSymbolRefExpr>(*Op.getExpr());
-- O << refExp.getSymbol().getName();
-+ const MCSymbolRefExpr *RefExp = nullptr;
-+ const MCConstantExpr *ConstExp = nullptr;
-+ if (const MCBinaryExpr *BinExpr = dyn_cast<MCBinaryExpr>(Op.getExpr())) {
-+ RefExp = cast<MCSymbolRefExpr>(BinExpr->getLHS());
-+ ConstExp = cast<MCConstantExpr>(BinExpr->getRHS());
-+ } else
-+ RefExp = cast<MCSymbolRefExpr>(Op.getExpr());
-+
-+ O << RefExp->getSymbol().getName();
- O << '(';
- printOperand(MI, OpNo+1, O);
- O << ')';
-- if (refExp.getKind() != MCSymbolRefExpr::VK_None)
-- O << '@' << MCSymbolRefExpr::getVariantKindName(refExp.getKind());
-+ if (RefExp->getKind() != MCSymbolRefExpr::VK_None)
-+ O << '@' << MCSymbolRefExpr::getVariantKindName(RefExp->getKind());
-+ if (ConstExp != nullptr)
-+ O << '+' << ConstExp->getValue();
- }
-
- /// showRegistersWithPercentPrefix - Check if this register name should be
-Index: rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
-===================================================================
---- rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
-+++ rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
-@@ -487,8 +487,14 @@
- if (!Subtarget->isPPC64() && !Subtarget->isDarwin() &&
- isPositionIndependent())
- Kind = MCSymbolRefExpr::VK_PLT;
-- const MCSymbolRefExpr *TlsRef =
-+ const MCExpr *TlsRef =
- MCSymbolRefExpr::create(TlsGetAddr, Kind, OutContext);
-+
-+ // Add 32768 offset to the symbol so we follow up the latest GOT/PLT ABI.
-+ if (Kind == MCSymbolRefExpr::VK_PLT && Subtarget->isSecurePlt())
-+ TlsRef = MCBinaryExpr::createAdd(TlsRef,
-+ MCConstantExpr::create(32768, OutContext),
-+ OutContext);
- const MachineOperand &MO = MI->getOperand(2);
- const GlobalValue *GValue = MO.getGlobal();
- MCSymbol *MOSymbol = getSymbol(GValue);
-Index: rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
-===================================================================
---- rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
-+++ rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
-@@ -4054,7 +4054,20 @@
- if (trySETCC(N))
- return;
- break;
--
-+ // These nodes will be transformed into GETtlsADDR32 node, which
-+ // later becomes BL_TLS __tls_get_addr(sym at tlsgd)@PLT
-+ case PPCISD::ADDI_TLSLD_L_ADDR:
-+ case PPCISD::ADDI_TLSGD_L_ADDR: {
-+ const Module *Mod = MF->getFunction().getParent();
-+ if (PPCLowering->getPointerTy(CurDAG->getDataLayout()) != MVT::i32 ||
-+ !PPCSubTarget->isSecurePlt() || !PPCSubTarget->isTargetELF() ||
-+ Mod->getPICLevel() == PICLevel::SmallPIC)
-+ break;
-+ // Attach global base pointer on GETtlsADDR32 node in order to
-+ // generate secure plt code for TLS symbols.
-+ getGlobalBaseReg();
-+ }
-+ break;
- case PPCISD::CALL: {
- const Module *M = MF->getFunction().getParent();
-
-Index: rustc-src/src/llvm-project/llvm/test/CodeGen/PowerPC/ppc32-secure-plt-tls.ll
-===================================================================
---- rustc-src/src/llvm-project/llvm/test/CodeGen/PowerPC/ppc32-secure-plt-tls.ll
-+++ rustc-src/src/llvm-project/llvm/test/CodeGen/PowerPC/ppc32-secure-plt-tls.ll
-@@ -0,0 +1,18 @@
-+; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -mattr=+secure-plt -relocation-model=pic | FileCheck -check-prefix=SECURE-PLT-TLS %s
-+
-+@a = thread_local local_unnamed_addr global i32 6, align 4
-+define i32 @main() local_unnamed_addr #0 {
-+entry:
-+ %0 = load i32, i32* @a, align 4
-+ ret i32 %0
-+}
-+
-+
-+!llvm.module.flags = !{!0}
-+!0 = !{i32 7, !"PIC Level", i32 2}
-+
-+; SECURE-PLT-TLS: mflr 30
-+; SECURE-PLT-TLS-NEXT: addis 30, 30, .LTOC-.L0$pb@ha
-+; SECURE-PLT-TLS-NEXT: addi 30, 30, .LTOC-.L0$pb@l
-+; SECURE-PLT-TLS-NEXT: bl .L{{.*}}
-+; SECURE-PLT-TLS: bl __tls_get_addr(a@tlsgd)@PLT+32768
-\ No newline at end of file
diff --git a/dev-lang/rust/files/0051-llvm-powerpc-elfv2.patch b/dev-lang/rust/files/0051-llvm-powerpc-elfv2.patch
new file mode 100644
index 0000000..b5ee930
--- /dev/null
+++ b/dev-lang/rust/files/0051-llvm-powerpc-elfv2.patch
@@ -0,0 +1,12 @@
+--- 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/0052-llvm-D52013.patch b/dev-lang/rust/files/0052-llvm-D52013.patch
deleted file mode 100644
index 05ccae6..0000000
--- a/dev-lang/rust/files/0052-llvm-D52013.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
-===================================================================
---- rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
-+++ rustc-src/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
-@@ -199,6 +199,10 @@
- case Triple::ppc64le:
- return PPCTargetMachine::PPC_ABI_ELFv2;
- case Triple::ppc64:
-+ // musl uses ELFv2 ABI on both endians.
-+ if (TT.getEnvironment() == Triple::Musl)
-+ return PPCTargetMachine::PPC_ABI_ELFv2;
-+
- return PPCTargetMachine::PPC_ABI_ELFv1;
- default:
- return PPCTargetMachine::PPC_ABI_UNKNOWN;
diff --git a/dev-lang/rust/files/0053-llvm-secureplt.patch b/dev-lang/rust/files/0053-llvm-secureplt.patch
deleted file mode 100644
index ddf8877..0000000
--- a/dev-lang/rust/files/0053-llvm-secureplt.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/src/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp b/src/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
---- a/src/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
-+++ b/src/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
-@@ -138,6 +138,10 @@
- if (isDarwin())
- HasLazyResolverStubs = true;
-
-+ // Set up musl-specific properties.
-+ if (TargetTriple.getEnvironment() == Triple::Musl)
-+ SecurePlt = true;
-+
- if (HasSPE && IsPPC64)
- report_fatal_error( "SPE is only supported for 32-bit targets.\n", false);
- if (HasSPE && (HasAltivec || HasQPX || HasVSX || HasFPU))
-diff --git a/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
---- a/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
-+++ b/src/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
-@@ -222,6 +222,10 @@ static Reloc::Model getEffectiveRelocModel(const Triple &TT,
- if (TT.getArch() == Triple::ppc64)
- return Reloc::PIC_;
-
-+ // musl needs SecurePlt, which depends on PIC.
-+ if (TT.getEnvironment() == Triple::Musl)
-+ return Reloc::PIC_;
-+
- // Rest are static by default.
- return Reloc::Static;
- }
diff --git a/dev-lang/rust/files/0060-fix-build-with-libressl-2.9.1.patch b/dev-lang/rust/files/0060-fix-build-with-libressl-2.9.1.patch
deleted file mode 100644
index d5375a0..0000000
--- a/dev-lang/rust/files/0060-fix-build-with-libressl-2.9.1.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From a04a24be49e14fe77dfcef647afbbe5ae5e181d1 Mon Sep 17 00:00:00 2001
-From: Jory Pratt <anarchy@gentoo.org>
-Date: Wed, 24 Apr 2019 01:57:40 -0500
-Subject: [PATCH] fix build with libressl-2.9.1
-
-Signed-off-by: Jory Pratt <anarchy@gentoo.org>
----
- vendor/openssl-sys/.cargo-checksum.json | 2 +-
- vendor/openssl-sys/build/main.rs | 1 +
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/vendor/openssl-sys/.cargo-checksum.json b/vendor/openssl-sys/.cargo-checksum.json
-index b5c539431..49a2227bf 100644
---- a/vendor/openssl-sys/.cargo-checksum.json
-+++ b/vendor/openssl-sys/.cargo-checksum.json
-@@ -1 +1 @@
--{"files":{"Cargo.toml":"b09af0445220130b1b1c45791a316435f7400cf2fab3abe9c419f4f8028cfb9c","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"96a414be6e7e061a21a9e39a61449039f6791225264032641dd044a1a9b88111","build/cfgs.rs":"fae5176c2b149d190c9611b58c5882312b5c0e483d1a404cfdf850473314a58f","build/main.rs":"c8bc352b94d05afeaeb96300341a695c70c3b62c46793a5c035aaf42e22b69d1","src/aes.rs":"660efd70f809cb2f5dbbf527be8f9592911776bab7dafa1fc4cc72dd9a576b67","src/asn1.rs":"4f12d2f4c2a493888db669d1ecfd55df40861a78cae65957f801ed91dc2cae30","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"29aa053b67b47515fd15812aa0a90ff35dd9fa347da2beeba96d6deafeb9d945","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"f6e8a116940755b2b53e3d0d49d1b451fc6e4269831fd1cfcee9d6ed404cf487","src/dh.rs":"520
b282b92fa372a75bc16696dc3ee7a9a5752e517a18862182a3e9f5a976d28","src/dsa.rs":"3c294c5c45235497396ac803b723b3a0cb5bd3609f5dec18338b5b014c2adeb9","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"b22d27b01a70652384866b3d0d01d2f7a0421b2ba2db9268ed379fef4b1ac034","src/err.rs":"81230711e081277e0b6dae4ff21266052d075688c758c2b0720001849ef9192d","src/evp.rs":"13a8a71154545d7c478e156edb21beb219824937aba6b29c6bc6ef895c735a3d","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"17b5a1faa0fe3ab777c8cb0039a3dffd8922b211bf1330c2cd0c3e02f624353c","src/macros.rs":"a7c95174fd4cfeb42f730c7c0744194009520249888dbf43968571219fd6dfa1","src/obj_mac.rs":"9c20609db7115c9edb99185375426169cb5b7caee839d892b556e92285e65309","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"619177f939328597e4bcf9
c41fdf4d0aa9207d779c6e0dafddbe2eab9b1a6a98","src/pem.rs":"3ae1c53dbc126a04c188575294111cc04c215c2f3e031192d5cc05952f011ddf","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"a0bf64f1f8ff9f6e5dbed6c38d8fa2d3d1c5dfcfe6dd3ff79f7737b072ce4681","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"05044d221d8d205010a4e3760c0b5c0e2e923e165db0d65f9a8c9bcedaad9961","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"e69d3b9b8f2f8ae1ed3905a4dbe064ad1b7c1eaf21d7eabb86ecdb5b41e2120a","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"fd85a1683064def0a9e07d803b90102229adc1d58f
a19cf4e56976f0dd7425b9","src/x509.rs":"839be2feb74755ab7df66a024ad27dfa70ce4f7889229d9152ba999f3a54b914","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"66fd646ea4caf5ce81e3c881e88d85462519c4e97a7f82e82ca8ac52ea830ad2"},"package":"1bb974e77de925ef426b6bc82fce15fd45bdcbeb5728bffcfc7cdeeb7ce1c2d6"}
-\ No newline at end of file
-+{"files":{"Cargo.toml":"b09af0445220130b1b1c45791a316435f7400cf2fab3abe9c419f4f8028cfb9c","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"96a414be6e7e061a21a9e39a61449039f6791225264032641dd044a1a9b88111","build/cfgs.rs":"fae5176c2b149d190c9611b58c5882312b5c0e483d1a404cfdf850473314a58f","build/main.rs":"4c1c4b208af314ee7217108c5cb22fd51dac1fdb2bbdf901a63454a99741ca2d","src/aes.rs":"660efd70f809cb2f5dbbf527be8f9592911776bab7dafa1fc4cc72dd9a576b67","src/asn1.rs":"4f12d2f4c2a493888db669d1ecfd55df40861a78cae65957f801ed91dc2cae30","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"29aa053b67b47515fd15812aa0a90ff35dd9fa347da2beeba96d6deafeb9d945","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"f6e8a116940755b2b53e3d0d49d1b451fc6e4269831fd1cfcee9d6ed404cf487","src/dh.rs":"520
b282b92fa372a75bc16696dc3ee7a9a5752e517a18862182a3e9f5a976d28","src/dsa.rs":"3c294c5c45235497396ac803b723b3a0cb5bd3609f5dec18338b5b014c2adeb9","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"b22d27b01a70652384866b3d0d01d2f7a0421b2ba2db9268ed379fef4b1ac034","src/err.rs":"81230711e081277e0b6dae4ff21266052d075688c758c2b0720001849ef9192d","src/evp.rs":"13a8a71154545d7c478e156edb21beb219824937aba6b29c6bc6ef895c735a3d","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"17b5a1faa0fe3ab777c8cb0039a3dffd8922b211bf1330c2cd0c3e02f624353c","src/macros.rs":"a7c95174fd4cfeb42f730c7c0744194009520249888dbf43968571219fd6dfa1","src/obj_mac.rs":"9c20609db7115c9edb99185375426169cb5b7caee839d892b556e92285e65309","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"619177f939328597e4bcf9
c41fdf4d0aa9207d779c6e0dafddbe2eab9b1a6a98","src/pem.rs":"3ae1c53dbc126a04c188575294111cc04c215c2f3e031192d5cc05952f011ddf","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"a0bf64f1f8ff9f6e5dbed6c38d8fa2d3d1c5dfcfe6dd3ff79f7737b072ce4681","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"05044d221d8d205010a4e3760c0b5c0e2e923e165db0d65f9a8c9bcedaad9961","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"e69d3b9b8f2f8ae1ed3905a4dbe064ad1b7c1eaf21d7eabb86ecdb5b41e2120a","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"fd85a1683064def0a9e07d803b90102229adc1d58f
a19cf4e56976f0dd7425b9","src/x509.rs":"839be2feb74755ab7df66a024ad27dfa70ce4f7889229d9152ba999f3a54b914","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"66fd646ea4caf5ce81e3c881e88d85462519c4e97a7f82e82ca8ac52ea830ad2"},"package":"1bb974e77de925ef426b6bc82fce15fd45bdcbeb5728bffcfc7cdeeb7ce1c2d6"}
-\ No newline at end of file
-diff --git a/vendor/openssl-sys/build/main.rs b/vendor/openssl-sys/build/main.rs
-index 69def400e..6f08c872d 100644
---- a/vendor/openssl-sys/build/main.rs
-+++ b/vendor/openssl-sys/build/main.rs
-@@ -505,6 +505,7 @@ See rust-openssl README for more information:
- (8, 1) => ('8', '1'),
- (8, _) => ('8', 'x'),
- (9, 0) => ('9', '0'),
-+ (9, _) => ('9', 'x'),
- _ => version_error(),
- };
-
---
-2.21.0
-
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
new file mode 100644
index 0000000..9064a52
--- /dev/null
+++ b/dev-lang/rust/files/1.46.0-don-t-create-prefix-at-time-of-check.patch
@@ -0,0 +1,31 @@
+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
new file mode 100644
index 0000000..07ad0eb
--- /dev/null
+++ b/dev-lang/rust/files/1.47.0-libressl.patch
@@ -0,0 +1,44 @@
+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":"1f38a3ec4029511fecd7a51548965a265f3e7772891b5514e22bfb1d
061b3a90","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":"638fb9
098f6024e82b331eeee50c64cefdb58456dba28ee42560be655a0c2bf6","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":"306047f3f31828fe7
d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","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":"1f38a3ec4029511fecd7a51548965a265f3e7772891b5514e22bfb1d
061b3a90","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":"638fb9
098f6024e82b331eeee50c64cefdb58456dba28ee42560be655a0c2bf6","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":"306047f3f31828fe7
d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","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
index 72d27c6..cd11337 100644
--- a/dev-lang/rust/metadata.xml
+++ b/dev-lang/rust/metadata.xml
@@ -1,14 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>samuel@sholland.org</email>
- <name>Samuel Holland</name>
- </maintainer>
- <use>
- <flag name="clippy">Install clippy component</flag>
- <flag name="system-llvm">Use the system LLVM install</flag>
- <flag name="rls">Install rls component</flag>
- <flag name="rustfmt">Install rustfmt component</flag>
- </use>
+ <maintainer type="project">
+ <email>rust@gentoo.org</email>
+ <name>Rust Project</name>
+ </maintainer>
+ <use>
+ <flag name="cargo">Install cargo component</flag>
+ <flag name="clippy">Install clippy component</flag>
+ <flag name="system-llvm">Use the system LLVM install</flag>
+ <flag name="rls">Install rls component</flag>
+ <flag name="rustfmt">Install rustfmt component</flag>
+ <flag name="wasm">Build support for the wasm32-unknown-unknown
+ target</flag>
+ </use>
</pkgmetadata>
diff --git a/dev-lang/rust/rust-1.34.2.ebuild b/dev-lang/rust/rust-1.34.2.ebuild
deleted file mode 100644
index ca831e7..0000000
--- a/dev-lang/rust/rust-1.34.2.ebuild
+++ /dev/null
@@ -1,337 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python{2_7,3_7} )
-
-inherit check-reqs eapi7-ver flag-o-matic llvm multiprocessing python-any-r1 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 ~ppc ~ppc64 ~x86"
-
-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
- amd64? ( https://portage.smaeul.xyz/distfiles/rust-${RUST_STAGE0_VERSION}-x86_64-gentoo-linux-musl.tar.xz )
- arm? ( https://portage.smaeul.xyz/distfiles/rust-${RUST_STAGE0_VERSION}-armv7a-unknown-linux-musleabihf.tar.xz )
- arm64? ( https://portage.smaeul.xyz/distfiles/rust-${RUST_STAGE0_VERSION}-aarch64-gentoo-linux-musl.tar.xz )
- ppc? ( https://portage.smaeul.xyz/distfiles/rust-${RUST_STAGE0_VERSION}-powerpc-gentoo-linux-musl.tar.xz )
- ppc64? ( https://portage.smaeul.xyz/distfiles/rust-${RUST_STAGE0_VERSION}-powerpc64-gentoo-linux-musl.tar.xz )
- x86? ( https://portage.smaeul.xyz/distfiles/rust-${RUST_STAGE0_VERSION}-i686-gentoo-linux-musl.tar.xz )
-"
-
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC 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 rls rustfmt system-llvm ${ALL_LLVM_TARGETS[*]}"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling one than more 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. < 9.
-# 3. Specify LLVM_MAX_SLOT, e.g. 8.
-LLVM_DEPEND="
- || (
- >=sys-devel/llvm-8:=[${LLVM_TARGET_USEDEPS// /,}]
- )
- <sys-devel/llvm-9:=
-"
-LLVM_MAX_SLOT=8
-
-COMMON_DEPEND="
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- net-libs/http-parser:=
- net-libs/libssh2:=
- net-misc/curl:=[ssl]
- sys-libs/zlib:=
- system-llvm? (
- ${LLVM_DEPEND}
- )
-"
-DEPEND="${COMMON_DEPEND}
- ${PYTHON_DEPS}
- || (
- >=sys-devel/gcc-4.7
- >=sys-devel/clang-3.5
- )
- !system-llvm? (
- dev-util/cmake
- dev-util/ninja
- )
-"
-RDEPEND="${COMMON_DEPEND}
- >=app-eselect/eselect-rust-20190311
- !dev-util/cargo
- rustfmt? ( !dev-util/rustfmt )"
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
- x86? ( cpu_flags_x86_sse2 )
-"
-
-PATCHES=(
- "${FILESDIR}/0001-Don-t-pass-CFLAGS-to-the-C-compiler.patch"
- "${FILESDIR}/0002-Fix-LLVM-build.patch"
- "${FILESDIR}/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch"
- "${FILESDIR}/0004-Require-static-native-libraries-when-linking-static-.patch"
- "${FILESDIR}/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch"
- "${FILESDIR}/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch"
- "${FILESDIR}/0007-runtest-Fix-proc-macro-tests-on-musl-hosts.patch"
- "${FILESDIR}/0008-Correct-minimum-system-LLVM-version-in-tests.patch"
- "${FILESDIR}/0009-test-use-extern-for-plugins-Don-t-assume-multilib.patch"
- "${FILESDIR}/0010-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch"
- "${FILESDIR}/0011-Ignore-broken-and-non-applicable-tests.patch"
- "${FILESDIR}/0012-Link-stage-2-tools-dynamically-to-libstd.patch"
- "${FILESDIR}/0013-Move-debugger-scripts-to-usr-share-rust.patch"
- "${FILESDIR}/0014-Add-gentoo-target-specs.patch"
- "${FILESDIR}/0030-liblibc-linkage.patch"
- "${FILESDIR}/0040-rls-atomics.patch"
- "${FILESDIR}/0050-llvm.patch"
- "${FILESDIR}/0051-llvm-D45520.patch"
- "${FILESDIR}/0052-llvm-D52013.patch"
- "${FILESDIR}/0053-llvm-secureplt.patch"
- "${FILESDIR}/0060-fix-build-with-libressl-2.9.1.patch"
-)
-
-S="${WORKDIR}/${MY_P}-src"
-
-toml_usex() {
- usex "$1" true false
-}
-
-pre_build_checks() {
- CHECKREQS_DISK_BUILD="7G"
- eshopts_push -s extglob
- if is-flagq '-g?(gdb)?([1-9])'; then
- CHECKREQS_DISK_BUILD="10G"
- fi
- eshopts_pop
- check-reqs_pkg_setup
-}
-
-pkg_pretend() {
- pre_build_checks
-}
-
-pkg_setup() {
- export RUST_BACKTRACE=1
- pre_build_checks
- python-any-r1_pkg_setup
- 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() {
- default
-
- "${WORKDIR}/rust-${RUST_STAGE0_VERSION}-${CHOST}/install.sh" \
- --destdir="${WORKDIR}/stage0" \
- --prefix=/ \
- --components=rust-std-$CHOST,rustc,cargo \
- --disable-ldconfig \
- || die
-}
-
-src_configure() {
- local tools='"cargo"'
-
- for tool in clippy rls rustfmt; do
- if use $tool; then
- tools+=", \"$tool\""
- fi
- done
-
- cat <<- EOF > "${S}"/config.toml
- [llvm]
- ninja = true
- optimize = $(toml_usex !debug)
- release-debuginfo = $(toml_usex debug)
- assertions = $(toml_usex debug)
- targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
- link-shared = $(toml_usex system-llvm)
- [build]
- build = "${CHOST}"
- host = ["${CHOST}"]
- target = ["${CHOST}"]
- cargo = "${WORKDIR}/stage0/bin/cargo"
- rustc = "${WORKDIR}/stage0/bin/rustc"
- docs = $(toml_usex doc)
- compiler-docs = $(toml_usex doc)
- submodules = false
- python = "${EPYTHON}"
- locked-deps = true
- vendor = true
- verbose = 0
- sanitizers = false
- profiler = false
- extended = true
- tools = [${tools}]
- [install]
- prefix = "${EPREFIX}/usr"
- libdir = "lib"
- docdir = "share/doc/${P}"
- mandir = "share/${P}/man"
- [rust]
- optimize = $(toml_usex !debug)
- debuginfo = $(toml_usex debug)
- debug-assertions = $(toml_usex debug)
- default-linker = "$(tc-getCC)"
- channel = "stable"
- rpath = false
- optimize-tests = $(toml_usex !debug)
- dist-src = false
- jemalloc = false
- [dist]
- src-tarball = false
- [target.${CHOST}]
- cc = "$(tc-getCC)"
- cxx = "$(tc-getCXX)"
- linker = "$(tc-getCC)"
- ar = "$(tc-getAR)"
- EOF
- use system-llvm && cat <<- EOF >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "$LLVM_MAX_SLOT")/bin/llvm-config"
- EOF
-}
-
-src_compile() {
- "${EPYTHON}" x.py build --config="${S}"/config.toml -j$(makeopts_jobs) --exclude src/tools/miri || die
-}
-
-src_test() {
- "${EPYTHON}" x.py test -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-fail/pretty \
- src/test/run-make \
- src/test/run-make-fulldeps \
- src/test/run-pass \
- src/test/run-pass/pretty \
- src/test/run-pass-fulldeps \
- src/test/run-pass-fulldeps/pretty \
- src/test/ui \
- src/test/ui-fulldeps || die
-}
-
-src_install() {
- env DESTDIR="${D}" "${EPYTHON}" x.py install || die
-
- mv "${ED}/usr/bin/cargo" "${ED}/usr/bin/cargo-${PV}" || die
- 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
-
- rm "${ED}/usr/lib"/*.so || die
- rm "${ED}/usr/lib/rustlib/components" || die
- rm "${ED}/usr/lib/rustlib/install.log" || die
- rm "${ED}/usr/lib/rustlib"/manifest-* || die
- rm "${ED}/usr/lib/rustlib/rust-installer-version" || die
- rm "${ED}/usr/lib/rustlib/uninstall.sh" || die
-
- if use clippy; then
- mv "${ED}/usr/bin/cargo-clippy" "${ED}/usr/bin/cargo-clippy-${PV}" || die
- mv "${ED}/usr/bin/clippy-driver" "${ED}/usr/bin/clippy-driver-${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/cargo-fmt" "${ED}/usr/bin/cargo-fmt-${PV}" || die
- mv "${ED}/usr/bin/rustfmt" "${ED}/usr/bin/rustfmt-${PV}" || die
- fi
-
- if use doc; then
- dodir "/usr/share/doc/${P}"
- mv "${ED}/usr/share/doc/rust"/* "${ED}/usr/share/doc/${P}" || die
- rmdir "${ED}/usr/share/doc/rust" || 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
-
- docompress "/usr/share/${P}/man"
-
- cat <<-EOF > "${T}"/50${P}
- LDPATH="${EPREFIX}/usr/lib/rustlib/${CHOST}/lib"
- MANPATH="${EPREFIX}/usr/share/${P}/man"
- EOF
- doenvd "${T}"/50${P}
-
- # 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/cargo-clippy >> "${T}/provider-${P}"
- echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
- fi
- if use rls; then
- echo /usr/bin/rls >> "${T}/provider-${P}"
- fi
- if use rustfmt; then
- echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
- echo /usr/bin/rustfmt >> "${T}/provider-${P}"
- fi
- dodir /etc/env.d/rust
- 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}."
-
- ewarn "cargo is now installed from dev-lang/rust{,-bin} instead of dev-util/cargo."
- ewarn "This might have resulted in a dangling symlink for /usr/bin/cargo on some"
- ewarn "systems. This can be resolved by calling 'sudo eselect rust set ${P}'."
-
- if has_version app-editors/emacs || has_version app-editors/emacs-vcs; 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 has_version 'app-shells/zsh'; then
- elog "install app-shells/rust-zshcomp to get zsh completion for rust."
- fi
-}
-
-pkg_postrm() {
- eselect rust unset --if-invalid
-}
diff --git a/dev-lang/rust/rust-1.47.0-r1.ebuild b/dev-lang/rust/rust-1.47.0-r1.ebuild
new file mode 100644
index 0000000..5c2bfe5
--- /dev/null
+++ b/dev-lang/rust/rust-1.47.0-r1.ebuild
@@ -0,0 +1,531 @@
+# 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 ~ppc ~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} ) )
+ )
+"
+
+# 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
+ "${FILESDIR}"/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
+ "${FILESDIR}"/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
+}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/musl:master commit in: dev-lang/rust/, dev-lang/rust/files/
@ 2021-12-02 0:14 Jory Pratt
0 siblings, 0 replies; 8+ messages in thread
From: Jory Pratt @ 2021-12-02 0:14 UTC (permalink / raw
To: gentoo-commits
commit: f3308830d09fb15b6345ebffc7c8874a49106994
Author: Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 1 22:46:24 2021 +0000
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Wed Dec 1 22:46:24 2021 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=f3308830
dev-lang/rust: use dynamic linking for arm64/amd64 musl builds
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>
dev-lang/rust/Manifest | 34 +
....0-ignore-broken-and-non-applicable-tests.patch | 76 +++
.../rust/files/1.56.1-musl-dynamic-linking.patch | 69 +++
dev-lang/rust/metadata.xml | 24 +
dev-lang/rust/rust-1.56.1.ebuild | 686 +++++++++++++++++++++
5 files changed, 889 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
new file mode 100644
index 00000000..7b40980d
--- /dev/null
+++ b/dev-lang/rust/Manifest
@@ -0,0 +1,34 @@
+DIST rust-1.55.0-aarch64-unknown-linux-gnu.tar.xz 233469360 BLAKE2B ac0529d771dcd22ed55cf52af12a5b55a8ee008d9dec2c09fb1aacb0c7ced78e87a6b7cd8d17a3dd81241d553b750720e48631c3a3702ee59bcac905f3a51420 SHA512 223a024701762675adb5c7c59fc54717d23f2ae4ea5984cd1cc0568d39c5207aa07a104ddad68da057f6434eecf23415ae13be2235797897d8d0f7cb5f2fc4b5
+DIST rust-1.55.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 02fec5fd64e97da4c74aa5354f557b3090c3df9c55d827c1811fbc41fe513ba00d8f854f95babafc7c9a4d2dadf50f4cbe6d3bf60cc10f12609c0957971c571b SHA512 1c2f41efb85971009a705ff3f82a45b6e3688d12b2c919c2555cc19dcc3b9575b516223a72caccb5ec3622e353fa0380ae3481a63ed2fa9b89f8e01c2771c95e
+DIST rust-1.55.0-aarch64-unknown-linux-musl.tar.xz 233248308 BLAKE2B 263506150ecb677c73a9a670952796d7df90b572ceada5fa4afd8b1478363670d802f6a26f47d0d6cbb34544edc63279dd4b08a9131e5702f4119a2236a91f6b SHA512 a74050bbeabee752d030b07f830b919467af59755b7b79f64edbbb7acf822bfbbd1d013d25091d37ce255ee9796056966d102bf5b3da475a859788af7ebbdf68
+DIST rust-1.55.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B b1b43bf430d33acc9a9b5f99148f1e0b930d3e271d40834a44ca839bf00369a01bfbcc69f4851e1cc951b26d6f7eedfd6f02b6ff9ada8dac85ccda0c22b1ce36 SHA512 04d31f458c285801b0185308a56700f0bc3bc2ad8c4548a1aa91e73bf94878810dbcf483403ad5815e80e87fb1417d958dbb18e6fdf090d2fd41b90d1c8c040c
+DIST rust-1.55.0-arm-unknown-linux-gnueabi.tar.xz 210542012 BLAKE2B 91e6eb6c42f99e13aaeae97ef85cb266378a0201c64c3588335022a7218bd95c438d290a66390ed004a627a667ed6e4acded9f79fd6a7d47017457fe9955c658 SHA512 3cfd6e6968ed4b7872376da4d33f2eae0bf10d99eaf5fcf59e6d9be432f0239b03baf46b70f0146175894f2eb1ef118854d263d4ba8d18913e4f820fdd1f97e8
+DIST rust-1.55.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 0902e4acc3a70750d8c2de86c22cfefad261e2b204c63d948c7e232adece894c4f7e15d799eaa3fadcef9a63953e603f5bf1e17c6f4b601cb4d93b88d8c970bd SHA512 39db8c7421e86c79189f1e0cc5a79dfae6e7633c43749f49cff371af862c0becead4a977cb75295b06da75d64516ceef68de4f42beee6d63e1eb4fb0bf976dd5
+DIST rust-1.55.0-arm-unknown-linux-gnueabihf.tar.xz 210534624 BLAKE2B cf02334a4b0182073b5387f3d1f16b6ae0d0508fc07e81ecc7623eb21031b03c1e6ab10cb2b6fd23071c3cc0c77adcf4cbd7d34d38e81853cd0ef02368c99036 SHA512 83a888c334caeda24f365df43df0fb83f367fda477d1bd7c869c88cff5407ffc134d8bd172a037c27a34d79cb28eb2e9629f26a7cfbc0db9209e581e06ec86bf
+DIST rust-1.55.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 17911a4745c705f7a4a2849301901912161c85300305e77588180d0fa4160a7ccd9188415c97a266613f35fdfd5b0b45879814c0afef6c6c2fea2bac700d0f39 SHA512 95d0731d84b49ecec8388fbcc0cb65f0ce93956a44dc62e1628f7e51e5726de6b611ed426a5e5c586a028d8808e6bca4257a8a1354b524087d833a32c3e0a231
+DIST rust-1.55.0-armv7-unknown-linux-gnueabihf.tar.xz 216342104 BLAKE2B ea2cb2d41c0a994124c5a5893cd3764f078157cb225117d9ca8641ca8896f02724beab7561a828d1163055e4c999ecece669f77920ccce0f495f2ff1b6632368 SHA512 b06b3c36b5ca35391030f3c9d2f64725263ac987002923d9263c4c27877d91453db3191e01d40c78f439a48f83da220926a2841337d815dd333591d453f2fc0e
+DIST rust-1.55.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B f35d5adf2ef48d52d22f6066a2dbf6a61543cf7e478a5d201caf1831f5cda53b7003148477fd043de98530bf3160de51f44f87d4e30be6cb7768344c6754f16e SHA512 e3cc3596e3f96d0aa6ec915690730118cea023e57b7bd9255acf80782acb865a1aa5ed3e404654d7eaa8110947f50f42b575d3df1eaef616afd2c55e8502b535
+DIST rust-1.55.0-i686-unknown-linux-gnu.tar.xz 228160060 BLAKE2B a5c37f6a25b8e09b3ca831f4f69d65d71f97bf0b0e975e7c92e8a4b2ec791f166f477b2fdce0ae6d9f539e598887a54b1e9ed0bc603da0e0c787cd2ba4b59565 SHA512 a0222c68c63ddd67afee552dd9ed636ea02fd3f26000deb7a1dc47806a1ec0b2fafaed903d4dabb0fddeb9e4026bf0da8bb2161c14db24d2883c084932e306b6
+DIST rust-1.55.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 62cc675de6155892cd6c0932d0b354cac4b3a07be58b2d6b021f7e86df058d5ecccef8e4ad9bedfd2432e84cea9720a982cbf9a50bf8a42149d8f197a27f8fb1 SHA512 21efa3b95a0344913666220f2996a8273e7d41077410b9eaafb7467976d0eca0139c780326b3e645d83db0b410e5db3a36342d89af668e65d045309f541c1c1e
+DIST rust-1.55.0-mips-unknown-linux-gnu.tar.xz 152431144 BLAKE2B b5b27cf62f92f551a39ed65c957b73ce30ef9d1d956b5ca342641bb647c4874d7e325ec5f1c22a340668315c8f50c34240d0a2044ac8e5a88608c02fdf4f7e39 SHA512 e7eb3a64ea87c211a77ac73c4cfa001849fde1f73605d4e58cab84b09c886ab1a9a850cf1dcc9e1af19fcea0ea53400529a74adab531bc0a5ae3cee70a7cc99e
+DIST rust-1.55.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 31dde6a6991040bc4772bba2577946837af84922b01c12bfa1ac9003f90f118c24d63bdcaff339b3a256f48cbfc55aac0bd1823727c35ca6424c5cf3b049d4b0 SHA512 685e6d15e79f71de45c9c2532cbbf7ded0c6b8d986c2bbb78887c43c05cc91ad5430c5f04c80d8007a3a86fe2936b29d7c8d92905cebf0ddbd152c526f324077
+DIST rust-1.55.0-mips64-unknown-linux-gnuabi64.tar.xz 159792528 BLAKE2B b762f4965771184fcf3ceaf38c7c8b62d9f4cbafe0fbc0a1e01a30ab9a5c951bff9472796c72ae1945d2a510b0efefd576f3ef0b4041eec7103cb5e5deb75e14 SHA512 74b199449c2237d71d2d8de4d8de05c82f631cda1fbf00b342707b4e99aa6aa7f89957d606c29dfeebb5990b3e6f09de5f360c484c8153cd17076bffbbfac251
+DIST rust-1.55.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 92a173654e7de569734b9c56f4f9d73d67fdad625b71db20c1f1fbbe20a12cb54a54a69bd215846101fc620b6a995d1f91dccdd59c97a5d6f2efdf59f1c40b3e SHA512 2f166793f3d814f39b11c968921fb9d95627325f588eab9d7b26b76c5824222978286cbfd2cc3b197d7a53711e74dc5da39eb422d0dfead9e2ad2638a2d3692f
+DIST rust-1.55.0-mipsel-unknown-linux-gnu.tar.xz 155530648 BLAKE2B ffdaba2d35b5a6287fa78234df4368cab5e95ee139600d2d0964398eb0eddddf0382fc5e17f721eff3c1b61feaadadfa056727e249266d4a1783dfd441316eb3 SHA512 b4de4aab16039b7119760922fc18e7a5e0d1a1cc61ba5b3b5f778ce9d1d234448c8cfb5d46ced58a5b5705c1ae1a79403b394f0c4894e6387d7a9276768b2014
+DIST rust-1.55.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B bf9a712e8b3ee8e44a4a1e9bb5e70486d11a65a09134845553c8f2d201eb1f674e64a6dc50a9de7eba3c8c457a747a0c14ec8228710e2725fc4a4630dea9414d SHA512 f9f62b8d12d33446504e193df49b11507cf47f17ea63abe329505af25c29ef928505049e161bd0157f03dab5f54bd59c38382e0e2cd891e79bcb831dc4c1ddef
+DIST rust-1.55.0-powerpc-unknown-linux-gnu.tar.xz 165801508 BLAKE2B 752325711493d0caccd005a2509121992dfd3850eb87cd4100b61be08f42d0680d16098c631b15e4b94f63dc5d11f63f75e2d3d38ff7817fcf254563f80cc6af SHA512 c78fb4a5e7c59fc96f937eaee2e8ddf08be32376f45a6916aebdf046363f5ad792f67dbe1d42b699ee82b5f968671e710233f72d1677e70efaa90c9a54d36688
+DIST rust-1.55.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B bdcea33c2655a29bbb154129e981229cacff826483d950f32b5df5fb9ba7728c68d25d35df796bd75a26cad20ff525e6de4a059d0c908449a68460ae83112767 SHA512 f3ba9d98da9d4eb60c0f07ac509c24281cca419b805e1efe89583c93bb050665992f63069b3a76d8cd810b5a81d28b3f732c54eba081c40e9f8e6e0d39e452ab
+DIST rust-1.55.0-powerpc64-unknown-linux-gnu.tar.xz 179595992 BLAKE2B 3ed33cd7d28f0d8f91fa0ad2e46b7e8e53afe3f0fe8b8557530aa7ddeb3489e054635b636bdedc85bf91f17ea074b286f603b83cdad1c149eec431bd0b440ab5 SHA512 367ddaee0131ae05945b0a81efb73fde479140cb8078d10ec166c0da68afc1fa2aff40a8e6246c2b4861a876b8672a8d8d126bf15d23830c6e170aa27c1d6a7b
+DIST rust-1.55.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 795eda0483df19dc9c3f4439ab01dd3a647cbcd7bdb03a6d236d699214c6d1e2b1d794515bc09b067b0c4ab789893d07ba9905821d4851c84e4b16cdc38e85b7 SHA512 e2c527769342b8c05b60065e74ab7c8b3fa05e39a78f7cdca3044fc3b3167c62911194402d2256cc98ea69a30d5ef8b726dfec76755b7211cb0e9f0131eb556a
+DIST rust-1.55.0-powerpc64le-unknown-linux-gnu.tar.xz 188758520 BLAKE2B 789d6a835f4bf3c5631e55645cb7d8b77674dfa66b49c6f5c089b2a913785aa8962ee5db90a34000958f946b0f00b648a31346aa93d509e898e6476c14d6f551 SHA512 67c98c7cc44482082daa5daa3926dc92782b373b3173181413e68d59ea07f6eee61d46f3832a3fce18bdc44dd563e2e1f85709435e04c599b299981ecd932a9f
+DIST rust-1.55.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ef25130d02f4570b433ddcd52545c7ceea9b239204a6bf138cc210f8a7fbd48922a0b8ab5a93a9f1c2b2f1d608bf525dd4f5402b03863defc8979fb84ec19760 SHA512 4a707f12d4b1c3113e0b4202fb0a7b66a04572f9c522ad6f0da0b049e1915ccdd9d3978cc03fb9a47a97639430101f3871869e99953374bfc5541d02ee0d7ff8
+DIST rust-1.55.0-riscv64gc-unknown-linux-gnu.tar.xz 182350256 BLAKE2B 1b139ae02b036719c7173d9607329a225455ac430d3911adce74ed0edd7c85e0f63a0beee563b7e26a4efe147083bcecf2dc93b5babad66303dcb7231bd83048 SHA512 c28beb76d9ae3a0727ae368845b4f62f8a087570a5464eac3b966ece6dd30d324696240a404f67c90cf005004bbfac8da31410d51469a7c34a6af3415e958acd
+DIST rust-1.55.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e04e2c6ae4c2192c558b41201aec4fede2fcb05022f2e841e9048f2891b3baad5737e27297c0479e7363f920b7a63a502fca0fa7481ffdeca5084d1fd8bd2a4d SHA512 96b6412bfe84c6b4d13a13a8bfccb28505e8070c2e5ee94bc572be84dc5a59a7c5208659d20fe0d37cf3c02ca8475e5c9c0d4f0a5b9b86aecce2a35bc91c5a11
+DIST rust-1.55.0-s390x-unknown-linux-gnu.tar.xz 187722100 BLAKE2B 030413321337cab855fdcf6ff4ffdca4cf1105e633fc4b28d049263a5fe40a0097a9e03ff4aeff80b57c761c672d96e65c9f774cd83a9aba0f95180a2eb2dac9 SHA512 7fc83c8723493864a470f32a05db9e16ecba0ff621080d8a3a257e6f42a37bfcc8d364d71aff696991dd85635f6596ffa72efdefee1620c308984536b48d212a
+DIST rust-1.55.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B fa4d8d8bb025a9010a44a9f021ba2fb443146debd9281ba520d764b49db6dd0e8b7b614d7a131f1722b29be4b80eabd3694e14f47a05d87cb3382c799ef96a88 SHA512 9ed8aefb443bc51a33e3cbca80f3ce1e65a565735672a966b73e5f4c8f7363c6d8204ab0f9387739765b70dfa8269372156500d99cc4d74ed94d1c2473c807f2
+DIST rust-1.55.0-x86_64-unknown-linux-gnu.tar.xz 139040728 BLAKE2B 1d7905411b55617178c88a062a1ff3048edb8020126a8c4c047aef762c4fd13b1c8c5de4c06a97477d9cfacadf6dc008c2b7b66862dc0c3fb9a8dc48f12f5ed2 SHA512 4bc304727b1e9459194a9a9ad5c8e1fe63501f01047d479585de6708365b3f59e09aade64c7f4969df204f8bbcf9de9508745d2b96bc25cb74ed093f8053a4d6
+DIST rust-1.55.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d454086c93147737c7c144af288394512528e4ce759dc221d7371b62724857fe16e391949b5b4dac436bdcaef8bf817f577e8d951e1f4bae098d687b4a7bdbb5 SHA512 b175e3ddefd036fce29c80c65a86565583167f7859f0941dee6718fd71baa8596f1788a6bed5d992096959e1deda98dc9c10e8cbc896114b7938a05951c29f02
+DIST rust-1.55.0-x86_64-unknown-linux-musl.tar.xz 267291288 BLAKE2B b96e8fa1c8d2e55c07781db37ddd33ec7180cde29c84f5020f2ba0fbf6aa83f9db32723e191c15df765f965d1314a57d12d80e73d20deaab1333afca65bdfac7 SHA512 6fb700d5d17c084fa520b29f3012ac565eaf891705a27c7738a61bb9899bc952f679987ef3790875b5a7adae836c602b394c7e19103f30bbdf5ec82cf3e86567
+DIST rust-1.55.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 5ccf03518eae6406ff66bff108b26988a6a859e5cf88ca44327f9826d880ea26d6e115fb3e63f6a40d1cb15adc25d6f1c056438466095b7223269fb0d74540fe SHA512 8d84a976d9922d28a5ddac0f47258759a4c7542df02fb9ffede4a3e98ceecc6415229f3eb676a22536ffff842c6e7ee35d50d1507f2d818301493ee3a7db9bb5
+DIST rustc-1.56.1-src.tar.xz 121798264 BLAKE2B 09677b0332022f28a0d80949a6735929dbf64276f7eb57195d8c33e6c80f13c903432ff77d8834093ab551677618fb1d385f2300e2b1b4c064f9c245c696be32 SHA512 193468e211cde9ebc5f6e30b8e3733b79bd8710fe6dd45c7ed8d4392f91010d30466787afd4d0b2041cd7dd994924fee8ad111048824e248bd994959e55bf15f
+DIST rustc-1.56.1-src.tar.xz.asc 801 BLAKE2B 70ed1c26971e864aa6cc9b05eb52c4a140d0d0cccb3ff66d4a13e1b1dbac958c5369f76524c4702311566ed26aff635f5e3d35d9da71d96e070f5f0e978dc2ba SHA512 f997e7962ef8b283c19c97d8b898f3642f1a58c89a9cc5470cf88682263a42e2054d670c12bf93c41e81edf8324a5b51453f402a74bccb7744c7f463cf689aa8
diff --git a/dev-lang/rust/files/1.55.0-ignore-broken-and-non-applicable-tests.patch b/dev-lang/rust/files/1.55.0-ignore-broken-and-non-applicable-tests.patch
new file mode 100644
index 00000000..c3bee9ba
--- /dev/null
+++ b/dev-lang/rust/files/1.55.0-ignore-broken-and-non-applicable-tests.patch
@@ -0,0 +1,76 @@
+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 +
+ 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
+@@ -2,6 +2,7 @@
+
+ // only-sparc64
+ // compile-flags: -O --target=sparc64-unknown-linux-gnu --crate-type=rlib
+ // needs-llvm-components: sparc
++// 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
+--
+2.24.1
+
diff --git a/dev-lang/rust/files/1.56.1-musl-dynamic-linking.patch b/dev-lang/rust/files/1.56.1-musl-dynamic-linking.patch
new file mode 100644
index 00000000..b556228c
--- /dev/null
+++ b/dev-lang/rust/files/1.56.1-musl-dynamic-linking.patch
@@ -0,0 +1,69 @@
+From f11729adb9990528a38df7c703bf589d58998c4f Mon Sep 17 00:00:00 2001
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Wed, 24 Nov 2021 21:32:50 -0600
+Subject: [PATCH] [PATCH] Fix linux_musl_base for native musl host
+
+See https://github.com/rust-lang/rust/pull/40113
+---
+ compiler/rustc_target/src/spec/crt_objects.rs | 22 -------------------
+ .../rustc_target/src/spec/linux_musl_base.rs | 6 +----
+ 2 files changed, 1 insertion(+), 27 deletions(-)
+
+diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
+index 2fc9ab29f..276736159 100644
+--- a/compiler/rustc_target/src/spec/crt_objects.rs
++++ b/compiler/rustc_target/src/spec/crt_objects.rs
+@@ -62,28 +62,6 @@ pub(super) fn all(obj: &str) -> CrtObjects {
+ ])
+ }
+
+-pub(super) fn pre_musl_fallback() -> CrtObjects {
+- new(&[
+- (LinkOutputKind::DynamicNoPicExe, &["crt1.o", "crti.o", "crtbegin.o"]),
+- (LinkOutputKind::DynamicPicExe, &["Scrt1.o", "crti.o", "crtbeginS.o"]),
+- (LinkOutputKind::StaticNoPicExe, &["crt1.o", "crti.o", "crtbegin.o"]),
+- (LinkOutputKind::StaticPicExe, &["rcrt1.o", "crti.o", "crtbeginS.o"]),
+- (LinkOutputKind::DynamicDylib, &["crti.o", "crtbeginS.o"]),
+- (LinkOutputKind::StaticDylib, &["crti.o", "crtbeginS.o"]),
+- ])
+-}
+-
+-pub(super) fn post_musl_fallback() -> CrtObjects {
+- new(&[
+- (LinkOutputKind::DynamicNoPicExe, &["crtend.o", "crtn.o"]),
+- (LinkOutputKind::DynamicPicExe, &["crtendS.o", "crtn.o"]),
+- (LinkOutputKind::StaticNoPicExe, &["crtend.o", "crtn.o"]),
+- (LinkOutputKind::StaticPicExe, &["crtendS.o", "crtn.o"]),
+- (LinkOutputKind::DynamicDylib, &["crtendS.o", "crtn.o"]),
+- (LinkOutputKind::StaticDylib, &["crtendS.o", "crtn.o"]),
+- ])
+-}
+-
+ pub(super) fn pre_mingw_fallback() -> CrtObjects {
+ new(&[
+ (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
+diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
+index 5038a967d..25d634a1e 100644
+--- a/compiler/rustc_target/src/spec/linux_musl_base.rs
++++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
+@@ -1,16 +1,12 @@
+-use crate::spec::crt_objects::{self, CrtObjectsFallback};
+ use crate::spec::TargetOptions;
+
+ pub fn opts() -> TargetOptions {
+ let mut base = super::linux_base::opts();
+
+ base.env = "musl".to_string();
+- base.pre_link_objects_fallback = crt_objects::pre_musl_fallback();
+- base.post_link_objects_fallback = crt_objects::post_musl_fallback();
+- base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
+
+ // These targets statically link libc by default
+- base.crt_static_default = true;
++ base.crt_static_default = false;
+
+ base
+ }
+--
+2.32.0
+
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
new file mode 100644
index 00000000..a51257c9
--- /dev/null
+++ b/dev-lang/rust/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gyakovlev@gentoo.org</email>
+ <name>Georgy Yakovlev</name>
+ </maintainer>
+ <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 (experimental, not tested by upstream)</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="rust-src">Install rust-src, needed by developer tools and for build-std (cross)</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.56.1.ebuild b/dev-lang/rust/rust-1.56.1.ebuild
new file mode 100644
index 00000000..df612b6d
--- /dev/null
+++ b/dev-lang/rust/rust-1.56.1.ebuild
@@ -0,0 +1,686 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..10} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
+ multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
+
+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 -> rustc-${PV}-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 arm64"
+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}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+
+# 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_x86_sse2 debug doc miri nightly parallel-compiler rls rustfmt rust-src 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:
+# List all the working slots in LLVM_VALID_SLOTS, newest first.
+LLVM_VALID_SLOTS=( 13 )
+LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
+
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+# (-) usedep needed because we may build with older llvm without that target
+LLVM_DEPEND="|| ( "
+for _s in ${LLVM_VALID_SLOTS[@]}; do
+ LLVM_DEPEND+=" ( "
+ for _x in ${ALL_LLVM_TARGETS[@]}; do
+ LLVM_DEPEND+="
+ ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )"
+ done
+ LLVM_DEPEND+=" )"
+done
+unset _s _x
+LLVM_DEPEND+=" )
+ <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
+ wasm? ( sys-devel/lld )
+"
+
+# to bootstrap we need at least exactly previous version, or same.
+# most of the time previous versions fail to bootstrap with newer
+# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
+# but it fails to bootstrap with 1.48.x
+# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.txt
+RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
+RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
+BOOTSTRAP_DEPEND="||
+ (
+ =dev-lang/rust-"${RUST_DEP_PREV}"
+ =dev-lang/rust-bin-"${RUST_DEP_PREV}"
+ =dev-lang/rust-"${RUST_DEP_CURR}"
+ =dev-lang/rust-bin-"${RUST_DEP_CURR}"
+ )
+"
+
+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-3.13.4
+ dev-util/ninja
+ )
+ test? ( sys-devel/gdb )
+ verify-sig? ( app-crypt/openpgp-keys-rust )
+"
+
+DEPEND="
+ >=app-arch/xz-utils-5.2
+ net-misc/curl:=[http2,ssl]
+ sys-libs/zlib:=
+ dev-libs/openssl:0=
+ elibc_musl? ( sys-libs/libunwind:= )
+ system-llvm? ( ${LLVM_DEPEND} )
+"
+
+# we need to block older versions due to layout changes.
+RDEPEND="${DEPEND}
+ app-eselect/eselect-rust
+ !<dev-lang/rust-1.47.0-r1
+ !<dev-lang/rust-bin-1.47.0-r1
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ rls? ( rust-src )
+ 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}/libexec/.*
+ 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
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.56.1-musl-dynamic-linking.patch
+)
+
+S="${WORKDIR}/${MY_P}-src"
+
+toml_usex() {
+ usex "${1}" true false
+}
+
+bootstrap_rust_version_check() {
+ # never call from pkg_pretend. eselect-rust may be not installed yet.
+ [[ ${MERGE_TYPE} == binary ]] && return
+ local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
+ local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))"
+ local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
+ rustc_version=${rustc_version[0]#rust-bin-}
+ rustc_version=${rustc_version#rust-}
+
+ [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
+
+ if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
+ eerror "Rust >=${rustc_wanted} is required"
+ eerror "please run 'eselect rust' and set correct rust version"
+ die "selected rust version is too old"
+ elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then
+ eerror "Rust <${rustc_toonew} is required"
+ eerror "please run 'eselect rust' and set correct rust version"
+ die "selected rust version is too new"
+ else
+ einfo "Using rust ${rustc_version} to build"
+ fi
+}
+
+pre_build_checks() {
+ local M=4096
+ # multiply requirements by 1.5 if we are doing x86-multilib
+ if use amd64; then
+ M=$(( $(usex abi_x86_32 15 10) * ${M} / 10 ))
+ fi
+ M=$(( $(usex clippy 128 0) + ${M} ))
+ M=$(( $(usex miri 128 0) + ${M} ))
+ M=$(( $(usex rls 512 0) + ${M} ))
+ M=$(( $(usex rustfmt 256 0) + ${M} ))
+ # add 2G if we compile llvm and 256M per llvm_target
+ if ! use system-llvm; then
+ M=$(( 2048 + ${M} ))
+ local ltarget
+ for ltarget in ${ALL_LLVM_TARGETS[@]}; do
+ M=$(( $(usex ${ltarget} 256 0) + ${M} ))
+ done
+ fi
+ M=$(( $(usex wasm 256 0) + ${M} ))
+ M=$(( $(usex debug 2 1) * ${M} ))
+ 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}
+}
+
+llvm_check_deps() {
+ has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]"
+}
+
+pkg_pretend() {
+ pre_build_checks
+}
+
+pkg_setup() {
+ pre_build_checks
+ python-any-r1_pkg_setup
+
+ export LIBGIT2_NO_PKG_CONFIG=1 #749381
+
+ use system-bootstrap && bootstrap_rust_version_check
+
+ 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 \
+ --without=rust-docs --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\""
+ 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/' compiler/rustc_target/src/spec/wasm_base.rs || die
+ fi
+ 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\",$tools"
+ fi
+ if use rustfmt; then
+ tools="\"rustfmt\",$tools"
+ fi
+ if use rust-src; then
+ tools="\"src\",$tools"
+ fi
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+
+ cat <<- _EOF_ > "${S}"/config.toml
+ changelog-seen = 2
+ [llvm]
+ download-ci-llvm = false
+ 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-stage = 2
+ test-stage = 2
+ doc-stage = 2
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ rustfmt = "${rust_stage0_root}/bin/rustfmt"
+ docs = $(toml_usex doc)
+ compiler-docs = false
+ 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)
+ debug-assertions-std = $(toml_usex debug)
+ debuginfo-level = $(usex debug 2 0)
+ debuginfo-level-rustc = $(usex debug 2 0)
+ debuginfo-level-std = $(usex debug 2 0)
+ debuginfo-level-tools = $(usex debug 2 0)
+ debuginfo-level-tests = 0
+ backtrace = true
+ incremental = false
+ default-linker = "$(tc-getCC)"
+ parallel-compiler = $(toml_usex parallel-compiler)
+ channel = "$(usex nightly nightly stable)"
+ description = "gentoo"
+ 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))
+ # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
+ # https://github.com/rust-lang/rust/issues/74976
+ # https://github.com/rust-lang/rust/issues/76526
+ deny-warnings = $(usex wasm $(usex doc false true) true)
+ backtrace-on-ice = true
+ jemalloc = false
+ [dist]
+ src-tarball = false
+ compression-formats = ["gz"]
+ _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
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ar = "${cross_toolchain}-ar"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="${RUSTFLAGS:-}"
+ echo RUSTFLAGS_BOOTSTRAP="${RUSTFLAGS_BOOTSTRAP:-}"
+ echo RUSTFLAGS_NOT_BOOTSTRAP="${RUSTFLAGS_NOT_BOOTSTRAP:-}"
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ cat "${S}"/config.env || die
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ # we need \n IFS to have config.env with spaces loaded properly. #734018
+ (
+ IFS=$'\n'
+ env $(cat "${S}"/config.env) 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 ! (
+ IFS=$'\n'
+ 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 "${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() {
+ (
+ IFS=$'\n'
+ env $(cat "${S}"/config.env) DESTDIR="${D}" \
+ "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ )
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+ newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
+
+ 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: ${symlinks[@]}"
+ 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}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ 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}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib"
+ MANPATH="${EPREFIX}/usr/lib/rust/man"
+ $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
+ $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
+ _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/libexec
+ /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 has_version sys-devel/gdb || has_version dev-util/lldb; then
+ 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}."
+ fi
+
+ 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
+}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/musl:master commit in: dev-lang/rust/, dev-lang/rust/files/
@ 2022-08-03 11:59 Jory Pratt
0 siblings, 0 replies; 8+ messages in thread
From: Jory Pratt @ 2022-08-03 11:59 UTC (permalink / raw
To: gentoo-commits
commit: 480a5a3e7993af0f29de1609d2f5ffdeb815e1a7
Author: Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 3 11:58:46 2022 +0000
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Wed Aug 3 11:58:46 2022 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=480a5a3e
dev-lang/rust: update dynamic linking patch
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>
dev-lang/rust/Manifest | 102 +--
.../rust/files/1.62.1-musl-dynamic-linking.patch | 25 +
dev-lang/rust/rust-1.58.1.ebuild | 704 ---------------------
.../{rust-1.59.0.ebuild => rust-1.62.1.ebuild} | 62 +-
4 files changed, 106 insertions(+), 787 deletions(-)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 69aba147..49a67bbe 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -1,67 +1,3 @@
-DIST rust-1.57.0-aarch64-unknown-linux-gnu.tar.xz 228665060 BLAKE2B 98fe268d060a7f19c284bf02fec148550807b6c75fad042b85f07b22c127f911e4e7e6d9738b4bef42b5a46cc888e5a0df79307cc84e39adf3ed9da3fd531188 SHA512 71d32e1ed3fc4a2eaf3594112b3b43ab82bd28b35e547542f6c1ed006175d7cf805be373a4da8b962762962dd32fe951c8ca7c0a424addad5d4e828441d5386c
-DIST rust-1.57.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B fc832ff510b498a5763a26b420a6cdcf6b2b5fa8ce655f01ab23190f527cfaac144ac68378c6af3d3048440330f94b5d213d049c65ad87f0701b0555ebfa2b6f SHA512 a225f1db92c6e57b977873a3e5dbd07fa1288d2f8d79a879cc72dfc0dff66e70ce56619198cf36376b2774272c85363b8e8abf14efe8404f4cc038410c648ad3
-DIST rust-1.57.0-aarch64-unknown-linux-musl.tar.xz 224700500 BLAKE2B 2eb3122af42c499bf92b93946b20b6414d51ba895a77a8e9c53dc437a20093605b2e9f22d8f88b4fc3ca7f7b75d425a2442b36fcea54b583692c32f728f23bfc SHA512 0850861d9d2c22d76b1550e7d6b64c746c3cc24b51a68949948528bdd93621f74e6c07d23428fcdb280e884e469f2e4f2d3f9a7f81ccfa61d41265e31af3a9cb
-DIST rust-1.57.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B f594a31b48af2ee7835f89660a13e336f3cb2a01d99a5d48d280c06698d69712de190b35ddc682a9ac7bb6bad1edac9c3bde7262fc5a9732ea471984e1bb99a7 SHA512 aee3fd35c8e7c6b9ce651d940f8fbb17a2bd2a58d8b85421ecfb4a72d5c56878a5d129166896ea717c5b3e5b9c7f61376801d766af1c9a4d1a090327424e93db
-DIST rust-1.57.0-arm-unknown-linux-gnueabi.tar.xz 206890752 BLAKE2B 5d314766d333708158df7ef01d740e0cf0e71044edbdeb180f491c78a39dbf9460b62a1eb70076787e33a3199821b18734da59f892c0c251effed8e68c0eb22a SHA512 c01a6a408bf334474b2060ef70ed7c6c53e5f3a7453de74e36e59013292584a129b50530259327ae410830852173601dd9bccd1cd801d9f916d1a3e93820e481
-DIST rust-1.57.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 494d4eec9795de0150da9a7f5ba6cfbabd8da99dc65e5e02360ed4961e42cc3761f147ca8f7155badf61ec85d2898ec866aa5dde53e555ab34ead6b4d32c737e SHA512 31e9f00de8252e905d4de279860ab7eb287237d7d5330122b989ef2199fa8d209ef7a0cc71b83db82b78ea632d4d3b9c00b8f49a272dafd6e1f78f62055fdf4c
-DIST rust-1.57.0-arm-unknown-linux-gnueabihf.tar.xz 206580040 BLAKE2B 3ff02d3308cc27e2422609055a82ed36dcfb3ed2180091653d7ec21ccbb07f3685c58dc5d20f4abf4e342ce18d1d98e47c0a82180b5dccd57d09d215984e6b3d SHA512 9351db6cbc029c1051da277292bd7c3728b6ef250da20a20ee619b45938ccdcd8da1ecfec143734cc692ca3a39690f2f8cd6c332e04d0fd048943a8203eb48fc
-DIST rust-1.57.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B e5495533d128a99505c7856b27eeae22f85b3f0783cc0c9d52e8e8e9fbcebee6b909fd3465a7b49d1e1da2477c1864fdd048f01f7ba684ed55133c925522aad2 SHA512 bf06cd5c1f6731b02351136c7682d05e6a7114702124768b5cde1935cae4dd1147352352ad9b8dded575b90a57a6cab7c09dbe179404da0e378e992e1a67f47f
-DIST rust-1.57.0-armv7-unknown-linux-gnueabihf.tar.xz 211614620 BLAKE2B e8c1f68d4e0846ee9425bd1747a423e1ab6161216a3cd276fd5afc13229dad33e3993d31305e3e38b4d3f6b21bb01fcdc9612d2217778a7f91915c65f1aa91d9 SHA512 667d8f6fb56408782c7a9e0c5086013d0350d6161d52ca4cd948ea39a02ebdf657dd45cb0a135ade8bc1e856c0962040969416fa1762e3bb55a03574fff3b1d1
-DIST rust-1.57.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 6bcb5e7c700a53d8420baa8747c06b291988b806aca6da447c283979f7324f31087482df5606c49d287c355e31b2952d7ed9f40713bce819ab8c02d1863413ce SHA512 164ae760f53820dddf93ce7432553d1698bcfb1af53dd6054d408db87f42b6ac2d7c71da375f8486675b2c6104fef295faff481e5167288e0df782ef74cc3006
-DIST rust-1.57.0-i686-unknown-linux-gnu.tar.xz 223062024 BLAKE2B d0e1d3aef1764403dcaa2b1d2a5ee887562f0b59b05b2f984e848da60f772c58bdd8a6073692c6b71dc741ff3d25a784c04478260104962d308529516a56cae3 SHA512 9dc7d650bbe35d3967a883e91bfd2a3dcad633c41c00a41d9ca78bc336b1e3262bbb4100a76d42169700dc3b15d4066fa065e785aed1c0a46df4736dfd00d7c6
-DIST rust-1.57.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5d6f4d31e1418124cbd10a7cdb5ecbfe3334256d238e058e5524120438cebe85af68a8dfd604dc311d38e553a559b471dc71ef2870f89ed2cf05f6291e65ac0b SHA512 4957bef14da4bfc34f19d69cc64b2e06fd329566fc941e399105eea6fe4de0de90cd50c72baeaea6490f93bc4b0af14c9591584d97d84873d9c87fe7c177c6ea
-DIST rust-1.57.0-mips-unknown-linux-gnu.tar.xz 165094616 BLAKE2B ca5965c40ad81c24ee00f895e00e26cab1a2c0322e2517e4793872707facf03430a92934b79a3d59f349bfb7513be4d1914073fc3b20300d5fd5c332bcb08224 SHA512 1fbd2aeb8e24d236f97c81a4136917cc8c705724c72567be095323a878ee18ed646fc2f4bec446a9a505fc4c88a708efa901970fdb00a67179c34cf97906a3b4
-DIST rust-1.57.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 230ccb3a534515c9ecd1ca2a3fced2e3688547a3ce42967eb06d7a04b79695eca74f1cf13583631139801a7ad60a31c7f6a1b2821dd13aceabc95386122034a0 SHA512 91313f0ed942d23bb490dffbc4b7eb9a441a09ff5925323df68a38c15aa4e3f5c1bad15c2700ccba8625fb35588135a9ba5f09c7bc5ba7d4f8486fed268a8000
-DIST rust-1.57.0-mips64-unknown-linux-gnuabi64.tar.xz 170276060 BLAKE2B 0c6defb288bdb11a8c81ab082944196c767424b8bab6997a51279c7c6ef6c1163c9715493b274420bca9d3f5e7fe7422d403a24162effc3cd880633641d23995 SHA512 339d1dc24e1227195b1fa1a72ceddf592026b4edf234141567e8b8c33c80e07aea71dd73962182783b60271829db8544e1ca6172aaf5ed5ae1cade848355508c
-DIST rust-1.57.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 3b6ebc9e8678946f57e30452a880be3bf5a5a949683e7230cbda776511fd68a7278ecfc741c823d2d1362f200af19cbc25db7d67ab4ade8561a3d9224fd0313e SHA512 0a161f676162684da557d010de4833a6ef229592b6cb9cf55938cb85d12685e28fb0e4e204688b9c9f203b34095831de06c25a4fea48a8ef17226b15a214af0f
-DIST rust-1.57.0-mipsel-unknown-linux-gnu.tar.xz 168175700 BLAKE2B d544173e64d81b5cf74f16810f0c00fab0e2b628f90a554a33596b1b3140ef5183db5123f956ff71269761915469a7d51bdb945c02217f47529ae45f1200edc5 SHA512 7963364478ca613ca8670cc71b72e8423febe3062269ea1e5e82358d54c6d5e5006f85c69ae5c746bec296bd3e97883358ab27a9aaf59703984fa4186c5e01c7
-DIST rust-1.57.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a4056c8006cc5f3d7a548b55ff85f42003d19a7323bd3829c79ba370837c1982a0ca6d15e5d2dac9a4c75251662b375c8243ba0d2682b684b6fe258b25c32fbb SHA512 3db703e462c5c2e974e039c986094ae2bcbdf5e4b2163bbca4d20062be2e54b39f04d72d3f5929886f65e79f19a041e01cb17ec73db4611c3208b51efa2b7e89
-DIST rust-1.57.0-powerpc-unknown-linux-gnu.tar.xz 183173668 BLAKE2B 8d897751ce518f0e7fac16fa67645b73337cf2aeca20ffc8ceeace6591043a1b69cae9ba8af6271ad2b7b4448a64e4b5063a2efcb2cebc72c1d0a95c576dc07a SHA512 10ca7a769b53453c503d8da2ebd5da49e016d31a92e898c4aea4129cf1225330b2e1b4ac1893860741efd9ddc9ce409ff9d9fc00536b960efc928562f2e169a3
-DIST rust-1.57.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b7cfe911745b76e8b2a7090db19a6cc973ff361b0fc23c1d3d104c08554d7818866a6832c89cd8e1dbb519de72618ab362c9e6b1971a2babd0af607c9db9b0e0 SHA512 385c022053f6e102aa9c96c49703bd441b466129bffc5fb3c233f432edf2f2adad5e9979e0b657016eec33cf4b6c7bf31131a0e831c990d071d7da758f5e03d8
-DIST rust-1.57.0-powerpc64-unknown-linux-gnu.tar.xz 193868872 BLAKE2B f60c9d320fa6ca0d3b52dc27b22efb50115a1338ce12ea1071499d3abbd60e17c4866a59495fbca725eafef3675b9ca9417c87cad0262541955d2e308eb79f2e SHA512 4b5b2d461cd093f176c1624b29d4174bf9558e8760f7be84b9f9e353e09b622d89548e5bdc91305cf76a072ed2b64f4692b1864b90c86ba7e1a7a9e5df205adb
-DIST rust-1.57.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 26ea554afaca2e453130d400d3315d0c857e4ab92d5c0cfd21035548160a3c00f801adcbc24387aa6f56bc2907e3aaa3712b4bf35abc10128e3e712b3a451043 SHA512 90ff52af04044b073855c2a91bfe2bdb8fb8397a2d59ca50e38e5e235bd3379d993917546d1dacf3c25db6ec386f967cb8c9c5c7a1b76b06fa60d50a5c066176
-DIST rust-1.57.0-powerpc64le-unknown-linux-gnu.tar.xz 203489092 BLAKE2B 5174c149bd6565ed2b709356caf940f7c051a1933a35f9801a31331358277e80d5262a73ea47d484abb2c12ad26c52bbeea5d2ee30f4c8b45e163d5fc788d848 SHA512 7e0809b66086f1c9dde14df5bd9f08757e32bb58041b74150415f798d81cb4ca01a6d69d529efe8a93026f251aa8f1711520defa8d86de64f20d9055ee1568e5
-DIST rust-1.57.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 0ed205cf7d3712e3501c228ad7d116331eb3c831437040dc7d4cbfa86de80372db1b116bd2c88ef9c05c57279499dc7cb6a394c216e89a69a6b033d56e4108b0 SHA512 2a3fd37e32382c747227f35e144966bbd241d57b9e06acdb444ed0ac68cf174dd21c565448d9e7ec032d14dbf6de580ca37e6d10b66446dcbef35b0dd35a2c1d
-DIST rust-1.57.0-riscv64gc-unknown-linux-gnu.tar.xz 196918164 BLAKE2B b41e958b690a5f6f46744dd38a464a0de0b80d9b4974f1fea46bbce8b26c37b88ffeb3b42e9cd6a3006e8ad8b89a990945dcf1e814041399f6fa8831089c074f SHA512 43c11df8b6621c4e3ccbbb81c043cc3b2f8c897f5d80b03a39ec73d0d73f1a3fafa1a8a607fcf6e16204eb424ead7b9dee0ffd401c185440c4a7b80e84921f5a
-DIST rust-1.57.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c55cc1c7c3e80bdb0527fcfe9b3a0bcb7edf84bea85e842ea425b5498247aaa8ffe19f05f1a2d8c93801dbf1d5e308760e8222311914179deb01f910aae279fe SHA512 df0d218a78eda0d005bb88e18a314f326165776449f28d4cd1aa014efa0e6870bacd2580f5958250e9a00de75c7327b20b4586606a8b120a7d658641759be61e
-DIST rust-1.57.0-s390x-unknown-linux-gnu.tar.xz 198621068 BLAKE2B 92af932e06c529ef27e389d35532cb7eed482c36bcc196d6c6934a442cc180815862ad7ee92c4ed97f69963ef6cfd617cab2bc254a81ffd35d88de267fb5d084 SHA512 4cc63e93bbafcbba2122a862200bf1dd241fe84f526778e1877c14237984fdeccdd3d2b3dfe73428b1b97bd253c1ddf98f4302f40709abbdd52ec721d5ccdb6e
-DIST rust-1.57.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c088d5904ecaadcad09d21dcffcbe1856ea2165cb45fcdce31ebad6edddfeb292bb644548537219ec301c4f5e417091d879093a627ea5efb4409e1db36771431 SHA512 c1c2f43033ba1a2ed28e8c60a18cc0de1dfdc7f5361c101cb8318f0f2c3be911784e7d1cc3a61456f1b2c39a5b6df2915b9e56e20dbfdfeb959addf4dc93f01e
-DIST rust-1.57.0-x86_64-unknown-linux-gnu.tar.xz 151033748 BLAKE2B 61ecece6a8aa31a2cdf8dcf22514c19a54fcfda3a1248797a6a98e9bc42cf4f4278be21369270a6418b7c416875394055fceb49b5b1d21625e2759b97b2447e8 SHA512 54016b58fe85208c0d98e61cb52f2549bbb9731d7d631b4964663c91c91b7ea0ff4c224c3d29a770de433e6a0bcd92d2fe757563bf68e224a20c1cec6d031a7e
-DIST rust-1.57.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ea41b27fd25cc75efac73203688ee0882767fc76a2fe09b5e424c42467d3e332463c5560cc58f3b20f6e4b44289a25cfb0d36e38a7a9a7b3950ef875a59dc9ae SHA512 8b955bfce6c130e4b95054b98646f7f9b89e621256759ee1ff533df5f777312dd7adbb192ee0076c9b9baa6883a74a9def50ef598ba8c707762290d465c9a8b7
-DIST rust-1.57.0-x86_64-unknown-linux-musl.tar.xz 260333980 BLAKE2B 75342ae8637355e714d5217d78604cfa6a601d3f9bc0ed4667ff0ca57c6521567b19b9bdb10f79761e2e5fd21ca10e12f3fae0c65791118fdb0c35f8f88349f4 SHA512 204ed493528757b8e3e8df13d062c9ae74c75c3e3adc1a2efc0dfc33d2525629168a558dd32653f44a4365191bf203a4415a77152276288a8e122e6bd587394a
-DIST rust-1.57.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 506400c3ea70469cbda0e492e85d41b7f94fba790ec19d1c3491bf4a00d283f97c8fb37319ad6c4a43b22a2195c21d1b9e3c16a5b2a9a82833ff61ad49bdc793 SHA512 793369dc7a854c48a72d81446a0c8eb9d83a071af77758e0bcbb8e4d518fb87c5a23c085202b9b427a02bdd772ad9c82724b34295b851f26f384c3e801bf9a04
-DIST rust-1.58.1-aarch64-unknown-linux-gnu.tar.xz 229585460 BLAKE2B 301b201cb40249005a1a8adf34ffdb0bacd22e1d919a24dec9bb8331c2243de1b7cc312c91a87fc9e11091cd9ad517347ff09143000d9de051b3c9a6e0780f9d SHA512 04e2cf2116e16fa293c7f2d29816012520b41df44b54657e289e7affbb91af5a5001d140a49aab1286451b93e93b0171edea77f61f01085136d1be1a3baac4a2
-DIST rust-1.58.1-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6da55597fddd643350c73f28a15dcfa935529c0878a199819b9bad6f3ea2542f9021e24bc1a6c8724ff14d36007c00f8906dd1aeaff33b0a99ef6982e8f711b3 SHA512 57debe0afe52c3af3eb53e4efe70ba194ddad449d9952174f8a775531b83f8ab0d66462e7bdd06712547e8f675d330a151d20d183daefe1dda2f0e3805695714
-DIST rust-1.58.1-aarch64-unknown-linux-musl.tar.xz 226068748 BLAKE2B 7f9680b0ad3f9a8349f3032f63d23b6d96ab43245d3025d0e4307a29b4353fd2408e7de572a10a77b261634b8fd4e9e6054ba9955b2440b608fdad2c88c12bfa SHA512 6400221a8ae04aea91f9df0f8d82585bcd380f22e80fe813eaa1cadbf592c5207665ad008d938b399e34fc2cb0485b16f993f94d431c290a69a696a4faf89e05
-DIST rust-1.58.1-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B fd22d8a3157a11df45e166b8c961a435bedb079254c1d7f0a738adc1065169a03c897a32bf8781802ca48bcb983c761e6985e532c0d76e90c3684752d8cff9d1 SHA512 54fffa8120fc6b86c57faffdc7857adb89e5fd217b0e753e76e6fadc54aa086243cb7ba3c2c49ec4f44ea8538223312469908d24add2d28203f41c16e9224204
-DIST rust-1.58.1-arm-unknown-linux-gnueabi.tar.xz 206480968 BLAKE2B 32ab78a1567d31bb1b5ca36fcb14fd1b002675baab0f688f931cef6524ffcee4257e00fa25a848f73f25656ae0b58beb0e862f1a36d4d5fad016316af3d1ab2a SHA512 94e7cf238235e845761e53fb5802ef0ce3a02c4675001cf67d05bc565403ec1d54293557d73dce7396147381c331ebfb0313e473289c05b65541f836dd8b4e6b
-DIST rust-1.58.1-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B db3275db531d78d728b33678be3869738009b65985aa3ad4f38aaa853cc1b84a1d2a89f98e203f697c457425547b80ad5826e7c820d49c767b5cd1df2db93bdd SHA512 fcca26b6b0dd2e7529efc93d1c4fdfcdf55c85f40bc247b3af9741403a085bc6808cd304ba535786dd2debbf4952c9d9fab62eaa61f1d3d8e59ce78bda992eb0
-DIST rust-1.58.1-arm-unknown-linux-gnueabihf.tar.xz 206545444 BLAKE2B 203a562ac448e7efc4fd519d98937f2deeb70c931611a6f0efc87947f5c48cf0c0cb85358fb9ce1dce49bdcde015fd2d5fd5f3b149d7370c05649579522d228c SHA512 5c0404d878300c1a47597bdadff7fe93c3b0a115320dbf5299dfb4fd06ad322217f4b630429a9db3a5ef54c56706c1ebdf512fcd663f379f1c2df0cf3612459e
-DIST rust-1.58.1-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B bf26f6540d96d124bb503b6e38acd87dc16ad16c5214559edd26f4f4f94f1f06a7059a09a7ee504721130576d6ddc5c7b2550f7bc0edffcef37bae3c0abb618c SHA512 1fa1e533adb1e355411cfb706b7c47712454547966bdf07687d9b563cf5dba9b4419d646227719a9362eb923c597f8461c194e56efcbed699610faa209985df2
-DIST rust-1.58.1-armv7-unknown-linux-gnueabihf.tar.xz 212381428 BLAKE2B 0cbc4ace0b7693de1898f160d5e76c7ff993aa8e8135a094b23dff736326ff7616471068f02a064d2b88c816fbf6f943fdaf82629dcda0e0e07b6a4a3941fcef SHA512 c1dabf7281c754d3c89044b1277618b0e928efbecde47ed98133d3f8664722d5b3dfb5fbf485cfb4c98c53d3101b192070c5c41e4395cd8563b0e8415abdf2a1
-DIST rust-1.58.1-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 85f3892a41dd381250219cb0c0c8e70b3902e5356ad34066a6db319193dd580e609975e38356097b7ca0907d62d188459c5a72783c95e77f1d08a50ae8673458 SHA512 70a2269b8326ed8b5e53dbd6698237c4d843086a139c4f4ddd6e04625f0defbcaff46149981e5a1502d56da1393b01bc0c6f74fa8e6ff407f6eb45cc5638ed41
-DIST rust-1.58.1-i686-unknown-linux-gnu.tar.xz 224773372 BLAKE2B d90db8b20611f6430759399bbccd0359f2b64ba9b9aa50312ce51dd4a43728897ab5c31d3c6bbee892db8e6e500a19184eb325a312231458cf99bad7c6f04b58 SHA512 0cfccc77cf62002ad99751744ae5a910d48c142d596eb88e187fc061c4b3a8cc1d99634802bc06b0302c41bb3462a17453af1beab6ca694a1535a1b20e10fa47
-DIST rust-1.58.1-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 1fc809defcfeb240f756b3e7158d3e747b2e21ea81f3029618c58c4070070a2068603a4e93f7928a9ec3d120d7b2c7cd944d1ae03ebff1b9d5baea823dba54b7 SHA512 aba1f533227794755ca81c2bd8a3bd35fd9ad4affe5bd39430e0329310fe6c6f813fa7d95790958c61c6b22a4e4fea3488e406f05fa30c27eb6871f71e2e6e5d
-DIST rust-1.58.1-mips-unknown-linux-gnu.tar.xz 164572088 BLAKE2B 117dcc6483652c3f18436e185b44d605e64b9b31634484ead2d86c1caf6ec47a53eeded5dd766e2410ce59dfcd3f7e71ccf924afab0f34988e00e4c9324a5f13 SHA512 08df5ca03f786aae814b7a22a7d05e18107a1f185338880ea1b58df23d6b1d5c9f2359650ad38c30058a2d2d6f8ae32dffc3926ff47fd3342049c2251eb48463
-DIST rust-1.58.1-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 275a43c158a444c3ab27f1e45a9de294a059c21edf7280482303b83f6b0eb65d309021a82c49410b5b24828b88f65888529e95b01886ad20f2f4c187f595b788 SHA512 c70800d0629f92e4640a64a276575b5d6c1e92c2f1b6c7ca025c98a93a2665cbd7192d2fb697c421adc34fe397297c4cb78e21b38f27fa4261483cbf423f933d
-DIST rust-1.58.1-mips64-unknown-linux-gnuabi64.tar.xz 170025876 BLAKE2B 05cac890ccb9e37faeb3d995555b6f7f52281619101f033038ef056e7ee75b0c5eb2bd14357c1f8b0f5e96b9e2877514ee870bd75be1b28dce4906be95e6e3b9 SHA512 7d2fc1f0787f828fed72b1681f2668bce7cf25a87a01a818dfec18eda0fb63fb4a5e4aad8115e93dc4c8398641db4a476dfcaea07e6826fdcea727118c64e286
-DIST rust-1.58.1-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B fc25396963178a21a5b0a999e8dd3c9520b3056483ddde1f8a284747a078db0dfb0e808f2292704680e37c5cb2db990ad8311efdc0b32e2a65fd93d389c2a09c SHA512 32ab00c666c33ab53a975e9abffb7645d2101e8f508ea67d2e63b1ec01b4785e384bfe2966ca237b5494e34c2abd15e509835fa161709ddbe1c69845f26a6f43
-DIST rust-1.58.1-mipsel-unknown-linux-gnu.tar.xz 169136184 BLAKE2B ae698d08e2592b32b5a0927536e1c2a506c2782f9449fe20242d2ebbc5cbccb2d3a53874b973d88898157b233a88ed80987e2e83a316c05c0d478b1021c49c41 SHA512 ccb13dbb41c92956a437d0879fe9d3ad0a2aac88fa1b761e3b68a6536e389ed4997d1682730b2078fe01e68df0ef64bbe43dd2d64595dbb4ed388fe59e1d6dec
-DIST rust-1.58.1-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6b14cb176bb33207aed7a01de755390df0f71163940fa8121b51dccefb018cb4dd1cfe9efc359f6bb941104b8b08db0cb5a94c3af880058e59904884c5dff3e4 SHA512 1e30495303f9c6289223a2970d419a70885a866468717254b3efa5124e21cb06830692cfadca33ced94a383d1b9af43b70c08235e935ee491a1de50eafba96b1
-DIST rust-1.58.1-powerpc-unknown-linux-gnu.tar.xz 183853716 BLAKE2B a2b98d2c55b5bda8647301536bc8e95b72f98f41018f9b7574f85756d2cd2980fc3a3e995bdd0ed5226b7f18357c5aa3c2f8a05b1679d3dceeae6dfac7484f15 SHA512 5b9010bc3685889411fab6a06727a320123029c037a01cbd5b69f037a87ed595362b698264954b2d3dc2adbaf422fd54d7b56d81512b62147c1922aae77afa22
-DIST rust-1.58.1-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c428bb51fdc740ea9499a1a853f4be93a53c23e59d5142d33bf103ac46e32716505eea3e45174ac3b88ffa12caa4dc010dc2d02093f397ce45b4af27f5c4191a SHA512 b3ac66cc88c75f77f7f9632c2104f45a6a730a83b75bd7b531dab833e8e5b512ef06bfea433111302f64321b688f0817b95c5eac9fddd8ff44bb49934a616eea
-DIST rust-1.58.1-powerpc64-unknown-linux-gnu.tar.xz 194177236 BLAKE2B bb0c23288014207123345deb06e40a45221d0149e8563c374810892b68cc2b5838b5c3f8c630522723daa633c5fbf72aed16e977313a6d1ce27697c22552681e SHA512 8a089c44d2f50d4677a6aa82e6308d47451ca588243e0df3fbbfd13768002f0caaabeca0d6a7f113b8f63477565296e5cb89f27760621a327cf9cb5b4999eeb5
-DIST rust-1.58.1-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b94fe36ab1896bfee3d7e7f2b17dad05d33c672407955fe45758d167bb1fb4df4d33040e6d18dfa966d33133e181ef9a0e7dd04784ed80e30b38175a901859e5 SHA512 6edd981ded134e0c2e6198014ff37868d7e71d0d2185284c28a35450ab226ffd460faeb29e8aea6d5e75a2fa94874e01c9987f1f1470efe061859d06f3d3e605
-DIST rust-1.58.1-powerpc64le-unknown-linux-gnu.tar.xz 203175404 BLAKE2B 53ebdad5859fa7a5e2cd79ea31595aef65a8cc54e11d887f04385500aeac6dd886273f7736271aeb71c70e0d512fd986f09b54ed1a9c744432688eb71c74edb0 SHA512 abaa2b749987b4a1dbc20cc3dfdccc694bce0d1e126d8e9c03dfdcaf85c5be2a2d28f9877ccdaec847c499d7044f955a70f454dafb24dc59ecb5854807eb2289
-DIST rust-1.58.1-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d5cdf7cfca4d881931a08bf67ca1c08fafda621746b01b8e12e41cd88f5ba8107c1bc86b70f84eed4e6137f6d92ae712740b57505705c7bfd3454d8ca1131eb7 SHA512 39a9649ac0645ea6df93cef59baa6d197b9cfdf88f0c1b3846e52369c8e3e293ecf9327cfa6b5457be65896380c13445ad05c3a0cc213da0ed9bba3c12ae9b8a
-DIST rust-1.58.1-riscv64gc-unknown-linux-gnu.tar.xz 196828436 BLAKE2B 9b38c585146f0832d9bc1bebbdab086f351bc88c27817e44ff251c1566b80ee5e573b59764a22802d246023ade332f861096f2e68504c7b64400754ed2676695 SHA512 d268e5a45542f7684d52b694baf5c9b504837fa43d2f5a298e3fb4e335bc6789cdb868651614fbcc1d55c13ded1b2134d57103f46b098d0a8d4a7fd58fb10b03
-DIST rust-1.58.1-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7b234a9fe76cf39177ebc6ad54799bce80fef97151c257b58ae08321c5fe427dd5b5a70627b5a4011e32560f63f6f7b6fddb42e58728004406aec6a9e7597eed SHA512 ee4a1c52cc623dd1858ce8d363f0aaccd58b8bed27a0838f399f1b5cc51f0c123d98056147a266f45724b6a25b09b11c7224c4bc01f208ff7d77e906c850aebf
-DIST rust-1.58.1-s390x-unknown-linux-gnu.tar.xz 198204996 BLAKE2B f6f325a10aa9c16510b77b7729410d08d09b83dadff3b8ef7e06642d8c6a50a153eb17cef338fe3e3b7efa3a48ae0e318414aea794f2f488d6f59852310bbbf0 SHA512 31ce8b53c50063c9409191beab28f67ab804549b5eb4d6bfaf42a3342ccb2f4dc039e3afffe22d87664917481e943018c0d1239e7dd0a62af34c44a975f69303
-DIST rust-1.58.1-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 995a6ce146b758bcad983fc8d7a8613b0da172c7e62a0b73d206cfd461e1046d024a8431ac287b5c267b215128542bf20d796b072ab1aed348787f50013a1118 SHA512 d7af25ef9bb92952949e7f91a13d5e910f32134b962e6432bd10ed885be451eb99c518213d9dd4c425c40ea43fa2722d6ea7c357ab0ec63b8ca4f7d020412979
-DIST rust-1.58.1-x86_64-unknown-linux-gnu.tar.xz 150229600 BLAKE2B 056e5a646d6758ac88e2b2b9309dbe0e9d23a285be31ba009eed936c82923ad9615874b8689ef926b14335d6c5255df41b5879794e6f0982b90553273487853d SHA512 7a61ecc8ff49769847ed4021c57279c16f261aa21469da426023fadab3820d0d962edc0fb04861ae23c8dcf821fc3ab99c2d469ba827dad30c1acc995732605c
-DIST rust-1.58.1-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b86d3d2cbf27594dfe55fe2ff52523a9dff08d08ddd30526172f9e07760c2f854698eb8153cb9894588d75759a3d0bb7887756d005a2c69aa9cfeec8e7dee678 SHA512 82dcb22efb94bb19f2338e9cb46e3f6da3d189fe6bff12bf1ec870197d395c2ad58bd15705aa7f3cde38e5ec0266e20eb2e45761e0f55b13261d3e6b14dce60f
-DIST rust-1.58.1-x86_64-unknown-linux-musl.tar.xz 262511608 BLAKE2B f2ca664fe1ab0614f13ce9d7764eed935b107b393830ad14b64d8b05e032feeec57dd04cdc963ad3eea2cb23558beeb1975722be93412d4ff8fd3a75d2bbb896 SHA512 d064464333a64f91b8a30f267ecfe2b4dc5be6d639bc9f064efa86a54478c8de7156166236b7ff8d96bf8fc8cbbeebf7ac17d8b5dabf24d72e189dbbd8ae0819
-DIST rust-1.58.1-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 9c58a08b4e5d609230b5aae52fe7eec2dd6a0cc0eb8c257068ac2585918aba6cbe3263a6480860d34a117d3e2ee835fc8d8b1702296369c3a4e0f660f46bd62e SHA512 6c294cbbbf22940e36278e92d5095dbfee0df741694188ef1e6df7740bbe770ffb5b2467bab12825045ebf7d6fb12eebb1ce7edbb32d0afcb114c57e814fe5d7
DIST rust-1.59.0-aarch64-unknown-linux-gnu.tar.xz 217126920 BLAKE2B 87fd1910d76a133624ff860fd3932527b3ce3775db9e03c6d2ab9ad06534e9e63ff7d1eed0c81e3574d676c192495e0f175b2ae0fa706b722ead9a852296b3f4 SHA512 6f5b6fb325ac226bf5f308463a54f59570d9ba5efe4329d6116d79cda1f8572b2e4584d005586759ac60e1e7a10782d8ef8ebf30c980220b4780a9846895fcb0
DIST rust-1.59.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 2b75d91a060376bd0711c18b1b04f7d0c7ded0a64b0b086e7799898db7fe24ff49dc09c76695a151e54bd205aa040775c6a36d10fb21ecb2d89d23398b02dc34 SHA512 a04cb7b03e3b963002357d48ecf92d0aef20464f9da38081411832c07df0a7c9ce3755a7b89c86394933446fc18e83a55a7cc01f3739ddddb19dafcbb7b43960
DIST rust-1.59.0-aarch64-unknown-linux-musl.tar.xz 212064268 BLAKE2B 4636001103fc058c2c14a34449846c0378c26ac4dc29588615c5216bb4759b0e92ec97be25e106a5aaaa07059f404c615272e359b0f3b1e9164437e63d863bd0 SHA512 2ec97a48cdac3fb1f7411fdf3a34aac6f64a09991d25174dff97efab0ee724d4dce2bbe29046d243a72b06d406990adf5d1f3f24286fdfb0e658326e28cf5363
@@ -94,9 +30,39 @@ DIST rust-1.59.0-x86_64-unknown-linux-gnu.tar.xz 151858140 BLAKE2B 80eda8c19361b
DIST rust-1.59.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B cd4387ad25b7f000395e336cdc92916ee7260cbf98a397ce02514444c8d2b35c653012ae6a9f1d5598155c06db573e1fe1a3f0bde1693863855dc17c18b478f5 SHA512 0b6790f0aa531a8251e1a19e0adfdb16bfd39fcec40b83094c26b7169f833114cc8679e2955fcc5359b05cd67564827aa231c521f81d4c41d561e9ef44eea713
DIST rust-1.59.0-x86_64-unknown-linux-musl.tar.xz 246630236 BLAKE2B c9fe24e92055b2e765a8d96181c7c14a0db329f98e006ea2ade285078cad64fa2ef3419d26f30339685cfbcee672bb5e263dd183c960aa0067a27a0b36fe6fbd SHA512 40a711c015fa8eb07aaa11b0698f20886928230a8441cc7523572c7c2768a52557daf5c02bdf61430dcb9a912b8eeda499794af28f269b319ca7fef848ae4cdd
DIST rust-1.59.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 1a96c49754b8670d243d1ad43478d4df8b4f4997490fa9691e3947260d469c7dc9bab192a20fd2ee0592e15785fb059644404d77d716d86b54038d0a76feaf6e SHA512 0c67f2be31fae00a318b5a6184c60f10f80ca5275a5d9dad4459d94aef2fe65624dd7789987d506b691666ac8f7357143fa6bb8207cd5b13b28692aa909a1636
-DIST rustc-1.58.1-src.tar.xz 124353160 BLAKE2B 686c7272db544ad46f7fb01b4e05f24f4e08ff959a000cadfaef5d8fc413b93f5ed839077bc9715defc7a0a179af091f65c7a5d7104b0b3153f0654c237c094b SHA512 eff3279d2e519343cea542a9ae2daab592e44f35af344e33ff43ed55fc7c824511790d1991dd36a603d12465de8c3688e7194c2b9557f288c587ffa04738c2ce
-DIST rustc-1.58.1-src.tar.xz.asc 801 BLAKE2B f0b600a503b0ca777dd5d690dca7252ecc6d7d49ca4a9cc8edc0647038f727e9052a861f9868292f837d78d6b02efe9ed5efa85843262c44cf6f73254cc7c9b0 SHA512 983c1ffdc4febf8bce6efc123c76b13f233772bc0a152ffaeb7ebf8f1f7b82a6b5d653407a4d293953d6fbf62c0df4ff4d398a1133061b53ae0f85317a14380b
-DIST rustc-1.59.0-src.tar.xz 128942756 BLAKE2B b28114f14c9a0fec7db56fde79a985360fd8438c3b14eede49ed12e540c2636be960d0fd800c569af193886ac76fe8bf604d5dae59214ae08cb0cc6cc0ca404e SHA512 acace866871d13a55d365f65d7e15c192c3cd33096862571df6317e066b7474d668b95ae281e0244967778c05f1e33966c3c55616218bd25d3770a2b2d4f0365
-DIST rustc-1.59.0-src.tar.xz.asc 801 BLAKE2B 061701c4fdbde930798f9f938ca3642204ae4a2ad9396937ca7d604268813d6d68f4979f20d35abdbbfeec0bb389acd86c9d3d84256db85861f6b11e3dbef80e SHA512 1b90bc01f9d68ba1f70591c4ae707295d7727b790d170a0b757d654684e59d3c26c45b66a21f9ac762debb6867494660c73daaf10be9bd567a38be44c0009f72
+DIST rust-1.61.0-aarch64-unknown-linux-gnu.tar.xz 226403096 BLAKE2B b9927e6d364fe791bef49cea5f0904629a2f01e6a71325c1769c67b845725ae6f54a1a8c0530fa5048591dd0ecfd50a40224243f935b38ad269e35ce2e1c59d9 SHA512 1c00830f67b75eaf23ab759e8218fca48e424cad0ede02e737e341d105f6f8b8113e4d4181cde1b43f9369af9c2f238fbdcac27ccad3dd02db878e2f4e6ba35b
+DIST rust-1.61.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 697df0294d01a19eca2f9b7597df3826e79ea790766c5c5a7b73f5a04919cf64f1489f34c9d2c397523432243e7f3f29f42440ba9aee127753868529196810cf SHA512 78cbc7eeb552965a1b6c4cfc9c8404017fe195acefbda1aa203d1c2ba969b3ac28388930bb4f3ca5dda7ecac5e61163ae0a5d06967eab9f0a7cada87c6b2dc58
+DIST rust-1.61.0-aarch64-unknown-linux-musl.tar.xz 220966060 BLAKE2B e03c6418fed773d1028363979726648d1ffa0e04d6879688efefc15f95fbeff3ff9c0dc7c16a53fedb18c4e0b16e060cee9f3566b0f96027e5dc68820fda149f SHA512 e806f78ecc9edd12bb991533c6bfc95da30c8eaacbfc54f0f4dbf3a95a011da82fca13cf3ef23594a9d1d9d8c79c8186fe98b60658a2cd5c0ed2c6e3984468d0
+DIST rust-1.61.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 426c4c8dac07269d184f61bf2447957cdbdacafdf27fac5ab5a0eea958e15fb3eeed0753dadb1d1bb157322ca5e8c6b7c10d946c4bd3a089ccd8275d0a310014 SHA512 b231afc0c3604aba64277c4f018f1f4b30417bd2fd113919b8b584d5482523b961071a50394a4906d8ba8536685fcff4710b51fee7832a7a041dcb902f1c5ff1
+DIST rust-1.61.0-arm-unknown-linux-gnueabi.tar.xz 200226676 BLAKE2B c55c36524249eaf9ab1e040b6742e1ada46b32bf0511338d23536663050b46103b1765aeb2a145be9cdc0b602d83526fe902fc431e0793d1a307ab0d4b61a356 SHA512 3a9f52b9f4f2a972477a48b629b8345f151d32d491be0cbf3692b76f05ddbd3319de1da7b10959d37fffc08e12b3196a6f4462cc2476ad80d2f9750e0b189cad
+DIST rust-1.61.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 34f251ee19ace45c411f161b383dcda35b8dea62e135cdeceddd73ca029920b0f0ea0484fb79c9680d9b4403c5c01d76d4fd2fb47fd65a2fbcb0375e56a1586b SHA512 641ce73107609d55f98ae00a03a9efd58985539e46a834ceffe5af79822309a40a4eac59e5cec3b1654da733f463f3bca438f42ecbaf5fce5d276466317a7e54
+DIST rust-1.61.0-arm-unknown-linux-gnueabihf.tar.xz 200078864 BLAKE2B 02403c024bf02b9ec42fd0baf52856fbcce2a10477d19e68e4ad06110aaabb90496543fc3de5f385428396979fbb80cdb27f28b4cef8af9266c18fa87a995c30 SHA512 155b2f0c341280bfb7db066b639dc50580a07b21ad6f9f6255a8645d5d944d58fbaff505f1de0c3f51ed92ca0d4dc75d9b92e2aab7e8b64f8c42d3af0a714fe6
+DIST rust-1.61.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 6b4875ac242f11f47518f17a0a039539e56cf3cef78f1e3cb4bc2174e60d6d0f0d444b4c0cfa007643202b5ce92a4cb979e92b5f6f559eb90fd78fdd5f870e57 SHA512 f2618ba9f076c10d0ddd23129e6e8e7050fd1126d7767c8b74c53be209ca87f9bebbc09069f6aed55e14de64b1478fd93b370be7e60858b5226fcfc1e8ed87c0
+DIST rust-1.61.0-armv7-unknown-linux-gnueabihf.tar.xz 206757912 BLAKE2B c702e17e225becc681713a3e819cc38c727377d280a1963efd4e6b1d27e0dbbb71ad0bec4d7add8319417846cf54bb7b5901af0f633b180ca9a5f169c709e43a SHA512 88dbb7a35a8424e5b197566515c21122c1da71df146abb304d7dbb50380b4771a741910abefc9d79831146b28b657ffe53cae07f0392e83a7279a7795aadf0e6
+DIST rust-1.61.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B f4b93feba557d81638ead6c3ad72f2e5c321c1103b473096e312d8a3191e98aac65aff0ebcb6f2c23701de17f2602ba18a6462c24a678c2bc2a13e1003189271 SHA512 72d8152d206c1ca9d69ed4704b8638c32b5f136ad985fd4790961935f1b44f08df0960e03066de2dd1cc9f7a140e8070f0a6e671f59c751506847d9e247c5ecd
+DIST rust-1.61.0-i686-unknown-linux-gnu.tar.xz 218220208 BLAKE2B da47b131676258747e27704e2a1abb844567e2ac9ccffdd1c87edaa677e04b1fe73227f7b6afa437d8fe2f2690352623343b8318906038206b5b684fa8eafcc7 SHA512 f19e1a5253c57d250d4de7f0f54b70a296d92bba2e22d8b842bcbb311e393e3bf24c28621f490584497c586c6fdbc41f5af55d86a074b93efaa62d313121cc4a
+DIST rust-1.61.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 3b154ab9d414ec6d7dea13c6b2d2def9613544b3d8f6464385fa390bb6228d73826032ed6e536a9a2dd379499ec500788b149c838d5ad1a50f545a47b19a2cbd SHA512 f06ab7e865bf56c153586e146438079ff3ee3de86c610e463cd0ce67c090349b9dd4fa587d9eab0dea4b908770bca0dab955f797ebcc5aee2617a981ff23eb23
+DIST rust-1.61.0-mips-unknown-linux-gnu.tar.xz 157918296 BLAKE2B 0551ab0898491129828be9cd7d6fd22a56c329f85ae9767c8ca216cac16ae3f93d30913c50c8cea8daa2f98878147e2f15f587e38e9e0fca7c8c4b6d3ead6870 SHA512 02cf5d1ed8c28bd52b7c27ba696de30ee23322ddd1e2ef953cd95a6d0b31c63ea66071bfb22c4d11a780243e62e21407d7ada2592b08caac67d7d79e7d9ee0f2
+DIST rust-1.61.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 2d050374431b8d48b6a0a3e171d4d2f62cfd8a2df70ddbf0d374bb9351e684d15d3ade7f6717e6abba1de47c4899f0f7575a4ca537d1a39a57e03ea4b0ae281e SHA512 6e2d01d3b8218cae46008328226286abe3f4323891ab41129f9af94b4526d5b21700fa84c880b4efe38d39c57b2a0946eb82e3ac58950761b20f4def1d8b82f2
+DIST rust-1.61.0-mips64-unknown-linux-gnuabi64.tar.xz 162321252 BLAKE2B d49ec8d3a5eec2085a26b4da22a31e5631e3665333a030e4683446cfe3f71e86e466b827942d6a62d32f469ff7fe9208aa51ba9d47822a54d40d89bef45636e5 SHA512 1e6003127963b836c343ae06586b152b1f227529d05b555aefa0bd7d4b92124215cfa1038aba1236c0c42ecd8e429253db4faa13ed388c16a8659e71b0008fe7
+DIST rust-1.61.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B b031019589b12cdf45f0a938c7479ad219c257643b88108d0c524088530df783338d64c1b356055e34a38df8908653c25fc286949826bb7e3539d63c78c36a66 SHA512 ee9178251f5a79803871fa76a22395e4b43958582930f92cf1f5e76970c1583f9b0403da7c05bd8a7cdd83839b319a6640adcaaa5475e9ab5bffb43146116b09
+DIST rust-1.61.0-mipsel-unknown-linux-gnu.tar.xz 162148648 BLAKE2B 492e0c811c9fae9d0052fcdfffe6d96d43674e1775edaf31d63024e56763d44c02763fd70e768ac0987d260665b86d78aa55a0652f5acbf097a3e9a472aa4d9f SHA512 637b081d8357d46030ca206c8feb54a38d9696a0bdbbad9a892ee4a472f29976c82b814f14cc987ad9e473e70d22347e7e01e81f0f59e82dbaad62153c1ec32f
+DIST rust-1.61.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 9323f7488fdf603e81018c4b6afa11da952eb6051e9480fee027326ebccd15befed97c75c981f621d7eda3daf2d082c5fb12af426e48cb4c0c733ab55c46af6e SHA512 9d1e6062c4a7714aa754ea586f9bbe3a988e5e6d1e6309316bde89fa83ccddb837e96a8de13fbd4b932c8fc37be89de06802f12f689e17b1ae6cd97b5e2db561
+DIST rust-1.61.0-powerpc-unknown-linux-gnu.tar.xz 180802408 BLAKE2B 41ecab76e35d9ee2b9658730f46ece4191e706714b3b90b6021b4bd9ed2c4f0d563e0c0b39bdc7e633237d55c5375379565d7932e7ffb4896851831f64f61559 SHA512 ed19698f32c1af73ba8c402395b6ee30381d1fff6026d2c94e45ad89ef197cffc1529dc21402e2b463deb47aba0ed4d63d69c62908cdc099da463835757f3fe3
+DIST rust-1.61.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 438143b3474d0cb9e1a19b93de28544f02672e245bba7855da286fb15c58db93021e44d432fbe4a0949592b57cb23b373abd5c0a3f960f6975a0cf433352462e SHA512 7a570c64a79adf78c8c28342d9ab39e8ed953cd44b8038e03beb888b5611625bae95e88220c9c88236ff1672f20ad61976d116da7689cf29f53112deb9b75858
+DIST rust-1.61.0-powerpc64-unknown-linux-gnu.tar.xz 187335836 BLAKE2B 6feca68e47f7e19355ba623cda1d1cd15351017d388d94e2b9d6821493b8a77a09c95148a8fcf7124e3b0c9a9ee205c9f5c14af04172e2d02ea239355755b364 SHA512 b8afcb47653877dd47a808b4aecd95bca715a96311652e0616125e75bc5a457364b0caba2918e2e3e8df2d1fe0afb6fb384bbfa44fde25ebe0dd368414984acb
+DIST rust-1.61.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 20bc76dea5484d2a6bf60ffdacc1dacb8d3f7abdb428fee3b1d3e6e19d499f18afbe667a5de96a28005661bd0b4f5e4c8429df917a31b86d72b9aaa9ec56c7e0 SHA512 cf10c0f1ca50894deba5f02a4e3491fe61ea8def4b0f76fe790eb52ff66295d2570ae50acea66a51e710822d6109a2ab3c8f1e703388ae0ee19fcfc5657d4f38
+DIST rust-1.61.0-powerpc64le-unknown-linux-gnu.tar.xz 196945316 BLAKE2B 23ac372f7bbeac3eb757adcb6ca93187ad01492992327533452ab348ec899cb97f5ac9335b32039a62ccf4c34125de3c4b6c1d7829839c95f638b6531be59c57 SHA512 6cf969cef60d2b70db17902ceb71d2616de0df1ff4fda15578347372bf5a349fc8f4377eb1d003abb84a93a122ab0e54aac52c95568813148d3c0113d663a07f
+DIST rust-1.61.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6b4bdcba7c5b681512b98b39f8035788f612ee1c8f44d98d58f8a29bc71e470d57ae587a6ea2e02a22263d40bb452054d03483a3922db6c131d3947e65da23bb SHA512 cd102d958ad3ca62f534033473664e867892dce0ca8a2f96271ecfabe34e0afbd63d8281086c5cd692fdb961894313e7430ce2e1d14c3a686b40d8a514c124e3
+DIST rust-1.61.0-riscv64gc-unknown-linux-gnu.tar.xz 190408604 BLAKE2B 1f37d88201f0e3517194d810f99ce3167fa132c72f8580704750b926b838956157b1ccd303ccf5de15615733383d1009cc135ede7dd8dc7c1e39b4246a8ed604 SHA512 8f6f469484ff9c10af2b1a822a8193f313ac244783921c68dc1feee4d6897e7083cfb90d19384a266d41b97aeb845ef073ed955fb7beaf7e1810d682185c2d42
+DIST rust-1.61.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c413b2f55e3d45dbfccf193f5cb9f6866abf895d23c850e3744a0bd897c2c812f57457211efaab7416c0d8fc079cc4feaa35de879ad76356a961e704e711be46 SHA512 0155b4e0ba86cc190b85f2f82e8ee75c14825e52e05ab3446283512f0b42f113d85ef89d72e0929382637dc0a44ef72f06552957285463c2edd7f83d9c8234ff
+DIST rust-1.61.0-s390x-unknown-linux-gnu.tar.xz 214196912 BLAKE2B 31eeaabdbca2fa837610179eafd0cb6cde2ce8d4feb57e86cd1fc8962e1f8b84bf067d7782414380616d5b56fef5db19c91c54c89f5dd935debf6ed2d3841466 SHA512 7de0ea08c4834e60d12098d92d4366689c0b959f58667bc68e35ad3c976011e8d9375566cebd9260933e13bd74105d297dabf40a0d09b34f83905d4cb9995f7f
+DIST rust-1.61.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 617bfd93b883cc36c8504ac326813511bee205a508489be168060863d967efe9a2e8276c3834d872f419317047ba83624c996be9d6f913be58f9feab66f292b2 SHA512 933689de3c1fabc31dd1910844479b3505e1a8b8474fdaeb4936df118a6da4f9597c45f0a0056d5c1efc33ae8ffb2910f5aa07b91afbd231ad7c20f0c79ceeb4
+DIST rust-1.61.0-x86_64-unknown-linux-gnu.tar.xz 157592468 BLAKE2B 0877c0794280a5ab7e74553c02cebad67e36148a3f34a709973310d89d7ea65dc8ecfa8b9c461e4f96939ed2ff09b7bacbef0b4fcf409758a0429bc431f87ebe SHA512 365191453f37775cf8bed66e12224294d4d99f3bacc635c3c13f05bf8585838a04b602c2fef7964f26a6cc35ab432a5c0a9745e9ffad0a83b0c761ec02de3484
+DIST rust-1.61.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5296a8df210a4cf2fd7dffcba1ae6bd8cda9e408ff4c55d997199c2890b9faab9e8d6d22a3c0961786bb80231836047929621edf9043d474b352fe28bd9192e8 SHA512 cb97e84cd793aa8676c41297d8da14125855c008815e65d8191868eb88241ccb408c6f9ae85b7ba8de1a02ea8923f5e042f4fea662fa593e5ec03505b41ee52d
+DIST rust-1.61.0-x86_64-unknown-linux-musl.tar.xz 259724324 BLAKE2B d005bd2794d196136c42842fbb7bc64d827898b5713f768cf0e88be5a40e3906139027ee58571cfccd8d2c864f672d1986da28c72f0d1c4a7f78d18efe14385e SHA512 96d09ac3a48bb2956dd6bf219e605c68327a94d09e72290ee74781c4886dce93b217163fb08dac0ce69bfaa2e3ab8cccd4a26d10b9df4c3162822a38e355bdb6
+DIST rust-1.61.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B e1c8061c80cd5445f7df9c44044ccb47731704b93d4e86cf95bd3b1b08a3c3cdb61e21349088cd0127632c63a0f7c22f0fa209809450dd81607bf7353d61a7b4 SHA512 587f487a3c8159a4b102f15a484a0ffa4f32c2abd2fb4ca078c27d36f6ff365c95015a99494e852631e9f92bfc9f33a0266c5f62b7edfce823c34993ff6a836b
DIST rustc-1.60.0-src.tar.xz 136183048 BLAKE2B 8030f32c21f81af6abc7a282aab1189cb7d680c6bce58c119a1beaad71a3eeb36a696eef46a22d366e2c41a2f9182a9a5aa527426f2c8db05278184c37297dd0 SHA512 d0c113e8c2c67bf10773c9403dc4c4700c4deb2fb287bfec51e565d3473d2b481d8ae2c90b272cd67b3a87d7443ea25a34c7b40ba8cd7106bf5d71126ab141c3
DIST rustc-1.60.0-src.tar.xz.asc 801 BLAKE2B 02a2c140e091ea6913a760daa93aa57ba6a7631d0b99867669ce68641d562d436f13ed1f1578713184f06c9307d46e19dfd7c8d74a516b04293bc65c02b90707 SHA512 8136d19d4f3f4c45249b59b689f01d4edf108535ffe1f813771bd244cde1c66184a0bde5a0acfed4fb01015812458204244bbb54e6f5fa86e9b1ef5e92e805e3
+DIST rustc-1.62.1-src.tar.xz 135644156 BLAKE2B ff8428362153770c57d53cb7eef07b75944d47ec747d9c337cc7ba9f38dfd749415c9a00acf9d9d8743874ba1c51da7915315bd25e011eeb8a2aaa8812773850 SHA512 6f7fa855acdf20525e907a6fc8c7aa8b206603e3bcbd532d3bdce165380f0019f45dba2b2b06d20b541381accf67ca0d256fbddfcb1642a2e60e1237807d5410
+DIST rustc-1.62.1-src.tar.xz.asc 801 BLAKE2B dd0e917f8b587eb8318a9c820df5ee9a052f14e7dea05d8afcb3cf687fa2e362e6d2f4d20fa94a19bdf97227c9ef29548a6e267ffd9113bfdc36cc42f341d8b8 SHA512 698bfd419c218a6cccce04869279708cf6084adc464a64d7dd1c981c0577249cd06b4de132634085c792c838aa1e1beaa11a5a06ea0e5f4c1a6f4e28afe65a3c
diff --git a/dev-lang/rust/files/1.62.1-musl-dynamic-linking.patch b/dev-lang/rust/files/1.62.1-musl-dynamic-linking.patch
new file mode 100644
index 00000000..6d53487a
--- /dev/null
+++ b/dev-lang/rust/files/1.62.1-musl-dynamic-linking.patch
@@ -0,0 +1,25 @@
+From e42709c46647dab342b826d30324f3e6e5590e00 Mon Sep 17 00:00:00 2001
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Tue, 2 Aug 2022 18:32:53 -0500
+Subject: [PATCH] Enable dynamic linking by default for musl
+
+Signed-off-by: Jory Pratt <anarchy@gentoo.org>
+---
+ compiler/rustc_target/src/spec/linux_musl_base.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
+index 207a87ab0..8a5a43363 100644
+--- a/compiler/rustc_target/src/spec/linux_musl_base.rs
++++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
+@@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
+ base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
+
+ // These targets statically link libc by default
+- base.crt_static_default = true;
++ base.crt_static_default = false;
+
+ base
+ }
+--
+2.35.1
\ No newline at end of file
diff --git a/dev-lang/rust/rust-1.58.1.ebuild b/dev-lang/rust/rust-1.58.1.ebuild
deleted file mode 100644
index f663a781..00000000
--- a/dev-lang/rust/rust-1.58.1.ebuild
+++ /dev/null
@@ -1,704 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..10} )
-
-inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
- multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
-
-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 -> rustc-${PV}-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 arm64"
-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}
- verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
- !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
-"
-
-# 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_x86_sse2 debug dist doc miri nightly parallel-compiler rls rustfmt rust-src 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:
-# List all the working slots in LLVM_VALID_SLOTS, newest first.
-LLVM_VALID_SLOTS=( 13 )
-LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
-
-# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
-# (-) usedep needed because we may build with older llvm without that target
-LLVM_DEPEND="|| ( "
-for _s in ${LLVM_VALID_SLOTS[@]}; do
- LLVM_DEPEND+=" ( "
- for _x in ${ALL_LLVM_TARGETS[@]}; do
- LLVM_DEPEND+="
- ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )"
- done
- LLVM_DEPEND+=" )"
-done
-unset _s _x
-LLVM_DEPEND+=" )
- <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
- wasm? ( sys-devel/lld )
-"
-
-# to bootstrap we need at least exactly previous version, or same.
-# most of the time previous versions fail to bootstrap with newer
-# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
-# but it fails to bootstrap with 1.48.x
-# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.txt
-RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
-RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
-BOOTSTRAP_DEPEND="||
- (
- =dev-lang/rust-"${RUST_DEP_PREV}"
- =dev-lang/rust-bin-"${RUST_DEP_PREV}"
- =dev-lang/rust-"${RUST_DEP_CURR}"
- =dev-lang/rust-bin-"${RUST_DEP_CURR}"
- )
-"
-
-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-3.13.4
- dev-util/ninja
- )
- test? ( sys-devel/gdb )
- verify-sig? ( sec-keys/openpgp-keys-rust )
-"
-
-DEPEND="
- >=app-arch/xz-utils-5.2
- net-misc/curl:=[http2,ssl]
- sys-libs/zlib:=
- dev-libs/openssl:0=
- elibc_musl? ( sys-libs/libunwind:= )
- system-llvm? ( ${LLVM_DEPEND} )
-"
-
-# we need to block older versions due to layout changes.
-RDEPEND="${DEPEND}
- app-eselect/eselect-rust
- !<dev-lang/rust-1.47.0-r1
- !<dev-lang/rust-bin-1.47.0-r1
-"
-
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
- miri? ( nightly )
- parallel-compiler? ( nightly )
- rls? ( rust-src )
- test? ( ${ALL_LLVM_TARGETS[*]} )
- wasm? ( llvm_targets_WebAssembly )
- x86? ( cpu_flags_x86_sse2 )
-"
-
-# we don't use cmake.eclass, but can get a warning
-CMAKE_WARN_UNUSED_CLI=no
-
-QA_FLAGS_IGNORED="
- usr/lib/${PN}/${PV}/bin/.*
- usr/lib/${PN}/${PV}/libexec/.*
- 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
-"
-
-QA_PRESTRIPPED="
- usr/lib/rust/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
-"
-# An rmeta file is custom binary format that contains the metadata for the crate.
-# rmeta files do not support linking, since they do not contain compiled object files.
-# so we can safely silence the warning for this QA check.
-QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
-
-# causes double bootstrap
-RESTRICT="test"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
-
-PATCHES=(
- "${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch
- "${FILESDIR}"/1.56.1-musl-dynamic-linking.patch
-)
-
-S="${WORKDIR}/${MY_P}-src"
-
-toml_usex() {
- usex "${1}" true false
-}
-
-bootstrap_rust_version_check() {
- # never call from pkg_pretend. eselect-rust may be not installed yet.
- [[ ${MERGE_TYPE} == binary ]] && return
- local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
- local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))"
- local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
- rustc_version=${rustc_version[0]#rust-bin-}
- rustc_version=${rustc_version#rust-}
-
- [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
-
- if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
- eerror "Rust >=${rustc_wanted} is required"
- eerror "please run 'eselect rust' and set correct rust version"
- die "selected rust version is too old"
- elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then
- eerror "Rust <${rustc_toonew} is required"
- eerror "please run 'eselect rust' and set correct rust version"
- die "selected rust version is too new"
- else
- einfo "Using rust ${rustc_version} to build"
- fi
-}
-
-pre_build_checks() {
- local M=4096
- # multiply requirements by 1.5 if we are doing x86-multilib
- if use amd64; then
- M=$(( $(usex abi_x86_32 15 10) * ${M} / 10 ))
- fi
- M=$(( $(usex clippy 128 0) + ${M} ))
- M=$(( $(usex miri 128 0) + ${M} ))
- M=$(( $(usex rls 512 0) + ${M} ))
- M=$(( $(usex rustfmt 256 0) + ${M} ))
- # add 2G if we compile llvm and 256M per llvm_target
- if ! use system-llvm; then
- M=$(( 2048 + ${M} ))
- local ltarget
- for ltarget in ${ALL_LLVM_TARGETS[@]}; do
- M=$(( $(usex ${ltarget} 256 0) + ${M} ))
- done
- fi
- M=$(( $(usex wasm 256 0) + ${M} ))
- M=$(( $(usex debug 2 1) * ${M} ))
- 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}
-}
-
-llvm_check_deps() {
- has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]"
-}
-
-pkg_pretend() {
- pre_build_checks
-}
-
-pkg_setup() {
- pre_build_checks
- python-any-r1_pkg_setup
-
- export LIBGIT2_NO_PKG_CONFIG=1 #749381
-
- use system-bootstrap && bootstrap_rust_version_check
-
- 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 \
- --without=rust-docs --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\""
- 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/' compiler/rustc_target/src/spec/wasm_base.rs || die
- fi
- 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\",$tools"
- fi
- if use rustfmt; then
- tools="\"rustfmt\",$tools"
- fi
- if use rust-src; then
- tools="\"src\",$tools"
- fi
-
- local rust_stage0_root
- if use system-bootstrap; then
- local printsysroot
- printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
- rust_stage0_root="${printsysroot}"
- else
- rust_stage0_root="${WORKDIR}"/rust-stage0
- fi
- # in case of prefix it will be already prefixed, as --print sysroot returns full path
- [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
-
- rust_target="$(rust_abi)"
-
- cat <<- _EOF_ > "${S}"/config.toml
- changelog-seen = 2
- [llvm]
- download-ci-llvm = false
- 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)
- $(case "${rust_target}" in
- i586-*-linux-*)
- # https://github.com/rust-lang/rust/issues/93059
- echo 'cflags = "-fcf-protection=none"'
- echo 'cxxflags = "-fcf-protection=none"'
- echo 'ldflags = "-fcf-protection=none"'
- ;;
- esac)
- [build]
- build-stage = 2
- test-stage = 2
- doc-stage = 2
- build = "${rust_target}"
- host = ["${rust_target}"]
- target = [${rust_targets}]
- cargo = "${rust_stage0_root}/bin/cargo"
- rustc = "${rust_stage0_root}/bin/rustc"
- rustfmt = "${rust_stage0_root}/bin/rustfmt"
- docs = $(toml_usex doc)
- compiler-docs = false
- 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)
- debug-assertions-std = $(toml_usex debug)
- debuginfo-level = $(usex debug 2 0)
- debuginfo-level-rustc = $(usex debug 2 0)
- debuginfo-level-std = $(usex debug 2 0)
- debuginfo-level-tools = $(usex debug 2 0)
- debuginfo-level-tests = 0
- backtrace = true
- incremental = false
- default-linker = "$(tc-getCC)"
- parallel-compiler = $(toml_usex parallel-compiler)
- channel = "$(usex nightly nightly stable)"
- description = "gentoo"
- 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))
- # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
- # https://github.com/rust-lang/rust/issues/74976
- # https://github.com/rust-lang/rust/issues/76526
- deny-warnings = $(usex wasm $(usex doc false true) true)
- backtrace-on-ice = true
- jemalloc = false
- [dist]
- src-tarball = false
- compression-formats = ["xz"]
- _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}]
- ar = "$(tc-getAR)"
- cc = "$(tc-getCC)"
- cxx = "$(tc-getCXX)"
- linker = "$(tc-getCC)"
- ranlib = "$(tc-getRANLIB)"
- _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
-
- if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
- # experimental cross support
- # discussion: https://bugs.gentoo.org/679878
- # TODO: c*flags, clang, system-llvm, cargo.eclass target support
- # it would be much better if we could split out stdlib
- # complilation to separate ebuild and abuse CATEGORY to
- # just install to /usr/lib/rustlib/<target>
-
- # extra targets defined as a bash array
- # spec format: <LLVM target>:<rust-target>:<CTARGET>
- # best place would be /etc/portage/env/dev-lang/rust
- # Example:
- # RUST_CROSS_TARGETS=(
- # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
- # )
- # no extra hand holding is done, no target transformations, all
- # values are passed as-is with just basic checks, so it's up to user to supply correct values
- # valid rust targets can be obtained with
- # rustc --print target-list
- # matching cross toolchain has to be installed
- # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
- # only gcc toolchains installed with crossdev are checked for now.
-
- # BUG: we can't pass host flags to cross compiler, so just filter for now
- # BUG: this should be more fine-grained.
- filter-flags '-mcpu=*' '-march=*' '-mtune=*'
-
- local cross_target_spec
- for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
- # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
- local cross_llvm_target="${cross_target_spec%%:*}"
- # extracts toolchain triples, <rust-target>:<CTARGET>
- local cross_triples="${cross_target_spec#*:}"
- # extracts first element after before : separator
- local cross_rust_target="${cross_triples%%:*}"
- # extracts last element after : separator
- local cross_toolchain="${cross_triples##*:}"
- use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
- command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${cross_rust_target}]
- ar = "${cross_toolchain}-ar"
- cc = "${cross_toolchain}-gcc"
- cxx = "${cross_toolchain}-g++"
- linker = "${cross_toolchain}-gcc"
- ranlib = "${cross_toolchain}-ranlib"
- _EOF_
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- if [[ "${cross_toolchain}" == *-musl* ]]; then
- cat <<- _EOF_ >> "${S}"/config.toml
- musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
- _EOF_
- fi
-
- # append cross target to "normal" target list
- # example 'target = ["powerpc64le-unknown-linux-gnu"]'
- # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
-
- rust_targets="${rust_targets},\"${cross_rust_target}\""
- sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
-
- ewarn
- ewarn "Enabled ${cross_rust_target} rust target"
- ewarn "Using ${cross_toolchain} cross toolchain"
- ewarn
- if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
- ewarn "'sys-devel/binutils[multitarget]' is not installed"
- ewarn "'strip' will be unable to strip cross libraries"
- ewarn "cross targets will be installed with full debug information"
- ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
- ewarn
- ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
- ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
- ewarn
- fi
- done
- fi # I_KNOW_WHAT_I_AM_DOING_CROSS
-
- einfo "Rust configured with the following flags:"
- echo
- echo RUSTFLAGS="${RUSTFLAGS:-}"
- echo RUSTFLAGS_BOOTSTRAP="${RUSTFLAGS_BOOTSTRAP:-}"
- echo RUSTFLAGS_NOT_BOOTSTRAP="${RUSTFLAGS_NOT_BOOTSTRAP:-}"
- env | grep "CARGO_TARGET_.*_RUSTFLAGS="
- cat "${S}"/config.env || die
- echo
- einfo "config.toml contents:"
- cat "${S}"/config.toml || die
- echo
-}
-
-src_compile() {
- # we need \n IFS to have config.env with spaces loaded properly. #734018
- (
- IFS=$'\n'
- env $(cat "${S}"/config.env) 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 ! (
- IFS=$'\n'
- 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 "${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() {
- (
- IFS=$'\n'
- env $(cat "${S}"/config.env) DESTDIR="${D}" \
- "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
- )
-
- # bug #689562, #689160
- rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
- rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
- newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
-
- 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: ${symlinks[@]}"
- 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}"
- if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
- einfo "Installing ${i} symlink"
- ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
- else
- ewarn "${i} symlink requested, but source file not found"
- ewarn "please report this"
- fi
- 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}/libexec" "/usr/lib/${PN}/libexec-${PV}"
- dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
- dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
- dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
-
- newenvd - "50${P}" <<-_EOF_
- LDPATH="${EPREFIX}/usr/lib/rust/lib"
- MANPATH="${EPREFIX}/usr/lib/rust/man"
- $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
- $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
- _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/libexec
- /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}"
-
- if use dist; then
- insinto "/usr/lib/${PN}/${PV}/dist"
- doins -r "${S}/build/dist/."
- fi
-}
-
-pkg_postinst() {
- eselect rust update
-
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
- 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}."
- fi
-
- 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
-}
diff --git a/dev-lang/rust/rust-1.59.0.ebuild b/dev-lang/rust/rust-1.62.1.ebuild
similarity index 92%
rename from dev-lang/rust/rust-1.59.0.ebuild
rename to dev-lang/rust/rust-1.62.1.ebuild
index b686bc82..96528b5e 100644
--- a/dev-lang/rust/rust-1.59.0.ebuild
+++ b/dev-lang/rust/rust-1.62.1.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7..10} )
+PYTHON_COMPAT=( python3_{8..11} )
inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
@@ -19,10 +19,10 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="amd64 ~arm arm64 ppc64 x86"
+ KEYWORDS="amd64 arm arm64 ppc64 ~x86"
fi
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).1"
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
DESCRIPTION="Systems programming language from Mozilla"
HOMEPAGE="https://www.rust-lang.org/"
@@ -41,7 +41,7 @@ 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 dist doc miri nightly parallel-compiler rls rustfmt rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+IUSE="clippy cpu_flags_x86_sse2 debug dist doc miri nightly parallel-compiler profiler rls rustfmt rust-src 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
@@ -49,7 +49,7 @@ IUSE="clippy cpu_flags_x86_sse2 debug dist doc miri nightly parallel-compiler rl
# How to use it:
# List all the working slots in LLVM_VALID_SLOTS, newest first.
-LLVM_VALID_SLOTS=( 13 )
+LLVM_VALID_SLOTS=( 14 )
LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
@@ -109,11 +109,9 @@ DEPEND="
system-llvm? ( ${LLVM_DEPEND} )
"
-# we need to block older versions due to layout changes.
RDEPEND="${DEPEND}
app-eselect/eselect-rust
- !<dev-lang/rust-1.47.0-r1
- !<dev-lang/rust-bin-1.47.0-r1
+ sys-apps/lsb-release
"
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
@@ -157,7 +155,7 @@ VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
PATCHES=(
"${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch
- "${FILESDIR}"/1.56.1-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
)
S="${WORKDIR}/${MY_P}-src"
@@ -191,10 +189,10 @@ bootstrap_rust_version_check() {
}
pre_build_checks() {
- local M=4096
- # multiply requirements by 1.5 if we are doing x86-multilib
+ local M=8192
+ # multiply requirements by 1.3 if we are doing x86-multilib
if use amd64; then
- M=$(( $(usex abi_x86_32 15 10) * ${M} / 10 ))
+ M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
fi
M=$(( $(usex clippy 128 0) + ${M} ))
M=$(( $(usex miri 128 0) + ${M} ))
@@ -258,7 +256,9 @@ src_prepare() {
}
src_configure() {
- local rust_target="" rust_targets="" arch_cflags
+ use system-llvm && filter-flags '-flto*' # https://bugs.gentoo.org/862109
+
+ local rust_target="" rust_targets="" arch_cflags use_libcxx="false"
# Collect rust target names to compile standard libs for all ABIs.
for v in $(multilib_get_enabled_abi_pairs); do
@@ -281,6 +281,9 @@ src_configure() {
if use miri; then
tools="\"miri\",$tools"
fi
+ if use profiler; then
+ tools="\"rust-demangler\",$tools"
+ fi
if use rls; then
tools="\"rls\",\"analysis\",$tools"
fi
@@ -304,6 +307,15 @@ src_configure() {
rust_target="$(rust_abi)"
+ # https://bugs.gentoo.org/732632
+ if tc-is-clang; then
+ local clang_slot="$(clang-major-version)"
+ if { has_version "sys-devel/clang:${clang_slot}[default-libcxx]" || is-flagq -stdlib=libc++; }; then
+ use_libcxx="true"
+ fi
+ fi
+
+ local cm_btype="$(usex debug DEBUG RELEASE)"
cat <<- _EOF_ > "${S}"/config.toml
changelog-seen = 2
[llvm]
@@ -315,6 +327,10 @@ src_configure() {
targets = "${LLVM_TARGETS// /;}"
experimental-targets = ""
link-shared = $(toml_usex system-llvm)
+ $(if [[ ${use_libcxx} == true ]]; then
+ echo "use-libcxx = true"
+ echo "static-libstdcpp = false"
+ fi)
$(case "${rust_target}" in
i586-*-linux-*)
# https://github.com/rust-lang/rust/issues/93059
@@ -322,7 +338,17 @@ src_configure() {
echo 'cxxflags = "-fcf-protection=none"'
echo 'ldflags = "-fcf-protection=none"'
;;
+ *)
+ ;;
esac)
+ [llvm.build-config]
+ CMAKE_VERBOSE_MAKEFILE = "ON"
+ CMAKE_C_FLAGS_${cm_btype} = "${CFLAGS}"
+ CMAKE_CXX_FLAGS_${cm_btype} = "${CXXFLAGS}"
+ CMAKE_EXE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = "${ARFLAGS}"
[build]
build-stage = 2
test-stage = 2
@@ -343,7 +369,7 @@ src_configure() {
tools = [${tools}]
verbose = 2
sanitizers = false
- profiler = false
+ profiler = $(toml_usex profiler)
cargo-native-static = false
[install]
prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
@@ -420,6 +446,8 @@ src_configure() {
cat <<- _EOF_ >> "${S}"/config.toml
[target.wasm32-unknown-unknown]
linker = "$(usex system-llvm lld rust-lld)"
+ # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
+ profiler = false
_EOF_
fi
@@ -607,6 +635,7 @@ src_install() {
use clippy && symlinks+=( clippy-driver cargo-clippy )
use miri && symlinks+=( miri cargo-miri )
+ use profiler && symlinks+=( rust-demangler )
use rls && symlinks+=( rls )
use rustfmt && symlinks+=( rustfmt cargo-fmt )
@@ -666,6 +695,9 @@ src_install() {
echo /usr/bin/miri >> "${T}/provider-${P}"
echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
fi
+ if use profiler; then
+ echo /usr/bin/rust-demangler >> "${T}/provider-${P}"
+ fi
if use rls; then
echo /usr/bin/rls >> "${T}/provider-${P}"
fi
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-08-03 11:59 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-19 20:02 [gentoo-commits] proj/musl:master commit in: dev-lang/rust/, dev-lang/rust/files/ Aric Belsito
-- strict thread matches above, loose matches on Subject: below --
2022-08-03 11:59 Jory Pratt
2021-12-02 0:14 Jory Pratt
2021-03-13 21:34 Sam James
2021-03-13 16:26 Anthony G. Basile
2019-11-06 22:58 Jory Pratt
2018-01-24 22:07 Aric Belsito
2017-12-14 2:13 Aric Belsito
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox