about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-01-31 12:27:06 +0000
committerbors <bors@rust-lang.org>2016-01-31 12:27:06 +0000
commit9041b930585806b948b4cc68933047ffdc96f6f9 (patch)
tree219818781d18938dc835b04889daf7f002fe5a38 /src/libstd
parent9a07087bc5533f4dc7318ea15d9fb4822c0ba67b (diff)
parent27127dbc238a5c2abffa53517fd67d1165765d3f (diff)
downloadrust-9041b930585806b948b4cc68933047ffdc96f6f9.tar.gz
rust-9041b930585806b948b4cc68933047ffdc96f6f9.zip
Auto merge of #31298 - japaric:mips-musl, r=alexcrichton
This target covers MIPS devices that run the trunk version of OpenWRT.

The x86_64-unknown-linux-musl target always links statically to C libraries. For
the mips(el)-unknown-linux-musl target, we opt for dynamic linking (like most of
other targets do) to keep binary size down.

As for the C compiler flags used in the build system, we use the same flags used
for the mips(el)-unknown-linux-gnu target.

r? @alexcrichton
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/os/linux/raw.rs9
-rw-r--r--src/libstd/sys/common/libunwind.rs5
2 files changed, 12 insertions, 2 deletions
diff --git a/src/libstd/os/linux/raw.rs b/src/libstd/os/linux/raw.rs
index 953d0917141..286823552c2 100644
--- a/src/libstd/os/linux/raw.rs
+++ b/src/libstd/os/linux/raw.rs
@@ -93,11 +93,20 @@ mod arch {
     use os::raw::{c_long, c_ulong};
     use os::unix::raw::{gid_t, uid_t};
 
+    #[cfg(target_env = "musl")]
+    #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i64;
+    #[cfg(not(target_env = "musl"))]
     #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i32;
     #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = i32;
+    #[cfg(target_env = "musl")]
+    #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64;
+    #[cfg(not(target_env = "musl"))]
     #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u32;
     #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u32;
+    #[cfg(target_env = "musl")]
     #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i32;
+    #[cfg(not(target_env = "musl"))]
+    #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64;
     #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i32;
 
     #[repr(C)]
diff --git a/src/libstd/sys/common/libunwind.rs b/src/libstd/sys/common/libunwind.rs
index 77d1eed9623..179a27a2ec8 100644
--- a/src/libstd/sys/common/libunwind.rs
+++ b/src/libstd/sys/common/libunwind.rs
@@ -101,9 +101,10 @@ pub type _Unwind_Exception_Cleanup_Fn =
                       exception: *mut _Unwind_Exception);
 
 #[cfg_attr(any(all(target_os = "linux", not(target_env = "musl")),
-               target_os = "freebsd"),
+               target_os = "freebsd",
+               all(target_os = "linux", target_env = "musl", not(target_arch = "x86_64"))),
            link(name = "gcc_s"))]
-#[cfg_attr(all(target_os = "linux", target_env = "musl", not(test)),
+#[cfg_attr(all(target_os = "linux", target_env = "musl", target_arch = "x86_64", not(test)),
            link(name = "unwind", kind = "static"))]
 #[cfg_attr(any(target_os = "android", target_os = "openbsd"),
            link(name = "gcc"))]