-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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. rust-lang/rust#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.
- Loading branch information
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...178/patches/patch-compiler_rustc__target_src_spec_targets_aarch64__be__unknown__netbsd.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() | ||
}, | ||
} |
24 changes: 24 additions & 0 deletions
24
rust178/patches/patch-compiler_rustc__target_src_spec_targets_aarch64__unknown__netbsd.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() | ||
}, | ||
} |