[distcc] using distcc to speed up gcc bootstraps

Alexandre Oliva aoliva at redhat.com
Fri Aug 23 00:34:00 GMT 2002


On Aug 16, 2002, Alexandre Oliva <aoliva at redhat.com> wrote:

> An alternative I'm considering is to have cpp emit some different #
> directive that contains the full pathname of the source file, or
> perhaps just the directory name.  I.e., something like:

> # 1 "filename"
> # 1 "<directory> /path/name"
> # 1 "filename"
> ...

> I find this somewhat icky, but it's fully backward-compatible.  Neil,
> Zack, anyone else, what do you think?

Not having got any complaints about this proposal, I went ahead and
implemented it.  Patch below.  Ok to install?  Bootstrapped on
athlon-pc-linux-gnu.

Unfortunately, the bootstrap compare test still failed :-(

The reason is that gcc generates different debugging information for a
source file such as:

#define FOO(X)
int FOO((x, y,
         z, w)) bar;
int baz;

If we preprocess this code and compile it separately (e.g.,
-save-temps), the result is:

# 2 "<filename>"
int bar;

int baz;

i.e., the declaration of bar is moved from line 3 to line 2.  However,
with integrated preprocessing, the declaration of bar is correctly
flagged as in line 3 in debugging information.  This difference is
enough for the bootstrap compare to fail, since at least varray.h
contains a number of union member declarations like above, with
multi-line GTY() macro invocations between the types and the
declarators.  Oh, well...

This should probably be fixed.  I don't think it's good that compiling
with or without -save-temps can result in different assembly output.
Neil, Zack, any comments?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: distcc-preproc-directory.patch
Type: text/x-patch
Size: 10442 bytes
Desc: not available
Url : http://lists.samba.org/archive/distcc/attachments/20020823/1404a30e/distcc-preproc-directory.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