This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

crosstool: how to link with compiled glibc


Hi, I'm just getting started with crosstool.  I've successfully built
a toolchain using the demo-i386.sh script.  However I need some help
on how to use the glibc libraries that were also build.  When I
compile a simple test program using the new compiler and then run
'ldd', it shows that they are linked against my previously installed
system libraries.  How do I get it to link against the libraries that
were built by crosstool?  I eventually need to move all the necessary
libraries, runtime linker, etc over to a compact flash card to boot a
minimal linux system, but am not sure where to copy the glibc stuff
from?

Below is an output from my compiler test.  Any tips/suggestions are appreciated.

[mark@localhost archive]$
/opt/crosstool/gcc-3.4.3-glibc-2.3.4/i386-unknown-linux-gnu/bin/i386-unknown-linux-gnu-gcc
hello.cpp -lstdc++ -o hello
[mark@localhost archive]$ ./hello
hello world
[mark@localhost archive]$ ldd hello
        linux-gate.so.1 =>  (0xffffe000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7f03000)
        libc.so.6 => /lib/tls/libc.so.6 (0xb7dd8000)
        libm.so.6 => /lib/tls/libm.so.6 (0xb7db5000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7dac000)
        /lib/ld-linux.so.2 (0xb7fec000)
[mark@localhost archive]$

Thanks,
Mark

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]