This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Build native compiler using cross compiler??
- From: Andris Pavenis <pavenis at latnet dot lv>
- To: "Andrea 'Fyre Wyzard' Bocci" <fwyzard at inwind dot it>, Aladdin Chang <chang at totoro dot ee dot ntust dot edu dot tw>, <gcc-help at gcc dot gnu dot org>
- Date: Fri, 28 Dec 2001 09:35:54 +0200
- Subject: Re: Build native compiler using cross compiler??
- References: <5.1.0.14.0.20011228032156.0225c060@popmail.inwind.it>
On Friday 28 December 2001 04:27, Andrea 'Fyre Wyzard' Bocci wrote:
> At 14.46 27/12/2001 (GMT +0800), Aladdin Chang wrote:
> >Dear all,
> >
> >Is it possible to build a native compiler for MIPS
> >using a cross compiler like mipsel-linux-gcc ?
> >
> >
> >Aladdin
>
> I think so.
> First build a cross compiler (with the libraries for the target system).
> Then use that to build a compiler for ther target system that'll run on the
> target system.
>
> Acutally, I have no idea how to configure the second compiler.
> Have a look at how canadian cross compiler are built, that might give you a
> hint (http://www.objsw.com/CrossGCC/FAQ-4.html#ss4.9).
> Someone with more experien in cross compiler might help here, also.
Some hacking the script for building canadian cross-compiler may help
(See CrossGCC FAQ for details).
For example I have used such way for building gcc-2.95.X as native compiler
for i586-pc-msdosdjgpp under Linux (that time I used not installed
previously built cross-compiler to be run on build machine:
CC_FOR_HOST="/foo/gcc/xgcc -B /foo/gcc/"
where foo was location of Linux to DJGPP cross-compiler build directory).
Of course things could be slightly simplier when using installed
cross-compiler.
But be sure to edit specs and change cross_compile to 0 later as specs are
dumped by cross-compiler.
Didn't have time to test all this stuff for gcc-3.0.X
Andris