commit:     3ba34f8a2bc6292439ed89193d5d5e8529f47564
Author:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Mon May 14 16:27:15 2018 +0000
Commit:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Mon May 14 16:27:15 2018 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=3ba34f8a

dev-lang/rust: remove old

sync with upstream

 dev-lang/rust/Manifest                             |  18 -
 ...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 --
 .../rust/files/1.21.0/0007-Fix-LLVM-build.patch    |  26 --
 ...dd-openssl-configuration-for-musl-targets.patch |  40 --
 dev-lang/rust/files/1.21.0/0009-liblibc.patch      |  16 -
 .../files/1.21.0/0010-static-linking-default.patch |  13 -
 dev-lang/rust/files/1.21.0/llvm4-musl-fixes.patch  |  33 --
 dev-lang/rust/files/1.23.0-separate-libdir.patch   | 180 ---------
 ...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 --
 .../rust/files/1.23.0/0005-Fix-LLVM-build.patch    |  26 --
 .../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/files/1.23.0/0009-liblibc.patch      |  16 -
 dev-lang/rust/files/1.23.0/llvm4-musl-fixes.patch  |  33 --
 dev-lang/rust/rust-1.21.0.ebuild                   | 239 ------------
 dev-lang/rust/rust-1.23.0-r1.ebuild                | 268 -------------
 dev-lang/rust/rust-1.23.0.ebuild                   | 248 ------------
 26 files changed, 2473 deletions(-)

diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 7cd5282..a171321 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -1,19 +1,3 @@
-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 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 rust-1.24.1-aarch64-unknown-linux-gnu.tar.xz 80079312 BLAKE2B 
a9efc2144db041e19c24e442839e0beba7836be03f38b18725b14c51ff317dc63a6babb06c828b72f9fbe161403fe722d25d7220b63c98fa9bc29f9a94befcc1
 SHA512 
6f74275cd1d2463c0b7b50a54d1365a0518b7fbf01025a9b799019a296e3b81c0ab3e70468216d6e6f6fa59f6a8b20ceff2532aafa5d63661b662616bfa9c21e
 DIST rust-1.24.1-aarch64-unknown-linux-musl.tar.xz 78536928 BLAKE2B 
ad7a433bfd1b9a06af15227c66af8bc0cdedeae37af17b0f261569a7dd17297dc700c9d9dfb9c5c97d07b8511dde98c50ade374bcc548bdcaff05fb1ac202a6b
 SHA512 
5a39b53e7dbaf20d80f82a28476a0729cffb37e31e849dd5653c571a74a65b8589bcf6bcc40041c140b5ac791bc90496de588aea502a72e4a9250af68b0193ed
 DIST rust-1.24.1-arm-unknown-linux-gnueabi.tar.xz 82770752 BLAKE2B 
dbda5149444e17430b4b929a20335dc5093515eb7699c9c50bc81bc1069cba1639e4a37ebf1001c06cd5415fe86f37a28f78c208783aa7d9c34292ca0aaadfef
 SHA512 
2294b24d4024bd991892e0b59dc3a59fc1b2b14282b0cf3d7a55b91062cad4d4278ce835709da1b5544a2980a35714501fafb7d41f29de252c844e51eda51d98
@@ -24,6 +8,4 @@ DIST rust-1.24.1-i686-unknown-linux-gnu.tar.xz 86918664 
BLAKE2B 49bc796602c0e4d9
 DIST rust-1.24.1-i686-unknown-linux-musl.tar.xz 83970072 BLAKE2B 
34700ee73d9ad85571fcd561bc3f5c8e41e8791fbbdab3880167ee989b2ee0e7cc61e000c0cea3930e35d6819b1897521f449671e9ae9e1701d6da39dd354214
 SHA512 
22a5187ba9011dbddf78fdc5056455e7179f3470341d2287cb5795c7cd8d9a90fed856936a6e486af9119b106efe366221d376520cdd7e4e7a3b8d8e6322db74
 DIST rust-1.24.1-x86_64-unknown-linux-gnu.tar.xz 90298644 BLAKE2B 
15430f87cd6351a9bfc4cba3c43a7e36f31b325983bd04138622f23a4fe67b412f874771fe0703b2d6065fe46af28d6a89fb0387636524c46e0cefa75b78c3dc
 SHA512 
f263e8bee6bff1b3a4c8716248aa78c99f86768f03c7f21fc239203ade6e3b466bfec35e138b021e84b7ae8dffb41c4d045e3c98437f4549d801a2f687c4b92d
 DIST rust-1.24.1-x86_64-unknown-linux-musl.tar.xz 81773076 BLAKE2B 
c6d21d5740ca259c98a1a53a40b86cdca939c5b107ff7174b420dca7a1c90f71219e8b498c1485a3881d88e86caca7d19a81100614bd78ad5790f8d36a5beff4
 SHA512 
7fc3fd6a5a23b7f43ebc9c90401be3182ff9f68ec4910a71e9b1ee1c198508e759a342f9e42eab3b19dc5465e3158a6a8f7fcc2753cc4c88bdb06ae99d66b638
-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
 DIST rustc-1.25.0-src.tar.xz 56108536 BLAKE2B 
c4a5e56b0e345b5ccde699f68659ac10793670047d2806bdab856d56aa5b960a0df5b947f7c0a7dadfcb7edbe4f9c1a71a94c5f240e91c93296a90d232030645
 SHA512 
45baaaa47d8b6433f61b1a6f2637d8f4fe013b534a8a94365025dfcf786815c95111b9bd3beb2544ba8587fb4c8b38431765c4d68bc9c19285da4ccf7c7eeda2

diff --git 
a/dev-lang/rust/files/1.21.0/0001-Explicitly-run-perl-for-OpenSSL-Configure.patch
 
b/dev-lang/rust/files/1.21.0/0001-Explicitly-run-perl-for-OpenSSL-Configure.patch
deleted file mode 100644
index b0267d7..0000000
--- 
a/dev-lang/rust/files/1.21.0/0001-Explicitly-run-perl-for-OpenSSL-Configure.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 56da47a7e21b90dbd9fec0f935d4519d072b6a92 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <sam...@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/1.21.0/0002-Require-rlibs-for-dependent-crates-when-linking-stat.patch
 
b/dev-lang/rust/files/1.21.0/0002-Require-rlibs-for-dependent-crates-when-linking-stat.patch
deleted file mode 100644
index 672e864..0000000
--- 
a/dev-lang/rust/files/1.21.0/0002-Require-rlibs-for-dependent-crates-when-linking-stat.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From 1f9f168d318a0c87847b33afa9f13463c22a83ff Mon Sep 17 00:00:00 2001
-From: Samuel Holland <sam...@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/1.21.0/0003-Adjust-dependency-resolution-errors-to-be-more-consi.patch
 
b/dev-lang/rust/files/1.21.0/0003-Adjust-dependency-resolution-errors-to-be-more-consi.patch
deleted file mode 100644
index f92683d..0000000
--- 
a/dev-lang/rust/files/1.21.0/0003-Adjust-dependency-resolution-errors-to-be-more-consi.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 02ef7616b6f5d192032c250982362c0ae0f06b45 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <sam...@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/1.21.0/0004-Require-static-native-libraries-when-linking-static-.patch
 
b/dev-lang/rust/files/1.21.0/0004-Require-static-native-libraries-when-linking-static-.patch
deleted file mode 100644
index b58c08d..0000000
--- 
a/dev-lang/rust/files/1.21.0/0004-Require-static-native-libraries-when-linking-static-.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From b6ace9145b6ec3540b17c7253ed3b042eb8aee5e Mon Sep 17 00:00:00 2001
-From: Samuel Holland <sam...@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/1.21.0/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
 
b/dev-lang/rust/files/1.21.0/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
deleted file mode 100644
index 985d007..0000000
--- 
a/dev-lang/rust/files/1.21.0/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
+++ /dev/null
@@ -1,416 +0,0 @@
-From 40709f672f29ad2c9454615d3d0741f78cec7447 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <sam...@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/1.21.0/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
 
b/dev-lang/rust/files/1.21.0/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
deleted file mode 100644
index c12e6df..0000000
--- 
a/dev-lang/rust/files/1.21.0/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From cbd6ddb6036758c54a89e578b2fad183b2d50e8d Mon Sep 17 00:00:00 2001
-From: Samuel Holland <sam...@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/1.21.0/0007-Fix-LLVM-build.patch 
b/dev-lang/rust/files/1.21.0/0007-Fix-LLVM-build.patch
deleted file mode 100644
index d435bfb..0000000
--- a/dev-lang/rust/files/1.21.0/0007-Fix-LLVM-build.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From ede5ae2d6278c7309601d2bb2dde55e5c91fbac2 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <sam...@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/1.21.0/0008-Add-openssl-configuration-for-musl-targets.patch
 
b/dev-lang/rust/files/1.21.0/0008-Add-openssl-configuration-for-musl-targets.patch
deleted file mode 100644
index 691661b..0000000
--- 
a/dev-lang/rust/files/1.21.0/0008-Add-openssl-configuration-for-musl-targets.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 6fe9d7428e87bd13d96895cc56568104fe2cc112 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <sam...@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/1.21.0/0009-liblibc.patch 
b/dev-lang/rust/files/1.21.0/0009-liblibc.patch
deleted file mode 100644
index d9d9c3b..0000000
--- a/dev-lang/rust/files/1.21.0/0009-liblibc.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-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/1.21.0/0010-static-linking-default.patch 
b/dev-lang/rust/files/1.21.0/0010-static-linking-default.patch
deleted file mode 100644
index 57836ad..0000000
--- a/dev-lang/rust/files/1.21.0/0010-static-linking-default.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-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/1.21.0/llvm4-musl-fixes.patch 
b/dev-lang/rust/files/1.21.0/llvm4-musl-fixes.patch
deleted file mode 100644
index c683835..0000000
--- a/dev-lang/rust/files/1.21.0/llvm4-musl-fixes.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-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/files/1.23.0-separate-libdir.patch 
b/dev-lang/rust/files/1.23.0-separate-libdir.patch
deleted file mode 100644
index dcf1762..0000000
--- a/dev-lang/rust/files/1.23.0-separate-libdir.patch
+++ /dev/null
@@ -1,180 +0,0 @@
-From c520b2dd277f13dc09e8e72c486e5c58fb97017d Mon Sep 17 00:00:00 2001
-From: O01eg <o0...@yandex.ru>
-Date: Wed, 29 Nov 2017 12:32:03 +0300
-Subject: [PATCH] Fix #45345.
-
-Re-implement
-
-```bash
-CFG_LIBDIR_RELATIVE=`echo ${CFG_LIBDIR} | cut 
-c$((${#CFG_PREFIX}+${CAT_INC}))-`
-```
-
-from old `configure` script.
-
-Accept verbosity in rustdoc.
-
-Stage 1 and later use relative libdir.
-
-Build all stages with relative libdirs.
-
-Add library path for real rustdoc with `RUSTDOC_LIBDIR` environment variable.
-
-Remove unused argument `rustc_cargo`.
-
-Remove unused configuration parameter `libdir_relative`.
----
- src/bootstrap/bin/rustdoc.rs | 13 ++++++++++++-
- src/bootstrap/builder.rs     |  9 ++++++---
- src/bootstrap/check.rs       |  2 +-
- src/bootstrap/compile.rs     | 13 ++++---------
- src/bootstrap/config.rs      |  1 -
- src/bootstrap/doc.rs         |  2 +-
- 6 files changed, 24 insertions(+), 16 deletions(-)
-
-diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
-index 4e975adc97..24312b50ec 100644
---- a/src/bootstrap/bin/rustdoc.rs
-+++ b/src/bootstrap/bin/rustdoc.rs
-@@ -23,10 +23,17 @@ use std::path::PathBuf;
- fn main() {
-     let args = env::args_os().skip(1).collect::<Vec<_>>();
-     let rustdoc = env::var_os("RUSTDOC_REAL").expect("RUSTDOC_REAL was not 
set");
--    let libdir = env::var_os("RUSTC_LIBDIR").expect("RUSTC_LIBDIR was not 
set");
-+    let libdir = env::var_os("RUSTDOC_LIBDIR").expect("RUSTDOC_LIBDIR was not 
set");
-     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");
- 
-+    use std::str::FromStr;
-+
-+    let verbose = match env::var("RUSTC_VERBOSE") {
-+        Ok(s) => usize::from_str(&s).expect("RUSTC_VERBOSE should be an 
integer"),
-+        Err(_) => 0,
-+    };
-+
-     let mut dylib_path = bootstrap::util::dylib_path();
-     dylib_path.insert(0, PathBuf::from(libdir));
- 
-@@ -59,6 +66,10 @@ fn main() {
-            .arg("--crate-version").arg(version);
-     }
- 
-+    if verbose > 1 {
-+        eprintln!("rustdoc command: {:?}", cmd);
-+    }
-+
-     std::process::exit(match cmd.status() {
-         Ok(s) => s.code().unwrap_or(1),
-         Err(e) => panic!("\n\nfailed to run {:?}: {}\n\n", cmd, e),
-diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index c76900882b..1927a604c5 100644
---- a/src/bootstrap/builder.rs
-+++ b/src/bootstrap/builder.rs
-@@ -357,8 +357,8 @@ impl<'a> Builder<'a> {
- 
-             fn run(self, builder: &Builder) -> Interned<PathBuf> {
-                 let compiler = self.compiler;
--                let lib = if compiler.stage >= 2 && 
builder.build.config.libdir_relative.is_some() {
--                    builder.build.config.libdir_relative.clone().unwrap()
-+                let lib = if compiler.stage >= 1 && 
builder.build.config.libdir.is_some() {
-+                    builder.build.config.libdir.clone().unwrap()
-                 } else {
-                     PathBuf::from("lib")
-                 };
-@@ -416,7 +416,7 @@ impl<'a> Builder<'a> {
-         let compiler = self.compiler(self.top_stage, host);
-         cmd.env("RUSTC_STAGE", compiler.stage.to_string())
-            .env("RUSTC_SYSROOT", self.sysroot(compiler))
--           .env("RUSTC_LIBDIR", self.sysroot_libdir(compiler, 
self.build.build))
-+           .env("RUSTDOC_LIBDIR", self.sysroot_libdir(compiler, 
self.build.build))
-            .env("CFG_RELEASE_CHANNEL", &self.build.config.channel)
-            .env("RUSTDOC_REAL", self.rustdoc(host))
-            .env("RUSTDOC_CRATE_VERSION", self.build.rust_version())
-@@ -496,6 +496,9 @@ impl<'a> Builder<'a> {
-         if let Some(target_linker) = self.build.linker(target) {
-             cargo.env("RUSTC_TARGET_LINKER", target_linker);
-         }
-+        if cmd != "build" {
-+            cargo.env("RUSTDOC_LIBDIR", self.rustc_libdir(self.compiler(2, 
self.build.build)));
-+        }
- 
-         if mode != Mode::Tool {
-             // Tools don't get debuginfo right now, e.g. cargo and rls don't
-diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs
-index 4d69b19c73..d926c2b901 100644
---- a/src/bootstrap/check.rs
-+++ b/src/bootstrap/check.rs
-@@ -1171,7 +1171,7 @@ impl Step for Crate {
-             }
-             Mode::Librustc => {
-                 builder.ensure(compile::Rustc { compiler, target });
--                compile::rustc_cargo(build, &compiler, target, &mut cargo);
-+                compile::rustc_cargo(build, target, &mut cargo);
-                 ("librustc", "rustc-main")
-             }
-             _ => panic!("can only test libraries"),
-diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index db013691bb..d60feb1aff 100644
---- a/src/bootstrap/compile.rs
-+++ b/src/bootstrap/compile.rs
-@@ -485,7 +485,7 @@ impl Step for Rustc {
-         build.clear_if_dirty(&stage_out, &libtest_stamp(build, compiler, 
target));
- 
-         let mut cargo = builder.cargo(compiler, Mode::Librustc, target, 
"build");
--        rustc_cargo(build, &compiler, target, &mut cargo);
-+        rustc_cargo(build, target, &mut cargo);
-         run_cargo(build,
-                   &mut cargo,
-                   &librustc_stamp(build, compiler, target));
-@@ -500,7 +500,6 @@ impl Step for Rustc {
- 
- /// Same as `std_cargo`, but for libtest
- pub fn rustc_cargo(build: &Build,
--                   compiler: &Compiler,
-                    target: Interned<String>,
-                    cargo: &mut Command) {
-     cargo.arg("--features").arg(build.rustc_features())
-@@ -514,13 +513,9 @@ pub fn rustc_cargo(build: &Build,
-          .env("CFG_VERSION", build.rust_version())
-          .env("CFG_PREFIX", build.config.prefix.clone().unwrap_or_default());
- 
--    if compiler.stage == 0 {
--        cargo.env("CFG_LIBDIR_RELATIVE", "lib");
--    } else {
--        let libdir_relative =
--            
build.config.libdir_relative.clone().unwrap_or(PathBuf::from("lib"));
--        cargo.env("CFG_LIBDIR_RELATIVE", libdir_relative);
--    }
-+    let libdir_relative =
-+        build.config.libdir.clone().unwrap_or(PathBuf::from("lib"));
-+    cargo.env("CFG_LIBDIR_RELATIVE", libdir_relative);
- 
-     // If we're not building a compiler with debugging information then remove
-     // these two env vars which would be set otherwise.
-diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 35e62f17f2..1ca19187cf 100644
---- a/src/bootstrap/config.rs
-+++ b/src/bootstrap/config.rs
-@@ -119,7 +119,6 @@ pub struct Config {
-     pub docdir: Option<PathBuf>,
-     pub bindir: Option<PathBuf>,
-     pub libdir: Option<PathBuf>,
--    pub libdir_relative: Option<PathBuf>,
-     pub mandir: Option<PathBuf>,
-     pub codegen_tests: bool,
-     pub nodejs: Option<PathBuf>,
-diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
-index 3c12cfc4c7..1314d967d8 100644
---- a/src/bootstrap/doc.rs
-+++ b/src/bootstrap/doc.rs
-@@ -616,7 +616,7 @@ impl Step for Rustc {
-         t!(symlink_dir_force(&my_out, &out_dir));
- 
-         let mut cargo = builder.cargo(compiler, Mode::Librustc, target, 
"doc");
--        compile::rustc_cargo(build, &compiler, target, &mut cargo);
-+        compile::rustc_cargo(build, target, &mut cargo);
- 
-         if build.config.compiler_docs {
-             // src/rustc/Cargo.toml contains a bin crate called rustc which
--- 
-2.13.6
-

diff --git 
a/dev-lang/rust/files/1.23.0/0001-Require-static-native-libraries-when-linking-static-.patch
 
b/dev-lang/rust/files/1.23.0/0001-Require-static-native-libraries-when-linking-static-.patch
deleted file mode 100644
index 8175c4c..0000000
--- 
a/dev-lang/rust/files/1.23.0/0001-Require-static-native-libraries-when-linking-static-.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From abd07ed6ab514ef00d450640a659861af06f308e Mon Sep 17 00:00:00 2001
-From: Samuel Holland <sam...@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/1.23.0/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
 
b/dev-lang/rust/files/1.23.0/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
deleted file mode 100644
index 4c99e42..0000000
--- 
a/dev-lang/rust/files/1.23.0/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
+++ /dev/null
@@ -1,408 +0,0 @@
-From 3f14fcbb1dc6a11ed82724d6c006325243122bfb Mon Sep 17 00:00:00 2001
-From: Samuel Holland <sam...@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/1.23.0/0003-Switch-musl-targets-to-link-dynamically-by-default.patch
 
b/dev-lang/rust/files/1.23.0/0003-Switch-musl-targets-to-link-dynamically-by-default.patch
deleted file mode 100644
index b3a0df9..0000000
--- 
a/dev-lang/rust/files/1.23.0/0003-Switch-musl-targets-to-link-dynamically-by-default.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 77f657181d30e7195188b2d0c6cd55c11aa079ac Mon Sep 17 00:00:00 2001
-From: Samuel Holland <sam...@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/1.23.0/0004-Prefer-libgcc_eh-over-libunwind-for-musl.patch
 
b/dev-lang/rust/files/1.23.0/0004-Prefer-libgcc_eh-over-libunwind-for-musl.patch
deleted file mode 100644
index a15680f..0000000
--- 
a/dev-lang/rust/files/1.23.0/0004-Prefer-libgcc_eh-over-libunwind-for-musl.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 807918c554f688305ab4a2f7ee439652832e12df Mon Sep 17 00:00:00 2001
-From: Samuel Holland <sam...@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/1.23.0/0005-Fix-LLVM-build.patch 
b/dev-lang/rust/files/1.23.0/0005-Fix-LLVM-build.patch
deleted file mode 100644
index 97e7f3b..0000000
--- a/dev-lang/rust/files/1.23.0/0005-Fix-LLVM-build.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 1fa880e13931269c187319f0d535ef194c098894 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <sam...@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/1.23.0/0006-Fix-rustdoc-for-cross-targets.patch 
b/dev-lang/rust/files/1.23.0/0006-Fix-rustdoc-for-cross-targets.patch
deleted file mode 100644
index 390f202..0000000
--- a/dev-lang/rust/files/1.23.0/0006-Fix-rustdoc-for-cross-targets.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From da75097b4c83ee27358136c67cdf1c9c3ba795f7 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <sam...@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/1.23.0/0007-Add-openssl-configuration-for-musl-targets.patch
 
b/dev-lang/rust/files/1.23.0/0007-Add-openssl-configuration-for-musl-targets.patch
deleted file mode 100644
index 82848c6..0000000
--- 
a/dev-lang/rust/files/1.23.0/0007-Add-openssl-configuration-for-musl-targets.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From c919f6ce3c9ac32dbad42946a62f97bd20fe607e Mon Sep 17 00:00:00 2001
-From: Samuel Holland <sam...@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/1.23.0/0008-Don-t-pass-CFLAGS-to-the-C-compiler.patch 
b/dev-lang/rust/files/1.23.0/0008-Don-t-pass-CFLAGS-to-the-C-compiler.patch
deleted file mode 100644
index 1d769b5..0000000
--- a/dev-lang/rust/files/1.23.0/0008-Don-t-pass-CFLAGS-to-the-C-compiler.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From c386995b5515ca3116e249876ec7916e64f18a90 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <sam...@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/files/1.23.0/0009-liblibc.patch 
b/dev-lang/rust/files/1.23.0/0009-liblibc.patch
deleted file mode 100644
index d9d9c3b..0000000
--- a/dev-lang/rust/files/1.23.0/0009-liblibc.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-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/1.23.0/llvm4-musl-fixes.patch 
b/dev-lang/rust/files/1.23.0/llvm4-musl-fixes.patch
deleted file mode 100644
index c683835..0000000
--- a/dev-lang/rust/files/1.23.0/llvm4-musl-fixes.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-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/rust-1.21.0.ebuild b/dev-lang/rust/rust-1.21.0.ebuild
deleted file mode 100644
index 1dab345..0000000
--- a/dev-lang/rust/rust-1.21.0.ebuild
+++ /dev/null
@@ -1,239 +0,0 @@
-# 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 multiprocessing 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*)
-               RUSTARCH=armv7 ;;
-       arm*)
-               RUSTARCH=arm ;;
-       *)
-               RUSTARCH=${CHOST%%-*} ;;
-esac
-case "${CHOST}" in
-       armv7a-hardfloat-*)
-               RUSTLIBC=${ELIBC/glibc/gnu}eabihf ;;
-       arm*)
-               RUSTLIBC=${CHOST##*-} ;;
-       *)
-               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"
-
-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}/1.21.0/0001-Explicitly-run-perl-for-OpenSSL-Configure.patch"
-       
"${FILESDIR}/1.21.0/0002-Require-rlibs-for-dependent-crates-when-linking-stat.patch"
-       
"${FILESDIR}/1.21.0/0003-Adjust-dependency-resolution-errors-to-be-more-consi.patch"
-       
"${FILESDIR}/1.21.0/0004-Require-static-native-libraries-when-linking-static-.patch"
-       
"${FILESDIR}/1.21.0/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch"
-       "${FILESDIR}/1.21.0/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch"
-       "${FILESDIR}/1.21.0/0007-Fix-LLVM-build.patch"
-       
"${FILESDIR}/1.21.0/0008-Add-openssl-configuration-for-musl-targets.patch"
-       "${FILESDIR}/1.21.0/0009-liblibc.patch"
-       "${FILESDIR}/1.21.0/0010-static-linking-default.patch"
-       "${FILESDIR}/1.21.0/llvm4-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)"
-       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 -j$(makeopts_jobs) || die
-}
-
-src_install() {
-       env DESTDIR="${D}" ./x.py install -j$(makeopts_jobs) || 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
-       fi
-
-       rm "${D}/usr/share/doc/${P}/LICENSE-MIT" || die
-       rm "${D}/usr/share/doc/${P}/LICENSE-APACHE" || 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 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
-}

diff --git a/dev-lang/rust/rust-1.23.0-r1.ebuild 
b/dev-lang/rust/rust-1.23.0-r1.ebuild
deleted file mode 100644
index 935c6ba..0000000
--- a/dev-lang/rust/rust-1.23.0-r1.ebuild
+++ /dev/null
@@ -1,268 +0,0 @@
-# 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 multiprocessing 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
-       armv7*)
-               RUSTARCH=armv7 ;;
-       arm*)
-               RUSTARCH=arm ;;
-       *)
-               RUSTARCH=${CHOST%%-*} ;;
-esac
-case "${CHOST}" in
-       armv7a-hardfloat-*)
-               RUSTLIBC=${ELIBC/glibc/gnu}eabihf ;;
-       arm*)
-               RUSTLIBC=${CHOST##*-} ;;
-       *)
-               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 extended jemalloc libressl system-llvm"
-
-RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
-               jemalloc? ( dev-libs/jemalloc )
-               system-llvm? ( sys-devel/llvm:4 )
-               extended? (
-                       libressl? (
-                               >=dev-libs/libressl-2.5.0:=
-                               <dev-libs/libressl-2.7.0:=
-                       )
-                       !libressl? ( dev-libs/openssl:0= )
-                       net-libs/http-parser:0/2.6.2
-                       net-libs/libssh2:=
-                       net-misc/curl:=[ssl]
-                       sys-libs/zlib:=
-                       !dev-util/rustfmt
-                       !dev-util/cargo
-               )
-"
-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="!extended? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )"
-
-PATCHES=(
-       "${FILESDIR}/1.23.0-separate-libdir.patch"
-       
"${FILESDIR}/1.23.0/0001-Require-static-native-libraries-when-linking-static-.patch"
-       
"${FILESDIR}/1.23.0/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch"
-       
"${FILESDIR}/1.23.0/0003-Switch-musl-targets-to-link-dynamically-by-default.patch"
-       "${FILESDIR}/1.23.0/0004-Prefer-libgcc_eh-over-libunwind-for-musl.patch"
-       "${FILESDIR}/1.23.0/0005-Fix-LLVM-build.patch"
-       "${FILESDIR}/1.23.0/0006-Fix-rustdoc-for-cross-targets.patch"
-       
"${FILESDIR}/1.23.0/0007-Add-openssl-configuration-for-musl-targets.patch"
-       "${FILESDIR}/1.23.0/0008-Don-t-pass-CFLAGS-to-the-C-compiler.patch"
-       "${FILESDIR}/1.23.0/0009-liblibc.patch"
-       "${FILESDIR}/1.23.0/llvm4-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
-               extended = $(toml_usex extended)
-               [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 = $(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 -j$(makeopts_jobs) || die
-}
-
-src_install() {
-       env DESTDIR="${D}" ./x.py install -j$(makeopts_jobs) || 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
-       fi
-
-       if use extended; then
-               rm "${D}/usr/$(get_libdir)/rustlib/manifest-cargo" || die
-               rm "${D}/usr/$(get_libdir)/rustlib/manifest-rls-preview" || die
-               rm 
"${D}/usr/$(get_libdir)/rustlib/manifest-rust-analysis-${RUSTHOST}" || die
-               rm "${D}/usr/$(get_libdir)/rustlib/manifest-rust-src" || die
-               rm "${D}/usr/$(get_libdir)/rustlib/manifest-rustfmt-preview" || 
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
-}

diff --git a/dev-lang/rust/rust-1.23.0.ebuild b/dev-lang/rust/rust-1.23.0.ebuild
deleted file mode 100644
index 2a81e3a..0000000
--- a/dev-lang/rust/rust-1.23.0.ebuild
+++ /dev/null
@@ -1,248 +0,0 @@
-# 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 multiprocessing 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
-       armv7*)
-               RUSTARCH=armv7 ;;
-       arm*)
-               RUSTARCH=arm ;;
-       *)
-               RUSTARCH=${CHOST%%-*} ;;
-esac
-case "${CHOST}" in
-       armv7a-hardfloat-*)
-               RUSTLIBC=${ELIBC/glibc/gnu}eabihf ;;
-       arm*)
-               RUSTLIBC=${CHOST##*-} ;;
-       *)
-               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 )
-       net-libs/http-parser:0/2.6.2
-"
-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}/1.23.0/0001-Require-static-native-libraries-when-linking-static-.patch"
-       
"${FILESDIR}/1.23.0/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch"
-       
"${FILESDIR}/1.23.0/0003-Switch-musl-targets-to-link-dynamically-by-default.patch"
-       "${FILESDIR}/1.23.0/0004-Prefer-libgcc_eh-over-libunwind-for-musl.patch"
-       "${FILESDIR}/1.23.0/0005-Fix-LLVM-build.patch"
-       "${FILESDIR}/1.23.0/0006-Fix-rustdoc-for-cross-targets.patch"
-       
"${FILESDIR}/1.23.0/0007-Add-openssl-configuration-for-musl-targets.patch"
-       "${FILESDIR}/1.23.0/0008-Don-t-pass-CFLAGS-to-the-C-compiler.patch"
-       "${FILESDIR}/1.23.0/0009-liblibc.patch"
-       "${FILESDIR}/1.23.0/llvm4-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 -j$(makeopts_jobs) || die
-}
-
-src_install() {
-       env DESTDIR="${D}" ./x.py install -j$(makeopts_jobs) || 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
-}

Reply via email to