From 6c048723f83fad6c96c2e19d6dfa1db547371c11 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 21 Apr 2015 15:56:55 -0700 Subject: std: Prepare for linking to musl This commit modifies the standard library and its dependencies to link correctly when built against MUSL. This primarily ensures that the right libraries are linked against and when they're linked against they're linked against statically. --- src/libstd/rt/libunwind.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/libstd/rt') diff --git a/src/libstd/rt/libunwind.rs b/src/libstd/rt/libunwind.rs index 4b754bd5f58..8f75ae5ef5c 100644 --- a/src/libstd/rt/libunwind.rs +++ b/src/libstd/rt/libunwind.rs @@ -97,10 +97,15 @@ pub type _Unwind_Exception_Cleanup_Fn = extern "C" fn(unwind_code: _Unwind_Reason_Code, exception: *mut _Unwind_Exception); -#[cfg(any(target_os = "linux", target_os = "freebsd"))] +#[cfg(any(all(target_os = "linux", not(target_env = "musl")), + target_os = "freebsd"))] #[link(name = "gcc_s")] extern {} +#[cfg(all(target_os = "linux", target_env = "musl", not(test)))] +#[link(name = "unwind", kind = "static")] +extern {} + #[cfg(any(target_os = "android", target_os = "openbsd"))] #[link(name = "gcc")] extern {} -- cgit 1.4.1-3-g733a5