pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
rust175: make this build again with an external LLVM.
Module Name: pkgsrc-wip
Committed By: Havard Eidnes <he%NetBSD.org@localhost>
Pushed By: he
Date: Sat Jan 13 20:59:34 2024 +0000
Changeset: 5ee31a79dd3049b6abe453639ebfade45f62d6ad
Modified Files:
rust175/Makefile
rust175/distinfo
rust175/patches/patch-compiler_rustc__target_src_spec_base_netbsd.rs
Added Files:
rust175/patches/patch-compiler_rustc__target_src_spec_mod.rs
rust175/patches/patch-compiler_rustc__target_src_spec_target_mips64el__unknown__netbsd.rs
rust175/patches/patch-src_bootstrap_src_core_builder.rs
Removed Files:
rust175/patches/patch-compiler_rustc__target_src_spec_i586__unknown__netbsd.rs
rust175/patches/patch-compiler_rustc__target_src_spec_mips64el__unknown__netbsd.rs
rust175/patches/patch-compiler_rustc__target_src_spec_mipsel__unknown__netbsd.rs
Log Message:
rust175: make this build again with an external LLVM.
* The builder.rs file had moved, and I had overlooked converting
that patch, which sets linker arg to set rpath to @PREFIX@/{libdir}.
Several minor adjustments get along for the ride:
* Rename the SUBST_CLASS from "rpath" to "prefix", since it's
replacing @PREFIX@, even though this is most often for rpath.
* Try to also set lib/libatomic as run-path (for libatomic-links
users, primarily 32-bit targets)
* Remove patches for targets which are upstreamed (i586, mipsel)
(but which now live in a different directory).
* Re-add the mips64el-unknown-netbsd target.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=5ee31a79dd3049b6abe453639ebfade45f62d6ad
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
rust175/Makefile | 15 ++++++-----
rust175/distinfo | 20 +++++++-------
...-compiler_rustc__target_src_spec_base_netbsd.rs | 13 +++++----
...rustc__target_src_spec_i586__unknown__netbsd.rs | 31 ----------------------
...c__target_src_spec_mips64el__unknown__netbsd.rs | 29 --------------------
...stc__target_src_spec_mipsel__unknown__netbsd.rs | 30 ---------------------
.../patch-compiler_rustc__target_src_spec_mod.rs | 14 ++++++++++
...et_src_spec_target_mips64el__unknown__netbsd.rs | 29 ++++++++++++++++++++
.../patch-src_bootstrap_src_core_builder.rs | 15 +++++++++++
9 files changed, 84 insertions(+), 112 deletions(-)
diffs:
diff --git a/rust175/Makefile b/rust175/Makefile
index 83bd694335..d0bb19daac 100644
--- a/rust175/Makefile
+++ b/rust175/Makefile
@@ -411,13 +411,14 @@ TOOLS_PATH.md5sum= ${PREFIX}/bin/gmd5sum
TOOLS_PLATFORM.gzcat= ${PREFIX}/bin/gzip -cd
.endif
-SUBST_CLASSES+= rpath
-SUBST_STAGE.rpath= pre-configure
-SUBST_FILES.rpath+= compiler/rustc_codegen_ssa/src/back/linker.rs
-SUBST_FILES.rpath+= compiler/rustc_target/src/spec/base/netbsd.rs
-SUBST_FILES.rpath+= src/bootstrap/src/core/build_steps/compile.rs
-SUBST_FILES.rpath+= src/bootstrap/bootstrap.py
-SUBST_VARS.rpath= PREFIX
+SUBST_CLASSES+= prefix
+SUBST_STAGE.prefix= pre-configure
+SUBST_FILES.prefix+= compiler/rustc_codegen_ssa/src/back/linker.rs
+SUBST_FILES.prefix+= compiler/rustc_target/src/spec/base/netbsd.rs
+SUBST_FILES.prefix+= src/bootstrap/src/core/build_steps/compile.rs
+SUBST_FILES.prefix+= src/bootstrap/src/core/builder.rs
+SUBST_FILES.prefix+= src/bootstrap/bootstrap.py
+SUBST_VARS.prefix= PREFIX
#
# Generate list of subst entries for various .cargo-checksum.json files. These
diff --git a/rust175/distinfo b/rust175/distinfo
index a82c9b559d..9e5efca97d 100644
--- a/rust175/distinfo
+++ b/rust175/distinfo
@@ -54,9 +54,9 @@ Size (rust-1.74.1-x86_64-unknown-freebsd.tar.gz) = 314334589 bytes
BLAKE2s (rust-1.74.1-x86_64-unknown-linux-gnu.tar.gz) = 3cf48f8beed816899addd2d15493083f48d1b289803e8c3c73f1a186e71c8e03
SHA512 (rust-1.74.1-x86_64-unknown-linux-gnu.tar.gz) = 918dc9bd838cc115ff9f5cc7458ed6fa264607d3be37e033f0a8ec9f05b2403e0f013bc77bf7df9b3e1b7cf437ce148aef32c9aeb24de9e7a487b15f78b2630a
Size (rust-1.74.1-x86_64-unknown-linux-gnu.tar.gz) = 325345126 bytes
-BLAKE2s (rust-1.74.1-x86_64-unknown-netbsd.tar.xz) = f9179a7fcf4449ba6aed225272cd6c8694c4bbc92c7d32c3bb0a268063580ca8
-SHA512 (rust-1.74.1-x86_64-unknown-netbsd.tar.xz) = 85864be16d48dce5dc8b3ad8ee0a226902435032141e5f725a69753c5c3fe980de3b9c22fd594acfcfa64ef1083ab6c3bd530c9b8ebbb8f301db1230e216ed88
-Size (rust-1.74.1-x86_64-unknown-netbsd.tar.xz) = 153085208 bytes
+BLAKE2s (rust-1.74.1-x86_64-unknown-netbsd.tar.xz) = bff23c6ebe65adcb9440c5ae980f2e937d386d2a3d892715b8efcfe28d6b05bd
+SHA512 (rust-1.74.1-x86_64-unknown-netbsd.tar.xz) = e33ff006f4cba5f613bf964d40c3b1c64657caac4b9ec9f6fcf2c3872b16b529b431940b85ab4687ff9c1eb7cbd82fba850e7dd39265b240ad88065cd2597f3b
+Size (rust-1.74.1-x86_64-unknown-netbsd.tar.xz) = 163817800 bytes
BLAKE2s (rust-std-1.74.1-aarch64-apple-darwin.tar.gz) = 0408a38a765ff39c1b4d0c95eb82cf3c435ffed2786de401b94e335fc84e6533
SHA512 (rust-std-1.74.1-aarch64-apple-darwin.tar.gz) = 43d969f21cfc9656ac5dd8ab082ea0190f61556d369b0b14e8492e3a81958fb2e29675080bec310da6340dfdfc7eac1df5f634a5978b36a998da2865ff9f57b3
Size (rust-std-1.74.1-aarch64-apple-darwin.tar.gz) = 40110241 bytes
@@ -108,18 +108,17 @@ Size (rust-std-1.74.1-x86_64-unknown-freebsd.tar.gz) = 43726025 bytes
BLAKE2s (rust-std-1.74.1-x86_64-unknown-linux-gnu.tar.gz) = 693cbd61d9cb455a61b1e35dda8752d763272421c12e3f7806cfdc557bb03a76
SHA512 (rust-std-1.74.1-x86_64-unknown-linux-gnu.tar.gz) = bfed8575c0c010f19536c08179d9ecdbbef77af93dde72c1b8d5f6acd9a7b45f247e3aa3e83c8a0b0ee8ee5817ff15c2775e23a0d6247d8f79a7ede76b3e2d20
Size (rust-std-1.74.1-x86_64-unknown-linux-gnu.tar.gz) = 45514745 bytes
-BLAKE2s (rust-std-1.74.1-x86_64-unknown-netbsd.tar.xz) = f3452e9f0ddacc651106d82b82f29a57461e47e2dc9295f015f5fc8dff7c5167
-SHA512 (rust-std-1.74.1-x86_64-unknown-netbsd.tar.xz) = b55e98fa873f57f3063f72bb51dd0b8ade30d30974de7593a5b22e04e16e473b2c9c67993cd880c2fd9cc890193c840fe16798dd225f29c26a6ca84e8155b49d
-Size (rust-std-1.74.1-x86_64-unknown-netbsd.tar.xz) = 22812280 bytes
+BLAKE2s (rust-std-1.74.1-x86_64-unknown-netbsd.tar.xz) = a1407b022f18a778182b1de3e63fe9a53796dc1aa11cb961692dad646b5298d5
+SHA512 (rust-std-1.74.1-x86_64-unknown-netbsd.tar.xz) = be1946da6aef29c56743445e03e6ee402cd1e23959a24068c3aba1187778f6de18e8e0cc9f357abc05589c56a9dc5f5fc1c4148c49b4fcbb7ba5eb73ed0ba684
+Size (rust-std-1.74.1-x86_64-unknown-netbsd.tar.xz) = 22817820 bytes
BLAKE2s (rustc-1.75.0-src.tar.gz) = ce73634181497293f543514b5e22b059b9f7b4d102766db8beaa76fd9baf7db4
SHA512 (rustc-1.75.0-src.tar.gz) = c0fbc7349082bdda5693664f86e2814e3a15272dd1b5028859e9d0d864b4375fae94b7039e14567d25bc9c3c4d8187734a163a2522b75cb1f267f7b9e57c3385
Size (rustc-1.75.0-src.tar.gz) = 285857065 bytes
SHA1 (patch-compiler_rustc__codegen__ssa_src_back_linker.rs) = 62819cf6db7d2e3e77d433fe883046c28fc20d91
SHA1 (patch-compiler_rustc__llvm_build.rs) = a4a66d449fc9eb99d648d02a041778a68f4f7ce8
-SHA1 (patch-compiler_rustc__target_src_spec_base_netbsd.rs) = 1451b4550e742ba5756abd07e850d238b0ae9596
-SHA1 (patch-compiler_rustc__target_src_spec_i586__unknown__netbsd.rs) = 0e36dd304c6ac91b3b6692c908ebd94501533d99
-SHA1 (patch-compiler_rustc__target_src_spec_mips64el__unknown__netbsd.rs) = a0fb5338d0020d3ee1266d1ed1361e7bf2eea611
-SHA1 (patch-compiler_rustc__target_src_spec_mipsel__unknown__netbsd.rs) = fc78fc681f170be9e3b6e3c823a6bd62da742cbd
+SHA1 (patch-compiler_rustc__target_src_spec_base_netbsd.rs) = 7fb6ec6d45a9bf4525c675390117e9e61b8023cd
+SHA1 (patch-compiler_rustc__target_src_spec_mod.rs) = a22b5d28997ed9a5565deec9c34322165d563d00
+SHA1 (patch-compiler_rustc__target_src_spec_target_mips64el__unknown__netbsd.rs) = d38c3b43656917e60312a842e6a0c37776bbd5d0
SHA1 (patch-library_backtrace_src_symbolize_gimli.rs) = 1ab343595e65ff6348f83cffc30e53d764485ff8
SHA1 (patch-library_backtrace_src_symbolize_gimli_elf.rs) = 3b84a462c6bc8245d579452e4c37e3ce13314952
SHA1 (patch-library_std_src_sys_unix_mod.rs) = f8669d680f169137ac2891af2977909619366a97
@@ -128,6 +127,7 @@ SHA1 (patch-library_std_src_sys_unix_thread__parking_netbsd.rs) = c29eb1cf074766
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_llvm.rs) = aba4c50ffd0a037096ea34a5e9660f8b435d997f
+SHA1 (patch-src_bootstrap_src_core_builder.rs) = 557721367140fe1078ce9948296f1a747fab56f0
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/rust175/patches/patch-compiler_rustc__target_src_spec_base_netbsd.rs b/rust175/patches/patch-compiler_rustc__target_src_spec_base_netbsd.rs
index 55bcabe65c..a57da2a270 100644
--- a/rust175/patches/patch-compiler_rustc__target_src_spec_base_netbsd.rs
+++ b/rust175/patches/patch-compiler_rustc__target_src_spec_base_netbsd.rs
@@ -5,17 +5,20 @@ search the directory containing the symlinks to -latomic.
--- compiler/rustc_target/src/spec/base/netbsd.rs.orig 2024-01-06 19:57:14.887897867 +0000
+++ compiler/rustc_target/src/spec/base/netbsd.rs
-@@ -1,12 +1,20 @@
+@@ -1,12 +1,23 @@
-use crate::spec::{cvs, RelroLevel, TargetOptions};
+use crate::spec::{cvs, Cc, Lld, RelroLevel, LinkerFlavor, TargetOptions};
pub fn opts() -> TargetOptions {
++ let add_linker_paths =
++ &[
++ // For the benefit of powerpc, when libatomic-links is installed,
++ "-Wl,-R@PREFIX@/lib/libatomic",
++ "-Wl,-L@PREFIX@/lib/libatomic",
++ ];
+ let pre_link_args = TargetOptions::link_args(
+ LinkerFlavor::Gnu(Cc::Yes, Lld::No),
-+ &[
-+ // For the benefit of powerpc, when libatomic-links is installed,
-+ "-Wl,-L@PREFIX@/lib/libatomic".into(),
-+ ],
++ add_linker_paths
+ );
TargetOptions {
os: "netbsd".into(),
diff --git a/rust175/patches/patch-compiler_rustc__target_src_spec_i586__unknown__netbsd.rs b/rust175/patches/patch-compiler_rustc__target_src_spec_i586__unknown__netbsd.rs
deleted file mode 100644
index ace65d984d..0000000000
--- a/rust175/patches/patch-compiler_rustc__target_src_spec_i586__unknown__netbsd.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
-Add an i586 / pentium variant, in an effort to support AMD Geode etc.
-
---- compiler/rustc_target/src/spec/i586_unknown_netbsd.rs.orig 2022-12-21 19:11:11.452711494 +0000
-+++ compiler/rustc_target/src/spec/i586_unknown_netbsd.rs
-@@ -0,0 +1,24 @@
-+// use crate::spec::{Cc, Lld, LinkerFlavor, StackProbeType, Target, TargetOptions};
-+use crate::spec::{StackProbeType, Target, TargetOptions};
-+
-+pub fn target() -> Target {
-+ let mut base = super::netbsd_base::opts();
-+ base.cpu = "pentium".into();
-+ base.max_atomic_width = Some(64);
-+// base.pre_link_args
-+// .entry(LinkerFlavor::Gnu(Cc::Yes, Lld::No))
-+// .or_default()
-+// .push("-m32".into());
-+ // don't use probe-stack=inline-asm until rust-lang/rust#83139 is resolved.
-+ base.stack_probes = StackProbeType::Call;
-+
-+ Target {
-+ llvm_target: "i586-unknown-netbsdelf".into(),
-+ pointer_width: 32,
-+ data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
-+ f64:32:64-f80:32-n8:16:32-S128"
-+ .into(),
-+ arch: "x86".into(),
-+ options: TargetOptions { mcount: "__mcount".into(), ..base },
-+ }
-+}
diff --git a/rust175/patches/patch-compiler_rustc__target_src_spec_mips64el__unknown__netbsd.rs b/rust175/patches/patch-compiler_rustc__target_src_spec_mips64el__unknown__netbsd.rs
deleted file mode 100644
index aea9becd9b..0000000000
--- a/rust175/patches/patch-compiler_rustc__target_src_spec_mips64el__unknown__netbsd.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-$NetBSD$
-
-Provide a mips64el target with N32, suitable for NetBSD/mips64el.
-
---- compiler/rustc_target/src/spec/mips64el_unknown_netbsd.rs.orig 2022-12-29 22:55:00.640217876 +0000
-+++ compiler/rustc_target/src/spec/mips64el_unknown_netbsd.rs
-@@ -0,0 +1,22 @@
-+use crate::abi::Endian;
-+use crate::spec::{Target, TargetOptions};
-+
-+pub fn target() -> Target {
-+ let mut base = super::netbsd_base::opts();
-+ base.max_atomic_width = Some(32);
-+ base.cpu = "mips32".into();
-+
-+ Target {
-+ llvm_target: "mipsel-unknown-netbsd".into(),
-+ pointer_width: 32,
-+ data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(),
-+ arch: "mips".into(),
-+ options: TargetOptions {
-+ abi: "n32".into(),
-+ features: "+soft-float,+abi=n32".into(),
-+ endian: Endian::Little,
-+ mcount: "__mcount".into(),
-+ ..base
-+ },
-+ }
-+}
diff --git a/rust175/patches/patch-compiler_rustc__target_src_spec_mipsel__unknown__netbsd.rs b/rust175/patches/patch-compiler_rustc__target_src_spec_mipsel__unknown__netbsd.rs
deleted file mode 100644
index cdee1caa6f..0000000000
--- a/rust175/patches/patch-compiler_rustc__target_src_spec_mipsel__unknown__netbsd.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-$NetBSD$
-
-Add target spec for NetBSD/mipsel.
-This one uses mips32 (mips1 llvm fails), so this one is not universally
-usable on NetBSD's supported 32-bit MIPS processors.
-
---- compiler/rustc_target/src/spec/mipsel_unknown_netbsd.rs.orig 2022-11-06 18:16:59.750850353 +0000
-+++ compiler/rustc_target/src/spec/mipsel_unknown_netbsd.rs 2022-11-06 18:14:10.846209169 +0000
-@@ -0,0 +1,21 @@
-+use crate::abi::Endian;
-+use crate::spec::{Target, TargetOptions};
-+
-+pub fn target() -> Target {
-+ let mut base = super::netbsd_base::opts();
-+ base.max_atomic_width = Some(32);
-+ base.cpu = "mips32".into();
-+
-+ Target {
-+ llvm_target: "mipsel-unknown-netbsd".into(),
-+ pointer_width: 32,
-+ data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(),
-+ arch: "mips".into(),
-+ options: TargetOptions {
-+ features: "+soft-float".into(),
-+ mcount: "__mcount".into(),
-+ endian: Endian::Little,
-+ ..base
-+ },
-+ }
-+}
diff --git a/rust175/patches/patch-compiler_rustc__target_src_spec_mod.rs b/rust175/patches/patch-compiler_rustc__target_src_spec_mod.rs
new file mode 100644
index 0000000000..324f6c804d
--- /dev/null
+++ b/rust175/patches/patch-compiler_rustc__target_src_spec_mod.rs
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Add entry for NetBSD/mips64el.
+
+--- compiler/rustc_target/src/spec/mod.rs.orig 2024-01-13 14:20:59.236278792 +0000
++++ compiler/rustc_target/src/spec/mod.rs
+@@ -1532,6 +1532,7 @@ supported_targets! {
+ ("armv7-unknown-netbsd-eabihf", armv7_unknown_netbsd_eabihf),
+ ("i586-unknown-netbsd", i586_unknown_netbsd),
+ ("i686-unknown-netbsd", i686_unknown_netbsd),
++ ("mips64el-unknown-netbsd", mips64el_unknown_netbsd),
+ ("mipsel-unknown-netbsd", mipsel_unknown_netbsd),
+ ("powerpc-unknown-netbsd", powerpc_unknown_netbsd),
+ ("riscv64gc-unknown-netbsd", riscv64gc_unknown_netbsd),
diff --git a/rust175/patches/patch-compiler_rustc__target_src_spec_target_mips64el__unknown__netbsd.rs b/rust175/patches/patch-compiler_rustc__target_src_spec_target_mips64el__unknown__netbsd.rs
new file mode 100644
index 0000000000..710cf5ffdd
--- /dev/null
+++ b/rust175/patches/patch-compiler_rustc__target_src_spec_target_mips64el__unknown__netbsd.rs
@@ -0,0 +1,29 @@
+$NetBSD$
+
+Provide a mips64el target with N32, suitable for NetBSD/mips64el.
+
+--- compiler/rustc_target/src/spec/targets/mips64el_unknown_netbsd.rs.orig 2024-01-13 14:16:30.122042614 +0000
++++ compiler/rustc_target/src/spec/targets/mips64el_unknown_netbsd.rs
+@@ -0,0 +1,22 @@
++use crate::abi::Endian;
++use crate::spec::{base, Target, TargetOptions};
++
++pub fn target() -> Target {
++ let mut base = base::netbsd::opts();
++ base.max_atomic_width = Some(32);
++ base.cpu = "mips32".into();
++
++ Target {
++ llvm_target: "mipsel-unknown-netbsd".into(),
++ pointer_width: 32,
++ data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(),
++ arch: "mips".into(),
++ options: TargetOptions {
++ abi: "n32".into(),
++ features: "+soft-float,+abi=n32".into(),
++ endian: Endian::Little,
++ mcount: "__mcount".into(),
++ ..base
++ },
++ }
++}
diff --git a/rust175/patches/patch-src_bootstrap_src_core_builder.rs b/rust175/patches/patch-src_bootstrap_src_core_builder.rs
new file mode 100644
index 0000000000..a62092418f
--- /dev/null
+++ b/rust175/patches/patch-src_bootstrap_src_core_builder.rs
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Use @PREFIX@, not $ORIGIN in rpath.
+
+--- src/bootstrap/src/core/builder.rs.orig 2024-01-13 20:06:50.748741545 +0000
++++ src/bootstrap/src/core/builder.rs
+@@ -1678,7 +1678,7 @@ impl<'a> Builder<'a> {
+ && !target.contains("xous")
+ {
+ rustflags.arg("-Clink-args=-Wl,-z,origin");
+- Some(format!("-Wl,-rpath,$ORIGIN/../{libdir}"))
++ Some(format!("-Wl,-rpath,@PREFIX@/{libdir}"))
+ } else {
+ None
+ };
Home |
Main Index |
Thread Index |
Old Index