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: Robert A Nesius <rnesius at ichips dot intel dot com>
- To: "Andrea 'Fyre Wyzard' Bocci" <fwyzard at inwind dot it>
- Cc: 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 11:23:38 -0800 (PST)
- Subject: Re: Build native compiler using cross compiler??
On Fri, 28 Dec 2001, 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.
I would then use the compiler built by the cross-compiler to compile
a new compiler on the native system.
That is:
1) Build your cross compiler.
2) Use the cross compiler to build a native compiler.
3) Use the native compiler on its hardware to build a native compiler.
The compilers should from steps 2 and 3 should be identical.
If 2 can't build 3, then 2 is broken. It's a good way to make sure
your cross compiler is working correctly, and generating code that
actually runs.
Most people probably wouldn't go that far, but in my mind you're skating
on ice if you don't.
Hope that helps.
-Rob
>
> 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.
>
> HTH, fwyzard
>
--
#include <sig.h>
------------------------------------------------------------------
Robert Nesius rnesius@ichips.intel.com 503.712.2181
DPG Engineering Computing SW Applications Team