This is the mail archive of the crossgcc@sources.redhat.com 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: --multilib


On Fri, 2003-12-12 at 22:09, Stuart Hughes wrote:
> Dan Kegel wrote:
> > 
> > Stuart Hughes wrote:
> > > I've been looking for a clear explanation regarding using multilib with
> > > binutils/gcc/glibc.  Does anyone have a link or an explanation of how
> > > this works.
> > >
> > > What I'm trying to work out is if it's possible to have something like
> > > an arm toolchain that supports big-endian and little-endian in soft or
> > > hard float mode.
> > 
> > Earlier this year I figured out how to multilib a bit.
> > http://www.kegel.com/xgcc3/gcc-20020715-ppc405erratum77.patch
> > added a way to turn on an extra set of libraries specially
> > compiled for ppc405.  I can't remember how it worked
> > (it's too painful :-) but maybe you can work it out from
> > that patch and from digging in the manual.
> > - Dan
> 
> Thanks, I'll take a look at the patch.  
> 
> I've looked in the manuals (info gcc) and I sort of understand that you
> can get gcc to make multiple versions of its libraries, and then control
> them with flags (e.g -mbig-endian) or with alternate spec files.
> However, what always bothers me is that most toolchains incorporate a C
> library, and as far as I can tell, this is not multi-lib aware and so I
> don't see how you can get the C library to switch.
glibc2 is just one libc implementation. I don't know if its
configuration is multilib aware - Probably not.

Other libc-implementations' configurations are multilib-aware and get
built several times (once for each multilib variant). One of these is
newlib.



>    So for example if
> you build glibc little endian, and then you needed to build a 'hello
> world' big-endian where would the big-endian libc come from ??
If a libc's configuration is not multilib aware, you'd have to manually
build/configure it once per multilib variant (Using appropriate paths
and flags) and install it to the appropriate locations, such that the
multilib-support magic in gcc can find it.

Ralf




------
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]