This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [cs branch] how to start compile server?
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Ian Lance Taylor <ian at airs dot com>
- Cc: Andrew Pinski <pinskia at physics dot uc dot edu>, Per Bothner <per at bothner dot com>, GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Wed, 27 Aug 2003 22:43:23 -0400
- Subject: Re: [cs branch] how to start compile server?
On Wednesday, Aug 27, 2003, at 20:23 US/Eastern, Ian Lance Taylor wrote:
Per Bothner <per@bothner.com> writes:
We haven't documented how to start the compile server, partly
because we're trying figure out the right way to do it!
I don't know much about the project, so my apologies when I repeat
thoughts that people have already had.
Actually you are the first person (outside Apple) I really comment on
the compile server except to praise it but I think you misunderstood
this
project and what the term server refers to in this case.
The general notion of running a server is a well-understood one and
there is a lot of existing code to do it. Recreating the code in gcc
itself seems mildly pointless. Projects like tcpserver, xinetd, and
tcpwrapper exist to handle being a server.
{x,}inetd starts programs when connections open, which is what already
happens now for the driver gcc.
Similarly, on the client side, I don't see any particular reason to
use gcc at all. Instead, define a simple protocol--you've already
done this--and write separate programs to generate that protocol. For
example, instead of `gcc -server', just use `gcc-server'. That
separate program can then grow to take whatever options will be needed
to locate the server--using a URI naturally suggests itself.
Note that gcc is just a driver which starts programs much like what
{x,}inet
does. So calling gcc -server tells the driver to go into client mode
for the
compiler server and use the server (without -server tells to use the
normal mode
and launch {cc1{,plus,objc},jc1,f771,ada?,f951}, the real "front-end").
This is much
like what telnet or ssh does. Right now there is no such thing as a
remote GCC server,
it is all local compiling. distc is what I think you are trying to
describe which does
compiling on other machines.
The compile server is going to be used to speed up things by caching
more stuff like headers
and also no need to start up a new front-end every time you want to
compile your program in
the debug-compile cycle, making things faster.
In general, though, I think it's desirable to keep the networking code
out of gcc proper, and I think it can be done without loss of
efficiency.
There is no networking code in GCC at all still.
The compile server is more like the talk server which uses UNIX fifo's.
Thanks,
Andrew Pinski