pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
rust179: reduce diff to lang/rust
Module Name: pkgsrc-wip
Committed By: Tobias Nygren <tnn%NetBSD.org@localhost>
Pushed By: tnn
Date: Fri Aug 2 18:12:50 2024 +0200
Changeset: e88365736f35d3defda7a77a00b10962a4ed7f22
Modified Files:
rust179/Makefile
rust179/distinfo
rust179/patches/patch-compiler_rustc__codegen__ssa_src_back_linker.rs
rust179/patches/patch-src_bootstrap_src_core_builder.rs
rust179/platform.mk
Log Message:
rust179: reduce diff to lang/rust
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e88365736f35d3defda7a77a00b10962a4ed7f22
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
rust179/Makefile | 25 ++++++++--------------
rust179/distinfo | 4 ++--
...compiler_rustc__codegen__ssa_src_back_linker.rs | 14 +++++++++++-
.../patch-src_bootstrap_src_core_builder.rs | 17 +++++++++++++--
rust179/platform.mk | 4 ++--
5 files changed, 41 insertions(+), 23 deletions(-)
diffs:
diff --git a/rust179/Makefile b/rust179/Makefile
index 2f1c75abd9..6b1254af71 100644
--- a/rust179/Makefile
+++ b/rust179/Makefile
@@ -60,12 +60,6 @@ CONFIGURE_ARGS+= --enable-vendor
# cargo defaults to using the number of available CPUs
MAKE_ENV+= CARGO_BUILD_JOBS=${_MAKE_JOBS_N}
-# Rust builds some bundled components with strict version requirements, ensure
-# that any conflicting packages pulled in via dependencies are not buildlinked.
-BUILDLINK_FILES_CMD.libssh2= ${TRUE}
-BUILDLINK_FILES_CMD.xz= ${TRUE}
-MAKE_ENV+= LZMA_API_STATIC=1
-
# MacOS X 10.7 is the oldest supported version. See
# ${WRKSRC}/src/bootstrap/lib.rs
MAKE_ENV.Darwin+= MACOSX_DEPLOYMENT_TARGET="10.7"
@@ -142,17 +136,9 @@ CONFIGURE_ARGS+= --set llvm.targets="Mips"
CONFIGURE_ARGS+= --set llvm.targets="Mips;X86"
.endif
-CHECK_INTERPRETER_SKIP+= lib/rustlib/src/rust/library/backtrace/ci/android-sdk.sh
-CHECK_INTERPRETER_SKIP+= lib/rustlib/src/rust/library/backtrace/ci/debuglink.sh
-CHECK_INTERPRETER_SKIP+= lib/rustlib/src/rust/library/backtrace/ci/run.sh
-CHECK_INTERPRETER_SKIP+= lib/rustlib/src/rust/library/backtrace/ci/run-docker.sh
+CHECK_INTERPRETER_SKIP+= lib/rustlib/src/rust/library/backtrace/ci/*.sh
CHECK_INTERPRETER_SKIP+= lib/rustlib/src/rust/library/core/src/unicode/printable.py
-CHECK_INTERPRETER_SKIP+= lib/rustlib/src/rust/library/stdarch/ci/build-std-detect.sh
-CHECK_INTERPRETER_SKIP+= lib/rustlib/src/rust/library/stdarch/ci/dox.sh
-CHECK_INTERPRETER_SKIP+= lib/rustlib/src/rust/library/stdarch/ci/run-docker.sh
-CHECK_INTERPRETER_SKIP+= lib/rustlib/src/rust/library/stdarch/ci/run.sh
-CHECK_INTERPRETER_SKIP+= lib/rustlib/src/rust/library/stdarch/ci/style.sh
-
+CHECK_INTERPRETER_SKIP+= lib/rustlib/src/rust/library/stdarch/ci/*.sh
CHECK_PORTABILITY_SKIP+= tests/run-make/dump-ice-to-disk/check.sh
CHECK_PORTABILITY_SKIP+= vendor/libdbus-sys-0.2.5/vendor/dbus/tools/cmake-format
@@ -500,6 +486,13 @@ provide-libgcc-for-bootstrap:
. endif
.endif
+# Rust builds some bundled components with strict version requirements, ensure
+# that any conflicting packages pulled in via dependencies are not buildlinked.
+BUILDLINK_FILES_CMD.xz= ${TRUE}
+MAKE_ENV+= LZMA_API_STATIC=1
+pre-configure:
+ ${RM} -rf ${BUILDLINK_DIR}/include/libssh2*
+
#
# These are essentially copies of the "all", "test", and "install" Makefile
# targets, but are duplicated here so that we can specify -j.
diff --git a/rust179/distinfo b/rust179/distinfo
index 37f5f92d1b..925b2393c6 100644
--- a/rust179/distinfo
+++ b/rust179/distinfo
@@ -108,7 +108,7 @@ Size (rust-std-1.78.0-x86_64-unknown-netbsd.tar.xz) = 23245376 bytes
BLAKE2s (rustc-1.79.0-src.tar.gz) = 0d2faf6d2455275a09c78a0f8e3e1bfa5d864b5dfc70980f7ee42c188422f4fc
SHA512 (rustc-1.79.0-src.tar.gz) = 4fa7385b2e89816849f1c353be3bf8fd36c05896ca7ded53dedfb92876ab2f40b77235a9eaa84ab34c045ddcd3a5c67644a986b9cc8695e5f824d22416bcd018
Size (rustc-1.79.0-src.tar.gz) = 297469050 bytes
-SHA1 (patch-compiler_rustc__codegen__ssa_src_back_linker.rs) = 3105b0c89cf04b4469fc56cd89e7e4a661517002
+SHA1 (patch-compiler_rustc__codegen__ssa_src_back_linker.rs) = f5336828d70f9fc684ea871a6869138ac7a18b4f
SHA1 (patch-compiler_rustc__llvm_build.rs) = a4a66d449fc9eb99d648d02a041778a68f4f7ce8
SHA1 (patch-compiler_rustc__target_src_spec_base_netbsd.rs) = 7d910631f49acf2c33fdd191fd3e0f261efae234
SHA1 (patch-compiler_rustc__target_src_spec_mod.rs) = a22b5d28997ed9a5565deec9c34322165d563d00
@@ -123,7 +123,7 @@ SHA1 (patch-library_std_src_sys_pal_unix_thread__parking_netbsd.rs) = 9b073ba37a
SHA1 (patch-src_bootstrap_bootstrap.py) = 5cd73003292c935ce0e405edd132180233a04857
SHA1 (patch-src_bootstrap_src_core_build__steps_compile.rs) = 4696304623232acd419ad15597f539a10a014271
SHA1 (patch-src_bootstrap_src_core_build__steps_install.rs) = cc6558df42c9c9ac28fdb2ff180bdaa7f22ce816
-SHA1 (patch-src_bootstrap_src_core_builder.rs) = bb9f428bf4da9bf11a19de69f308ef4d9b5a7002
+SHA1 (patch-src_bootstrap_src_core_builder.rs) = e3fd19e0a18f1e79e287c85035ea431b98d91d9a
SHA1 (patch-src_bootstrap_src_lib.rs) = d29bc3c0b335d5e788eecbb02fc08966beef0fb1
SHA1 (patch-src_llvm-project_llvm_CMakeLists.txt) = 7abfabb6ec70df229a69355f8c76825610165c37
SHA1 (patch-src_llvm-project_llvm_cmake_modules_AddLLVM.cmake) = e1b2eb2f0b3cf1cf87b443656ae306b3242f6b12
diff --git a/rust179/patches/patch-compiler_rustc__codegen__ssa_src_back_linker.rs b/rust179/patches/patch-compiler_rustc__codegen__ssa_src_back_linker.rs
index 911bedebe3..b315aa9153 100644
--- a/rust179/patches/patch-compiler_rustc__codegen__ssa_src_back_linker.rs
+++ b/rust179/patches/patch-compiler_rustc__codegen__ssa_src_back_linker.rs
@@ -1,6 +1,7 @@
-$NetBSD: patch-compiler_rustc__codegen__ssa_src_back_linker.rs,v 1.15 2024/04/18 09:29:42 pin Exp $
+$NetBSD: patch-compiler_rustc__codegen__ssa_src_back_linker.rs,v 1.17 2024/07/27 02:35:24 tnn Exp $
Do not use @rpath on Darwin.
+Find external libunwind on Linux.
--- compiler/rustc_codegen_ssa/src/back/linker.rs.orig 2006-07-24 01:21:28.000000000 +0000
+++ compiler/rustc_codegen_ssa/src/back/linker.rs
@@ -13,3 +14,14 @@ Do not use @rpath on Darwin.
rpath.push(out_filename.file_name().unwrap());
self.linker_args(&[OsString::from("-install_name"), rpath]);
}
+@@ -462,6 +462,10 @@ impl<'a> Linker for GccLinker<'a> {
+ self.linker_arg("--as-needed");
+ }
+ }
++ if self.sess.target.os.contains("linux") && name == "unwind" {
++ self.linker_arg("-rpath,@PREFIX@/lib");
++ self.linker_arg("-L@PREFIX@/lib");
++ }
+ }
+
+ fn link_framework_by_name(&mut self, name: &str, _verbatim: bool, as_needed: bool) {
diff --git a/rust179/patches/patch-src_bootstrap_src_core_builder.rs b/rust179/patches/patch-src_bootstrap_src_core_builder.rs
index 1dd07ff2e7..7db4e8beb1 100644
--- a/rust179/patches/patch-src_bootstrap_src_core_builder.rs
+++ b/rust179/patches/patch-src_bootstrap_src_core_builder.rs
@@ -1,9 +1,22 @@
-$NetBSD$
+$NetBSD: patch-src_bootstrap_src_core_builder.rs,v 1.5 2024/07/27 02:35:24 tnn Exp $
+Find external libunwind on Linux.
Use @PREFIX@, not $ORIGIN in rpath.
---- src/bootstrap/src/core/builder.rs.orig 2024-07-07 12:16:58.347642901 +0000
+--- src/bootstrap/src/core/builder.rs.orig 2006-07-24 01:21:28.000000000 +0000
+++ src/bootstrap/src/core/builder.rs
+@@ -2149,6 +2149,11 @@ impl<'a> Builder<'a> {
+ rustflags.arg(v);
+ });
+
++ // added for pkgsrc libunwind
++ if target.contains("linux") {
++ rustflags.arg("-Clink-args=-Wl,-rpath,@PREFIX@/lib,-L@PREFIX@/lib");
++ }
++
+ Cargo {
+ command: cargo,
+ compiler,
@@ -2513,7 +2518,7 @@ impl Cargo {
Some(format!("-Wl,-rpath,@loader_path/../{libdir}"))
} else if !target.is_windows() && !target.contains("aix") && !target.contains("xous") {
diff --git a/rust179/platform.mk b/rust179/platform.mk
index 9d9c5145ca..c6a01214d8 100644
--- a/rust179/platform.mk
+++ b/rust179/platform.mk
@@ -1,4 +1,4 @@
-# $NetBSD: platform.mk,v 1.26 2024/07/31 12:21:23 he Exp $
+# $NetBSD: platform.mk,v 1.27 2024/08/01 15:24:39 tnn Exp $
# This file encodes whether a given platform has support for rust.
@@ -16,7 +16,7 @@ RUST_PLATFORMS+= ${rust_os}-*-${rust_arch}
. endfor
.endfor
-.if ${OPSYS} == "NetBSD" && (${MACHINE_ARCH} == "earmv7hf")
+.if ${MACHINE_PLATFORM:MNetBSD-*-earm*} && ${OPSYS_VERSION} < 100000
RUST_DIR?= ../../lang/rust176
.endif
RUST_DIR?= ../../lang/rust
Home |
Main Index |
Thread Index |
Old Index