This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: -no-integrated-cpp flag (patches for gcc3.3)
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: "Ashif S. Harji" <asharji at plg2 dot math dot uwaterloo dot ca>,gcc-patches at gcc dot gnu dot org
- Cc: gcc at gcc dot gnu dot org, Ashif Harji <asharji at uwaterloo dot ca>,"Peter A. Buhr" <pabuhr at plg2 dot math dot uwaterloo dot ca>
- Date: Sun, 2 Mar 2003 14:11:40 +0000
- Subject: Re: -no-integrated-cpp flag (patches for gcc3.3)
- References: <Pine.SOL.4.44.0303011622250.6792-100000@plg2.math.uwaterloo.ca> <Pine.SOL.4.44.0303011854220.7764-100000@plg2.math.uwaterloo.ca>
Ashif S. Harji wrote:-
>
> The patch passed bootstrap and testing.
>
> Bootstrapping and Testing:
>
> On i686-pc-linux-gnu:
> - bootstrap was successful
> - no changes in testsuite results when compared to original (gcc-20030224 snapshot)
OK, for completeness, here is what I've applied to 3.3 and 3.4.
Thanks,
Neil.
============================================================
Index: gcc/gcc.c
--- gcc/gcc.c 13 Dec 2002 00:17:19 -0000 1.350
+++ gcc/gcc.c 2 Mar 2003 10:08:53 -0000
@@ -857,11 +857,11 @@ static const struct compiler default_com
%{!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)}}\
+ %{save-temps|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
+ %(cpp_options) %{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:\
+ cc1 %(cpp_unique_options) %(cc1_options)}}}\
%{!fsyntax-only:%(invoke_as)}}}}", 0},
{"-",
"%{!E:%e-E required when input is from standard input}\
@@ -965,6 +965,7 @@ static const struct option_map option_ma
{"--library-directory", "-L", "a"},
{"--machine", "-m", "aj"},
{"--machine-", "-m", "*j"},
+ {"--no-integrated-cpp", "-no-integrated-cpp", 0},
{"--no-line-commands", "-P", 0},
{"--no-precompiled-includes", "-noprecomp", 0},
{"--no-standard-includes", "-nostdinc", 0},
============================================================
Index: gcc/cp/lang-specs.h
--- gcc/cp/lang-specs.h 10 Aug 2002 20:58:45 -0000 1.53
+++ gcc/cp/lang-specs.h 2 Mar 2003 10:08:53 -0000
@@ -36,10 +36,10 @@ Boston, MA 02111-1307, USA. */
"%{E|M|MM:cc1plus -E %{!no-gcc:-D__GNUG__=%v1}\
%(cpp_options) %2 %(cpp_debug_options)}\
%{!E:%{!M:%{!MM:\
- %{save-temps:cc1plus -E %{!no-gcc:-D__GNUG__=%v1}\
- %(cpp_options) %2 %b.ii \n}\
- cc1plus %{save-temps:-fpreprocessed %b.ii}\
- %{!save-temps:%(cpp_unique_options) %{!no-gcc:-D__GNUG__=%v1}}\
+ %{save-temps|no-integrated-cpp:cc1plus -E %{!no-gcc:-D__GNUG__=%v1}\
+ %(cpp_options) %2 %{save-temps:%b.ii} %{!save-temps:%g.ii} \n}\
+ cc1plus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\
+ %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options) %{!no-gcc:-D__GNUG__=%v1}}}\
%(cc1_options) %2 %{+e1*}\
%{!fsyntax-only:%(invoke_as)}}}}",
CPLUSPLUS_CPP_SPEC},
============================================================
Index: gcc/doc/invoke.texi
--- gcc/doc/invoke.texi 23 Feb 2003 16:59:31 -0000 1.209.2.15
+++ gcc/doc/invoke.texi 2 Mar 2003 10:08:57 -0000
@@ -165,7 +165,7 @@ in the following sections.
-ansi -std= at var{standard} -aux-info @var{filename} @gol
-fno-asm -fno-builtin -fno-builtin- at var{function} @gol
-fhosted -ffreestanding -fms-extensions @gol
--trigraphs -traditional -traditional-cpp @gol
+-trigraphs -no-integrated-cpp -traditional -traditional-cpp @gol
-fallow-single-precision -fcond-mismatch @gol
-fsigned-bitfields -fsigned-char @gol
-funsigned-bitfields -funsigned-char @gol
@@ -1184,6 +1184,17 @@ Accept some non-standard constructs used
@opindex trigraphs
Support ISO C trigraphs. The @option{-ansi} option (and @option{-std}
options for strict ISO C conformance) implies @option{-trigraphs}.
+
+ at item -no-integrated-cpp
+ at opindex no-integrated-cpp
+Performs a compilation in two passes: preprocessing and compiling. This
+option allows a user supplied "cc1", "cc1plus", or "cc1obj" via the
+ at option{-B} option. The user supplied compilation step can then add in
+an additional preprocessing step after normal preprocessing but before
+compiling. The default is to use the integrated cpp (internal cpp)
+
+The semantics of this option will change if "cc1", "cc1plus", and
+"cc1obj" are merged.
@cindex traditional C language
@cindex C language, traditional
============================================================
Index: gcc/objc/lang-specs.h
--- gcc/objc/lang-specs.h 10 Aug 2002 20:58:45 -0000 1.26
+++ gcc/objc/lang-specs.h 2 Mar 2003 10:08:57 -0000
@@ -30,10 +30,10 @@ Boston, MA 02111-1307, USA. */
%{!E:%{!M:%{!MM:\
%{traditional|ftraditional|traditional-cpp:\
%eGNU Objective C no longer supports traditional compilation}\
- %{save-temps:cc1obj -E %(cpp_options) %b.mi \n\
- cc1obj -fpreprocessed %b.mi %(cc1_options) %{gen-decls}}\
- %{!save-temps:\
- cc1obj %(cpp_unique_options) %(cc1_options) %{gen-decls}}\
+ %{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\
+ cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %{gen-decls}}\
+ %{!save-temps:%{!no-integrated-cpp:\
+ cc1obj %(cpp_unique_options) %(cc1_options) %{gen-decls}}}\
%{!fsyntax-only:%(invoke_as)}}}}", 0},
{".mi", "@objc-cpp-output", 0},
{"@objc-cpp-output",