This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Missing -D__GNUG__ in cpp0 cmd line, with -save-temps
- To: gcc-patches at gcc dot gnu dot org
- Subject: Missing -D__GNUG__ in cpp0 cmd line, with -save-temps
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 05 Dec 2000 21:34:40 -0200
- Organization: GCC Team, Red Hat
cpp0 wasn't invoked with all appropriate -Defines when -save-temps was
given. This patch fixes it. Tested on i686-pc-linux-gnu, with and
without -save-temps. Ok to install?
Index: gcc/cp/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* lang-specs.h (c++): When invoking the stand-alone preprocessor
for -save-temps, pass all relevant -Defines to it, and then don't
pass them to cc1plus.
Index: gcc/cp/lang-specs.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/lang-specs.h,v
retrieving revision 1.34
diff -u -p -r1.34 lang-specs.h
--- gcc/cp/lang-specs.h 2000/11/26 10:48:50 1.34
+++ gcc/cp/lang-specs.h 2000/12/05 23:30:11
@@ -33,15 +33,19 @@ Boston, MA 02111-1307, USA. */
the external preprocessor if -save-temps is given. */
"%{E|M|MM:cpp0 -lang-c++ %{!no-gcc:-D__GNUG__=%v1}\
%{fnew-abi:-D__GXX_ABI_VERSION=100}\
- %{ansi:-trigraphs -$ -D__STRICT_ANSI__} %(cpp_options)}\
+ %{ansi:-D__STRICT_ANSI__ -trigraphs -$} %(cpp_options)}\
%{!E:%{!M:%{!MM:\
- %{save-temps:cpp0 -lang-c++ %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
+ %{save-temps:cpp0 -lang-c++ \
+ %{!no-gcc:-D__GNUG__=%v1}\
+ %{fnew-abi:-D__GXX_ABI_VERSION=100}\
+ %{ansi:-D__STRICT_ANSI__ -trigraphs -$}\
%(cpp_options) %b.ii \n}\
cc1plus %{save-temps:-fpreprocessed %b.ii}\
- %{!save-temps:%(cpp_options)}\
- %{!no-gcc:-D__GNUG__=%v1}\
- %{fnew-abi:-D__GXX_ABI_VERSION=100}\
- %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
+ %{!save-temps:%(cpp_options)\
+ %{!no-gcc:-D__GNUG__=%v1}\
+ %{fnew-abi:-D__GXX_ABI_VERSION=100}\
+ %{ansi:-D__STRICT_ANSI__}}\
+ %{ansi:-trigraphs -$}\
%(cc1_options) %2 %{+e*}\
%{!fsyntax-only:%(invoke_as)}}}}"},
{".ii", "@c++-cpp-output"},
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me