Skip to content

Commit b54c76c

Browse files
crabtwbrson
authored andcommitted
fix link error
1 parent d64ff98 commit b54c76c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rustc/back/link.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ fn link_binary(sess: session,
636636
// On linux librt and libdl are an indirect dependencies via rustrt,
637637
// and binutils 2.22+ won't add them automatically
638638
if sess.targ_cfg.os == session::os_linux {
639-
cc_args += ["-lrt", "-ldl"];
639+
cc_args += ["-lrt", "-ldl", "-lm"];
640640
}
641641

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

0 commit comments

Comments
 (0)