Skip to content

Commit

Permalink
lang/rust-nightly: Update to 2024-05-07
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaelUrankar committed May 13, 2024
1 parent 2322b66 commit dcf699a
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 48 deletions.
6 changes: 3 additions & 3 deletions lang/rust-nightly/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Run update.sh to update to the latest nightly
PORTVERSION= 1.79.0.${NIGHTLY_DATE:C,-,,g}
PORTVERSION= 1.80.0.${NIGHTLY_DATE:C,-,,g}
# Always set PORTREVISION explicitly as otherwise it is inherited from lang/rust
PORTREVISION= 0
PKGNAMESUFFIX= -nightly
Expand All @@ -14,8 +14,8 @@ MASTERDIR= ${.CURDIR}/../rust
PATCHDIR= ${.CURDIR}/files
DISTINFO_FILE= ${.CURDIR}/distinfo

NIGHTLY_DATE= 2024-03-17
BOOTSTRAPS_DATE= 2024-02-04
NIGHTLY_DATE= 2024-05-07
BOOTSTRAPS_DATE= 2024-04-29
RUST_BOOTSTRAP_VERSION= beta

.include "${MASTERDIR}/Makefile"
18 changes: 9 additions & 9 deletions lang/rust-nightly/distinfo
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
TIMESTAMP = 1710755050
SHA256 (rust/2024-03-17/rustc-nightly-src.tar.xz) = 6e6c230c757feb1374c656c8b078d2fd96e7cced020cecf8100ac04c7ea46503
SIZE (rust/2024-03-17/rustc-nightly-src.tar.xz) = 159212704
SHA256 (rust/2024-02-04/rustc-beta-x86_64-unknown-freebsd.tar.xz) = b5de56f1f686befd7d225c4fc0636132119a28e6ed22e56300347e8c8fd4388b
SIZE (rust/2024-02-04/rustc-beta-x86_64-unknown-freebsd.tar.xz) = 72836908
SHA256 (rust/2024-02-04/rust-std-beta-x86_64-unknown-freebsd.tar.xz) = a02a5962c65cbe60667a45d5ad5ec28f1dc86d18344c619fba00f9afd96519e1
SIZE (rust/2024-02-04/rust-std-beta-x86_64-unknown-freebsd.tar.xz) = 26887676
SHA256 (rust/2024-02-04/cargo-beta-x86_64-unknown-freebsd.tar.xz) = 46a7ce49382615f896276eb1966b7815353d19927a9e54feac902777fc7de10e
SIZE (rust/2024-02-04/cargo-beta-x86_64-unknown-freebsd.tar.xz) = 9010280
TIMESTAMP = 1715170997
SHA256 (rust/2024-05-07/rustc-nightly-src.tar.xz) = 980396ea6f15b926155ffaab4d56f70a0729a18a98ed99fe11004b5709855458
SIZE (rust/2024-05-07/rustc-nightly-src.tar.xz) = 162781340
SHA256 (rust/2024-04-29/rustc-beta-x86_64-unknown-freebsd.tar.xz) = 786f40030dbe5e6897aafe4bda44770920b2010b93fc5ce86574774e531e2eff
SIZE (rust/2024-04-29/rustc-beta-x86_64-unknown-freebsd.tar.xz) = 75473648
SHA256 (rust/2024-04-29/rust-std-beta-x86_64-unknown-freebsd.tar.xz) = 69626178bc5309afc8a02c941bd77e70e1aa6917ffb6bf0d67a57d921b5c664a
SIZE (rust/2024-04-29/rust-std-beta-x86_64-unknown-freebsd.tar.xz) = 27096208
SHA256 (rust/2024-04-29/cargo-beta-x86_64-unknown-freebsd.tar.xz) = 7fab806227d1a3be817602abb121ac7e039ba0bbf81e0a1d47bdcccca74203c6
SIZE (rust/2024-04-29/cargo-beta-x86_64-unknown-freebsd.tar.xz) = 9257888
107 changes: 107 additions & 0 deletions lang/rust-nightly/files/patch-vendor_cc.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
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-1.0.73/src/lib.rs.orig 2021-03-04 20:58:54 UTC
+++ vendor/cc-1.0.73/src/lib.rs
@@ -2659,24 +2659,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.ends_with("cl") || fname == "cl.exe" {
- 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,

--- vendor/cc-1.0.79/src/lib.rs.orig 2021-03-04 20:58:54 UTC
+++ vendor/cc-1.0.79/src/lib.rs
@@ -2659,24 +2659,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.ends_with("cl") || fname == "cl.exe" {
- 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,

--- vendor/cc-1.0.90/src/tool.rs.orig 2024-03-18 11:23:17 UTC
+++ vendor/cc-1.0.90/src/tool.rs
@@ -122,22 +122,7 @@ impl Tool {
};

// 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.ends_with("cl") || fname == "cl.exe" {
- ToolFamily::Msvc { clang_cl: false }
- } else if fname.contains("clang") {
- match clang_driver {
- Some("cl") => ToolFamily::Msvc { clang_cl: true },
- _ => ToolFamily::Clang,
- }
- } else {
- detect_family(&path)
- }
- } else {
- detect_family(&path)
- };
+ let family = ToolFamily::Gnu;

Tool {
path,
--- vendor/cc-1.0.92/src/tool.rs.orig 2024-05-09 18:20:47 UTC
+++ vendor/cc-1.0.92/src/tool.rs
@@ -151,9 +151,7 @@ impl Tool {

match (clang, accepts_cl_style_flags, gcc) {
(clang_cl, true, _) => Ok(ToolFamily::Msvc { clang_cl }),
- (true, false, _) => Ok(ToolFamily::Clang {
- zig_cc: is_zig_cc(path, cargo_output),
- }),
+ (true, false, _) => Ok(ToolFamily::Gnu),
(false, false, true) => Ok(ToolFamily::Gnu),
(false, false, false) => {
cargo_output.print_warning(&"Compiler family detection failed since it does not define `__clang__`, `__GNUC__` or `_MSC_VER`, fallback to treating it as GNU");
36 changes: 0 additions & 36 deletions lang/rust-nightly/files/patch-vendor_cc_src_tool.rs

This file was deleted.

2 changes: 2 additions & 0 deletions lang/rust/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ do-configure:
@cd ${WRKDIR}/${_component}-*-${OPSYS:tl} && \
${SH} install.sh --prefix=${WRKDIR}/bootstrap --verbose
.endfor
.if !defined(NIGHTLY_DATE)
@${ECHO_CMD} 'changelog-seen=2' > ${WRKSRC}/config.toml
.endif
@${ECHO_CMD} '[build]' >> ${WRKSRC}/config.toml
@${ECHO_CMD} 'build-dir="${WRKDIR}/_build"' >> ${WRKSRC}/config.toml
@${ECHO_CMD} 'build-stage=2' >> ${WRKSRC}/config.toml
Expand Down

0 comments on commit dcf699a

Please sign in to comment.