linking correct libc

ng@piments.com ng@piments.com
Sun May 24 21:12:00 GMT 2009


Yann E. MORIN wrote:
> On Saturday 23 May 2009 17:40:41 ng@piments.com wrote:
>> trying --sysroot was one of my desperate attempts to get some sense out 
>> of this toolchain. I have now dumped the idea.
> 
> It is *not* needed to pass --sysroot to the compielrs build with
> crosstool-NG.

thanks, I realised that , it was an attempt to verofu what was happening 
by explicitly specifying everything. When it made no difference I 
concluded the built-in sysroot was correctly interpreted and the problem 
lay elsewhere.

> 
>> adding -nostdlib stops it finding the host libc but stops it finding any 
>> libc:
> 
> That's exactly the purpose of -nostdlib: to not use standard libraries.


> 
>> So the two basic issues remain: why does it find /lib/libc.so.6 at all 
>> and why can't it find (or use) the library that exists in the libdir 
>> explicitly included with -L ??
> 
> What does the follwing command says:
> /back/ts/ct-wkg//x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc \
> 
was something missed off after the \   :?

/back/ts/ct-wkg//x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc 

arm-unknown-linux-gnueabi-gcc: no input files


> And what does that one says:
> /back/ts/ct-wkg//x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc \
> -print-file-name=libc.so
> 
 
/back/ts/ct-wkg//x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc 
\ -print-file-name=libc.so
/back/ts/ct-wkg/x-tools/arm-unknown-linux-gnueabi/bin/../arm-unknown-linux-gnueabi//sys-root/usr/lib/libc.so

cat 
/back/ts/ct-wkg/x-tools/arm-unknown-linux-gnueabi/bin/../arm-unknown-linux-gnueabi//sys-root/usr/lib/libc.so
/* GNU ld script
    Use the shared library, but some functions are only in
    the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf32-littlearm)
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( 
/lib/ld-linux.so.3 ) )



OK , so that explains the reference to /lib/libc.so.6 , is that what you 
would expect to see here?

Thanks for your help,
Peter.

> Regards,
> Yann E. MORIN.
> 


--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list