rustc: Fix link error on Ubuntu Oneiric. Issue #903
This commit is contained in:
parent
6e654564db
commit
e50371060b
1 changed files with 4 additions and 2 deletions
|
@ -524,7 +524,7 @@ fn link_binary(sess: session::session,
|
||||||
// The invocations of gcc share some flags across platforms
|
// The invocations of gcc share some flags across platforms
|
||||||
|
|
||||||
let gcc_args =
|
let gcc_args =
|
||||||
[stage, "-Lrt", "-lrustrt", "-m32", "-o", saved_out_filename,
|
[stage, "-m32", "-o", saved_out_filename,
|
||||||
saved_out_filename + ".o"];
|
saved_out_filename + ".o"];
|
||||||
let lib_cmd;
|
let lib_cmd;
|
||||||
|
|
||||||
|
@ -581,8 +581,10 @@ fn link_binary(sess: session::session,
|
||||||
// FIXME: why do we hardcode -lm?
|
// FIXME: why do we hardcode -lm?
|
||||||
gcc_args += ["-lm", main];
|
gcc_args += ["-lm", main];
|
||||||
}
|
}
|
||||||
// We run 'gcc' here
|
|
||||||
|
|
||||||
|
gcc_args += ["-Lrt", "-lrustrt"];
|
||||||
|
|
||||||
|
// We run 'gcc' here
|
||||||
let err_code = run::run_program(prog, gcc_args);
|
let err_code = run::run_program(prog, gcc_args);
|
||||||
if 0 != err_code {
|
if 0 != err_code {
|
||||||
sess.err(#fmt["linking with gcc failed with code %d", err_code]);
|
sess.err(#fmt["linking with gcc failed with code %d", err_code]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue