public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Haley <aph@redhat.com>
To: John Fine <johnsfine@verizon.net>
Cc: mario guerra <emailformario@gmail.com>, gcc-help@gcc.gnu.org
Subject: Re: supporting multiple versions of GCC with a single shared object   release?
Date: Thu, 16 Apr 2009 17:06:00 -0000	[thread overview]
Message-ID: <49E76572.5020608@redhat.com> (raw)
In-Reply-To: <49E5F8AC.8030706@verizon.net>

John Fine wrote:
> I have accidentally mixed binaries compiled by gcc3.2.3 with binaries
> compiled by gcc3.4.6 in both directions across the main program / .so
> boundary.  I did that in both x86 and AMD64 architectures.  In all cases
> I have had crashes, usually in std::string.

Right: libstdc++ wasn't stable.

> I have mixed gcc3.4.6 with each of gcc4.1.2 and gcc4.3.2 in similar
> combinations (but only in AMD64) and seen no similar problems.

It is now.

> So there seems to be a significant change in std::string (or something
> it depends on) somewhere between gcc3.2.3 and gcc3.4.6, but no similar
> change since.
> 
> So I think you would need to switch to some newer version in order to
> provide compatibility across a range of versions, and then I guess you
> would lose compatibility back to 3.3.3

Right.

> BTW, if any of the experts here have specific warnings (what won't work)
> across the range 3.4.6 through 4.3.2, I'd appreciate them.  The fact
> that it has all worked for me so far doesn't prove it is safe.

Well, we had to change the ABI several times as we were tracking the
development of the standard, and even after the multi-vendor C++ ABI
was finalized, we still made a couple of mistakes that required a fix
that broke binary compatibility.  That was, if I remember correctly,
gcc 3.2.x.  It's been pretty stable ever since.

It's pretty easy to see when the ABI has changed because we bump the
major release number in the soname.

Andrew.

  reply	other threads:[~2009-04-16 17:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5480d0a80904141452g45324a9ch68c1e1a6e5e51904@mail.gmail.com>
2009-04-14 22:02 ` mario guerra
2009-04-14 22:09   ` Brian Budge
2009-04-14 22:21   ` Ian Lance Taylor
2009-04-15 15:09   ` John Fine
2009-04-16 17:06     ` Andrew Haley [this message]
2009-04-15 17:09 mario guerra
2009-04-15 17:13 mario guerra
2009-04-15 17:40 ` Ian Lance Taylor
2009-04-17 14:55 mario guerra
2009-04-17 15:30 ` Ian Lance Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49E76572.5020608@redhat.com \
    --to=aph@redhat.com \
    --cc=emailformario@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=johnsfine@verizon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).