Haitao Li
ad5014bf4c
Fix link error by explicitly link needed DSOs
Building Rust(version 280bc56) on Ubuntu 11.10 failed with link error, like: compile_and_link: stage0/lib/rustc/i686-unknown-linux-gnu/lib/libstd.so compile_and_link: stage0/lib/rustc/i686-unknown-linux-gnu/bin/rustc /local/src/rust/build/stage0/lib/rustc/i686-unknown-linux-gnu/lib/librustrt.so: undefined reference to `clock_gettime' collect2: ld returned 1 exit status error: linking with gcc failed with code 1 GCC toolchain released by Ubuntu 11.10 introduced a few compiler flags that are different with upstream GCC[1]. Flags "-Wl,--as-needed' and '-Wl,--no-copy-dt-needed-entries' are passed by default. Function clock_gettime from librt is used by librustrt, indirectly by rustc. It is necessary to explicitly pass the "-lrt" flags when building rustc. Please note since the toolchain changes will be the default in the next release(2.22) of binutils, this is not actually a Debian/Ubuntu specific issue. 1. https://wiki.ubuntu.com/OneiricOcelot/ReleaseNotes#GCC_4.6_Toolchain Signed-off-by: Haitao Li <lihaitao@gmail.com>
This is a compiler and suite of associated libraries and documentation for the Rust programming language. See LICENSE.txt for terms of copyright and redistribution. See http://www.rust-lang.org for more information.
Description
Languages
Rust
96.2%
RenderScript
0.7%
JavaScript
0.6%
Shell
0.6%
Fluent
0.4%
Other
1.3%