From 6fc015f03ec5144bba9d76017ab46966acbd5677 Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Thu, 12 Jul 2018 08:55:40 +0100 Subject: [PATCH 1/2] Fix netbsd build with "stdbuild" --- src/unix/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 7c5f4e6b4b7d5..5e1b8ee4675c2 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", From 3d763ae4aa3a1f9d0c61f94f915528736b262436 Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Thu, 12 Jul 2018 17:47:31 +0100 Subject: [PATCH 2/2] Disable test for --no-default-features on rumprun --- ci/run.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ci/run.sh b/ci/run.sh index ff74899cbb830..ffcd042186812 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -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