This is the mail archive of the 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: do_spec(), do_spec_x() and execute() in mygcc/gcc/gcc.c

> 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.


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