From: Phil Edwards Date: Thu, 7 Jun 2001 23:54:24 +0000 (+0000) Subject: lang-specs.h: Move -D_GNU_SOURCE to config/linux.h. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=37344b9b0d23085c897e881992b8965b9ce67648;p=gcc.git lang-specs.h: Move -D_GNU_SOURCE to config/linux.h. 2001-06-07 Phil Edwards * cp/lang-specs.h: Move -D_GNU_SOURCE to config/linux.h. * config/linux.h (CPLUSPLUS_CPP_SPEC): Move -D_GNU_SOURCE to here. * config/pa/pa-linux.h: Allow CPLUSPLUS_CPP_SPEC to remain. From-SVN: r42989 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 60ea3c6bdb6..0387a6a9b98 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-06-07 Phil Edwards + + * linux.h (CPLUSPLUS_CPP_SPEC): Move -D_GNU_SOURCE to here. + * pa/pa-linux.h: Allow CPLUSPLUS_CPP_SPEC to remain. + 2001-06-08 Joseph S. Myers * doc/contrib.texi: Add copyright notice. diff --git a/gcc/config/linux.h b/gcc/config/linux.h index 1a69758010a..62186ef79b2 100644 --- a/gcc/config/linux.h +++ b/gcc/config/linux.h @@ -75,6 +75,13 @@ Boston, MA 02111-1307, USA. */ #define CC1_SPEC "%{profile:-p}" #endif +/* The GNU C++ standard library requires that these macros be + defined. */ +#undef CPLUSPLUS_CPP_SPEC +#define CPLUSPLUS_CPP_SPEC \ + "-D_GNU_SOURCE \ + %(cpp_cpu)" + #ifndef USE_GNULIBC_1 #undef DEFAULT_VTABLE_THUNKS #define DEFAULT_VTABLE_THUNKS 1 diff --git a/gcc/config/pa/pa-linux.h b/gcc/config/pa/pa-linux.h index 5ed5901433d..baa1cf5b4a5 100644 --- a/gcc/config/pa/pa-linux.h +++ b/gcc/config/pa/pa-linux.h @@ -27,8 +27,6 @@ Boston, MA 02111-1307, USA. */ #undef CPP_PREDEFINES #define CPP_PREDEFINES "-D__ELF__ -Dunix -D__hppa__ -Dlinux -Asystem=unix -Asystem=posix -Acpu=hppa -Amachine=hppa -Amachine=bigendian" -#undef CPLUSPLUS_CPP_SPEC - #undef LIB_SPEC #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}" diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 39ff3399c08..8be3d79c91d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2001-06-07 Phil Edwards + + * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h. + 2001-06-07 Nathan Sidwell PR c++/2914 diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h index dcb9b24dab1..526b67c0d8b 100644 --- a/gcc/cp/lang-specs.h +++ b/gcc/cp/lang-specs.h @@ -35,13 +35,13 @@ Boston, MA 02111-1307, USA. */ {"@c++", /* cc1plus has an integrated ISO C preprocessor. We should invoke the external preprocessor if -save-temps is given. */ - "%{E|M|MM:cpp0 -lang-c++ -D_GNU_SOURCE %{!no-gcc:-D__GNUG__=%v1}\ + "%{E|M|MM:cpp0 -lang-c++ %{!no-gcc:-D__GNUG__=%v1}\ %{!Wno-deprecated:-D__DEPRECATED}\ %{!fno-exceptions:-D__EXCEPTIONS}\ %{!fno-new-abi:-D__GXX_ABI_VERSION=100}\ %{ansi:-D__STRICT_ANSI__ -trigraphs -$} %(cpp_options)}\ %{!E:%{!M:%{!MM:\ - %{save-temps:cpp0 -lang-c++ -D_GNU_SOURCE \ + %{save-temps:cpp0 -lang-c++ \ %{!no-gcc:-D__GNUG__=%v1}\ %{!Wno-deprecated:-D__DEPRECATED}\ %{!fno-exceptions:-D__EXCEPTIONS}\ @@ -50,7 +50,7 @@ Boston, MA 02111-1307, USA. */ %(cpp_options) %b.ii \n}\ cc1plus %{save-temps:-fpreprocessed %b.ii}\ %{!save-temps:%(cpp_options)\ - %{!no-gcc:-D__GNUG__=%v1} -D_GNU_SOURCE \ + %{!no-gcc:-D__GNUG__=%v1} \ %{!Wno-deprecated:-D__DEPRECATED}\ %{!fno-exceptions:-D__EXCEPTIONS}\ %{!fno-new-abi:-D__GXX_ABI_VERSION=100}\