Re: how to use the gcc front end

Michael Meissner <>
4 Oct 2003 14:39:13 -0400

          From comp.compilers

Related articles
how to use the gcc front end (Vali) (2003-09-27)
Re: how to use the gcc front end (Thomas David Rivers) (2003-10-04)
Re: how to use the gcc front end (Michael Meissner) (2003-10-04)
Re: how to use the gcc front end (2003-10-04)
| List of all articles for this month |

From: Michael Meissner <>
Newsgroups: comp.compilers
Date: 4 Oct 2003 14:39:13 -0400
Organization: Compilers Central
References: 03-09-100
Keywords: GCC
Posted-Date: 04 Oct 2003 14:39:12 EDT

"Vali" <> writes:

> Does anyone know a project (source available ?) that uses gcc as a
> front end ? If not, is there any documentation about how to replace
> the gcc back end ?

I guess I'm not clear what you are asking. If by replace the backend,
you mean write the machine description so that the existing front ends
will produce code that targets a new machine? If so, there is
documentation in the gcc manual that comes with the source. The time
it takes for a basic port depends on the complexity of the machine,
what kind of ABI you are targeting, the skill level of the person or
people doing the port, and whether you have to do other tasks like
create the assembler and linker. For most machines, I tend to use the
estimate of 3 months for just the compiler portion of the work to get
a port where you can start testing and then optimizing for.

If by replace the backend of GCC you mean rip out the RTL and use a
completely different compiler, that is a different kettle of fish. It
depends on how well you can map RTL (or trees going earlier) into the
intermediate language used by the other compiler. Note, on a legal
level, you do have to make sure you follow the GPL and whatever the
other compiler's license is.

Michael Meissner

Post a followup to this message

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