Re: supporting multiple versions of GCC with a single shared object release?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you all for the helpful responses. Based on the info provided, it sounds like if we built our product with GCC version 4.x we would have binary compatibility at least back to 3.4.x, please let me know if my understanding is not right. 

On a related note, if we tried this approach would we have to worry about any differences in the implementation of exception handling between different versions of GCC?

Thanks again,
Mario

--- On Thu, 4/16/09, Andrew Haley <aph@xxxxxxxxxx> wrote:

> From: Andrew Haley <aph@xxxxxxxxxx>
> Subject: Re: supporting multiple versions of GCC with a single shared object  release?
> To: "John Fine" <johnsfine@xxxxxxxxxxx>
> Cc: "mario guerra" <emailformario@xxxxxxxxx>, gcc-help@xxxxxxxxxxx
> Date: Thursday, April 16, 2009, 12:05 PM
> 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.
> 


      

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux