pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
rust178: turn off thread local storage for NetBSD/aarch64*.
Module Name: pkgsrc-wip
Committed By: Havard Eidnes <he%NetBSD.org@localhost>
Pushed By: he
Date: Tue Jul 30 09:10:19 2024 +0000
Changeset: 375fa826e4a93bc44c6f2a4493b081d06f02516a
Modified Files:
rust178/distinfo
Added Files:
rust178/patches/patch-compiler_rustc__target_src_spec_targets_aarch64__be__unknown__netbsd.rs
rust178/patches/patch-compiler_rustc__target_src_spec_targets_aarch64__unknown__netbsd.rs
Log Message:
rust178: turn off thread local storage for NetBSD/aarch64*.
NetBSD aarch64 has a bug in the thread-local storage implementation,
ref. http://gnats.netbsd.org/58154, and this is responsible for the
build misery experienced earlier, ref.
https://github.com/rust-lang/rust/issues/123551
Therefore: turn it off for now on arm64.
Ideally one could check whether the specific OS version has the fix
or not, but e.g. __NetBSD_Version__ isn't easily available here
that I know, and this goes against the pattern that OS version
should not matter as long as it's >= supported version.
So until the fix for NetBSD PR#58154 has propagated to NetBSD
releases, and the old ones are no longer supported for pkgsrc
(which is going to take a while), this is what we do.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=375fa826e4a93bc44c6f2a4493b081d06f02516a
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
rust178/distinfo | 2 ++
...rc_spec_targets_aarch64__be__unknown__netbsd.rs | 24 ++++++++++++++++++++++
...et_src_spec_targets_aarch64__unknown__netbsd.rs | 24 ++++++++++++++++++++++
3 files changed, 50 insertions(+)
diffs:
diff --git a/rust178/distinfo b/rust178/distinfo
index aa142e3113..7bd98cc547 100644
--- a/rust178/distinfo
+++ b/rust178/distinfo
@@ -112,6 +112,8 @@ SHA1 (patch-compiler_rustc__codegen__ssa_src_back_linker.rs) = 6c8f8bbacc544b63b
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
+SHA1 (patch-compiler_rustc__target_src_spec_targets_aarch64__be__unknown__netbsd.rs) = b0a26945a8640d53eabca16c27c99fc27c8e5623
+SHA1 (patch-compiler_rustc__target_src_spec_targets_aarch64__unknown__netbsd.rs) = bd4f1086033ab21160f1edba1d255ffb4451cbcf
SHA1 (patch-compiler_rustc__target_src_spec_targets_mips64el__unknown__netbsd.rs) = e97b7978cc525db7eadf967d51f4818a3c145754
SHA1 (patch-library_backtrace_src_symbolize_gimli.rs) = 1ab343595e65ff6348f83cffc30e53d764485ff8
SHA1 (patch-library_backtrace_src_symbolize_gimli_elf.rs) = 3b84a462c6bc8245d579452e4c37e3ce13314952
diff --git a/rust178/patches/patch-compiler_rustc__target_src_spec_targets_aarch64__be__unknown__netbsd.rs b/rust178/patches/patch-compiler_rustc__target_src_spec_targets_aarch64__be__unknown__netbsd.rs
new file mode 100644
index 0000000000..fec351d519
--- /dev/null
+++ b/rust178/patches/patch-compiler_rustc__target_src_spec_targets_aarch64__be__unknown__netbsd.rs
@@ -0,0 +1,24 @@
+$NetBSD$
+
+NetBSD aarch64 has a bug in the thread-local storage implementation,
+ref. http://gnats.netbsd.org/58154, and this is responsible for the
+build misery experienced earlier, ref.
+https://github.com/rust-lang/rust/issues/123551
+Turn it off for now on arm64.
+Ideally should check whether the specific OS version has the fix
+or not, but e.g. __NetBSD_Version__ isn't easily available here
+that I know, and this goes against the attitude that OS version
+should matter as long as it's >= supported version.
+So until the fix for NetBSD PR#58154 has propagated to releases,
+this is what we do.
+
+--- compiler/rustc_target/src/spec/targets/aarch64_be_unknown_netbsd.rs.orig 2024-07-23 19:21:34.344805113 +0000
++++ compiler/rustc_target/src/spec/targets/aarch64_be_unknown_netbsd.rs
+@@ -18,6 +18,7 @@ pub fn target() -> Target {
+ max_atomic_width: Some(128),
+ stack_probes: StackProbeType::Inline,
+ endian: Endian::Big,
++ has_thread_local: false, // ref. NetBSD PR#58154
+ ..base::netbsd::opts()
+ },
+ }
diff --git a/rust178/patches/patch-compiler_rustc__target_src_spec_targets_aarch64__unknown__netbsd.rs b/rust178/patches/patch-compiler_rustc__target_src_spec_targets_aarch64__unknown__netbsd.rs
new file mode 100644
index 0000000000..a99b41e446
--- /dev/null
+++ b/rust178/patches/patch-compiler_rustc__target_src_spec_targets_aarch64__unknown__netbsd.rs
@@ -0,0 +1,24 @@
+$NetBSD$
+
+NetBSD aarch64 has a bug in the thread-local storage implementation,
+ref. http://gnats.netbsd.org/58154, and this is responsible for the
+build misery experienced earlier, ref.
+https://github.com/rust-lang/rust/issues/123551
+Turn it off for now on arm64.
+Ideally should check whether the specific OS version has the fix
+or not, but e.g. __NetBSD_Version__ isn't easily available here
+that I know, and this goes against the attitude that OS version
+should matter as long as it's >= supported version.
+So until the fix for NetBSD PR#58154 has propagated to releases,
+this is what we do.
+
+--- compiler/rustc_target/src/spec/targets/aarch64_unknown_netbsd.rs.orig 2024-07-23 19:18:44.116841966 +0000
++++ compiler/rustc_target/src/spec/targets/aarch64_unknown_netbsd.rs
+@@ -17,6 +17,7 @@ pub fn target() -> Target {
+ mcount: "__mcount".into(),
+ max_atomic_width: Some(128),
+ stack_probes: StackProbeType::Inline,
++ has_thread_local: false, // ref. NetBSD PR#58154
+ ..base::netbsd::opts()
+ },
+ }
Home |
Main Index |
Thread Index |
Old Index