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 b54c76c commit 9975ad0Copy full SHA for 9975ad0
src/rustc/back/link.rs
@@ -636,7 +636,12 @@ fn link_binary(sess: session,
636
// On linux librt and libdl are an indirect dependencies via rustrt,
637
// and binutils 2.22+ won't add them automatically
638
if sess.targ_cfg.os == session::os_linux {
639
- cc_args += ["-lrt", "-ldl", "-lm"];
+ cc_args += ["-lrt", "-ldl"];
640
+
641
+ // LLVM implements the `frem` instruction as a call to `fmod`,
642
+ // which lives in libm. Similar to above, on some linuxes we
643
+ // have to be explicit about linking to it. See #2510
644
+ cc_args += ["-lm"];
645
}
646
647
if sess.targ_cfg.os == session::os_freebsd {
0 commit comments