Date: Fri, 17 Apr 2020 10:53:19 +0000 (UTC) From: Tobias Kortkamp <tobik@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r531922 - in head/lang/rust-nightly: . files Message-ID: <202004171053.03HArJbH047668@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tobik Date: Fri Apr 17 10:53:18 2020 New Revision: 531922 URL: https://svnweb.freebsd.org/changeset/ports/531922 Log: lang/rust-nightly: Update to 1.44.0.20200417 - Add workaround to fix build when CC/CXX have "clang" in them [1] - Add patch to allow build with outdated libgit2 0.99.0 Changes: https://github.com/rust-lang/rust/compare/485c5fb6e1...7f3df57724 PR: 238556 [1] Added: head/lang/rust-nightly/files/patch-vendor_cc_src_lib.rs (contents, props changed) head/lang/rust-nightly/files/patch-vendor_libgit2-sys_build.rs (contents, props changed) Modified: head/lang/rust-nightly/Makefile head/lang/rust-nightly/distinfo Modified: head/lang/rust-nightly/Makefile ============================================================================== --- head/lang/rust-nightly/Makefile Fri Apr 17 10:52:51 2020 (r531921) +++ head/lang/rust-nightly/Makefile Fri Apr 17 10:53:18 2020 (r531922) @@ -18,7 +18,7 @@ DISTINFO_FILE= ${.CURDIR}/distinfo # Get latest from top level 'date' key in # https://static.rust-lang.org/dist/channel-rust-nightly.toml -NIGHTLY_DATE= 2020-04-09 +NIGHTLY_DATE= 2020-04-17 # See WRKSRC/src/stage0.txt for this date BOOTSTRAPS_DATE= 2020-03-12 Modified: head/lang/rust-nightly/distinfo ============================================================================== --- head/lang/rust-nightly/distinfo Fri Apr 17 10:52:51 2020 (r531921) +++ head/lang/rust-nightly/distinfo Fri Apr 17 10:53:18 2020 (r531922) @@ -1,6 +1,6 @@ -TIMESTAMP = 1586404359 -SHA256 (rust/2020-04-09/rustc-nightly-src.tar.xz) = bd63d2138aaebfaad7ac01189e8df442192d714603d64e25f37eaab01205fc6e -SIZE (rust/2020-04-09/rustc-nightly-src.tar.xz) = 94582740 +TIMESTAMP = 1587089218 +SHA256 (rust/2020-04-17/rustc-nightly-src.tar.xz) = 1fc625e21b860bed3ff52e7cd0e024d5459f3e9903c4e44c3ddf893605784ac8 +SIZE (rust/2020-04-17/rustc-nightly-src.tar.xz) = 94721724 SHA256 (rust/2020-03-12/rustc-beta-x86_64-unknown-freebsd.tar.xz) = 8a1fa4555d128dcf89958f7ea5ff476408903e76ea2f6c97f3da6d131b0c040f SIZE (rust/2020-03-12/rustc-beta-x86_64-unknown-freebsd.tar.xz) = 35928800 SHA256 (rust/2020-03-12/rust-std-beta-x86_64-unknown-freebsd.tar.xz) = d1faf86633140c059ee6f6d7ba7ae3f637385a8a78b98a97f6084d001497d650 Added: head/lang/rust-nightly/files/patch-vendor_cc_src_lib.rs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/rust-nightly/files/patch-vendor_cc_src_lib.rs Fri Apr 17 10:53:18 2020 (r531922) @@ -0,0 +1,42 @@ +When the compiler has "clang" in its name the cc crate will pass +an LLVM target triple to it. Rust uses a triple that lacks the OS +version and LLVM will default to FreeBSD 9 behavior, i.e., it will +default to libstdc++ which is no longer available in newer releases. + +To avoid this issue assume we have a GNU compatible toolchain instead +until LLVM can be updated to use libc++ by default. + +https://reviews.llvm.org/D77776 + +--- vendor/cc/src/lib.rs.orig 2020-04-14 08:55:10 UTC ++++ vendor/cc/src/lib.rs +@@ -2353,28 +2353,7 @@ impl Tool { + } + + fn with_features(path: PathBuf, clang_driver: Option<&str>, cuda: bool) -> Self { +- // Try to detect family of the tool from its name, falling back to Gnu. +- let family = if let Some(fname) = path.file_name().and_then(|p| p.to_str()) { +- if fname.contains("clang-cl") { +- ToolFamily::Msvc { clang_cl: true } +- } else if fname.contains("cl") +- && !fname.contains("cloudabi") +- && !fname.contains("uclibc") +- && !fname.contains("clang") +- { +- ToolFamily::Msvc { clang_cl: false } +- } else if fname.contains("clang") { +- match clang_driver { +- Some("cl") => ToolFamily::Msvc { clang_cl: true }, +- _ => ToolFamily::Clang, +- } +- } else { +- ToolFamily::Gnu +- } +- } else { +- ToolFamily::Gnu +- }; +- ++ let family = ToolFamily::Gnu; + Tool { + path: path, + cc_wrapper_path: None, Added: head/lang/rust-nightly/files/patch-vendor_libgit2-sys_build.rs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/rust-nightly/files/patch-vendor_libgit2-sys_build.rs Fri Apr 17 10:53:18 2020 (r531922) @@ -0,0 +1,11 @@ +--- vendor/libgit2-sys/build.rs.orig 2020-04-17 09:21:48 UTC ++++ vendor/libgit2-sys/build.rs +@@ -8,7 +8,7 @@ fn main() { + let ssh = env::var("CARGO_FEATURE_SSH").is_ok(); + + let mut cfg = pkg_config::Config::new(); +- if let Ok(lib) = cfg.atleast_version("1.0.0").probe("libgit2") { ++ if let Ok(lib) = cfg.atleast_version("0.99.0").probe("libgit2") { + for include in &lib.include_paths { + println!("cargo:root={}", include.display()); + }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004171053.03HArJbH047668>