Skip to content

Commit d5d7b3b

Browse files
committed
Merge branch 'master' into really-really-to-snap
2 parents 0218418 + 9975ad0 commit d5d7b3b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/rustc/back/link.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,11 @@ fn link_binary(sess: session,
637637
// and binutils 2.22+ won't add them automatically
638638
if sess.targ_cfg.os == session::os_linux {
639639
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"];
640645
}
641646

642647
if sess.targ_cfg.os == session::os_freebsd {

0 commit comments

Comments
 (0)