Skip to content

Commit cf9274b

Browse files
committed
Auto merge of #32407 - alexcrichton:netbsd-gcc-s-link, r=aturon
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!
2 parents 64a13a4 + f34c0e6 commit cf9274b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libstd/build.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ fn main() {
5050

5151
if target.contains("rumprun") {
5252
println!("cargo:rustc-link-lib=unwind");
53-
} else if target.contains("netbsd") || target.contains("openbsd") {
53+
} else if target.contains("netbsd") {
54+
println!("cargo:rustc-link-lib=gcc_s");
55+
} else if target.contains("openbsd") {
5456
println!("cargo:rustc-link-lib=gcc");
5557
} else if target.contains("bitrig") {
5658
println!("cargo:rustc-link-lib=c++abi");

0 commit comments

Comments
 (0)