This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: libstdc++-v3 irix6.2 fix for 70 broken g++ testsuiteresults
- From: Mark Mitchell <mark at codesourcery dot com>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Cc: "bkoz at redhat dot com" <bkoz at redhat dot com>, "cgf at redhat dot com" <cgf at redhat dot com>, "ro at TechFak dot Uni-Bielefeld dot DE" <ro at TechFak dot Uni-Bielefeld dot DE>
- Date: Mon, 06 May 2002 08:48:15 -0700
- Subject: Re: Patch: libstdc++-v3 irix6.2 fix for 70 broken g++ testsuiteresults
- References: <200205051610.MAA29116@caip.rutgers.edu>
> +/* 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. */
This isn't how we've "solved" this elsewhere, I think.
Instead, what we've done is to make -ansi turn on things like _SGI_SOURCE
anyhow, in C++.
Neither solution is correct; the -ansi change makes -ansi mean something
different than what it should, while the change you propose won't work
if people include the OS headers before the V3 headers. We could argue
all day about which breakage is worse, but we might as well use the same
breakage everywhere.
The only correct fix is for the library people to invest the effort to
make the V3 headers respect these #defines. So far, there hasn't been
any movement on that, so far as I know. Until that happens, we're
wedged; V3 works well on GNU systems, and less well on other systems
when -ansi is in use.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com