This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How do does the compiler driver and compiler driver work together?
- From: Rupert Wood <rup at kanat dot pair dot com>
- To: Guy Montag <theguymontag at yahoo dot com>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Tue, 3 Sep 2002 04:28:32 -0400 (EDT)
- Subject: Re: How do does the compiler driver and compiler driver work together?
Guy Montag wrote:
> I am trying to understand how the compiler driver and compiler
> proper go together, where and how are they linked?
They're not. They're separate executables.
The compiler proper lives under
<prefix>/lib/gcc-lib/<platform>/<version>
e.g. the C++ compiler proper installed in the default location on a Sun
box might be:
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.2/cc1plus
This path is hardcoded into the compiler driver. Try:
gcc -print-prog-name=cc1plus
to see this. If you compile something and add the '-v' switch, you'll see
the compiler driver invoke the compiler proper and see the complete
command line used. Alternatively, if you start top in a separate
console/xterm while you're compiling something large, you'll see it chew
through process numbers (each gcc invocation will use at least one process
each for gcc, cc1 and as - or cc1plus/cc1obj/jc1/gnat1/f771/tree1/etc.
depending on the language used) and see the backend compiler processes
take up most of the time.
I don't have access to the source to point you at anything specific right
now, sorry.
Hope that helps,
Rup.