[distcc] RE: precompiled headers and g++ -E
Greg Szeszko (TT)
Greg.Szeszko at tradingtechnologies.com
Fri Sep 9 19:46:51 GMT 2005
Even if I force the preprocessor to accept .h.gch files there is a
problem with distcc not transferring these files over to the remote
machine. It seems that either
a) distcc must transfer the .h.gch files to the remote machine so that
the compiler has access to them there.
b) distcc recognizes that the precompiled output needs additional files
and schedules that particular compilation on the local machine
c) GCC includes the precompiled header in the preprocessed file. The
.gch file would take place of the #pragma that is there now as a result
Either of these options is beyond what I want to play with at the
Thanks for your help.
From: Greg Szeszko (TT)
Sent: Thursday, September 08, 2005 2:57 PM
To: 'Daniel Kegel'
Cc: distcc at lists.samba.org
Subject: RE: [distcc] RE: precompiled headers and g++ -E
From: Daniel Kegel [mailto:dank at kegel.com]
Sent: Thursday, September 08, 2005 2:50 PM
To: Greg Szeszko (TT)
Cc: Daniel Kegel; distcc at lists.samba.org
Subject: Re: [distcc] RE: precompiled headers and g++ -E
Greg Szeszko (TT) wrote:
> Thanks. This option must be new in GCC4.x. I am using 3.4.3 and it
> doesn't know anything about -fpch-preprocess. Is there anything in
> 3.4.3 that can be used to achieve the same goal?
No. And gcc-3.4 doesn't support PCH anyway, so you
shouldn't be using it there, really. It was just a
It appears to be working in my case. The restriction that I discovered,
though, is that the .h.gch file must be in the same directory (the same
source directory, not corresponding build directory). This creates an
akward situation in which .o files are placed in the build node but the
.h.gch files must be placed in the src node.
> Besides, even if the the option work, the preprocessor will include in
> the output file a #pragma causing the compiler to ask for the pch file
> during compilation. With distcc in the picture, this will happen on
> remote machine. The pch file doesn't exist there. So wouldn't I be
> correct in expecting the compilation to fail at that point?
I wouldn't know - I haven't played with it yet!
If you're using the standard pch file(s) that come(s) with gcc,
that should be there. Anything else might be an interesting challenge.
No, I am not talking about the standard pch files. I have my own that
are very big and consequently, speed up compilation quite a bit. But
from looking at the distcc source I don't see how it could possibly
support this. It's design would have to change.
More information about the distcc