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: making gcc relocatable->fixed


On Monday 26 June 2006 14:09, NZG wrote:
> On Monday 26 June 2006 12:48 pm, Mike Frysinger wrote:
> > On Monday 26 June 2006 09:09, NZG wrote:
> > > > no, you moved the wrong libs
> > >
> > > You mean when I built it shared I did? Why is this?
> > > The target libs move with the toolchain because their sysrooted into
> > > the exec_path.
> > > Shouldn't the shared libs for the host move with the toolchain just
> > > because their in the prefix?
> > > Is there a way I can fix this from the configure path?
> >
> > you're confusing the libs
> >
> > the shared libs that are part of binutils are used by the host to
> > generate code for the target, they are not for use by the target at
> > runtime
>
> Although I did not understand that at the inception of this project, I have
> for some time. Is there something about my procedure that appears to be
> confusing them?

i mean you are confusing the purpose of the binutils shared libs, i havent 
looked at any of the code you've posted

> > > > binutils' shared libs are in host format, not target format ... so
> > > > they need to be in either the RPATH or in ld.so.conf path or
> > > > $LD_LIBRARY_PATH
> > >
> > > I need to be able to move the toolchain around and avoid a root
> > > install, so a static path in a root permission folder(or anywhere else
> > > for that matter) is not acceptable.
> >
> > ok ?  i just told you how to make it work ... make sure ld.so can find
> > them at runtime and it doesnt matter where they are
>
> But wouldn't this involve changing ld.so (or it's configuration file or
> something) every time you move the toolchain?

unless you got fancy with RPATH's and $ORIGIN, then yes, you would probably 
have to change the ld.so.conf file so it could locate the shared libs at 
runtime

this is why crosstool does not build shared libs with binutils ;)

> That's precisely what I'm trying to avoid.
> I want a toolchain that I can just move anywhere, without reinstalling
> anything or modifying anything other than the cross prefix in a Makefile:

fine, that's a fair goal ... what i was addressing was the incorrect idea you 
proposed earlier that building shared libs with binutils breaks 
relocateability

sure, it wont work if you dont setup your system properly ;)

> > shared libs are pretty well tested ... we've always used them in Gentoo
> > and i have yet to see a bug that was caused by shared libs
>
> It's not just shared libs, it's shared libs in conjunction with a
> relocatable toolchain which builds everything under it's prefix.
> Does Gentoo do this? Can you move the toolchain without reconfiguring it?

this isnt a goal of the Gentoo cross-toolchains ... we install the 
cross-compiler toolchains like every other toolchain: in target and version 
specific paths
-mike

Attachment: pgp00000.pgp
Description: PGP signature


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