This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Elegant way to make -no-integrated-cpp the default?
- From: Daniel Kegel <dank at kegel dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 05 Feb 2004 14:04:48 -0800
- Subject: Elegant way to make -no-integrated-cpp the default?
I needed for various reasons to make -no-integrated-cpp the default
on my local copy of gcc-3.3.3. The following kludge did the trick
(and added a --integrated-cpp option) but it's ugly (and somewhat wrong).
I was kinda hoping to avoid patching source; is there a way
to specify default options to gcc and g++ in a site config file when configuring gcc?
- Dan
--- gcc-3.3.3-20040131/gcc/gcc.c.old 2004-02-05 10:38:47.000000000 -0800
+++ gcc-3.3.3-20040131/gcc/gcc.c 2004-02-05 10:41:42.000000000 -0800
@@ -967,11 +967,11 @@
%{!E:%{!M:%{!MM:\
%{traditional|ftraditional:\
%eGNU C no longer supports -traditional without -E}\
- %{save-temps|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
+ %{!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)}}}\
+ %{integrated-cpp:\
+ cc1 %(cpp_unique_options) %(cc1_options)}\
%{!fsyntax-only:%(invoke_as)}}}}", 0},
{"-",
"%{!E:%e-E required when input is from standard input}\
@@ -1076,6 +1076,7 @@
{"--machine", "-m", "aj"},
{"--machine-", "-m", "*j"},
{"--no-integrated-cpp", "-no-integrated-cpp", 0},
+ {"--integrated-cpp", "-integrated-cpp", 0},
{"--no-line-commands", "-P", 0},
{"--no-precompiled-includes", "-noprecomp", 0},
{"--no-standard-includes", "-nostdinc", 0},
--- gcc-3.3.3-20040131/gcc/cp/lang-specs.h.old 2004-02-05 12:57:03.000000000 -0800
+++ gcc-3.3.3-20040131/gcc/cp/lang-specs.h 2004-02-05 13:07:57.000000000 -0800
@@ -36,10 +36,10 @@
"%{E|M|MM:cc1plus -E %{!no-gcc:-D__GNUG__=%v1}\
%(cpp_options) %2 %(cpp_debug_options)}\
%{!E:%{!M:%{!MM:\
- %{save-temps|no-integrated-cpp:cc1plus -E %{!no-gcc:-D__GNUG__=%v1}\
+ %{save-temps|!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}}}\
+ cc1plus %{save-temps|!integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\
+ %{!save-temps:%{integrated-cpp:%(cpp_unique_options) %{!no-gcc:-D__GNUG__=%v1}}}\
%(cc1_options) %2 %{+e1*}\
%{!fsyntax-only:%(invoke_as)}}}}",
CPLUSPLUS_CPP_SPEC},