Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Oct 2021 18:36:17 GMT
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: d5f09dc31fcf - main - lang/rust-nightly: Update to 1.58.0.20211030
Message-ID:  <202110311836.19VIaHMI013317@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by tobik:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d5f09dc31fcfdb77b69c86b9093bf67ec67653d9

commit d5f09dc31fcfdb77b69c86b9093bf67ec67653d9
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-19 10:27:40 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-31 18:20:54 +0000

    lang/rust-nightly: Update to 1.58.0.20211030
    
    Make the no-hardlinks-patches conditional and move them to
    files/no-hardlinks.
    
    Newer kernels should return sane kern.proc.pathname values for
    hardlinks which will hopefully help avoid the intermittent "can't
    find crate for `std`" build failures we had on the package
    builders.
    
    Thanks to kib@ for fixing kernel behavior. Now let's see if it
    makes a difference for lang/rust-nightly.
    
    Changes:        https://github.com/rust-lang/rust/compare/25ec8273855fde2d72ae877b397e054de5300e10...e249ce6b2345587d6e11052779c86adbad626dff
    PR:             248184
---
 lang/rust-nightly/Makefile                            |  6 +++---
 lang/rust-nightly/distinfo                            | 18 +++++++++---------
 .../{ => no-hardlinks}/patch-src_bootstrap_lib.rs     |  0
 .../{ => no-hardlinks}/patch-src_bootstrap_native.rs  |  0
 ...r_rustc__target_src_spec_i686__unknown__freebsd.rs |  8 ++++----
 lang/rust/Makefile                                    | 19 +++++++++++++++++++
 6 files changed, 35 insertions(+), 16 deletions(-)

diff --git a/lang/rust-nightly/Makefile b/lang/rust-nightly/Makefile
index f6ff2d58916d..3a890a36313f 100644
--- a/lang/rust-nightly/Makefile
+++ b/lang/rust-nightly/Makefile
@@ -1,7 +1,7 @@
 # Created by: Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
 
 # Run update.sh to update to the latest nightly
-PORTVERSION=	1.57.0.${NIGHTLY_DATE:C,-,,g}
+PORTVERSION=	1.58.0.${NIGHTLY_DATE:C,-,,g}
 # Always set PORTREVISION explicitly as otherwise it is inherited from lang/rust
 PORTREVISION=	0
 PKGNAMESUFFIX=	-nightly
@@ -16,8 +16,8 @@ MASTERDIR=	${.CURDIR}/../rust
 PATCHDIR=	${.CURDIR}/files
 DISTINFO_FILE=	${.CURDIR}/distinfo
 
-NIGHTLY_DATE=		2021-10-06
-BOOTSTRAPS_DATE=	2021-09-08
+NIGHTLY_DATE=		2021-10-30
+BOOTSTRAPS_DATE=	2021-10-22
 RUST_BOOTSTRAP_VERSION=	beta
 
 .include "${MASTERDIR}/Makefile"
diff --git a/lang/rust-nightly/distinfo b/lang/rust-nightly/distinfo
index 7e4e0f6bcdd6..8b4f78753031 100644
--- a/lang/rust-nightly/distinfo
+++ b/lang/rust-nightly/distinfo
@@ -1,9 +1,9 @@
-TIMESTAMP = 1633606205
-SHA256 (rust/2021-10-06/rustc-nightly-src.tar.xz) = 28c9e6ff47e07e4e68f8964488ad254369fa897f0e6943504a6b5e6cfc8609a8
-SIZE (rust/2021-10-06/rustc-nightly-src.tar.xz) = 122318988
-SHA256 (rust/2021-09-08/rustc-beta-x86_64-unknown-freebsd.tar.xz) = 4e01128800f479a96597ce7eee9d2e76a5128ae1c13a4e0e2eb52e36d43cf559
-SIZE (rust/2021-09-08/rustc-beta-x86_64-unknown-freebsd.tar.xz) = 120261460
-SHA256 (rust/2021-09-08/rust-std-beta-x86_64-unknown-freebsd.tar.xz) = 5faf349a9cc231c144c52de40f2a487a935c6f6146614547e64cabb26f037a23
-SIZE (rust/2021-09-08/rust-std-beta-x86_64-unknown-freebsd.tar.xz) = 24109712
-SHA256 (rust/2021-09-08/cargo-beta-x86_64-unknown-freebsd.tar.xz) = b65f8024b47d4784ab59e4722e522e54442852bbe16906760f2708e2b0d0fe65
-SIZE (rust/2021-09-08/cargo-beta-x86_64-unknown-freebsd.tar.xz) = 6506908
+TIMESTAMP = 1635682721
+SHA256 (rust/2021-10-30/rustc-nightly-src.tar.xz) = f102c8a7a1ff169214fe6933d7eb081160f68aa88e1523cda1d6c74a4c22a121
+SIZE (rust/2021-10-30/rustc-nightly-src.tar.xz) = 123708656
+SHA256 (rust/2021-10-22/rustc-beta-x86_64-unknown-freebsd.tar.xz) = 0c01b34ed39016866e945e0f01de830a68c54f7eef2ac83c3ab85318b01debb0
+SIZE (rust/2021-10-22/rustc-beta-x86_64-unknown-freebsd.tar.xz) = 88136372
+SHA256 (rust/2021-10-22/rust-std-beta-x86_64-unknown-freebsd.tar.xz) = 9e951fec5ee4a4a655693d1c9e205413aeb3120a7b2c0bb6673f4392cdf9fa6d
+SIZE (rust/2021-10-22/rust-std-beta-x86_64-unknown-freebsd.tar.xz) = 25586116
+SHA256 (rust/2021-10-22/cargo-beta-x86_64-unknown-freebsd.tar.xz) = b61464e9e1c2e820a237f1f3d91cae8b0e62cda16dea51b32a8cf695b7a5707c
+SIZE (rust/2021-10-22/cargo-beta-x86_64-unknown-freebsd.tar.xz) = 6539980
diff --git a/lang/rust-nightly/files/patch-src_bootstrap_lib.rs b/lang/rust-nightly/files/no-hardlinks/patch-src_bootstrap_lib.rs
similarity index 100%
rename from lang/rust-nightly/files/patch-src_bootstrap_lib.rs
rename to lang/rust-nightly/files/no-hardlinks/patch-src_bootstrap_lib.rs
diff --git a/lang/rust-nightly/files/patch-src_bootstrap_native.rs b/lang/rust-nightly/files/no-hardlinks/patch-src_bootstrap_native.rs
similarity index 100%
rename from lang/rust-nightly/files/patch-src_bootstrap_native.rs
rename to lang/rust-nightly/files/no-hardlinks/patch-src_bootstrap_native.rs
diff --git a/lang/rust-nightly/files/patch-compiler_rustc__target_src_spec_i686__unknown__freebsd.rs b/lang/rust-nightly/files/patch-compiler_rustc__target_src_spec_i686__unknown__freebsd.rs
index 9d3dc5a067aa..308bb0d4b551 100644
--- a/lang/rust-nightly/files/patch-compiler_rustc__target_src_spec_i686__unknown__freebsd.rs
+++ b/lang/rust-nightly/files/patch-compiler_rustc__target_src_spec_i686__unknown__freebsd.rs
@@ -1,11 +1,11 @@
---- compiler/rustc_target/src/spec/i686_unknown_freebsd.rs.orig	2020-01-23 19:40:44 UTC
+--- compiler/rustc_target/src/spec/i686_unknown_freebsd.rs.orig	2021-10-17 19:23:05 UTC
 +++ compiler/rustc_target/src/spec/i686_unknown_freebsd.rs
-@@ -2,7 +2,7 @@ use crate::spec::{LinkerFlavor, Target, TargetResult};
+@@ -2,7 +2,7 @@ use crate::spec::{LinkerFlavor, StackProbeType, Target
  
- pub fn target() -> TargetResult {
+ pub fn target() -> Target {
      let mut base = super::freebsd_base::opts();
 -    base.cpu = "pentium4".to_string();
 +    base.cpu = "pentiumpro".to_string();
      base.max_atomic_width = Some(64);
-     let pre_link_args = base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap();
+     let pre_link_args = base.pre_link_args.entry(LinkerFlavor::Gcc).or_default();
      pre_link_args.push("-m32".to_string());
diff --git a/lang/rust/Makefile b/lang/rust/Makefile
index a4496ddfad66..2a584a160ab0 100644
--- a/lang/rust/Makefile
+++ b/lang/rust/Makefile
@@ -88,6 +88,10 @@ _CARGO_BOOTSTRAP=	${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/cargo-${RUST_BO
 
 .include <bsd.port.pre.mk>
 
+.if ${OPSYS} != FreeBSD
+IGNORE=		is only for FreeBSD
+.endif
+
 .if ${ARCH} == powerpc
 # bfd to link rustc_driver; lld currently can't
 BUILD_DEPENDS+=	ld.bfd:devel/binutils
@@ -100,6 +104,21 @@ _RUST_TOOLS+=	rls
 EXTRA_PATCHES+=	${PATCHDIR}/${ARCH}${BOOTSTRAPS_SUFFIX}
 .endif
 
+# If the kernel does not return sane kern.proc.pathname values
+# for hardlinks then disable hardlinks in the build to avoid
+# intermittent "can't find crate for `std`" build failures,
+# c.f. PR248184
+#
+# XXX: Avoiding OSVERSION since it is derived from userland but
+# the running kernel might still be newer with sane behavior
+# anyway...
+.if exists(${PATCHDIR}/no-hardlinks)
+_KERN_OSRELDATE!=	${SYSCTL} -n kern.osreldate 2>/dev/null || echo 0
+.  if ${_KERN_OSRELDATE} < 1400040
+EXTRA_PATCHES+=		${PATCHDIR}/no-hardlinks
+.  endif
+.endif
+
 .if defined(PPC_ABI) && ${PPC_ABI} == ELFv1
 # The bootstrap is hardcoded to use gcc9
 # but we can build with a newer or older compiler as provided by USE_GCC=yes



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202110311836.19VIaHMI013317>