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: more pedantry: what is the purpose of ${PREFIX}/${TARGET}?


On Wed, 2005-09-28 at 07:16 -0700, Dan Kegel wrote:
> Robert P. J. Day wrote:
> >   working my way thru the crosstool code, i'm trying to understand the
> > layout of a build's "results" directory.  using my example again, i
> > get a results directory with the structure:
> > 
> >   results/
> >     gcc-4.0.1-glibc-2.3.5/		TOOLCOMBO
> >       sh3-unknown-linux-gnu/		TARGET
> >         ... the actual toolchain and intermediate stuff here ...
> > 
> > with the variable
> > 
> >   PREFIX=<results dir>/${TOOLCOMBO}/${TARGET}
> > 
> > fair enough thus far but it's not clear why there's yet *another*
> > subdirectory there with the name:
> > 
> >   ${PREFIX}/${TARGET}
> > 
> > which means the directory "sh3-unknown-linux-gnu" has a subdirectory
> > with the same name, which would seem kind of redundant.
> 
> I wasn't quite sure multiple installations of gcc for
> different targets could really coexist in the same PREFIX,
With recent GCC's, they can. Former versions repeatedly had (different)
problems with it.

> so I use a different PREFIX for each.
> Once we verify this works, we can set PREFIX to simply
> <results dir>/${TOOLCOMBO}
An even more agressive approach is possible with GCC, binutils and gdb
(I am not using crosstools and don't build linux targets, so I don't
know about glibc):

configure --prefix=/usr --enable-version-specific-runtime-libs \
--target=<target> <more>
works.

I have ca. 10 different cross compilers (linux to RTEMS, freebsd,
cygwin, ...) installed in parallel having been configured this way.

> I'm pretty sure there are a couple of loose ends that
> keep this from working as intended for all versions of
> gcc.
Yes, ... the newer the GCC is the better it works. GCC >= 4.0.0 is
pretty clean. GCC-3.x version have some minor problems and gcc-2.x,
well ... it's dead ...


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]