pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/rust
Module Name: pkgsrc
Committed By: jperkin
Date: Tue Jun 17 15:19:17 UTC 2025
Modified Files:
pkgsrc/lang/rust: Makefile
Log Message:
rust: Apply ugly workaround for Darwin/arm64.
Ideally this should be resolved in the build process and only set the
library path at the specific points that it is required, but for now at
least it doesn't appear to have any harmful side-effects setting it for the
entire build, and makes the package build again.
Limit the blast radius of the other LD_LIBRARY_PATH settings to NetBSD, and
add a comment to explain why.
To generate a diff of this commit:
cvs rdiff -u -r1.338 -r1.339 pkgsrc/lang/rust/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/rust/Makefile
diff -u pkgsrc/lang/rust/Makefile:1.338 pkgsrc/lang/rust/Makefile:1.339
--- pkgsrc/lang/rust/Makefile:1.338 Tue Jun 17 11:12:01 2025
+++ pkgsrc/lang/rust/Makefile Tue Jun 17 15:19:17 2025
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.338 2025/06/17 11:12:01 jperkin Exp $
+# $NetBSD: Makefile,v 1.339 2025/06/17 15:19:17 jperkin Exp $
DISTNAME= rustc-1.86.0-src
PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//}
@@ -59,16 +59,6 @@ REPLACE_BASH+= library/portable-simd/su
# optional from do-cross.mk
CONFIGURE_ARGS+= ${ADD_CONFIGURE_ARGS}
-# Getting RPATH with $ORIGIN into the bootstrap binaries is
-# problematic, since pkgsrc refuses to put $ORIGIN into RPATHs
-# of executables. So instead we need these so that the bootstrap
-# compiler can be run out of the $RUST_BOOTSTRAP_PATH directory as
-# part of the initial part of the rust compiler build.
-# This problem is not present with the amd64 bootstrap bits,
-# which are built by our upstream and uses $ORIGIN/../lib in RPATH.
-MAKE_ENV+= LD_LIBRARY_PATH=${RUST_BOOTSTRAP_PATH:Q}/lib
-PKGSRC_MAKE_ENV+= LD_LIBRARY_PATH=${RUST_BOOTSTRAP_PATH:Q}/lib
-
# This should allow us to perform "offline" builds (so cargo doesn't fetch
# dependencies during the build stage) but this isn't hooked up yet.
CONFIGURE_ARGS+= --enable-vendor
@@ -93,6 +83,31 @@ CHECK_SSP_SUPPORTED= no
.include "../../mk/bsd.prefs.mk"
+.if ${OPSYS} == "NetBSD"
+# Getting RPATH with $ORIGIN into the bootstrap binaries is
+# problematic, since pkgsrc refuses to put $ORIGIN into RPATHs
+# of executables. So instead we need these so that the bootstrap
+# compiler can be run out of the $RUST_BOOTSTRAP_PATH directory as
+# part of the initial part of the rust compiler build.
+# This problem is not present with the amd64 bootstrap bits,
+# which are built by our upstream and uses $ORIGIN/../lib in RPATH.
+#
+# The above is only true on NetBSD, for other bootstrap kits (e.g. illumos)
+# the binaries are made to be relocatable after the build using elfedit or
+# similar. It is unclear why this approach is not used by NetBSD too.
+#
+MAKE_ENV+= LD_LIBRARY_PATH=${RUST_BOOTSTRAP_PATH:Q}/lib
+PKGSRC_MAKE_ENV+= LD_LIBRARY_PATH=${RUST_BOOTSTRAP_PATH:Q}/lib
+.endif
+
+# TODO: Hack introduced for 1.86.0 as @loader_path is stripped from the
+# bootstrap compiler arguments and the stage1 libraries cannot be found.
+# Ideally this should be inserted only in the necessary points of the
+# bootstrap script.
+.if ${MACHINE_PLATFORM:MDarwin-*-aarch64}
+MAKE_ENV+= DYLD_LIBRARY_PATH=${WRKSRC}/build/aarch64-apple-darwin/stage1/lib
+.endif
+
# Allow overriding MAKE_JOBS_SAFE
# some may chose to mostly build faster,
# and deal with any failures due to deadlocks
Home |
Main Index |
Thread Index |
Old Index