pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
rust182: reduce diff to main lang/rust package.
Module Name: pkgsrc-wip
Committed By: Havard Eidnes <he%NetBSD.org@localhost>
Pushed By: he
Date: Sun Nov 24 14:27:32 2024 +0000
Changeset: bcf8f559fbdc99bc4633836c3fdd0e2694cc590c
Modified Files:
rust182/Makefile
rust182/cargo.mk
rust182/distinfo
rust182/do-cross.mk
rust182/options.mk
rust182/rust.mk
Added Files:
rust182/patches/patch-library_stdarch_crates_std__detect_tests_cpu-detection.rs
Log Message:
rust182: reduce diff to main lang/rust package.
Also add a patch to treat NetBSD the same as FreeBSD and OpenBSD
for aarch64.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=bcf8f559fbdc99bc4633836c3fdd0e2694cc590c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
rust182/Makefile | 2 --
rust182/cargo.mk | 9 +++++++--
rust182/distinfo | 1 +
rust182/do-cross.mk | 14 +++++++-------
rust182/options.mk | 6 +++---
...rary_stdarch_crates_std__detect_tests_cpu-detection.rs | 15 +++++++++++++++
rust182/rust.mk | 2 +-
7 files changed, 34 insertions(+), 15 deletions(-)
diffs:
diff --git a/rust182/Makefile b/rust182/Makefile
index 187d0091d5..7b48d0b544 100644
--- a/rust182/Makefile
+++ b/rust182/Makefile
@@ -209,8 +209,6 @@ BUILDLINK_TRANSFORM+= opt:x86_64:arm64
#
DISTFILES:= ${DEFAULT_DISTFILES}
-NB=
-
.if ${MACHINE_PLATFORM:MDarwin-*-aarch64} || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.81.0
RUST_ARCH:= aarch64-apple-darwin
diff --git a/rust182/cargo.mk b/rust182/cargo.mk
index b57d01de95..5813c04321 100644
--- a/rust182/cargo.mk
+++ b/rust182/cargo.mk
@@ -70,6 +70,11 @@ print-cargo-depends:
print "CARGO_CRATE_DEPENDS+=\t" name "-" vers; \
}' ${CARGO_WRKSRC}/Cargo.lock
+.if ${RUST_TYPE} == "native"
+CARGO= cargo
+.else
+CARGO= ${PREFIX}/bin/cargo
+.endif
DEFAULT_CARGO_ARGS= --offline -j${_MAKE_JOBS_N} \
${CARGO_NO_DEFAULT_FEATURES:M[yY][eE][sS]:C/[yY][eE][sS]/--no-default-features/} \
${CARGO_FEATURES:C/.*/--features/W} \
@@ -86,7 +91,7 @@ do-build: do-cargo-build
.PHONY: do-cargo-build
do-cargo-build:
- ${RUN} cd ${CARGO_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PREFIX}/bin/cargo ${CARGO_ARGS}
+ ${RUN} cd ${CARGO_WRKSRC} && ${SETENV} ${MAKE_ENV} ${CARGO} ${CARGO_ARGS}
.if !target(do-install) && ${GNU_CONFIGURE:Uno:tl} == no
do-install: do-cargo-install
@@ -94,7 +99,7 @@ do-install: do-cargo-install
.PHONY: do-cargo-install
do-cargo-install:
- ${RUN} cd ${CARGO_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PREFIX}/bin/cargo ${CARGO_INSTALL_ARGS}
+ ${RUN} cd ${CARGO_WRKSRC} && ${SETENV} ${MAKE_ENV} ${CARGO} ${CARGO_INSTALL_ARGS}
# remove files cargo uses for tracking installations
${RM} -f ${DESTDIR}${PREFIX}/.crates.toml
${RM} -f ${DESTDIR}${PREFIX}/.crates2.json
diff --git a/rust182/distinfo b/rust182/distinfo
index 9543cb2193..6931616f7d 100644
--- a/rust182/distinfo
+++ b/rust182/distinfo
@@ -121,6 +121,7 @@ SHA1 (patch-config.example.toml) = 520ad7a26249780ae79a5dc1d2b534a8c6aef0a5
SHA1 (patch-library_backtrace_src_symbolize_gimli.rs) = 9d5ef634c5a454e474ea5fee76da9bb768f5b3d9
SHA1 (patch-library_backtrace_src_symbolize_gimli_elf.rs) = 3b84a462c6bc8245d579452e4c37e3ce13314952
SHA1 (patch-library_std_src_sys_pal_unix_mod.rs) = bfc59ae4568547e3ed71c8b31ba5b5b5363d5d40
+SHA1 (patch-library_stdarch_crates_std__detect_tests_cpu-detection.rs) = 97c3ad8ea39c25d41256fcad80fae1e6e4970124
SHA1 (patch-src_bootstrap_bootstrap.py) = 6f1d3068da49f19c3e092230ba1c7d99af628d3a
SHA1 (patch-src_bootstrap_src_core_build__steps_compile.rs) = e928203ed4734c93cc33c5a3f7879cf18dcecc83
SHA1 (patch-src_bootstrap_src_core_build__steps_dist.rs) = 22e37d6260cbd93ca3c6d119b58e48750836b17c
diff --git a/rust182/do-cross.mk b/rust182/do-cross.mk
index 8d866ed96f..36d5cd1a7f 100644
--- a/rust182/do-cross.mk
+++ b/rust182/do-cross.mk
@@ -7,13 +7,13 @@ V_NOREV!= make show-var VARNAME=PKGVERSION_NOREV
SHORT_TARGETS+= armv7
SHORT_TARGETS+= armv6
-#SHORT_TARGETS+= sparc64
-#SHORT_TARGETS+= powerpc
-#SHORT_TARGETS+= arm64
-#SHORT_TARGETS+= arm64_be
-#SHORT_TARGETS+= i386
-#SHORT_TARGETS+= riscv64
-#SHORT_TARGETS+= mipsel # produces mips32 (not mips1) executables
+SHORT_TARGETS+= sparc64
+SHORT_TARGETS+= powerpc
+SHORT_TARGETS+= arm64
+SHORT_TARGETS+= arm64_be
+SHORT_TARGETS+= i386
+SHORT_TARGETS+= riscv64
+SHORT_TARGETS+= mipsel # produces mips32 (not mips1) executables
# Conditional local overrides of ROOT.* variables:
.sinclude "local-roots.mk"
diff --git a/rust182/options.mk b/rust182/options.mk
index 3a6b4659ac..7da7699718 100644
--- a/rust182/options.mk
+++ b/rust182/options.mk
@@ -19,14 +19,14 @@ PKG_SUGGESTED_OPTIONS+= rust-internal-llvm
PKG_SUGGESTED_OPTIONS+= rust-internal-llvm
.endif
+PKG_OPTIONS_LEGACY_OPTS+= rust-llvm:rust-internal-llvm
+
# Bundle OpenSSL and curl into the cargo binary when producing
# bootstraps on NetBSD.
.if ${OPSYS} == "NetBSD" && ${BUILD_TARGET} == "dist"
PKG_SUGGESTED_OPTIONS+= rust-cargo-static
.endif
-PKG_OPTIONS_LEGACY_OPTS+= rust-llvm:rust-internal-llvm
-
.include "../../mk/bsd.options.mk"
# NetBSD/sparc64 when using the internal LLVM needs
@@ -35,7 +35,7 @@ PKG_OPTIONS_LEGACY_OPTS+= rust-llvm:rust-internal-llvm
# (however, gcc from 9.x produces a working LLVM, go figure).
.if ${MACHINE_PLATFORM:MNetBSD-10.*-sparc64}
. if !empty(PKG_OPTIONS:Mrust-internal-llvm)
-# Require GCC 12 (from pkgsrc) to correctly build the embedded LLVM (17.x).
+# Require GCC 12 (from pkgsrc) to correctly build the embedded LLVM (18.x).
GCC_REQD+= 12
. endif
.endif
diff --git a/rust182/patches/patch-library_stdarch_crates_std__detect_tests_cpu-detection.rs b/rust182/patches/patch-library_stdarch_crates_std__detect_tests_cpu-detection.rs
new file mode 100644
index 0000000000..d57e0bb62a
--- /dev/null
+++ b/rust182/patches/patch-library_stdarch_crates_std__detect_tests_cpu-detection.rs
@@ -0,0 +1,15 @@
+$NetBSD$
+
+On NetBSD/aarch64, do the same as FreeBSD and OpenBSD.
+
+--- library/stdarch/crates/std_detect/tests/cpu-detection.rs.orig 2024-11-10 17:39:05.836052531 +0000
++++ library/stdarch/crates/std_detect/tests/cpu-detection.rs
+@@ -166,7 +166,7 @@ fn aarch64_windows() {
+ #[test]
+ #[cfg(all(
+ target_arch = "aarch64",
+- any(target_os = "freebsd", target_os = "openbsd")
++ any(target_os = "freebsd", target_os = "openbsd", target_os = "netbsd")
+ ))]
+ fn aarch64_bsd() {
+ println!("asimd: {:?}", is_aarch64_feature_detected!("asimd"));
diff --git a/rust182/rust.mk b/rust182/rust.mk
index 2a29bc959e..5ecb4c2e46 100644
--- a/rust182/rust.mk
+++ b/rust182/rust.mk
@@ -14,7 +14,7 @@
# Official Rust binaries are only published for certain platforms,
# including Darwin, FreeBSD, Linux, and NetBSD x86_64.
#
-# Possible values: src bin
+# Possible values: src bin native
# Default: src
#
# === Package-settable variables ===
Home |
Main Index |
Thread Index |
Old Index