gkeating 02/12/10 11:59:50
Modified: live/gcc3/gcc gcc.c
Log:
Switch cpp-precomp off by default for C code.
Bug #: 3119160 3076149
Reviewed by: devang
Revision Changes Path
1.158 +28 -55 src/live/gcc3/gcc/gcc.c
Index: gcc.c
===================================================================
RCS file: /cvs/Darwin/src/live/gcc3/gcc/gcc.c,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -r1.157 -r1.158
--- gcc.c 2002/12/08 00:37:48 1.157
+++ gcc.c 2002/12/10 19:59:49 1.158
@@ -1022,46 +1022,39 @@
{".c", "@c", 0},
{"@c",
/* APPLE LOCAL begin cpp-precomp dpatel */
- /* Add support to invoke cpp-precomp.
- - Invoke cpp-precomp
- 1) by default (C and Objective-C).
- 2) when -cpp-precomp is used.
- - But do not invoke cpp-precomp when
- 1) -no-cpp-precomp is used
- 2) PFE is used
+ /* Add support to invoke cpp-precomp, but only when -cpp-precomp is used.
*/
- "%{M|MM:%(trad_capable_cpp) %(cpp_options)}\
- %{E|S:%{@:%e-E and -S are not allowed with multiple -arch flags}}\
- %{E:\
- %{traditional|ftraditional|traditional-cpp|no-cpp-precomp:\
- %(trad_capable_cpp) %(cpp_options)}\
- %{!traditional:%{!ftraditional:%{!traditional-cpp:%{!no-cpp-precomp:\
- %(cpp_precomp) -lang-c %{ansi:-std=c89} %(cpp_precomp_options) %y0}}}}}\
- %{!E:%{!M:%{!MM:\
- %{save-temps|no-integrated-cpp:\
- %{no-cpp-precomp|traditional-cpp:%{!fload=*:%{!fdump=*:\
- %(trad_capable_cpp) %(cpp_options) %b.i \n\
- cc1 -fpreprocessed %b.i %(cc1_options)}}}\
- %{cpp-precomp|!no-cpp-precomp|fdump=*|fload=*:%{!traditional-cpp:\
+ "%{E|S:%{@:%e-E and -S are not allowed with multiple -arch flags}}\
+ %{cpp-precomp|precomp:%{!no-cpp-precomp:%{!M:%{!MM:\
+ %{E:%(cpp_precomp) -lang-c %{ansi:-std=c89} %(cpp_precomp_options) \
+ %y0}\
+ %{!E:\
+ %{save-temps:\
+ %{!traditional-cpp:\
%{<fload=*} %{<fdump=*} \
%(cpp_precomp) -lang-c %{ansi:-std=c89} %(cpp_precomp_options) %y0
%b.i \n\
- cc1 -cpp-precomp %b.i %(cc1_options)}}}\
- %{!save-temps:%{!no-integrated-cpp:\
- %{traditional|ftraditional|traditional-cpp:%{!cpp-precomp:\
- tradcpp0 %(cpp_options) %{!pipe:%g.i} |\n\
- cc1 -fpreprocessed %{!pipe:%g.i} %(cc1_options)}}}\
-
%{!fdump=*:%{!fload=*:%{!no-cpp-precomp|cpp-precomp:%{!precomp:%{!traditional-cpp:\
+ cc1 -cpp-precomp %b.i %(cc1_options)}}\
+ %{!save-temps:\
+ %{!precomp:\
%(cpp_precomp) -lang-c %{ansi:-std=c89}\
%(cpp_precomp_options) %y0 %{!pipe:%g.i} |\n\
- cc1 -cpp-precomp %{!pipe:%g.i} %(cc1_options)}}}}}\
+ cc1 -cpp-precomp %{!pipe:%g.i} %(cc1_options)}\
%{precomp:\
%(cpp_precomp) -lang-c %{ansi:-std=c89}\
%(cpp_precomp_options) %y0\
- %{@:-o %f%u.p}%{!@:%W{o}%W{!o*:-o %b-gcc3.p}} }\
- %{!traditional:%{!ftraditional:%{!traditional-cpp:\
- %{fload=*|fdump=*|no-cpp-precomp:%{!precomp:\
- cc1 %(cpp_unique_options) %(cc1_options)}}}}}}\
- %{!fsyntax-only:%{!precomp:%(invoke_as)}}}}}", 0},
+ %{@:-o %f%u.p}%{!@:%W{o}%W{!o*:-o %b-gcc3.p}}}}\
+ %{!fsyntax-only:%{!precomp:%(invoke_as)}}}}}}}\
+ %{!precomp:%{no-cpp-precomp|!cpp-precomp|M|MM:\
+ %{E|M|MM:%(trad_capable_cpp) %(cpp_options) %(cpp_debug_options)}\
+ %{!E:%{!M:%{!MM:\
+ %{traditional|ftraditional:\
+%eGNU C no longer supports -traditional without -E}\
+ %{save-temps|traditional-cpp:%(trad_capable_cpp) \
+ %(cpp_options) %b.i \n\
+ cc1 -fpreprocessed %b.i %(cc1_options)}\
+ %{!save-temps:%{!traditional-cpp:\
+ cc1 %(cpp_unique_options) %(cc1_options)}}\
+ %{!fsyntax-only:%(invoke_as)}}}}}}", 0},
/* APPLE LOCAL end cpp-precomp dpatel */
{"-",
"%{!E:%e-E required when input is from standard input}\
@@ -1071,12 +1064,12 @@
/* APPLE LOCAL begin cpp-precomp */
"%{!E:%{!precomp:%ecompilation of header file requested}} \
%{E:%{@:%e-E is not allowed with multiple -arch flags}}\
- %{traditional-cpp|no-cpp-precomp:%{!precomp:\
+ %{!precomp:%{!cpp-precomp|no-cpp-precomp:\
%(trad_capable_cpp) %(cpp_options)}}\
- %{!traditional-cpp:%{!no-cpp-precomp:\
+ %{cpp-precomp:%{!traditional-cpp:%{!no-cpp-precomp:\
%(cpp_precomp) -lang-c %{ansi:-std=c89}\
%(cpp_precomp_options) %y0\
- %{precomp:%{@:-o %f%u.p}%{!@:%W{o}%W{!o*:-o %b-gcc3.p}}} }}", 0},
+ %{precomp:%{@:-o %f%u.p}%{!@:%W{o}%W{!o*:-o %b-gcc3.p}}} }}}", 0},
/* APPLE LOCAL end cpp-precomp */
{".i", "@cpp-output", 0},
{"@cpp-output",
@@ -3350,14 +3343,6 @@
n_infiles = 0;
added_libraries = 0;
- /* APPLE LOCAL begin cpp-precomp */
-#if !(defined(__APPLE__) && defined(__MACH__))
- /* If not hosted on Darwin, leave a space for a -no-cpp-precomp
- later. */
- n_switches = 1;
-#endif
- /* APPLE LOCAL end cpp-precomp */
-
/* Figure compiler version from version string. */
compiler_version = temp1 = xstrdup (version_string);
@@ -4127,18 +4112,6 @@
n_switches = 0;
n_infiles = 0;
last_language_n_infiles = -1;
-
- /* APPLE LOCAL begin cpp-precomp */
-#if !(defined(__APPLE__) && defined(__MACH__))
- /* If not hosted on Darwin, use the space reserved earlier to insert
- a -no-cpp-precomp ahead of all other switches. */
- switches[n_switches].part1 = "no-cpp-precomp";
- switches[n_switches].args = 0;
- switches[n_switches].live_cond = SWITCH_OK;
- switches[n_switches].validated = 0;
- n_switches++;
-#endif
- /* APPLE LOCAL end cpp-precomp */
/* This, time, copy the text of each switch and store a pointer
to the copy in the vector of switches.