Skip to content

Commit e503710

Browse files
committed
rustc: Fix link error on Ubuntu Oneiric. Issue #903
1 parent 6e65456 commit e503710

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/comp/back/link.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ fn link_binary(sess: session::session,
524524
// The invocations of gcc share some flags across platforms
525525

526526
let gcc_args =
527-
[stage, "-Lrt", "-lrustrt", "-m32", "-o", saved_out_filename,
527+
[stage, "-m32", "-o", saved_out_filename,
528528
saved_out_filename + ".o"];
529529
let lib_cmd;
530530

@@ -581,8 +581,10 @@ fn link_binary(sess: session::session,
581581
// FIXME: why do we hardcode -lm?
582582
gcc_args += ["-lm", main];
583583
}
584-
// We run 'gcc' here
585584

585+
gcc_args += ["-Lrt", "-lrustrt"];
586+
587+
// We run 'gcc' here
586588
let err_code = run::run_program(prog, gcc_args);
587589
if 0 != err_code {
588590
sess.err(#fmt["linking with gcc failed with code %d", err_code]);

0 commit comments

Comments
 (0)