dev-lang/rust: Remove. - parlay - yet another gentoo overlay
HTML git clone https://git.parazyd.org/parlay
DIR Log
DIR Files
DIR Refs
DIR README
---
DIR commit 5ecb189602d905ec5f458e3af6222dbf65c83dfa
DIR parent 049c45702de4204080845f8f8c044d1dad2265c0
HTML Author: parazyd <parazyd@dyne.org>
Date: Sun, 27 Jan 2019 11:54:59 +0100
dev-lang/rust: Remove.
Diffstat:
D dev-lang/rust/Manifest | 4 ----
D dev-lang/rust/files/0002-Remove-no… | 420 -------------------------------
D dev-lang/rust/files/0003-Switch-mu… | 25 -------------------------
D dev-lang/rust/files/0004-Prefer-li… | 24 ------------------------
D dev-lang/rust/files/0005-Fix-LLVM-… | 26 --------------------------
D dev-lang/rust/files/0007-Add-opens… | 42 -------------------------------
D dev-lang/rust/files/0008-Don-t-pas… | 36 -------------------------------
D dev-lang/rust/files/0010-liblibc.p… | 29 -----------------------------
D dev-lang/rust/files/0011-Avoid-nam… | 32 -------------------------------
D dev-lang/rust/metadata.xml | 20 --------------------
D dev-lang/rust/rust-1.31.0.ebuild | 317 -------------------------------
11 files changed, 0 insertions(+), 975 deletions(-)
---
DIR diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
@@ -1,4 +0,0 @@
-DIST rust-1.30.1-aarch64-unknown-linux-gnu.tar.xz 114223904 BLAKE2B ca3f93d8cb59f5ecc8680ab018f8666a5c0df1bf671af4220c39178a946ce77a05588d91709facd42a1d693120c46c472c4d6dc0b6a5e7d3330b9f0807ff3fcc SHA512 5fb9cb0281cd76b1995bcd6c4dd824f8a4d4c1ffc61a0a54f62b45340b98a7b41cf5ec3d4a8ec370c2603c14f9dc5451ae1a47ea96ebbd520770dfd22cf0ffdc
-DIST rust-1.30.1-i686-unknown-linux-gnu.tar.xz 143689500 BLAKE2B 0b654570e295c785b074625c8fe7649e1841327fba790e38e08e912ad0602440e08a205318e637c903989bd19bab4c0a726583f2ab457d75ff71e96524251aa0 SHA512 66c56107fd8c83f9c1948137aee09c67633f6f472823696719a22b5f0b0e28925b0a6b6545b8fe4d741b8473ddc49db30fe112fc5b0e6fc63439901ff5462a86
-DIST rust-1.30.1-x86_64-gentoo-linux-musl.tar.xz 96885576 BLAKE2B 403f73bb45bcce9ec85a9b1d5abe2053b6b3f97ea90e1326df61d788cad5fc43c850d30f0b023b6bcf5208a8f0fa13d202cc4ecb0754b7990b507d24ab4a1c5f SHA512 8310497433d1fb11dbb7e579354dbb30c316dbbd3db066ff3b059844f8c7169ab825f94fc48d0f7ed1339b823129d2cb10865abc656edca2e6bd4c914fb56bf5
-DIST rustc-1.31.0-src.tar.xz 96914112 BLAKE2B 5e4c5d7724033c756f57794bda273f5c6b481a4a310afc73cafa6a67c2fe3e56cf08ca828e822d91890a6fda917e4c05d4b20f598e50805431d2926a4f1add9c SHA512 38fb8c759a517defd64ca75a22d5deb1fa543fc13f127c73010741c40bc00935bf3b46743a95a22e98e37df5aa21d72203acabaecf8c0b23439e3b5c68f2fbec
DIR diff --git a/dev-lang/rust/files/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch b/dev-lang/rust/files/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -1,420 +0,0 @@
-From ad5ce81e82e931feb764ee8422230e56b37f3b3b Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Thu, 18 Oct 2018 00:03:57 +0200
-Subject: [PATCH 02/11] 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 | 22 -------------
- src/bootstrap/lib.rs | 8 -----
- src/bootstrap/sanity.rs | 30 +-----------------
- .../dist-i586-gnu-i586-i686-musl/Dockerfile | 2 --
- src/ci/docker/dist-various-1/Dockerfile | 7 -----
- src/ci/docker/dist-x86_64-musl/Dockerfile | 1 -
- src/librustc_target/spec/linux_musl_base.rs | 16 ----------
- 12 files changed, 4 insertions(+), 163 deletions(-)
-
-diff --git a/config.toml.example b/config.toml.example
-index 990734163..6f8b52e23 100644
---- a/config.toml.example
-+++ b/config.toml.example
-@@ -409,12 +409,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 7192cae89..71435f930 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::path::PathBuf;
- use std::process::Command;
-@@ -126,15 +125,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 698903f12..629cedf01 100644
---- a/src/bootstrap/cc_detect.rs
-+++ b/src/bootstrap/cc_detect.rs
-@@ -95,7 +95,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();
-@@ -124,7 +124,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()));
-@@ -135,8 +135,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
-@@ -173,26 +172,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 04e8e133b..7767956cd 100644
---- a/src/bootstrap/compile.rs
-+++ b/src/bootstrap/compile.rs
-@@ -87,13 +87,6 @@ impl Step for Std {
- });
- builder.info(&format!("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") {
-- let libdir = builder.sysroot_libdir(compiler, target);
-- copy_musl_third_party_objects(builder, target, &libdir);
-- }
--
- builder.ensure(StdLink {
- compiler: from,
- target_compiler: compiler,
-@@ -102,11 +95,6 @@ impl Step for Std {
- return;
- }
-
-- if target.contains("musl") {
-- let libdir = builder.sysroot_libdir(compiler, target);
-- copy_musl_third_party_objects(builder, target, &libdir);
-- }
--
- let out_dir = builder.cargo_out(compiler, Mode::Std, target);
- builder.clear_if_dirty(&out_dir, &builder.rustc(compiler));
- let mut cargo = builder.cargo(compiler, Mode::Std, target, "build");
-@@ -128,20 +116,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(builder: &Builder,
-- target: Interned<String>,
-- into: &Path) {
-- for &obj in &["crt1.o", "crti.o", "crtn.o"] {
-- builder.copy(&builder.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(builder: &Builder,
-@@ -196,11 +170,6 @@ pub fn std_cargo(builder: &Builder,
- cargo.env("JEMALLOC_OVERRIDE", jemalloc);
- }
- }
-- if target.contains("musl") {
-- if let Some(p) = builder.musl_root(target) {
-- cargo.env("MUSL_ROOT", p);
-- }
-- }
- }
- }
-
-diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 0a8a5c87d..9fdf8690c 100644
---- a/src/bootstrap/config.rs
-+++ b/src/bootstrap/config.rs
-@@ -131,8 +131,6 @@ pub struct Config {
- pub save_toolstates: Option<PathBuf>,
- pub print_step_timings: bool,
-
-- // Fallback musl-root for all targets
-- pub musl_root: Option<PathBuf>,
- pub prefix: Option<PathBuf>,
- pub sysconfdir: Option<PathBuf>,
- pub datadir: Option<PathBuf>,
-@@ -165,7 +163,6 @@ pub struct Target {
- pub linker: Option<PathBuf>,
- pub ndk: Option<PathBuf>,
- pub crt_static: Option<bool>,
-- pub musl_root: Option<PathBuf>,
- pub qemu_rootfs: Option<PathBuf>,
- pub no_std: bool,
- }
-@@ -294,7 +291,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>,
-@@ -328,7 +324,6 @@ struct TomlTarget {
- linker: Option<String>,
- android_ndk: Option<String>,
- crt_static: Option<bool>,
-- musl_root: Option<String>,
- qemu_rootfs: Option<String>,
- }
-
-@@ -541,7 +536,6 @@ impl Config {
- set(&mut config.llvm_tools_enabled, rust.llvm_tools);
- config.rustc_parallel_queries = rust.experimental_parallel_queries.unwrap_or(false);
- config.rustc_default_linker = rust.default_linker.clone();
-- config.musl_root = rust.musl_root.clone().map(PathBuf::from);
- config.save_toolstates = rust.save_toolstates.clone().map(PathBuf::from);
- set(&mut config.deny_warnings, rust.deny_warnings.or(flags.warnings));
- set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
-@@ -580,7 +574,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 9fdba044f..513935e4c 100755
---- a/src/bootstrap/configure.py
-+++ b/src/bootstrap/configure.py
-@@ -108,28 +108,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
- "aarch64-linux-android NDK standalone path")
- v("x86_64-linux-android-ndk", "target.x86_64-linux-android.android-ndk",
- "x86_64-linux-android NDK standalone path")
--v("musl-root", "target.x86_64-unknown-linux-musl.musl-root",
-- "MUSL root installation directory (deprecated)")
--v("musl-root-x86_64", "target.x86_64-unknown-linux-musl.musl-root",
-- "x86_64-unknown-linux-musl install directory")
--v("musl-root-i586", "target.i586-unknown-linux-musl.musl-root",
-- "i586-unknown-linux-musl install directory")
--v("musl-root-i686", "target.i686-unknown-linux-musl.musl-root",
-- "i686-unknown-linux-musl install directory")
--v("musl-root-arm", "target.arm-unknown-linux-musleabi.musl-root",
-- "arm-unknown-linux-musleabi install directory")
--v("musl-root-armhf", "target.arm-unknown-linux-musleabihf.musl-root",
-- "arm-unknown-linux-musleabihf install directory")
--v("musl-root-armv5te", "target.armv5te-unknown-linux-musleabi.musl-root",
-- "armv5te-unknown-linux-musleabi install directory")
--v("musl-root-armv7", "target.armv7-unknown-linux-musleabihf.musl-root",
-- "armv7-unknown-linux-musleabihf install directory")
--v("musl-root-aarch64", "target.aarch64-unknown-linux-musl.musl-root",
-- "aarch64-unknown-linux-musl install directory")
--v("musl-root-mips", "target.mips-unknown-linux-musl.musl-root",
-- "mips-unknown-linux-musl install directory")
--v("musl-root-mipsel", "target.mipsel-unknown-linux-musl.musl-root",
-- "mipsel-unknown-linux-musl install directory")
- v("qemu-armhf-rootfs", "target.arm-unknown-linux-gnueabihf.qemu-rootfs",
- "rootfs in qemu testing, you probably don't want to use this")
- v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs",
-diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index 1efff19df..e0fa46f8b 100644
---- a/src/bootstrap/lib.rs
-+++ b/src/bootstrap/lib.rs
-@@ -802,14 +802,6 @@ impl Build {
- }
- }
-
-- /// Returns the "musl root" for this `target`, if defined
-- fn musl_root(&self, target: Interned<String>) -> Option<&Path> {
-- self.config.target_config.get(&target)
-- .and_then(|t| t.musl_root.as_ref())
-- .or(self.config.musl_root.as_ref())
-- .map(|p| &**p)
-- }
--
- /// Returns true if this is a no-std `target`, if defined
- fn no_std(&self, target: Interned<String>) -> Option<bool> {
- self.config.target_config.get(&target)
-diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index c7f514da9..617a3c239 100644
---- a/src/bootstrap/sanity.rs
-+++ b/src/bootstrap/sanity.rs
-@@ -21,7 +21,7 @@
- use std::collections::HashMap;
- use std::env;
- use std::ffi::{OsString, OsStr};
--use std::fs::{self, File};
-+use std::fs::File;
- use std::io::Read;
- use std::path::PathBuf;
- use std::process::Command;
-@@ -186,34 +186,6 @@ pub fn check(build: &mut Build) {
- }
- }
-
-- // Make sure musl-root is valid
-- if target.contains("musl") {
-- // If this is a native target (host is also musl) and no musl-root is given,
-- // fall back to the system toolchain in /usr before giving up
-- if build.musl_root(*target).is_none() && build.config.build == *target {
-- let target = build.config.target_config.entry(target.clone())
-- .or_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/dist-i586-gnu-i586-i686-musl/Dockerfile b/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile
-index ba2d32a92..412c37fdd 100644
---- a/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile
-+++ b/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile
-@@ -30,8 +30,6 @@ COPY scripts/sccache.sh /scripts/
- RUN sh /scripts/sccache.sh
-
- ENV RUST_CONFIGURE_ARGS \
-- --musl-root-i586=/musl-i586 \
-- --musl-root-i686=/musl-i686 \
- --enable-extended \
- --disable-docs
-
-diff --git a/src/ci/docker/dist-various-1/Dockerfile b/src/ci/docker/dist-various-1/Dockerfile
-index 6302f5500..e04fdaa22 100644
---- a/src/ci/docker/dist-various-1/Dockerfile
-+++ b/src/ci/docker/dist-various-1/Dockerfile
-@@ -109,13 +109,6 @@ ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
- CC_x86_64_unknown_redox=x86_64-unknown-redox-gcc
-
- ENV RUST_CONFIGURE_ARGS \
-- --musl-root-armv5te=/musl-armv5te \
-- --musl-root-arm=/musl-arm \
-- --musl-root-armhf=/musl-armhf \
-- --musl-root-armv7=/musl-armv7 \
-- --musl-root-aarch64=/musl-aarch64 \
-- --musl-root-mips=/musl-mips \
-- --musl-root-mipsel=/musl-mipsel \
- --enable-emscripten \
- --disable-docs
-
-diff --git a/src/ci/docker/dist-x86_64-musl/Dockerfile b/src/ci/docker/dist-x86_64-musl/Dockerfile
-index 06f8a2fbb..f5dd37952 100644
---- a/src/ci/docker/dist-x86_64-musl/Dockerfile
-+++ b/src/ci/docker/dist-x86_64-musl/Dockerfile
-@@ -30,7 +30,6 @@ COPY scripts/sccache.sh /scripts/
- RUN sh /scripts/sccache.sh
-
- ENV RUST_CONFIGURE_ARGS \
-- --musl-root-x86_64=/musl-x86_64 \
- --enable-extended \
- --disable-docs
-
-diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/spec/linux_musl_base.rs
-index 7a3f3c2a5..b512af9b5 100644
---- a/src/librustc_target/spec/linux_musl_base.rs
-+++ b/src/librustc_target/spec/linux_musl_base.rs
-@@ -13,11 +13,6 @@ use spec::{LinkerFlavor, TargetOptions};
- pub fn opts() -> TargetOptions {
- let mut base = super::linux_base::opts();
-
-- // Make sure that the linker/gcc really don't pull in anything, including
-- // default objects, libs, etc.
-- base.pre_link_args_crt.insert(LinkerFlavor::Gcc, Vec::new());
-- base.pre_link_args_crt.get_mut(&LinkerFlavor::Gcc).unwrap().push("-nostdlib".to_string());
--
- // At least when this was tested, the linker would not add the
- // `GNU_EH_FRAME` program header to executables generated, which is required
- // when unwinding to locate the unwinding information. I'm not sure why this
-@@ -49,17 +44,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_crt.push("crt1.o".to_string());
-- base.pre_link_objects_exe_crt.push("crti.o".to_string());
-- base.post_link_objects_crt.push("crtn.o".to_string());
--
- // These targets statically link libc by default
- base.crt_static_default = true;
- // These targets allow the user to choose between static and dynamic linking.
---
-2.19.1
-
DIR diff --git a/dev-lang/rust/files/0003-Switch-musl-targets-to-link-dynamically-by-default.patch b/dev-lang/rust/files/0003-Switch-musl-targets-to-link-dynamically-by-default.patch
@@ -1,25 +0,0 @@
-From 9b1a4c44f62a41bc8a35c76539d2fda2a674ac41 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Thu, 18 Oct 2018 09:32:32 +0200
-Subject: [PATCH 03/11] Switch musl targets to link dynamically by default
-
----
- src/librustc_target/spec/linux_musl_base.rs | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/spec/linux_musl_base.rs
-index b512af9b5..7581a64b1 100644
---- a/src/librustc_target/spec/linux_musl_base.rs
-+++ b/src/librustc_target/spec/linux_musl_base.rs
-@@ -44,8 +44,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.19.1
-
DIR diff --git a/dev-lang/rust/files/0004-Prefer-libgcc_eh-over-libunwind-for-musl.patch b/dev-lang/rust/files/0004-Prefer-libgcc_eh-over-libunwind-for-musl.patch
@@ -1,24 +0,0 @@
-From a315a269713bd18e10f0ad22b38867d63c85712c Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Thu, 18 Oct 2018 09:33:14 +0200
-Subject: [PATCH 04/11] 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 2b3c19c06..8233beada 100644
---- a/src/libunwind/lib.rs
-+++ b/src/libunwind/lib.rs
-@@ -35,6 +35,6 @@ cfg_if! {
- }
-
- #[cfg(target_env = "musl")]
--#[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
-+#[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
- #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
- extern {}
---
-2.19.1
-
DIR diff --git a/dev-lang/rust/files/0005-Fix-LLVM-build.patch b/dev-lang/rust/files/0005-Fix-LLVM-build.patch
@@ -1,26 +0,0 @@
-From b22e016d89a954278e6b9b0d22ea53b689b186a6 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Thu, 18 Oct 2018 09:34:19 +0200
-Subject: [PATCH 05/11] 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 e0fa46f8b..dd785124d 100644
---- a/src/bootstrap/lib.rs
-+++ b/src/bootstrap/lib.rs
-@@ -742,7 +742,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.19.1
-
DIR diff --git a/dev-lang/rust/files/0007-Add-openssl-configuration-for-musl-targets.patch b/dev-lang/rust/files/0007-Add-openssl-configuration-for-musl-targets.patch
@@ -1,42 +0,0 @@
-From 3560f6c43064c63f121f8c4d7382a3adfd51faba Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Thu, 18 Oct 2018 09:36:46 +0200
-Subject: [PATCH 07/11] 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 9aeb4e0ed..329ca4f16 100644
---- a/src/bootstrap/native.rs
-+++ b/src/bootstrap/native.rs
-@@ -610,9 +610,12 @@ impl Step for Openssl {
- "arm-linux-androideabi" => "android",
- "arm-unknown-linux-gnueabi" => "linux-armv4",
- "arm-unknown-linux-gnueabihf" => "linux-armv4",
-+ "arm-unknown-linux-musleabi" => "linux-armv4",
-+ "arm-unknown-linux-musleabihf" => "linux-armv4",
- "armv6-unknown-netbsd-eabihf" => "BSD-generic32",
-- "armv7-linux-androideabi" => "android-armv7",
-+ "armv7-linux-androideabi" => "android-armv4",
- "armv7-unknown-linux-gnueabihf" => "linux-armv4",
-+ "armv7-unknown-linux-musleabihf" => "linux-armv4",
- "armv7-unknown-netbsd-eabihf" => "BSD-generic32",
- "i586-unknown-linux-gnu" => "linux-elf",
- "i586-unknown-linux-musl" => "linux-elf",
-@@ -623,9 +626,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",
- "powerpc-unknown-linux-gnuspe" => "linux-ppc",
- "powerpc-unknown-netbsd" => "BSD-generic32",
---
-2.19.1
-
DIR diff --git a/dev-lang/rust/files/0008-Don-t-pass-CFLAGS-to-the-C-compiler.patch b/dev-lang/rust/files/0008-Don-t-pass-CFLAGS-to-the-C-compiler.patch
@@ -1,36 +0,0 @@
-From 70fd5118619bf40d123162358ad0c556a99b0cdd Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Thu, 18 Oct 2018 09:37:33 +0200
-Subject: [PATCH 08/11] 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 dc0b0aaf0..257d36975 100644
---- a/src/bootstrap/builder.rs
-+++ b/src/bootstrap/builder.rs
-@@ -966,7 +966,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());
-@@ -981,9 +981,7 @@ impl<'a> Builder<'a> {
- let cxx = ccacheify(&cxx);
- cargo
- .env(format!("CXX_{}", target), &cxx)
-- .env("CXX", &cxx)
-- .env(format!("CXXFLAGS_{}", target), cflags.clone())
-- .env("CXXFLAGS", cflags);
-+ .env("CXX", &cxx);
- }
- }
-
---
-2.19.1
-
DIR diff --git a/dev-lang/rust/files/0010-liblibc.patch b/dev-lang/rust/files/0010-liblibc.patch
@@ -1,29 +0,0 @@
-From 553f0366e2f14135c05afa9c544f563cdd2b12c1 Mon Sep 17 00:00:00 2001
-From: parazyd <parazyd@dyne.org>
-Date: Thu, 18 Oct 2018 09:49:43 +0200
-Subject: [PATCH 10/11] liblibc
-
----
- src/liblibc/src/unix/mod.rs | 6 +-----
- 1 file changed, 1 insertion(+), 5 deletions(-)
-
-diff --git a/src/liblibc/src/unix/mod.rs b/src/liblibc/src/unix/mod.rs
-index 15c7821fa..5c5ae19aa 100644
---- a/src/liblibc/src/unix/mod.rs
-+++ b/src/liblibc/src/unix/mod.rs
-@@ -285,11 +285,7 @@ cfg_if! {
- // cargo build, don't pull in anything extra as the libstd dep
- // already pulls in all libs.
- } else if #[cfg(target_env = "musl")] {
-- #[cfg_attr(feature = "stdbuild",
-- link(name = "c", kind = "static",
-- cfg(target_feature = "crt-static")))]
-- #[cfg_attr(feature = "stdbuild",
-- link(name = "c", cfg(not(target_feature = "crt-static"))))]
-+ #[link(name = "c")]
- extern {}
- } else if #[cfg(target_os = "emscripten")] {
- #[link(name = "c")]
---
-2.19.1
-
DIR diff --git a/dev-lang/rust/files/0011-Avoid-name-conflicts-with-musl-libc.patch b/dev-lang/rust/files/0011-Avoid-name-conflicts-with-musl-libc.patch
@@ -1,32 +0,0 @@
-From 90268dc82de90c46555f4ff8e0b794a746e40545 Mon Sep 17 00:00:00 2001
-From: parazyd <parazyd@dyne.org>
-Date: Thu, 18 Oct 2018 09:50:10 +0200
-Subject: [PATCH 11/11] Avoid name conflicts with musl-libc
-
----
- src/llvm/include/llvm/Analysis/TargetLibraryInfo.def | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/src/llvm/include/llvm/Analysis/TargetLibraryInfo.def b/src/llvm/include/llvm/Analysis/TargetLibraryInfo.def
-index 24608af38..600c51ff1 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")
---
-2.19.1
-
DIR diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>rust@gentoo.org</email>
- <name>Rust Project</name>
- </maintainer>
- <use>
- <flag name="cargo">Install cargo component</flag>
- <flag name="clippy">Install clippy component</flag>
- <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> as the
- standard memory allocator</flag>
- <flag name="rls">Install rls component</flag>
- <flag name="system-llvm">Use system <pkg>sys-devel/llvm</pkg> in
- place of the bundled one</flag>
- <flag name="rustfmt">Install rustfmt component</flag>
- <flag name="wasm">Build support for the wasm32-unknown-unknown
- target</flag>
- </use>
-</pkgmetadata>
DIR diff --git a/dev-lang/rust/rust-1.31.0.ebuild b/dev-lang/rust/rust-1.31.0.ebuild
@@ -1,317 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-LLVM_MAX_SLOT=7
-PYTHON_COMPAT=( python2_7 python3_{5,6} pypy )
-
-inherit llvm eapi7-ver multiprocessing multilib-build python-any-r1 toolchain-funcs
-
-if [[ ${PV} = *beta* ]]; then
- betaver=${PV//*beta}
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
- MY_P="rustc-beta"
- SLOT="beta/${PV}"
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz"
-else
- ABI_VER="$(ver_cut 1-2)"
- SLOT="stable/${ABI_VER}"
- MY_P="rustc-${PV}"
- SRC="${MY_P}-src.tar.xz"
- KEYWORDS="amd64 ~arm64 x86"
-fi
-
-CHOST_amd64=x86_64-gentoo-linux-musl
-CHOST_x86=i686-unknown-linux-gnu
-CHOST_arm64=aarch64-unknown-linux-gnu
-
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).1"
-RUST_STAGE0_amd64="rust-${RUST_STAGE0_VERSION}-${CHOST_amd64}"
-RUST_STAGE0_x86="rust-${RUST_STAGE0_VERSION}-${CHOST_x86}"
-RUST_STAGE0_arm64="rust-${RUST_STAGE0_VERSION}-${CHOST_arm64}"
-
-CARGO_DEPEND_VERSION="0.$(($(ver_cut 2) + 1)).0"
-
-DESCRIPTION="Systems programming language from Mozilla"
-HOMEPAGE="https://www.rust-lang.org/"
-
-SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
- amd64? ( https://portage.smaeul.xyz/distfiles/${RUST_STAGE0_amd64}.tar.xz )
- x86? ( https://static.rust-lang.org/dist/${RUST_STAGE0_x86}.tar.xz )
- arm64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_arm64}.tar.xz )
-"
-
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC Sparc SystemZ X86 XCore )
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
-LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
-
-LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
-
-IUSE="cargo clippy cpu_flags_x86_sse2 debug doc system-llvm +jemalloc libressl rls rustfmt wasm ${ALL_LLVM_TARGETS[*]}"
-
-RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
- jemalloc? ( dev-libs/jemalloc )
- cargo? (
- sys-libs/zlib
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- net-libs/libssh2
- net-libs/http-parser:=
- net-misc/curl[ssl]
- )"
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- || (
- >=sys-devel/gcc-4.7
- >=sys-devel/clang-3.5
- )
- cargo? ( !dev-util/cargo )
- rustfmt? ( !dev-util/rustfmt )
- dev-util/cmake
-"
-PDEPEND="!cargo? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )"
-
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
- x86? ( cpu_flags_x86_sse2 )"
-
-S="${WORKDIR}/${MY_P}-src"
-
-PATCHES=(
- "${FILESDIR}/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch"
- "${FILESDIR}/0003-Switch-musl-targets-to-link-dynamically-by-default.patch"
- "${FILESDIR}/0004-Prefer-libgcc_eh-over-libunwind-for-musl.patch"
- "${FILESDIR}/0005-Fix-LLVM-build.patch"
- "${FILESDIR}/0007-Add-openssl-configuration-for-musl-targets.patch"
- "${FILESDIR}/0008-Don-t-pass-CFLAGS-to-the-C-compiler.patch"
- "${FILESDIR}/0010-liblibc.patch"
- "${FILESDIR}/0011-Avoid-name-conflicts-with-musl-libc.patch"
-)
-
-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() {
- local rust_stage0_root="${WORKDIR}"/rust-stage0
-
- local rust_stage0_name="RUST_STAGE0_${ARCH}"
- local rust_stage0="${!rust_stage0_name}"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die
-
- default
-}
-
-src_configure() {
- local rust_target="" rust_targets="" rust_target_name arch_cflags
-
- # Collect rust target names to compile standard libs for all ABIs.
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_target_name="CHOST_${v##*.}"
- rust_targets="${rust_targets},\"${!rust_target_name}\""
- done
- if use wasm; then
- rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
- fi
- rust_targets="${rust_targets#,}"
-
- local extended="false" tools=""
- if use cargo; then
- extended="true"
- tools="\"cargo\","
- fi
- if use clippy; then
- extended="true"
- tools="\"clippy\",$tools"
- fi
- if use rls; then
- extended="true"
- tools="\"rls\",\"analysis\",\"src\",$tools"
- fi
- if use rustfmt; then
- extended="true"
- tools="\"rustfmt\",$tools"
- fi
-
- local rust_stage0_root="${WORKDIR}"/rust-stage0
-
- rust_target_name="CHOST_${ARCH}"
- rust_target="${!rust_target_name}"
-
- cat <<- EOF > "${S}"/config.toml
- [llvm]
- optimize = $(toml_usex !debug)
- release-debuginfo = $(toml_usex debug)
- assertions = $(toml_usex debug)
- targets = "${LLVM_TARGETS// /;}"
- [build]
- build = "${rust_target}"
- host = ["${rust_target}"]
- target = [${rust_targets}]
- cargo = "${rust_stage0_root}/bin/cargo"
- rustc = "${rust_stage0_root}/bin/rustc"
- docs = $(toml_usex doc)
- submodules = false
- python = "${EPYTHON}"
- locked-deps = true
- vendor = true
- extended = ${extended}
- tools = [${tools}]
- [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 = "stable"
- rpath = false
- lld = $(toml_usex wasm)
- EOF
-
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_target=$(get_abi_CHOST ${v##*.})
- arch_cflags="$(get_abi_CFLAGS ${v##*.})"
-
- cat <<- EOF >> "${S}"/config.env
- CFLAGS_${rust_target}=${arch_cflags}
- EOF
-
- cat <<- EOF >> "${S}"/config.toml
- [target.${rust_target}]
- cc = "$(tc-getBUILD_CC)"
- cxx = "$(tc-getBUILD_CXX)"
- linker = "$(tc-getCC)"
- ar = "$(tc-getAR)"
- llvm-config = "$(get_llvm_prefix "$LLVM_MAX_SLOT")/bin/llvm-config"
- EOF
- done
-
- if use wasm; then
- cat <<- EOF >> "${S}"/config.toml
- [target.wasm32-unknown-unknown]
- linker = "rust-lld"
- EOF
- fi
-}
-
-src_compile() {
- env $(cat "${S}"/config.env)\
- "${EPYTHON}" ./x.py build --config="${S}"/config.toml -j$(makeopts_jobs) \
- --exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
-}
-
-src_install() {
- local rust_target abi_libdir
-
- env DESTDIR="${D}" "${EPYTHON}" ./x.py install || 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 cargo; then
- mv "${D}/usr/bin/cargo" "${D}/usr/bin/cargo-${PV}" || die
- fi
- if use clippy; then
- mv "${D}/usr/bin/clippy-driver" "${D}/usr/bin/clippy-driver-${PV}" || die
- mv "${D}/usr/bin/cargo-clippy" "${D}/usr/bin/cargo-clippy-${PV}" || die
- fi
- if use rls; then
- mv "${D}/usr/bin/rls" "${D}/usr/bin/rls-${PV}" || die
- fi
- if use rustfmt; then
- mv "${D}/usr/bin/rustfmt" "${D}/usr/bin/rustfmt-${PV}" || die
- mv "${D}/usr/bin/cargo-fmt" "${D}/usr/bin/cargo-fmt-${PV}" || die
- fi
-
- # Copy shared library versions of standard libraries for all targets
- # into the system's abi-dependent lib directories because the rust
- # installer only does so for the native ABI.
- for v in $(multilib_get_enabled_abi_pairs); do
- if [ ${v##*.} = ${DEFAULT_ABI} ]; then
- continue
- fi
- abi_libdir=$(get_abi_LIBDIR ${v##*.})
- rust_target=$(get_abi_CHOST ${v##*.})
- mkdir -p "${D}/usr/${abi_libdir}"
- cp "${D}/usr/$(get_libdir)/rustlib/${rust_target}/lib"/*.so \
- "${D}/usr/${abi_libdir}" || die
- done
-
- dodoc COPYRIGHT
-
- # FIXME:
- # Really not sure if that env is needed, specailly LDPATH
- cat <<-EOF > "${T}"/50${P}
- LDPATH="/usr/$(get_libdir)/${P}"
- MANPATH="/usr/share/${P}/man"
- EOF
- doenvd "${T}"/50${P}
-
- cat <<-EOF > "${T}/provider-${P}"
- /usr/bin/rustdoc
- /usr/bin/rust-gdb
- /usr/bin/rust-lldb
- EOF
- if use cargo; then
- echo /usr/bin/cargo >> "${T}/provider-${P}"
- fi
- if use clippy; then
- echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
- echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
- fi
- if use rls; then
- echo /usr/bin/rls >> "${T}/provider-${P}"
- fi
- if use rustfmt; then
- echo /usr/bin/rustfmt >> "${T}/provider-${P}"
- echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
- fi
- 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
-}