Fix link error by explicitly link needed DSOs
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 <1546787094a174f65e7b6f11359a040df0a1bd97@gmail.com>

fabricedesre/rust,zubron/rust,jbclements/rust,zachwick/rust,mdinger/rust,sarojaba/rust-doc-korean,XMPPwocky/rust,dwillmer/rust,fabricedesre/rust,rprichard/rust,bombless/rust,erickt/rust,andars/rust,aepsil0n/rust,GBGamer/rust,pczarn/rust,sae-bom/rust,jbclements/rust,defuz/rust,shepmaster/rand,gifnksm/rust,dwillmer/rust,sarojaba/rust-doc-korean,Ryman/rust,P1start/rust,zubron/rust,TheNeikos/rust,rohitjoshi/rust,zubron/rust,hauleth/rust,aturon/rust,mvdnes/rust,mdinger/rust,mvdnes/rust,ruud-v-a/rust,avdi/rust,mitsuhiko/rust,richo/rust,victorvde/rust,defuz/rust,LeoTestard/rust,avdi/rust,emk/rust,SiegeLord/rust,aepsil0n/rust,kwantam/rust,AerialX/rust-rt-minimal,miniupnp/rust,TheNeikos/rust,KokaKiwi/rust,servo/rust,kimroen/rust,XMPPwocky/rust,mitsuhiko/rust,bluss/rand,mdinger/rust,graydon/rust,jashank/rust,rprichard/rust,P1start/rust,pczarn/rust,erickt/rust,GBGamer/rust,quornian/rust,omasanori/rust,P1start/rust,pelmers/rust,mdinger/rust,AerialX/rust,Ryman/rust,ktossell/rust,seanrivera/rust,cllns/rust,omasanori/rust,GBGamer/rust,pythonesque/rust,mvdnes/rust,KokaKiwi/rust,jbclements/rust,mitsuhiko/rust,cllns/rust,ktossell/rust,michaelballantyne/rust-gpu,graydon/rust,dinfuehr/rust,krzysz00/rust,ejjeong/rust,zubron/rust,pelmers/rust,mahkoh/rust,mihneadb/rust,zachwick/rust,miniupnp/rust,fabricedesre/rust,aturon/rust,bombless/rust-docs-chinese,emk/rust,defuz/rust,robertg/rust,stepancheg/rust-ide-rust,0x73/rust,j16r/rust,rohitjoshi/rust,SiegeLord/rust,reem/rust,ejjeong/rust,dwillmer/rust,rprichard/rust,graydon/rust,rohitjoshi/rust,miniupnp/rust,kwantam/rust,kimroen/rust,l0kod/rust,j16r/rust,reem/rust,mihneadb/rust,mihneadb/rust,servo/rust,carols10cents/rust,ruud-v-a/rust,ebfull/rust,ruud-v-a/rust,servo/rust,jbclements/rust,zachwick/rust,carols10cents/rust,dwillmer/rust,sae-bom/rust,nwin/rust,LeoTestard/rust,XMPPwocky/rust,mitsuhiko/rust,sae-bom/rust,bombless/rust,KokaKiwi/rust,nwin/rust,miniupnp/rust,robertg/rust,GBGamer/rust,nham/rust,gifnksm/rust,sarojaba/rust-doc-korean,victorvde/rust,pelmers/rust,erickt/rust,TheNeikos/rust,philyoon/rust,defuz/rust,zubron/rust,j16r/rust,zaeleus/rust,nwin/rust,mihneadb/rust,mdinger/rust,ruud-v-a/rust,mahkoh/rust,sarojaba/rust-doc-korean,nwin/rust,seanrivera/rust,achanda/rand,vhbit/rust,mvdnes/rust,LeoTestard/rust,j16r/rust,l0kod/rust,ejjeong/rust,defuz/rust,l0kod/rust,reem/rust,P1start/rust,vhbit/rust,j16r/rust,AerialX/rust-rt-minimal,hauleth/rust,aturon/rust,michaelballantyne/rust-gpu,emk/rust,servo/rust,nham/rust,andars/rust,stepancheg/rust-ide-rust,untitaker/rust,pshc/rust,philyoon/rust,dinfuehr/rust,SiegeLord/rust,0x73/rust,andars/rust,fabricedesre/rust,aturon/rust,aepsil0n/rust,graydon/rust,avdi/rust,dinfuehr/rust,gifnksm/rust,XMPPwocky/rust,dinfuehr/rust,emk/rust,gifnksm/rust,0x73/rust,mahkoh/rust,nwin/rust,servo/rust,carols10cents/rust,kwantam/rust,vhbit/rust,stepancheg/rust-ide-rust,kwantam/rust,nham/rust,bombless/rust,kimroen/rust,nwin/rust,robertg/rust,kmcallister/rust,jashank/rust,rohitjoshi/rust,aturon/rust,rprichard/rust,erickt/rust,jashank/rust,jroesch/rust,miniupnp/rust,aidancully/rust,mvdnes/rust,dwillmer/rust,TheNeikos/rust,krzysz00/rust,sae-bom/rust,richo/rust,zaeleus/rust,pshc/rust,jashank/rust,pshc/rust,pczarn/rust,servo/rust,erickt/rust,KokaKiwi/rust,reem/rust,LeoTestard/rust,P1start/rust,XMPPwocky/rust,jroesch/rust,victorvde/rust,mitsuhiko/rust,carols10cents/rust,dwillmer/rust,ktossell/rust,pshc/rust,vhbit/rust,robertg/rust,jbclements/rust,GBGamer/rust,krzysz00/rust,AerialX/rust,AerialX/rust,aturon/rust,P1start/rust,kmcallister/rust,nwin/rust,victorvde/rust,sarojaba/rust-doc-korean,andars/rust,kimroen/rust,ejjeong/rust,barosl/rust,robertg/rust,kimroen/rust,michaelballantyne/rust-gpu,richo/rust,richo/rust,sarojaba/rust-doc-korean,jashank/rust,AerialX/rust,ktossell/rust,pshc/rust,hauleth/rust,barosl/rust,stepancheg/rust-ide-rust,sae-bom/rust,jbclements/rust,cllns/rust,nham/rust,avdi/rust,SiegeLord/rust,AerialX/rust-rt-minimal,servo/rust,dinfuehr/rust,ebfull/rust,mitsuhiko/rust,barosl/rust,zubron/rust,pczarn/rust,barosl/rust,jashank/rust,ejjeong/rust,victorvde/rust,aturon/rust,emk/rust,kmcallister/rust,jroesch/rust,pczarn/rust,omasanori/rust,michaelballantyne/rust-gpu,vhbit/rust,l0kod/rust,jbclements/rust,jroesch/rust,avdi/rust,kmcallister/rust,P1start/rust,bombless/rust,aidancully/rust,miniupnp/rust,AerialX/rust,graydon/rust,aepsil0n/rust,GBGamer/rust,jashank/rust,quornian/rust,zaeleus/rust,krzysz00/rust,pczarn/rust,Ryman/rust,sarojaba/rust-doc-korean,philyoon/rust,robertg/rust,GBGamer/rust,KokaKiwi/rust,zubron/rust,untitaker/rust,pshc/rust,mahkoh/rust,dwillmer/rust,nham/rust,philyoon/rust,richo/rust,kwantam/rust,rprichard/rust,mihneadb/rust,ruud-v-a/rust,rprichard/rust,reem/rust,avdi/rust,vhbit/rust,kmcallister/rust,ebfull/rust,aneeshusa/rust,kmcallister/rust,l0kod/rust,michaelballantyne/rust-gpu,zachwick/rust,aneeshusa/rust,untitaker/rust,0x73/rust,aidancully/rust,pythonesque/rust,rohitjoshi/rust,aidancully/rust,aneeshusa/rust,TheNeikos/rust,barosl/rust,seanrivera/rust,defuz/rust,emk/rust,fabricedesre/rust,Ryman/rust,nham/rust,pythonesque/rust,AerialX/rust-rt-minimal,mvdnes/rust,mihneadb/rust,andars/rust,Ryman/rust,mitsuhiko/rust,zachwick/rust,cllns/rust,jashank/rust,erickt/rust,pythonesque/rust,seanrivera/rust,ebfull/rust,untitaker/rust,quornian/rust,SiegeLord/rust,barosl/rust,l0kod/rust,huonw/rand,TheNeikos/rust,jroesch/rust,kmcallister/rust,pelmers/rust,Ryman/rust,ktossell/rust,zaeleus/rust,SiegeLord/rust,zaeleus/rust,waynenilsen/rand,philyoon/rust,aneeshusa/rust,ktossell/rust,aidancully/rust,aepsil0n/rust,pythonesque/rust,miniupnp/rust,bhickey/rand,l0kod/rust,mahkoh/rust,LeoTestard/rust,stepancheg/rust-ide-rust,jroesch/rust,hauleth/rust,LeoTestard/rust,stepancheg/rust-ide-rust,SiegeLord/rust,jbclements/rust,pythonesque/rust,graydon/rust,arthurprs/rand,barosl/rust,AerialX/rust-rt-minimal,zaeleus/rust,zachwick/rust,jroesch/rust,untitaker/rust,pythonesque/rust,quornian/rust,michaelballantyne/rust-gpu,pelmers/rust,gifnksm/rust,AerialX/rust-rt-minimal,dinfuehr/rust,vhbit/rust,pczarn/rust,rohitjoshi/rust,untitaker/rust,quornian/rust,pshc/rust,emk/rust,aneeshusa/rust,ruud-v-a/rust,pelmers/rust,bombless/rust,sae-bom/rust,quornian/rust,omasanori/rust,gifnksm/rust,0x73/rust,krzysz00/rust,j16r/rust,mdinger/rust,reem/rust,aneeshusa/rust,ebfull/rust,fabricedesre/rust,fabricedesre/rust,0x73/rust,ebfull/rust,retep998/rand,miniupnp/rust,andars/rust,carols10cents/rust,0x73/rust,nham/rust,cllns/rust,XMPPwocky/rust,zubron/rust,hauleth/rust,philyoon/rust,carols10cents/rust,victorvde/rust,jroesch/rust,GBGamer/rust,KokaKiwi/rust,aidancully/rust,vhbit/rust,ktossell/rust,krzysz00/rust,omasanori/rust,seanrivera/rust,cllns/rust,kimroen/rust,j16r/rust,aepsil0n/rust,GrahamDennis/rand,omasanori/rust,pshc/rust,richo/rust,AerialX/rust,l0kod/rust,erickt/rust,hauleth/rust,ebfull/rand,quornian/rust,kimroen/rust,jbclements/rust,stepancheg/rust-ide-rust,michaelballantyne/rust-gpu,nwin/rust,ejjeong/rust,kwantam/rust,seanrivera/rust,bombless/rust,dwillmer/rust,Ryman/rust,mahkoh/rust,LeoTestard/rust