public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* How do does the compiler driver and compiler driver work together?
@ 2002-09-02 11:37 Guy Montag
  2002-09-03  1:28 ` Rupert Wood
  0 siblings, 1 reply; 2+ messages in thread
From: Guy Montag @ 2002-09-02 11:37 UTC (permalink / raw)
  To: gcc-help

I am trying to understand how the compiler driver and
compiler proper go together, where and how are they
linked?

Looking under the C++ make fragment in the Makefile
(lines 883-1190), I see that the compiler driver (g++)
is built before the compiler proper (cc1plus), but I
do not see how the driver is linked to the compiler
proper. The compiler driver does include the object
file g++spec.o, but I do not see how this would have
any effect.

I would appreciate any insight and links relevant to
the subject.

Thank you world,
-Guy

__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How do does the compiler driver and compiler driver work together?
  2002-09-02 11:37 How do does the compiler driver and compiler driver work together? Guy Montag
@ 2002-09-03  1:28 ` Rupert Wood
  0 siblings, 0 replies; 2+ messages in thread
From: Rupert Wood @ 2002-09-03  1:28 UTC (permalink / raw)
  To: Guy Montag; +Cc: gcc-help

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-03  8:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-02 11:37 How do does the compiler driver and compiler driver work together? Guy Montag
2002-09-03  1:28 ` Rupert Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).