We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a433aa commit 7f4e3e1Copy full SHA for 7f4e3e1
[refs]
@@ -1,2 +1,2 @@
1
---
2
-refs/heads/master: ad5014bf4c81fdfd6c382d2f2df1e9f824787dde
+refs/heads/master: b42e551285541a1634b0e5fd731109f74a4f9ef7
trunk/src/comp/back/link.rs
@@ -582,7 +582,14 @@ fn link_binary(sess: session::session,
582
gcc_args += ["-lm", main];
583
}
584
585
- gcc_args += ["-lrustrt", "-lrt"];
+ // On linux librt is an indirect dependency via rustrt,
586
+ // and binutils 2.22+ won't add it automatically
587
+ if sess.get_targ_cfg().os == session::os_linux {
588
+ gcc_args += ["-lrt"];
589
+ }
590
+
591
+ // Always want the runtime linked in
592
+ gcc_args += ["-lrustrt"];
593
594
gcc_args += rpath::get_rpath_flags(sess, saved_out_filename);
595
0 commit comments