This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [distcc] gcc bootstraps with distcc


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]