This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: G++ defining _GNU_SOURCE
On Monday 11 June 2001 19:06, Richard Henderson wrote:
> On Mon, Jun 11, 2001 at 12:19:24PM +0200, Franz Sirl wrote:
> > On the patch itself, how can "-D_GNU_SOURCE %(cpp_cpu)" be correct?
> > Shouldn't that be %(cpp)?
>
> I think you're right.
At least powerpc-linux-gnu now bootstraps again for me with the appended
patch.
OK to commit to mainline and 3.0 branch?
Franz.
Index: gcc/config/rs6000/linux.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/linux.h,v
retrieving revision 1.23.4.2
diff -u -p -r1.23.4.2 linux.h
--- gcc/config/rs6000/linux.h 2001/05/24 20:23:03 1.23.4.2
+++ gcc/config/rs6000/linux.h 2001/06/11 17:58:06
@@ -34,6 +34,11 @@ Boston, MA 02111-1307, USA. */
#undef CPP_OS_DEFAULT_SPEC
#define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
+/* The GNU C++ standard library requires that these macros be
+ defined. */
+#undef CPLUSPLUS_CPP_SPEC
+#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
+
#undef LINK_SHLIB_SPEC
#define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}"