Skip to content

Commit 539c9fe

Browse files
committed
---
yaml --- r: 5825 b: refs/heads/master c: 007422c h: refs/heads/master i: 5823: 3a433aa v: v3
1 parent 7f4e3e1 commit 539c9fe

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: b42e551285541a1634b0e5fd731109f74a4f9ef7
2+
refs/heads/master: 007422cc04226730234f352925a028f651fcd23a

trunk/src/comp/back/link.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -582,15 +582,16 @@ fn link_binary(sess: session::session,
582582
gcc_args += ["-lm", main];
583583
}
584584

585-
// 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-
}
590585

591586
// Always want the runtime linked in
592587
gcc_args += ["-lrustrt"];
593588

589+
// On linux librt and libdl are an indirect dependencies via rustrt,
590+
// and binutils 2.22+ won't add them automatically
591+
if sess.get_targ_cfg().os == session::os_linux {
592+
gcc_args += ["-lrt", "-ldl"];
593+
}
594+
594595
gcc_args += rpath::get_rpath_flags(sess, saved_out_filename);
595596

596597
log #fmt("gcc link args: %s", str::connect(gcc_args, " "));

0 commit comments

Comments
 (0)