diff --git a/srcpkgs/rust/patches/4caa0b020f146e4504ab8ffdd52df29deaa49a09.patch b/srcpkgs/rust/patches/4caa0b020f146e4504ab8ffdd52df29deaa49a09.patch deleted file mode 100644 index 3920c61c95e..00000000000 --- a/srcpkgs/rust/patches/4caa0b020f146e4504ab8ffdd52df29deaa49a09.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 4caa0b020f146e4504ab8ffdd52df29deaa49a09 Mon Sep 17 00:00:00 2001 -From: Mark Simulacrum -Date: Tue, 20 Jun 2017 18:04:36 -0600 -Subject: [PATCH] Fixes bootstrapping with custom cargo/rustc. - -config.mk is now always read when parsing the configuration to prevent -this from reoccurring in the future, hopefully. ---- - src/bootstrap/bin/main.rs | 8 +------- - src/bootstrap/config.rs | 10 ++++++++-- - 2 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/src/bootstrap/bin/main.rs b/src/bootstrap/bin/main.rs -index 5ca5ce1648f2..5ef18b89841f 100644 ---- a/src/bootstrap/bin/main.rs -+++ b/src/bootstrap/bin/main.rs -@@ -26,12 +26,6 @@ use bootstrap::{Flags, Config, Build}; - fn main() { - let args = env::args().skip(1).collect::>(); - let flags = Flags::parse(&args); -- let mut config = Config::parse(&flags.build, flags.config.clone()); -- -- // compat with `./configure` while we're still using that -- if std::fs::metadata("config.mk").is_ok() { -- config.update_with_config_mk(); -- } -- -+ let config = Config::parse(&flags.build, flags.config.clone()); - Build::new(flags, config).build(); - } -diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs -index fd8aa320fb3d..902cd0997a8e 100644 ---- a/src/bootstrap/config.rs -+++ b/src/bootstrap/config.rs -@@ -15,7 +15,7 @@ - - use std::collections::HashMap; - use std::env; --use std::fs::File; -+use std::fs::{self, File}; - use std::io::prelude::*; - use std::path::PathBuf; - use std::process; -@@ -410,6 +410,12 @@ impl Config { - set(&mut config.rust_dist_src, t.src_tarball); - } - -+ -+ // compat with `./configure` while we're still using that -+ if fs::metadata("config.mk").is_ok() { -+ config.update_with_config_mk(); -+ } -+ - return config - } - -@@ -418,7 +424,7 @@ impl Config { - /// While we still have `./configure` this implements the ability to decode - /// that configuration into this. This isn't exactly a full-blown makefile - /// parser, but hey it gets the job done! -- pub fn update_with_config_mk(&mut self) { -+ fn update_with_config_mk(&mut self) { - let mut config = String::new(); - File::open("config.mk").unwrap().read_to_string(&mut config).unwrap(); - for line in config.lines() { diff --git a/srcpkgs/rust/patches/73267374d4176ac1c5d685ff2bac36556cfa4730.patch b/srcpkgs/rust/patches/73267374d4176ac1c5d685ff2bac36556cfa4730.patch deleted file mode 100644 index d44fc008ee7..00000000000 --- a/srcpkgs/rust/patches/73267374d4176ac1c5d685ff2bac36556cfa4730.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 73267374d4176ac1c5d685ff2bac36556cfa4730 Mon Sep 17 00:00:00 2001 -From: Mark Simulacrum -Date: Fri, 16 Jun 2017 07:44:09 -0600 -Subject: [PATCH] Use custom cargo/rustc paths when parsing flags. - ---- - src/bootstrap/flags.rs | 17 ++++++++--------- - 1 file changed, 8 insertions(+), 9 deletions(-) - -diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs -index 56cbb4cecf2a..dc9dac736278 100644 ---- a/src/bootstrap/flags.rs -+++ b/src/bootstrap/flags.rs -@@ -242,11 +242,18 @@ Arguments: - let cwd = t!(env::current_dir()); - let paths = matches.free[1..].iter().map(|p| cwd.join(p)).collect::>(); - -+ let cfg_file = matches.opt_str("config").map(PathBuf::from).or_else(|| { -+ if fs::metadata("config.toml").is_ok() { -+ Some(PathBuf::from("config.toml")) -+ } else { -+ None -+ } -+ }); - - // All subcommands can have an optional "Available paths" section - if matches.opt_present("verbose") { - let flags = Flags::parse(&["build".to_string()]); -- let mut config = Config::default(); -+ let mut config = Config::parse(&flags.build, cfg_file.clone()); - config.build = flags.build.clone(); - let mut build = Build::new(flags, config); - metadata::build(&mut build); -@@ -307,14 +314,6 @@ Arguments: - }; - - -- let cfg_file = matches.opt_str("config").map(PathBuf::from).or_else(|| { -- if fs::metadata("config.toml").is_ok() { -- Some(PathBuf::from("config.toml")) -- } else { -- None -- } -- }); -- - let mut stage = matches.opt_str("stage").map(|j| j.parse().unwrap()); - - if matches.opt_present("incremental") { diff --git a/srcpkgs/rust/patches/link-musl-dynamically.patch b/srcpkgs/rust/patches/link-musl-dynamically.patch index 29681d205ff..0f36329c921 100644 --- a/srcpkgs/rust/patches/link-musl-dynamically.patch +++ b/srcpkgs/rust/patches/link-musl-dynamically.patch @@ -1,25 +1,3 @@ ---- rustc-1.16.0-src/src/bootstrap/compile.rs.orig -+++ rustc-1.16.0-src/src/bootstrap/compile.rs -@@ -93,19 +93,6 @@ - - t!(fs::create_dir_all(&libdir)); - add_to_sysroot(&out_dir, &libdir); -- -- if target.contains("musl") && !target.contains("mips") { -- copy_musl_third_party_objects(build, target, &libdir); -- } --} -- --/// Copies the crt(1,i,n).o startup objects --/// --/// Only required for musl targets that statically link to libc --fn copy_musl_third_party_objects(build: &Build, target: &str, into: &Path) { -- for &obj in &["crt1.o", "crti.o", "crtn.o"] { -- copy(&build.musl_root(target).unwrap().join("lib").join(obj), &into.join(obj)); -- } - } - - /// Build and prepare startup objects like rsbegin.o and rsend.o --- a/src/bootstrap/sanity.rs +++ b/src/bootstrap/sanity.rs @@ -21,7 +21,6 @@ @@ -95,3 +73,32 @@ println!("cargo:rustc-link-lib=gcc_s"); } } else if target.contains("freebsd") { +--- rustc-1.19.0-src/src/bootstrap/compile.rs.orig ++++ rustc-1.19.0-src/src/bootstrap/compile.rs +@@ -114,10 +114,6 @@ + let libdir = build.sysroot_libdir(target_compiler, target); + add_to_sysroot(&libdir, &libstd_stamp(build, compiler, target)); + +- if target.contains("musl") && !target.contains("mips") { +- copy_musl_third_party_objects(build, target, &libdir); +- } +- + if build.config.sanitizers && compiler.stage != 0 && target == "x86_64-apple-darwin" { + // The sanitizers are only built in stage1 or above, so the dylibs will + // be missing in stage0 and causes panic. See the `std()` function above +@@ -126,15 +122,6 @@ + } + } + +-/// Copies the crt(1,i,n).o startup objects +-/// +-/// Only required for musl targets that statically link to libc +-fn copy_musl_third_party_objects(build: &Build, target: &str, into: &Path) { +- for &obj in &["crt1.o", "crti.o", "crtn.o"] { +- copy(&build.musl_root(target).unwrap().join("lib").join(obj), &into.join(obj)); +- } +-} +- + fn copy_apple_sanitizer_dylibs(native_dir: &Path, platform: &str, into: &Path) { + for &sanitizer in &["asan", "tsan"] { + let filename = format!("libclang_rt.{}_{}_dynamic.dylib", sanitizer, platform); diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template index 611c3e611b7..b90971e21bc 100644 --- a/srcpkgs/rust/template +++ b/srcpkgs/rust/template @@ -1,6 +1,6 @@ # Template file for 'rust' pkgname=rust -version=1.18.0 +version=1.19.0 revision=1 # NB. if you push any(!) new version, don't forget to put a build # output of musl to https://repo.voidlinux.eu/distfiles/ @@ -11,46 +11,46 @@ build_style=configure make_build_args="dist VERBOSE=1" only_for_archs="i686 x86_64 x86_64-musl" hostmakedepends="cmake curl pkg-config python" -makedepends="libffi-devel llvm3.9 ncurses-devel zlib-devel" +makedepends="libffi-devel llvm ncurses-devel zlib-devel" short_desc="Safe, concurrent, practical systems language" maintainer="Leah Neukirchen " homepage="http://www.rust-lang.org/" license="MIT, Apache-2.0" distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz" -checksum=d2dc36e99b9e2269488b2bcddde43c234e6bde03edf70cba82a027ff49c36111 +checksum=15231f5053fb72ad82be91f5abfd6aa60cb7898c5089e4f1ac5910a731090c51 case "$XBPS_MACHINE" in x86_64-musl) hostmakedepends+=" libcurl libgit2" distfiles+=" - https://repo.voidlinux.eu/distfiles/rustc-1.17.0-x86_64-unknown-linux-musl.tar.gz - https://repo.voidlinux.eu/distfiles/rust-std-1.17.0-x86_64-unknown-linux-musl.tar.gz - https://repo.voidlinux.eu/distfiles/cargo-0.17.0-x86_64-unknown-linux-musl.tar.gz" + https://repo.voidlinux.eu/distfiles/rustc-1.18.0-x86_64-unknown-linux-musl.tar.gz + https://repo.voidlinux.eu/distfiles/rust-std-1.18.0-x86_64-unknown-linux-musl.tar.gz + https://repo.voidlinux.eu/distfiles/cargo-0.18.0-x86_64-unknown-linux-musl.tar.gz" checksum+=" - b9202eb468568c528e3e817c7f230e12215030c6cefaffccd7fc22a10356cc38 - f1c6b1a6ca28a4e2018457afe3ff51404bac37881639ad683cbe8f6d9f0632a2 - 0150d5b249fa66a5d2515e6beb27aa6dfb25301bb50522fab7c2445bb7ecdd09" + 9ab8a7f347f13528399aecbeb13e93cf3ebda98f6cb610258409c5b1a1b79fbe + ac7f57e426c6e9f1c8793b137e7112441e0c33ad9b0a1ed458c6dbcdbf121fe4 + 28f2ee839f14f8b3edf3f4e4cc8600ac99ea50905ee8fb91116bba676728c2e9" ;; x86_64) # extract from src/stage0.txt distfiles+=" - https://static.rust-lang.org/dist/2017-04-27/rustc-1.17.0-x86_64-unknown-linux-gnu.tar.gz - https://static.rust-lang.org/dist/2017-04-27/rust-std-1.17.0-x86_64-unknown-linux-gnu.tar.gz + https://static.rust-lang.org/dist/2017-06-08/rustc-1.18.0-x86_64-unknown-linux-gnu.tar.gz + https://static.rust-lang.org/dist/2017-06-08/rust-std-1.18.0-x86_64-unknown-linux-gnu.tar.gz https://s3.amazonaws.com/rust-lang-ci/cargo-builds/6b05583d71f982bcad049b9fa094c637c062e751/cargo-nightly-x86_64-unknown-linux-gnu.tar.gz" checksum+=" - 3eebd92512040baf3c0974c3ce61859646d8cf422cc515d724d857577da0dbd5 - 2902bb0da78208f441f1d983aeafcad01ea653d2e062a8192892868e2b41130d + f2a34e20166ccf6eda4de46a9efb02821df5c3f34667e2988284a8eaee408113 + 4a66150781e224412ebd9dd6d643ad65ecc5668a7754e4a12e115be6ce7bf527 d9e69d2b87dc0cf7fafe0e0eb64f82fe3414ef14fcb27f5eeff34df860e459d9" ;; i686) # extract from src/stage0.txt distfiles+=" - https://static.rust-lang.org/dist/2017-04-27/rustc-1.17.0-i686-unknown-linux-gnu.tar.gz - https://static.rust-lang.org/dist/2017-04-27/rust-std-1.17.0-i686-unknown-linux-gnu.tar.gz + https://static.rust-lang.org/dist/2017-06-08/rustc-1.18.0-i686-unknown-linux-gnu.tar.gz + https://static.rust-lang.org/dist/2017-06-08/rust-std-1.18.0-i686-unknown-linux-gnu.tar.gz https://s3.amazonaws.com/rust-lang-ci/cargo-builds/6b05583d71f982bcad049b9fa094c637c062e751/cargo-nightly-i686-unknown-linux-gnu.tar.gz" checksum+=" - 9d3e3ff343f22b5288676b40d6749ebeabea863fa9e6009fbc5a018ede83c57c - 3dbaa44a07b14e5af05633c5f1a7d6b0538c6f8fa404ee6d3f85714d4f2bf39b + 0cb9bb95373cee8ba26e8f517c46f8c58a29e22f2c7c08a4d152306c6ffc7115 + 3b93c7b856b98f61ec0f640bc96373f4762484ab3340866902c8c96933bcf10b 863a4f92bbeec76257403fd571a90b90bd759ec8bcaddb7517fb89d40959e9e5" ;; esac