Permalink
Browse files

std: Link to gcc_s on NetBSD

Currently the nightlies we're producing fail when linking some C code into a
Rust application with the error message:

    libgcc_s.so.1: error adding symbols: DSO missing from command line

By linking `gcc_s` instead of `gcc` this error goes away. I haven't tested this
on NetBSD itself, but should help get the Linux cross-compile image moreso up
and working!
  • Loading branch information...
alexcrichton committed Mar 21, 2016
1 parent 7c66a89 commit f34c0e6ebd1f8a03a864b58fb6c6f8ebdffd80d6
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/libstd/build.rs
View
@@ -50,7 +50,9 @@ fn main() {
if target.contains("rumprun") {
println!("cargo:rustc-link-lib=unwind");
} else if target.contains("netbsd") || target.contains("openbsd") {
} else if target.contains("netbsd") {
println!("cargo:rustc-link-lib=gcc_s");
} else if target.contains("openbsd") {
println!("cargo:rustc-link-lib=gcc");
} else if target.contains("bitrig") {
println!("cargo:rustc-link-lib=c++abi");

0 comments on commit f34c0e6

Please sign in to comment.