This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [distcc] gcc bootstraps with distcc
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Neil Booth <neil at daikokuya dot co dot uk>
- Cc: gcc-patches at gcc dot gnu dot org, Zack Weinberg <zack at codesourcery dot com>
- Date: 16 Feb 2004 19:11:55 -0300
- Subject: Re: [distcc] gcc bootstraps with distcc
- Organization: Red Hat Global Engineering Services Compiler Team
- References: <20030619033358.63559.qmail@web41114.mail.yahoo.com><20030619104500.GE27331@wistful.sourcefrog.net><orbrwdzgc4.fsf@free.redhat.lsd.ic.unicamp.br><20030702054251.GA10814@daikokuya.co.uk><or3chp0ylg.fsf@livre.redhat.lsd.ic.unicamp.br><20030702202637.GC10814@daikokuya.co.uk><orn0frpxol.fsf@livre.redhat.lsd.ic.unicamp.br><20030706135943.GF23832@daikokuya.co.uk><or65mfpuyb.fsf@livre.redhat.lsd.ic.unicamp.br><20030706152516.GG23832@daikokuya.co.uk>
On Jul 6, 2003, Neil Booth <neil@daikokuya.co.uk> wrote:
> Alexandre Oliva wrote:-
>> `gcc -E -o - file.i' produces no output at all, which is unexpected
>> to me. Is this a bug, or a (mis)feature? :-)
> The specs in gcc.c appear to assume you're only going to compile it,
> in which case they do assume -preprocessed. A patch to handle -E
> correctly would be welcome.
Here it is. While at that, I've arranged for -save-temps separate
preprocessing to get cpp_debug_options as well. Bootstrapping on
i686-pc-linux-gnu. Ok to install if it passes?
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* gcc.c (default_compilers): Pass %(cpp_debug_options) to
preprocessor when compiling with -save-temps. Support
re-preprocessing .i file.
Index: gcc/gcc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcc.c,v
retrieving revision 1.405
diff -u -p -r1.405 gcc.c
--- gcc/gcc.c 24 Jan 2004 10:09:48 -0000 1.405
+++ gcc/gcc.c 16 Feb 2004 22:08:40 -0000
@@ -905,7 +905,8 @@ static const struct compiler default_com
%{traditional|ftraditional:\
%eGNU C no longer supports -traditional without -E}\
%{save-temps|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
- %(cpp_options) -o %{save-temps:%b.i} %{!save-temps:%g.i} \n\
+ %(cpp_options) %(cpp_debug_options) \
+ -o %{save-temps:%b.i} %{!save-temps:%g.i} \n\
cc1 -fpreprocessed %{save-temps:%b.i} %{!save-temps:%g.i} \
%(cc1_options)}\
%{!save-temps:%{!traditional-cpp:%{!no-integrated-cpp:\
@@ -921,7 +922,8 @@ static const struct compiler default_com
"%{E|M|MM:%(trad_capable_cpp) %(cpp_options) %(cpp_debug_options)}\
%{!E:%{!M:%{!MM:\
%{save-temps|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
- %(cpp_options) -o %{save-temps:%b.i} %{!save-temps:%g.i} \n\
+ %(cpp_options) %(cpp_debug_options) \
+ -o %{save-temps:%b.i} %{!save-temps:%g.i} \n\
cc1 -fpreprocessed %{save-temps:%b.i} %{!save-temps:%g.i} \
%(cc1_options)\
-o %g.s %{!o*:--output-pch=%i.gch}\
@@ -932,7 +934,10 @@ static const struct compiler default_com
%W{o*:--output-pch=%*}%V}}}}}}", 0},
{".i", "@cpp-output", 0},
{"@cpp-output",
- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0},
+ "%{E|M|MM:%(trad_capable_cpp) -fpreprocessed \
+ %(cpp_options) %(cpp_debug_options)}\
+ %{!M:%{!MM:%{!E:cc1 -fpreprocessed %i \
+ %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0},
{".s", "@assembler", 0},
{"@assembler",
"%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0},
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Happy GNU Year! oliva@{lsd.ic.unicamp.br, gnu.org}
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist Professional serial bug killer