[distcc] -MD and -o behaviour (again)

Thomas Walker Thomas.Walker at morganstanley.com
Mon Jan 13 15:12:01 GMT 2003


Yes, I have noticed that -MF seems to fix my problem with gcc3.2 but I am,
unofrtunately, trying to get this working in an environment that is unlikely
to see 2.96 disappear anytime in the near future.  At the moment, the only
solution I've found is the afore mentioned two passes method (one w/ distcc
for the compile, one without for the dependency generation).  Would you be
ammenable to a patch that would allow disabling of -o stripping via command
line switch or environment variable to support this kind of behaviour?  Are
there any other side-effects of this that I'm not seeing that you can think
of?  I think you'll find that as distcc comes into favor with more
environments (both corporate and non-corporate) that have huge version
dependency issues that little things like this will still be an issue... I
haven't had a chance for a close look at the source but I imagine this would
be trivial (I have too much on my plate at the moment but this is something
that I may be able to revisit shortly).
Has anyone else found another workaround?



Martin Pool wrote:

> On 10 Jan 2003, Thomas Walker <Thomas.Walker at morganstanley.com> wrote:
> > I'm curious as to whether there is any alternative workaround currently
> > being looked at for the way distcc handles -MD and -o.  I understand the
> > problems that have cropped up as a result of gcc3.x deciding to change
> > the -MD behaviour slightly.
> > Distcc appears to workaround the issue by stripping all -o options
> > and adding a -E before passsing the command to the preprocessor.
> -MD is only one reason why I chose that tradeoff.  Another is that
> some C compilers don't use -o to set the preprocessor output when used
> with -E.
> > This has the unfortunate side effect of not allowing you to create
> > .d and .o on a single pass and dump both of them to something other
> > than the cwd.
> It is quite possible to do that, if you know you'll be using gcc 3.x.
> Just specify -MF to set the file to write the dependencies too.  You
> can put this in the Makefile and it will work with distcc or plain gcc.
> > if I run:
> > $ distcc gcc -c hello.c -MD -o ../build/hello.o
> So presumably you want
>  distcc gcc -c hello.c -MD -o ../build/hello.o -MF ../build/hello.d
> --
> Martin
> If you continue running Windows, your system may become unstable.
>         -- Windows 95 error message

This communication is intended for the addressee(s) and may contain
confidential and legally privileged information.  We do not waive
confidentiality or privilege by mistransmission.  If you have received this
communication in error, any use, dissemination, printing or copying is
strictly prohibited; please destroy all electronic and paper copies and notify
the sender immediately.

More information about the distcc mailing list