crosstool: how to link with compiled glibc
Fri Dec 2 00:57:00 GMT 2005
I just want to deploy the newly compiled libraries to my target root
filesystem, but I don't know where to copy them from or how they
should be organized in /lib, /usr/lib, etc.
On 12/1/05, Dan Kegel <firstname.lastname@example.org> wrote:
> On 12/1/05, Mark Jessee <email@example.com> wrote:
> > > > 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.
> > >
> > > You misunderstand what ldd does.
> > > It shows you what libraries would be loaded if you tried
> > > to run the apps right now on the current system.
> > Thanks for the reply. Can you how to force it to use the newly
> > compiled libraries?
> You can't. Don't use ldd for this.
> If you want to see what libraries a binary wants, use readelf.
> > Where would I copy the libraries from in the
> > crosstool directory? There seems to be some in
> > /build/i386-unknown-linux-gnu/gcc-3.4.3-glibc-2.3.4/build-glibc/. I
> > don't suppose there is an 'install' command anywhere to put them into
> > the correctly /lib structure?
> You don't need to copy them anywhere. Readelf should do
> the trick without having to see the libraries. Or are you
> looking for transitive closure? Montavista used to ship
> a cross-ldd that did what you want. I can't recall how it
> was implemented.
> - Dan
> Why can't Johnny run Linux? See http://kegel.com/linux/comfort
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to firstname.lastname@example.org
More information about the crossgcc