This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Is cc1 backend or frontend?
- From: Bernd Jendrissek <berndj at prism dot co dot za>
- To: Albert Wang <alrrr at sina dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 6 May 2003 15:12:17 +0200
- Subject: Re: Is cc1 backend or frontend?
- References: <000701c31394$e3d831f0$63526fa6@wangwei>
On Tue, May 06, 2003 at 02:01:05PM +0800, Albert Wang wrote:
> Some book said that front end is machine independent,
> and back end is language independent.
Sounds about right.
> Since cc1 is the C compiler, and cc1plus is the C++ compiler,
> cc1 is more like a front end than a back end.
No - cc1 contains the front end *and* the backend. They're all linked into
one executable.
I've seen mention of libbackend.a; maybe that's the backend proper, but I
don't know.
> But what about gcc? And what's the front end for Objective-C?
> I'm really confused. Thanks for all.
The executable named "gcc" is just a driver program that selects the
"real" compiler to use and feeds it, the assembler and the linker options
according to the specs file that it uses. You can change almost any of
these components with suitable options to gcc, but for some of these you
may meet with only limited success. (Read: incompatibilities wrt flags.)
C cc1
C++ cc1plus
ObjC cc1obj
fortran f771
java jc1