Skip to content

Commit 5964896

Browse files
committed
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
2 parents ab63550 + 6fc015f commit 5964896

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/unix/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,11 @@ cfg_if! {
306306
} else if #[cfg(target_os = "emscripten")] {
307307
#[link(name = "c")]
308308
extern {}
309-
} else if #[cfg(all(target_os = "netbsd"))] {
309+
} else if #[cfg(all(target_os = "netbsd",
310+
feature = "stdbuild", target_vendor = "rumprun"))] {
310311
// Since we don't use -nodefaultlibs on Rumprun, libc is always pulled
311312
// in automatically by the linker. We avoid passing it explicitly, as it
312313
// causes some versions of binutils to crash with an assertion failure.
313-
#[cfg_attr(feature = "stdbuild", cfg(target_vendor = "rumprun"))]
314314
#[link(name = "m")]
315315
extern {}
316316
} else if #[cfg(any(target_os = "macos",

0 commit comments

Comments
 (0)