This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: G++ defining _GNU_SOURCE
> > On the patch itself, how can "-D_GNU_SOURCE %(cpp_cpu)" be correct?
> > Shouldn't that be %(cpp)?
To that end, I've applied the following.
r~
* config/linux.h (CPLUSPLUS_CPP_SPEC): Use %(cpp) not $(cpp_cpu).
* config/alpha/linux.h (CPLUSPLUS_CPP_SPEC): Likewise.
Index: linux.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/linux.h,v
retrieving revision 1.11.4.2
diff -c -p -d -r1.11.4.2 linux.h
*** linux.h 2001/06/08 00:00:35 1.11.4.2
--- linux.h 2001/06/11 19:48:06
*************** Boston, MA 02111-1307, USA. */
*** 75,86 ****
#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
--- 75,83 ----
#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)"
#ifndef USE_GNULIBC_1
#undef DEFAULT_VTABLE_THUNKS
Index: alpha/linux.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/linux.h,v
retrieving revision 1.21.4.2
diff -c -p -d -r1.21.4.2 linux.h
*** alpha/linux.h 2001/06/09 00:37:29 1.21.4.2
--- alpha/linux.h 2001/06/11 19:48:06
*************** SUB_CPP_PREDEFINES
*** 30,36 ****
/* The GNU C++ standard library requires that these macros be defined. */
#undef CPLUSPLUS_CPP_SPEC
! #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp_cpu)"
#undef LIB_SPEC
#define LIB_SPEC \
--- 30,36 ----
/* The GNU C++ standard library requires that these macros be defined. */
#undef CPLUSPLUS_CPP_SPEC
! #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
#undef LIB_SPEC
#define LIB_SPEC \