-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux-musl: Add patch to fix build error on hexagon
rust-lang/rust#121666 caused regression on hexagon linux-musl: ``` ld.lld: error: undefined symbol: pthread_getname_np ```
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
docker/test-base/patches/std+hexagon-unknown-linux-musl.diff
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 @@ | ||
diff --git a/src/sys/pal/unix/thread.rs b/src/sys/pal/unix/thread.rs | ||
index 2af6382..acf3ecb 100644 | ||
--- a/src/sys/pal/unix/thread.rs | ||
+++ b/src/sys/pal/unix/thread.rs | ||
@@ -225,7 +225,9 @@ pub fn set_name(_name: &CStr) { | ||
// Newlib, Emscripten, and VxWorks have no way to set a thread name. | ||
} | ||
|
||
- #[cfg(target_os = "linux")] | ||
+ // Qualcomm fork of musl doesn't have pthread_getname_np. | ||
+ // https://github.com/quic/musl/blob/7243e0d3a9d7e0f08d21fc194a05749e0bb26725/include/pthread.h | ||
+ #[cfg(all(target_os = "linux", not(target_arch = "hexagon")))] | ||
pub fn get_name() -> Option<CString> { | ||
const TASK_COMM_LEN: usize = 16; | ||
let mut name = vec![0u8; TASK_COMM_LEN]; | ||
@@ -253,7 +255,7 @@ pub fn get_name() -> Option<CString> { | ||
} | ||
|
||
#[cfg(not(any( | ||
- target_os = "linux", | ||
+ all(target_os = "linux", not(target_arch = "hexagon")), | ||
target_os = "macos", | ||
target_os = "ios", | ||
target_os = "tvos", |