diff options
author | bors <bors@rust-lang.org> | 2018-07-12 16:49:51 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2018-07-12 16:49:51 +0000 |
commit | bfe0e32d1260d5dd317aa144e757c1edbcc08ea3 (patch) | |
tree | 0aaffacd223f7b8346486b67ee548ec1a26e66db | |
parent | ab6355021e98b958ca2c28801a791eb55183919b (diff) | |
parent | 3d763ae4aa3a1f9d0c61f94f915528736b262436 (diff) | |
download | rust-libc-bfe0e32d1260d5dd317aa144e757c1edbcc08ea3.tar.gz |
Auto merge of #1038 - Amanieu:fix_netbsd, r=alexcrichton
Fix netbsd build with "stdbuild"
A bug was introduced in #930 which caused netbsd to not link to libm.
r? @alexcrichton
-rwxr-xr-x | ci/run.sh | 6 | ||||
-rw-r--r-- | src/unix/mod.rs | 4 |
2 files changed, 7 insertions, 3 deletions
@@ -86,5 +86,9 @@ if [ "$TARGET" = "x86_64-unknown-linux-gnux32" ]; then opt="--release" fi -cargo test $opt --no-default-features --manifest-path libc-test/Cargo.toml --target $TARGET +# Building with --no-default-features is currently broken on rumprun because we +# need cfg(target_vendor), which is currently unstable. +if [ "$TARGET" != "x86_64-rumprun-netbsd" ]; then + cargo test $opt --no-default-features --manifest-path libc-test/Cargo.toml --target $TARGET +fi exec cargo test $opt --manifest-path libc-test/Cargo.toml --target $TARGET diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 7c5f4e6b4b..5e1b8ee467 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -306,11 +306,11 @@ cfg_if! { } else if #[cfg(target_os = "emscripten")] { #[link(name = "c")] extern {} - } else if #[cfg(all(target_os = "netbsd"))] { + } else if #[cfg(all(target_os = "netbsd", + feature = "stdbuild", target_vendor = "rumprun"))] { // Since we don't use -nodefaultlibs on Rumprun, libc is always pulled // in automatically by the linker. We avoid passing it explicitly, as it // causes some versions of binutils to crash with an assertion failure. - #[cfg_attr(feature = "stdbuild", cfg(target_vendor = "rumprun"))] #[link(name = "m")] extern {} } else if #[cfg(any(target_os = "macos", |