This is the mail archive of the
mailing list for the GCC project.
Re: do_spec(), do_spec_x() and execute() in mygcc/gcc/gcc.c
- From: Ben Elliston <bje at au1 dot ibm dot com>
- To: sean yang <seanatpurdue at hotmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 27 Mar 2006 10:56:51 +1100
- Subject: Re: do_spec(), do_spec_x() and execute() in mygcc/gcc/gcc.c
- References: <BAY105-F5320DF320D236A1AB6105C0DD0@phx.gbl>
> Can someone give a brief intro of what do_spec(), do_spec_x() and
> execute() do, so that I can follow the procedure?
The comments seem generally adequate, but that could just be me :-)
For do_spec ():
/* Process the spec SPEC and run the commands specified therein.
Returns 0 if the spec is successfully processed; -1 if failed. */
The "spec" string directs the compiler driver. Its syntax is
documented in the GCC documentation. do_spec_x are helpers to
> A seperate but sort of related question is: After looking at
> Makefile, I think toplev_main () in toplev.c (which is wrapped in
> main() in main.c)is compiled to cc1(i.e, $BACKEND), is it correct?
> But why can't I find cc1 in the mygcc/bin directory after make and
> make install?
That's because cc1 is invoked by the driver and as such, cc1 is not
meant to be invoked by users. Only user-visible executables are meant
to be installed into the bin directory.