pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
rust188: reduce diffs to pkgsrc
Module Name: pkgsrc-wip
Committed By: Thomas Klausner <wiz%NetBSD.org@localhost>
Pushed By: wiz
Date: Mon Aug 25 17:45:53 2025 +0200
Changeset: 2421538ed0fa820db287e972ed083d037a1c2f0f
Modified Files:
rust188/buildlink3.mk
rust188/cross.mk
rust188/options.mk
rust188/platform.mk
Log Message:
rust188: reduce diffs to pkgsrc
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=2421538ed0fa820db287e972ed083d037a1c2f0f
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
rust188/buildlink3.mk | 8 ++++++--
rust188/cross.mk | 6 +++---
rust188/options.mk | 12 ++++++++++++
rust188/platform.mk | 8 +++++++-
4 files changed, 28 insertions(+), 6 deletions(-)
diffs:
diff --git a/rust188/buildlink3.mk b/rust188/buildlink3.mk
index b8cd208042..d932a4d4fe 100644
--- a/rust188/buildlink3.mk
+++ b/rust188/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.17 2025/03/31 16:38:43 jakllsch Exp $
+# $NetBSD: buildlink3.mk,v 1.18 2025/07/24 10:33:38 jperkin Exp $
BUILDLINK_TREE+= rust
@@ -13,9 +13,13 @@ BUILDLINK_API_DEPENDS.rust+= rust>=1.56.1
BUILDLINK_PKGSRCDIR.rust?= ../../wip/rust
BUILDLINK_PASSTHRU_DIRS+= ${PREFIX}/lib/rustlib
+.include "../../mk/bsd.fast.prefs.mk"
+
pkgbase:= rust
.include "../../mk/pkg-build-options.mk"
-.if empty(PKG_BUILD_OPTIONS.rust:Mrust-internal-llvm)
+# XXX: unclear why this is necessary, but is actively harmful on Darwin, and
+# likely broken for most uses anyway as rust defaults to DEPMETHOD=build.
+.if empty(PKG_BUILD_OPTIONS.rust:Mrust-internal-llvm) && ${OPSYS} != "Darwin"
. include "../../lang/libunwind/buildlink3.mk"
.endif
diff --git a/rust188/cross.mk b/rust188/cross.mk
index a9a53164f1..47f2b3e006 100644
--- a/rust188/cross.mk
+++ b/rust188/cross.mk
@@ -20,8 +20,8 @@
#CROSS_ROOT= /u/evbarm64
#CROSS_ROOT= /u/evbarm64eb
#CROSS_ROOT= /u/i386
-#CROSS_ROOT= /u/riscv64
#CROSS_ROOT= /u/mipsel
+#CROSS_ROOT= /u/riscv64
#CROSS_ROOT= /
#MAKE_ENV+= CROSS_ROOT=${CROSS_ROOT}
@@ -33,8 +33,8 @@
#GNU_CROSS_TARGET= aarch64--netbsd
#GNU_CROSS_TARGET= aarch64_be--netbsd
#GNU_CROSS_TARGET= i486--netbsdelf
-#GNU_CROSS_TARGET= riscv64--netbsd
#GNU_CROSS_TARGET= mipsel--netbsd
+#GNU_CROSS_TARGET= riscv64--netbsd
#MAKE_ENV+= GNU_CROSS_TARGET=${GNU_CROSS_TARGET}
# To cross-build rust, you need to specify
@@ -49,8 +49,8 @@
#TARGET= aarch64_be-unknown-netbsd
#TARGET= i686-unknown-netbsd
#TARGET= i586-unknown-netbsd
-#TARGET= riscv64gc-unknown-netbsd
#TARGET= mipsel-unknown-netbsd
+#TARGET= riscv64gc-unknown-netbsd
#
#SCRIPTS= ${WRKDIR}/scripts
#CONFIGURE_ARGS+= --host=${TARGET}
diff --git a/rust188/options.mk b/rust188/options.mk
index 999196b96b..2336fbbdce 100644
--- a/rust188/options.mk
+++ b/rust188/options.mk
@@ -40,6 +40,18 @@ GCC_REQD+= 12
. endif
.endif
+# Apparently, using pkgsrc LLVM 19.x does not work on
+# NetBSD/x86_64 9.x and NetBSD/i386 9.x unless rust is built
+# with a newer gcc than the platform-included 7.5.0. Ref.
+# https://gnats.netbsd.org/59435 and
+# https://mail-index.netbsd.org/pkgsrc-users/2025/05/20/msg041603.html
+# and following discussion.
+.if empty(PKG_OPTIONS:Mrust-internal-llvm)
+. if ${MACHINE_PLATFORM:MNetBSD-9.*-x86_64} || \
+ ${MACHINE_PLATFORM:MNetBSD-9.*-i386}
+GCC_REQD+= 10
+. endif
+
# Fix for problem seen during rust-installer run w/rust 1.84.1 on macppc,
# "of course" experienced near the end of the build process:
# assertion "memcmp(mf_ptr(mf) - 1, mf_ptr(mf) - matches[i].dist - 2, matches[i].len) == 0" failed: file "xz-5.2/src/liblzma/lz/lz_encoder_mf.c", line 40, function "lzma_mf_find"
diff --git a/rust188/platform.mk b/rust188/platform.mk
index d3ef0fd1d6..e094334ea2 100644
--- a/rust188/platform.mk
+++ b/rust188/platform.mk
@@ -1,4 +1,4 @@
-# $NetBSD: platform.mk,v 1.27 2024/08/01 15:24:39 tnn Exp $
+# $NetBSD: platform.mk,v 1.33 2025/06/16 21:10:43 he Exp $
# This file encodes whether a given platform has support for rust.
@@ -16,6 +16,12 @@ RUST_PLATFORMS+= ${rust_os}-*-${rust_arch}
. endfor
.endfor
+# rust does not build in the VA space available on earm.
+# \todo Consider extension to other platforms.
+.if ${NATIVE_MACHINE_PLATFORM:M*-*-earm*}
+RUST_TYPE?= bin
+.endif
+
RUST_DIR?= ../../lang/rust
.for rust_platform in ${RUST_PLATFORMS}
Home |
Main Index |
Thread Index |
Old Index