public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Build native compiler using cross compiler??
       [not found] <Pine.LNX.4.33.0112271444440.28357-100000@totoro.ee.ntust.e du.tw>
@ 2001-12-27 18:27 ` Andrea 'Fyre Wyzard' Bocci
  2001-12-27 23:37   ` Andris Pavenis
  2001-12-28 11:24   ` Robert A Nesius
  0 siblings, 2 replies; 4+ messages in thread
From: Andrea 'Fyre Wyzard' Bocci @ 2001-12-27 18:27 UTC (permalink / raw)
  To: Aladdin Chang, gcc-help

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.

HTH, fwyzard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Build native compiler using cross compiler??
  2001-12-27 18:27 ` Build native compiler using cross compiler?? Andrea 'Fyre Wyzard' Bocci
@ 2001-12-27 23:37   ` Andris Pavenis
  2001-12-28 11:24   ` Robert A Nesius
  1 sibling, 0 replies; 4+ messages in thread
From: Andris Pavenis @ 2001-12-27 23:37 UTC (permalink / raw)
  To: Andrea 'Fyre Wyzard' Bocci, Aladdin Chang, gcc-help

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Build native compiler using cross compiler??
  2001-12-27 18:27 ` Build native compiler using cross compiler?? Andrea 'Fyre Wyzard' Bocci
  2001-12-27 23:37   ` Andris Pavenis
@ 2001-12-28 11:24   ` Robert A Nesius
  1 sibling, 0 replies; 4+ messages in thread
From: Robert A Nesius @ 2001-12-28 11:24 UTC (permalink / raw)
  To: Andrea 'Fyre Wyzard' Bocci; +Cc: Aladdin Chang, gcc-help

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Build native compiler using cross compiler??
@ 2001-12-26 22:48 Aladdin Chang
  0 siblings, 0 replies; 4+ messages in thread
From: Aladdin Chang @ 2001-12-26 22:48 UTC (permalink / raw)
  To: gcc-help

Dear all,

Is it possible to build a native compiler  for MIPS 
using a cross compiler like mipsel-linux-gcc ?


Aladdin

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-12-28 19:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.33.0112271444440.28357-100000@totoro.ee.ntust.e du.tw>
2001-12-27 18:27 ` Build native compiler using cross compiler?? Andrea 'Fyre Wyzard' Bocci
2001-12-27 23:37   ` Andris Pavenis
2001-12-28 11:24   ` Robert A Nesius
2001-12-26 22:48 Aladdin Chang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).