[distcc] -MD and -o behaviour (again)
Martin Pool
mbp at sourcefrog.net
Fri Jan 10 22:04:40 GMT 2003
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
More information about the distcc
mailing list