diff --git a/lang/rust-nightly/Makefile b/lang/rust-nightly/Makefile index 6da24379e175..b7ae29e6f3c9 100644 --- a/lang/rust-nightly/Makefile +++ b/lang/rust-nightly/Makefile @@ -1,21 +1,21 @@ # Run update.sh to update to the latest nightly -PORTVERSION= 1.87.0.${NIGHTLY_DATE:C,-,,g} +PORTVERSION= 1.88.0.${NIGHTLY_DATE:C,-,,g} # Always set PORTREVISION explicitly as otherwise it is inherited from lang/rust PORTREVISION= 0 PKGNAMESUFFIX= -nightly DISTNAME= rustc-nightly-src ONLY_FOR_ARCHS= amd64 ONLY_FOR_ARCHS_REASON= upstream does not provide bootstraps for other architectures CONFLICTS_INSTALL= rust MASTERDIR= ${.CURDIR}/../rust PATCHDIR= ${.CURDIR}/files DISTINFO_FILE= ${.CURDIR}/distinfo -NIGHTLY_DATE= 2025-03-24 +NIGHTLY_DATE= 2025-04-02 BOOTSTRAPS_DATE= 2025-02-18 RUST_BOOTSTRAP_VERSION= beta .include "${MASTERDIR}/Makefile" diff --git a/lang/rust-nightly/distinfo b/lang/rust-nightly/distinfo index 2430c20325cc..39765842bf25 100644 --- a/lang/rust-nightly/distinfo +++ b/lang/rust-nightly/distinfo @@ -1,9 +1,9 @@ -TIMESTAMP = 1742916607 -SHA256 (rust/2025-03-24/rustc-nightly-src.tar.xz) = bed8708021a9dc434dbc19ad57ab9c97526ef05a347dcd19098b3508f8e00dd7 -SIZE (rust/2025-03-24/rustc-nightly-src.tar.xz) = 283301568 +TIMESTAMP = 1743681715 +SHA256 (rust/2025-04-02/rustc-nightly-src.tar.xz) = 93ae6bc04d67dbe3ed8fa28e19331c60115d4848e8f70e21c141e4ff7ffc84d6 +SIZE (rust/2025-04-02/rustc-nightly-src.tar.xz) = 283623996 SHA256 (rust/2025-02-18/rustc-beta-x86_64-unknown-freebsd.tar.xz) = 52ab3212d64b56a8da207fe976cbc8d266e962a61c742e6069137b10ff25c3c1 SIZE (rust/2025-02-18/rustc-beta-x86_64-unknown-freebsd.tar.xz) = 85822636 SHA256 (rust/2025-02-18/rust-std-beta-x86_64-unknown-freebsd.tar.xz) = 11bae401884cce0306b415bb1202c2c63f81395677057fbbe12e9302951a9d3d SIZE (rust/2025-02-18/rust-std-beta-x86_64-unknown-freebsd.tar.xz) = 27638072 SHA256 (rust/2025-02-18/cargo-beta-x86_64-unknown-freebsd.tar.xz) = c244ec4f97420c29c690e32bd6d8f14994bf1d990747f31a3dc0f2b37644493e SIZE (rust/2025-02-18/cargo-beta-x86_64-unknown-freebsd.tar.xz) = 10434836 diff --git a/lang/rust-nightly/files/patch-compiler_rustc__target_src_spec_targets_i686__unknown__freebsd.rs b/lang/rust-nightly/files/patch-compiler_rustc__target_src_spec_targets_i686__unknown__freebsd.rs deleted file mode 100644 index 9e9be66e56a3..000000000000 --- a/lang/rust-nightly/files/patch-compiler_rustc__target_src_spec_targets_i686__unknown__freebsd.rs +++ /dev/null @@ -1,13 +0,0 @@ -i386 should be pentiumpro (no SSE2, no ...) - ---- compiler/rustc_target/src/spec/targets/i686_unknown_freebsd.rs.orig 2025-03-03 19:34:25 UTC -+++ compiler/rustc_target/src/spec/targets/i686_unknown_freebsd.rs -@@ -3,7 +3,7 @@ pub(crate) fn target() -> Target { - pub(crate) fn target() -> Target { - let mut base = base::freebsd::opts(); - base.rustc_abi = Some(RustcAbi::X86Sse2); -- base.cpu = "pentium4".into(); -+ base.cpu = "pentiumpro".into(); - base.max_atomic_width = Some(64); - base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32", "-Wl,-znotext"]); - base.stack_probes = StackProbeType::Inline; diff --git a/lang/rust-nightly/files/patch-src_bootstrap_src_core_config_config.rs b/lang/rust-nightly/files/patch-src_bootstrap_src_core_config_config.rs new file mode 100644 index 000000000000..7756a2cf4f13 --- /dev/null +++ b/lang/rust-nightly/files/patch-src_bootstrap_src_core_config_config.rs @@ -0,0 +1,14 @@ +--- src/bootstrap/src/core/config/config.rs.orig 2025-04-01 18:22:03 UTC ++++ src/bootstrap/src/core/config/config.rs +@@ -3016,9 +3016,9 @@ impl Config { + || source_version.minor == stage0_version.minor + 1))) + { + let prev_version = format!("{}.{}.x", source_version.major, source_version.minor - 1); +- fail(&format!( ++ println!( + "Unexpected {component_name} version: {stage0_version}, we should use {prev_version}/{source_version} to build source with {source_version}" +- )); ++ ); + } + } + diff --git a/lang/rust-nightly/files/patch-vendor_cc.rs b/lang/rust-nightly/files/patch-vendor_cc.rs index f51a32b628a2..d8fe88b7682b 100644 --- a/lang/rust-nightly/files/patch-vendor_cc.rs +++ b/lang/rust-nightly/files/patch-vendor_cc.rs @@ -1,62 +1,88 @@ 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.98/src/tool.rs.orig 2024-12-10 13:16:09 UTC -+++ vendor/cc-1.0.98/src/tool.rs -@@ -167,9 +167,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"); --- vendor/cc-1.0.99/src/tool.rs.orig 2024-12-10 13:16:09 UTC +++ vendor/cc-1.0.99/src/tool.rs @@ -167,9 +167,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"); --- vendor/cc-1.1.22/src/tool.rs.orig 2024-12-10 13:16:09 UTC +++ vendor/cc-1.1.22/src/tool.rs @@ -174,9 +174,7 @@ impl Tool { match (clang, accepts_cl_style_flags, gcc, emscripten, vxworks) { (clang_cl, true, _, false, false) => Ok(ToolFamily::Msvc { clang_cl }), - (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Clang { - zig_cc: is_zig_cc(path, cargo_output), - }), + (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Gnu), (false, false, true, _, false) | (_, _, _, _, true) => Ok(ToolFamily::Gnu), (false, false, false, false, false) => { cargo_output.print_warning(&"Compiler family detection failed since it does not define `__clang__`, `__GNUC__`, `__EMSCRIPTEN__` or `__VXWORKS__`, also does not accept cl style flag `-?`, fallback to treating it as GNU"); --- vendor/cc-1.2.0/src/tool.rs.orig 2024-12-10 13:16:09 UTC +++ vendor/cc-1.2.0/src/tool.rs @@ -174,9 +174,7 @@ impl Tool { match (clang, accepts_cl_style_flags, gcc, emscripten, vxworks) { (clang_cl, true, _, false, false) => Ok(ToolFamily::Msvc { clang_cl }), - (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Clang { - zig_cc: is_zig_cc(path, cargo_output), - }), + (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Gnu), (false, false, true, _, false) | (_, _, _, _, true) => Ok(ToolFamily::Gnu), (false, false, false, false, false) => { cargo_output.print_warning(&"Compiler family detection failed since it does not define `__clang__`, `__GNUC__`, `__EMSCRIPTEN__` or `__VXWORKS__`, also does not accept cl style flag `-?`, fallback to treating it as GNU"); +--- vendor/cc-1.2.10/src/tool.rs.orig 2025-04-01 18:22:03 UTC ++++ vendor/cc-1.2.10/src/tool.rs +@@ -137,9 +137,7 @@ impl Tool { + + match (clang, accepts_cl_style_flags, gcc, emscripten, vxworks) { + (clang_cl, true, _, false, false) => Ok(ToolFamily::Msvc { clang_cl }), +- (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Clang { +- zig_cc: is_zig_cc(path, cargo_output), +- }), ++ (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Gnu), + (false, false, true, _, false) | (_, _, _, _, true) => Ok(ToolFamily::Gnu), + (false, false, false, false, false) => { + cargo_output.print_warning(&"Compiler family detection failed since it does not define `__clang__`, `__GNUC__`, `__EMSCRIPTEN__` or `__VXWORKS__`, also does not accept cl style flag `-?`, fallback to treating it as GNU"); +--- vendor/cc-1.2.16/src/tool.rs.orig 2025-04-01 18:22:03 UTC ++++ vendor/cc-1.2.16/src/tool.rs +@@ -141,9 +141,7 @@ impl Tool { + + match (clang, accepts_cl_style_flags, gcc, emscripten, vxworks) { + (clang_cl, true, _, false, false) => Ok(ToolFamily::Msvc { clang_cl }), +- (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Clang { +- zig_cc: is_zig_cc(path, cargo_output), +- }), ++ (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Gnu), + (false, false, true, _, false) | (_, _, _, _, true) => Ok(ToolFamily::Gnu), + (false, false, false, false, false) => { + cargo_output.print_warning(&"Compiler family detection failed since it does not define `__clang__`, `__GNUC__`, `__EMSCRIPTEN__` or `__VXWORKS__`, also does not accept cl style flag `-?`, fallback to treating it as GNU"); +--- vendor/cc-1.2.17/src/tool.rs.orig 2025-04-01 18:22:03 UTC ++++ vendor/cc-1.2.17/src/tool.rs +@@ -141,9 +141,7 @@ impl Tool { + + match (clang, accepts_cl_style_flags, gcc, emscripten, vxworks) { + (clang_cl, true, _, false, false) => Ok(ToolFamily::Msvc { clang_cl }), +- (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Clang { +- zig_cc: is_zig_cc(path, cargo_output), +- }), ++ (true, _, _, _, false) | (_, _, _, true, false) => Ok(ToolFamily::Gnu), + (false, false, true, _, false) | (_, _, _, _, true) => Ok(ToolFamily::Gnu), + (false, false, false, false, false) => { + cargo_output.print_warning(&"Compiler family detection failed since it does not define `__clang__`, `__GNUC__`, `__EMSCRIPTEN__` or `__VXWORKS__`, also does not accept cl style flag `-?`, fallback to treating it as GNU"); diff --git a/lang/rust-nightly/files/patch-vendor_git2-0.20.0_src_lib.rs b/lang/rust-nightly/files/patch-vendor_git2-0.20.0_src_lib.rs new file mode 100644 index 000000000000..1676f0c23188 --- /dev/null +++ b/lang/rust-nightly/files/patch-vendor_git2-0.20.0_src_lib.rs @@ -0,0 +1,18 @@ +--- vendor/git2-0.20.0/src/lib.rs.orig 2025-02-21 20:02:44 UTC ++++ vendor/git2-0.20.0/src/lib.rs +@@ -759,6 +759,7 @@ fn init() { + unix, + not(target_os = "macos"), + not(target_os = "ios"), ++ not(target_os = "freebsd"), + feature = "https" + ))] + fn openssl_env_init() { +@@ -880,6 +881,7 @@ fn openssl_env_init() { + windows, + target_os = "macos", + target_os = "ios", ++ target_os = "freebsd", + not(feature = "https") + ))] + fn openssl_env_init() {} diff --git a/lang/rust-nightly/files/patch-vendor_nix-0.28.0_src_sys_signal.rs b/lang/rust-nightly/files/patch-vendor_nix-0.28.0_src_sys_signal.rs deleted file mode 100644 index fbe6d4e5a216..000000000000 --- a/lang/rust-nightly/files/patch-vendor_nix-0.28.0_src_sys_signal.rs +++ /dev/null @@ -1,20 +0,0 @@ ---- vendor/nix-0.28.0/src/sys/signal.rs.orig 2024-06-14 14:06:00 UTC -+++ vendor/nix-0.28.0/src/sys/signal.rs -@@ -1099,7 +1099,7 @@ pub type type_of_thread_id = libc::lwpid_t; - #[cfg(target_os = "freebsd")] - pub type type_of_thread_id = libc::lwpid_t; - /// Identifies a thread for [`SigevNotify::SigevThreadId`] --#[cfg(all(not(target_os = "hurd"), any(target_env = "gnu", target_env = "uclibc")))] -+#[cfg(all(not(any(target_os = "freebsd", target_os = "hurd")), any(target_env = "gnu", target_env = "uclibc")))] - pub type type_of_thread_id = libc::pid_t; - - /// Specifies the notification method used by a [`SigEvent`] -@@ -1349,7 +1349,7 @@ mod sigevent { - sev.sigev_value.sival_ptr = si_value as *mut libc::c_void; - sev._sigev_un._threadid = thread_id; - } -- #[cfg(any(target_env = "gnu", target_env = "uclibc"))] -+ #[cfg(all(not(target_os = "freebsd"), any(target_env = "gnu", target_env = "uclibc")))] - SigevNotify::SigevThreadId{signal, thread_id, si_value} => { - sev.sigev_notify = libc::SIGEV_THREAD_ID; - sev.sigev_signo = signal as libc::c_int;