diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-06-06 12:42:56 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-06-06 12:46:19 -0700 |
| commit | 9975ad073acc408ee1bb4fe776daeeb175aa8816 (patch) | |
| tree | 28d50291fbd663ddfd63e7ebe12fdebf39b95ea8 /src/rustc | |
| parent | b54c76c832930c1eab4e1e944117300eacb12625 (diff) | |
rustc: Add comments about linking to libm
Diffstat (limited to 'src/rustc')
| -rw-r--r-- | src/rustc/back/link.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rustc/back/link.rs b/src/rustc/back/link.rs index 62dc467143e..c3e1b4da772 100644 --- a/src/rustc/back/link.rs +++ b/src/rustc/back/link.rs @@ -636,7 +636,12 @@ fn link_binary(sess: session, // On linux librt and libdl are an indirect dependencies via rustrt, // and binutils 2.22+ won't add them automatically if sess.targ_cfg.os == session::os_linux { - cc_args += ["-lrt", "-ldl", "-lm"]; + cc_args += ["-lrt", "-ldl"]; + + // LLVM implements the `frem` instruction as a call to `fmod`, + // which lives in libm. Similar to above, on some linuxes we + // have to be explicit about linking to it. See #2510 + cc_args += ["-lm"]; } if sess.targ_cfg.os == session::os_freebsd { |
