[distcc] implicit compiler name (again)
Martin Pool
mbp at samba.org
Thu Dec 12 07:45:01 GMT 2002
On 9 Dec 2002, Dimitri Papadopoulos <papadopo at REMOVE.shfj.DECOY.cea.fr> wrote:
> Sorry to insist on the subject, I know it has been widely discussed:
> http://lists.samba.org/pipermail/distcc/2002q3/000213.html
> However this looks like a good (new) reason to enable implicit compiler
> names in distcc, at least as an option.
>
> What is your opinion?
I agree that it would be a good thing to do. I have postponed a
definitive solution not because I don't want to support this mode, but
rather because I don't want people to count on a scheme that might
later need to be abandoned.
> Please find attached the current version of the wrapper script we are
> using for this purpose.
>
> Note that this script is able to read the list of hosts from an NFS
> distributed file (in our case /usr/local/etc/distccrc) and feed it
> into DISTCC_HOSTS. The code is commented out, but maybe it's useful
> to someone else.
That might well be a good idea, perhaps in addition to DISTCC_HOSTS to
provide a systemwide default. Perhaps
if defined(DISTCC_HOSTS):
use that
elif exists(~/.distcc_hosts):
use that
elif exits(/etc/distcc_hosts):
use that
else:
give warning
compile locally
I have been wondering about using DNS SRV records, which seem to be
the emerging standard way to advertise network services. However, I'm
not sure they can capture all the relevant parameters (compiler
sub-versions, cross-compilers, etc...) Easily updating them probably
requires some kind of dynamic-DNS system, and in any case distcc would
need to know what resource name to look up in the first place.
> #!/bin/sh
The script looks good. In summary, it seems to firstly treat
invocation by the name "distcc" as using the traditional behaviour of
explicitly giving the compiler name.
Otherwise, it looks for the first element in the $PATH that has the
same name as the script, but is not in fact this script.
I wonder if this works better or worse than looking for the first
occurrence in the path that is not a symlink, which is the approach
used by ccache?
--
Martin
More information about the distcc
mailing list