crosstool: how to link with compiled glibc

Mark Jessee
Thu Dec 1 22:09:00 GMT 2005

Hi, I'm just getting started with crosstool.  I've successfully built
a toolchain using the 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

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

[mark@localhost archive]$
hello.cpp -lstdc++ -o hello
[mark@localhost archive]$ ./hello
hello world
[mark@localhost archive]$ ldd hello =>  (0xffffe000) => /usr/lib/ (0xb7f03000) => /lib/tls/ (0xb7dd8000) => /lib/tls/ (0xb7db5000) => /lib/ (0xb7dac000)
        /lib/ (0xb7fec000)
[mark@localhost archive]$


Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list