This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is cc1 backend or frontend?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]