From: Rainer Orth Date: Fri, 8 Jun 2001 11:52:56 +0000 (+0000) Subject: mips.h (CPP_SPEC): Simplify .s/.S handling. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=64b172fed5b5498cc570629b400048a040b9522c;p=gcc.git mips.h (CPP_SPEC): Simplify .s/.S handling. * config/mips/mips.h (CPP_SPEC): Simplify .s/.S handling. Don't define _LANGUAGE_C and variants for .cpp/.cp/.c++ files. Move definition of _LANGUAGE_C_PLUS_PLUS ... (CPLUSPLUS_CPP_SPEC): ... here. Fixes PRs c++/3047, target/441. From-SVN: r43007 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ca8bb06cb94..303680dab62 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2001-06-08 Rainer Orth + + * config/mips/mips.h (CPP_SPEC): Simplify .s/.S handling. + Don't define _LANGUAGE_C and variants for .cpp/.cp/.c++ files. + Move definition of _LANGUAGE_C_PLUS_PLUS ... + (CPLUSPLUS_CPP_SPEC): ... here. + Fixes PRs c++/3047, target/441. + 2001-06-08 Gerald Pfeifer * doc/install.texi2html (MAKEINFO): Keep value if set already. diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 77bc6fd0d98..8375bbf921d 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -958,17 +958,19 @@ while (0) #endif #endif +/* For C++ we need to ensure that _LANGUAGE_C_PLUS_PLUS is defined independent + of the source file extension. */ +#define CPLUSPLUS_CPP_SPEC "\ +-D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS \ +%(cpp) \ +" /* CPP_SPEC is the set of arguments to pass to the preprocessor. */ #ifndef CPP_SPEC #define CPP_SPEC "\ -%{.cc: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ -%{.cxx: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ -%{.C: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ %{.m: -D__LANGUAGE_OBJECTIVE_C -D_LANGUAGE_OBJECTIVE_C -D__LANGUAGE_C -D_LANGUAGE_C} \ -%{.S: -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ -%{.s: -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ -%{!.S: %{!.s: %{!.cc: %{!.cxx: %{!.C: %{!.m: -D__LANGUAGE_C -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}}}}}} \ +%{.S|.s: -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ +%{!.S: %{!.s: %{!.cc: %{!.cxx: %{!.cpp: %{!.cp: %{!.c++: %{!.C: %{!.m: -D__LANGUAGE_C -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}}}}}}}}} \ %(subtarget_cpp_size_spec) \ %{mips3:-U__mips -D__mips=3 -D__mips64} \ %{mips4:-U__mips -D__mips=4 -D__mips64} \