[distcc] distcc won't output assembly to stdout; ccache loses also

Alexandre Oliva aoliva at redhat.com
Thu Sep 26 09:08:01 GMT 2002

I've finally been able to find out why my distcc-accelerated builds of
glibc sometimes failed, and why they created a file named `-' in
stdio-common in the source tree.  It was distcc's fault.

glibc's Makefile asks gcc to compile a C program to assembly in the
standard output (gcc -S foo.c -o -), but when distcc runs such a
compilation remotely, it ends up storing the output sent back by the
remote compiler in a file named ./-, instead of to the stdout.

Unfortunately, it's not easy to tell when the compiler output is
supposed to go to stdout and when it should go to a file.  Instead of
trying to second-guess the compiler, I think it's reasonable and safe
enough to simply defer compilations that output to `-' for the
compiler to decide, which I've implemented in the patch below.

ccache turns things a bit more confusing: with `-S -o -', we get
assembly code in the standard output, but `-S -c -o -' and `-c -S -o
-' will link a cached file to `-', even though gcc itself would have
generated assembly to stdout.  Looks like a ccache bug to me, but I'm
not sure whether to change ccache like I did to distcc, or to adjust
its heuristics so as to match that of gcc (at the risk of making it
incompatible with some other compiler).  After inspecting the ccache
sources for a few seconds, I don't see immediately where to make any
of these changes, so I'll wait for comments before doing anything.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: distcc-0.11-local-stdout.patch
Type: text/x-patch
Size: 569 bytes
Desc: not available
Url : http://lists.samba.org/archive/distcc/attachments/20020926/e6351dd1/distcc-0.11-local-stdout.bin
-------------- next part --------------

Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

More information about the distcc mailing list