Re: porting gcc

Jeff Sturm <>
17 Sep 2000 22:56:17 -0400

          From comp.compilers

Related articles
porting gcc (2000-09-15)
Re: porting gcc (Jeff Sturm) (2000-09-17)
Re: porting gcc (Michael A. Sewell) (2000-09-17)
Re: porting gcc (2000-09-17)
Re: porting gcc (2000-09-28)
Re: porting gcc (Tom Payne) (2000-10-08)
| List of all articles for this month |

From: Jeff Sturm <>
Newsgroups: comp.compilers
Date: 17 Sep 2000 22:56:17 -0400
Organization: @Home Network
References: 00-09-104
Keywords: GCC

Juergen Fischer wrote:
> is RTL able to generate code to any C-able machine ?

RTL is suitable for mainstream architectures. It makes some assumptions
that can cause trouble with standard C, such as interchangable
pointer/int arithmetic. Mostly that affects some mostly obsolete
hardware and a few DSP's.

> I hope I will be presented int n=*p++; in some abstract
> "pointer-plusplus"-token/struct, not in a "risc"
> MOVB R0,[R1]; ADD R1,4 ? able to cover C-able machines such as for
> example char* being different adresspattern than int* ?
> I guess what I am trying to ask is whether the backend programmer got
> full abstract C type information.

My understanding is that little type information is preserved in RTL.
Some of the GCC contributors no doubt would like to change that.

I'm not aware of any previous efforts to target a high-level language
with a GCC target description.

> - actually I want g++. assuming a g++ port, is the result any use for
> porting gcc? are they "RTL-compatible" ?

Err... why not? Both gcc and g++ generate RTL from syntax trees, and
they share the same backend.

> - I'd like latest stable/widely used but not experimental version. are
> various (minor?) versions "RTL compatible" ?

Why is that important? The RTL is never exposed outside the compiler.

> - I need win32 executable gcc to start with.

Get the mingw ports at

> actually my first step problem is to download the right set of
> source/executable packages to start with. and the "how to port gcc"
> manual I heard about but searchengines don't find...

This and many other links are available from the main GCC site:

> please advice URLs. leanest size packages if possible (does it contain
> machinedescriptionfiles for all cpus? an example, say 68000, maybe
> would be helpful).

The latest compiler release is gcc-2.95.2. The source distribution
contains all working target descriptions, and several obsolete ones as

You can build without f77, chill or java frontends, but be prepared, the
source distribution is quite extensive.

If you have more detailed questions you should probably ask on


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.