[distcc] .include in .s files (was Re: distcc 0.9, [patch])
Martin Pool
mbp at samba.org
Thu Sep 12 05:40:01 GMT 2002
On 12 Sep 2002, Alexandre Oliva <oliva at lsd.ic.unicamp.br> wrote:
> On Sep 12, 2002, Martin Pool <mbp at samba.org> wrote:
>
> > As far as I can see, gas accepts .include lines in both .S and .s
> > files. The case of the extension seems to just control whether gcc
> > feeds the file to cpp, which will have no effect on '.include'
> > lines.
For example (Richard's address was a giveaway :-)
http://lxr.linux.no/source/arch/m68k/fpsp040/do_func.S#L33
It looks like that code is wasting its time running cpp when only one
file actually uses #include, though.
Speaking of good interface design, I have to say I admire gas's
comment syntax:
Anything from the "line comment" character to the next newline is
considered a comment and is ignored. The line comment character is `;'
for the AMD 29K family; `;' on the ARC; `@' on the ARM; `;' for the
H8/300 family; `!' for the H8/500 family; `;' for the HPPA; `#' on the
i386 and x86-64; `#' on the i960; `;' for the PDP-11; `;' for picoJava;
`;' for Motorola PowerPC; `!' for the Hitachi SH; `!' on the SPARC; `#'
on the ip2k; `#' on the m32r; `|' on the 680x0; `#' on the 68HC11 and
68HC12; `;' on the M880x0; `#' on the Vax; `!' for the Z8000; `#' on
the V850; see *Note Machine Dependencies::.
I realize there are historical reasons but it's still amusing.
> > Therefore presumably distcc should do neither .s nor .S remotely?
>
> > It would probably be strange to have somebody write a .S file which
> > had both #include and .include lines in it, but I suppose it might
> > happen.
I think the best reasonableness/correctness tradeoff is probably to
just not distribute input files called .s or .S. They probably occur
infrequently compared to C or C++, and also assembly is probably
sufficiently cheaper than compilation that it will not hurt
performance too much.
> It might, indeed. But then, someone might also have a C file
> containing a line such as `asm (".include file")'. /me wonders what
> kind of pain should be inflicted upon someone who does this :-)
> Nah. The pain of not being able to use distcc would probably be
> more than enough as a penance :-)
People who do that will get what's coming to them. :-)
--
Martin
More information about the distcc
mailing list