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]

Re: crosstool: how to link with compiled glibc


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 <dank@kegel.com> wrote:
> On 12/1/05, Mark Jessee <mjessee04@gmail.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.
> http://www.gnu.org/software/binutils/manual/html_chapter/binutils_14.html
>
> > 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 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]