This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Anyone got irix5? I have questions about your ctype implementation
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: mark at codesourcery dot com, ro at TechFak dot Uni-Bielefeld dot DE
- Cc: aoliva at redhat dot com, cgf at redhat dot com, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org, ghazi at caip dot rutgers dot edu, libstdc++ at gcc dot gnu dot org
- Date: Sun, 12 May 2002 16:42:46 -0400 (EDT)
- Subject: Re: Anyone got irix5? I have questions about your ctype implementation
- References: <3236894765.1021144143@VAIO1>
> From: Mark Mitchell <mark@codesourcery.com>
>
> > So for that reason and also for being able to specifically target
> > pre-irix6.5, IMHO I prefer to solve it the way I originally did with
> > libstdc++-v3 os_defines.h.
>
> We're really just debating which evil is more evil. There are lots of
> evils
> in both directions.
>
> Your points are valid, but not strong enough to cause us to do something
> different on IRIX, with respect to everything else. And having programs
> behave different due to whether or not a V3 header is included first is
> a user-visible problem; maintenance issues are visible only to us.
Yes you're right. If there's a burden to be had both ways, it should
fall on maintainers, not users.
> So, let's go with CPLUSPLUS_CPP_SPEC.
Here's a patch I'm currently testing on irix6.2. (I can't test it on
6.5) Assuming bootstrap and tests pass, ok for the trunk?
--Kaveh
PS: I'll be away from email next week, so if its approved past Monday
morning, installation will have to wait a few days.
2002-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
libstdc++-v3:
* config/os/irix/irix5.2/bits/os_defines.h: Revert 2002-05-06
change.
gcc:
* mips/iris6.h (CPLUSPLUS_CPP_SPEC): Define.
diff -rup orig/egcc-CVS20020511/libstdc++-v3/config/os/irix/irix5.2/bits/os_defines.h egcc-CVS20020511/libstdc++-v3/config/os/irix/irix5.2/bits/os_defines.h
--- orig/egcc-CVS20020511/libstdc++-v3/config/os/irix/irix5.2/bits/os_defines.h 2002-05-06 10:01:27.000000000 -0400
+++ egcc-CVS20020511/libstdc++-v3/config/os/irix/irix5.2/bits/os_defines.h 2002-05-12 16:23:22.594661495 -0400
@@ -44,22 +44,6 @@
// the command-line.
#undef _POSIX_SOURCE
-/* On at least irix6.2 (which uses this file,) the header files are
- very fragile and depend heavily on _SGI_SOURCE and __EXTENSIONS__
- being defined. If they're not, then features disappear that
- configure was relying on which then breaks the libstdc++ headers.
- These macros are normally implicitly defined by the command-line,
- however they are not defined when -ansi is used, and -ansi is
- passed to the testsuite. The g++ test results (where it uses
- libstdc++ headers) get dozens of extra failures without these
- macros, so ensure they always are defined here. */
-#ifndef _SGI_SOURCE
-# define _SGI_SOURCE
-#endif
-#ifndef __EXTENSIONS__
-# define __EXTENSIONS__
-#endif
-
#define __off_t off_t
#define __off64_t off64_t
#define __ssize_t ssize_t
diff -rup orig/egcc-CVS20020511/gcc/config/mips/iris6.h egcc-CVS20020511/gcc/config/mips/iris6.h
--- orig/egcc-CVS20020511/gcc/config/mips/iris6.h 2001-12-17 11:33:33.000000000 -0500
+++ egcc-CVS20020511/gcc/config/mips/iris6.h 2002-05-12 16:23:12.345807810 -0400
@@ -124,6 +124,18 @@ Boston, MA 02111-1307, USA. */
%{mabi=64: -D__mips64} \
%{!mabi*: -D__mips64}"
+/* The GNU C++ standard library requires that __EXTENSIONS__ and
+ _SGI_SOURCE be defined on at least irix6.2 and probably all irix6
+ prior to 6.5. They normally get defined in SUBTARGET_CPP_SPEC if
+ !ansi, for g++ we want them regardless. We don't need this on
+ irix6.5 itself, but it shouldn't hurt other than the namespace
+ polution. */
+#undef CPLUSPLUS_CPP_SPEC
+#define CPLUSPLUS_CPP_SPEC "\
+-D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS \
+%{ansi:-D__EXTENSIONS__ -D_SGI_SOURCE} %(cpp) \
+"
+
/* Irix 6 uses DWARF-2. */
#define DWARF2_DEBUGGING_INFO
#define MIPS_DEBUGGING_INFO