This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++ clashes with libC system library on Irix 6.5
- To: Wolfram Gloger <Wolfram dot Gloger at dent dot med dot uni-muenchen dot de>
- Subject: Re: libstdc++ clashes with libC system library on Irix 6.5
- From: Alexandre Oliva <oliva at lsd dot ic dot unicamp dot br>
- Date: 02 Feb 2000 02:23:46 -0200
- Cc: gcc at gcc dot gnu dot org
- References: <200002011346.OAA10972@max.zk-i.med.uni-muenchen.de>
On Feb 1, 2000, Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de> wrote:
> Now I suppose the problem must be that libC in its global constructors
> does something bad to objects in libstdc++.
Yep. You see, SGI's libC constructs `cout' in a way that is
incompatible with its layout in gcc. So the crash...
This problem is not exclusive to Irix. Whenever you try to link
the standard libraries of two separate C++ compilers together, you'll
get problems because of cin and cout. That's very unfortunate, but
it's caused by the fact that the C++ Standard doesn't specify an ABI,
just an API.
> Could those objects be `tucked away' by rebuilding gcc with
> flag_honor_std turned on by default?
That's possible. At least cin and cout would be moved into the std
namespace. But not all of libstdc++ is namespace std-enabled :-(
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them