John Plocher wrote:

> Stefan Teleman wrote:
>
>> SunProCC's and g++'s C++ ABI's are incompatible. This is noone's
>> fault really, the C++ ABI has never been formalized.
>
>
> There exists a formal C++ ABI for SPARC that the Sun Compilers adhere to.
> I presume that the same ABI (modulo bit/byte order...) is also
> implemented
> for x64.
>
> You are correct in stating that the Gnu C++ world has chosen not to
> attempt
> to formalize a C++ ABI for their compiler; in fact, it seems that such a
> thing has been discussed and explicitly rejected.
>
>    -John



Good and careful ABI-stability handling with SunCC: 
http://developers.sun.com/sunstudio/articles/CC_abi/CC_abi_content.html
"Here an ABI, There an ABI ..." (article does not cover gcc/g++ at all,
only the Sun-C and C++ compilers cc/CC over time)


On the other hand g++:
ABI instability over the years (i.e. from 2.x to 3.x series), but
apparently a certain striving for future ABI stability

http://www.techfak.uni-bielefeld.de/rechner/bulletin/volume29/1.html

"Probleme

Wie schon bei den vergangenen GCC-Releases wurde die ABI des
C++-Compilers g++ wieder inkompatibel geändert, so daß sämtliche
C++-Programme und -Libraries mit dem g++ 3.1 neu übersetzt werden
müssen. Allerdings implementiert der g++ jetzt auf allen Plattformen
eine neue C++-ABI <http://www.codesourcery.com/cxx-abi/>, die
ursprünglich entwickelt wurde, um auf Intels Itanium-Prozessoren
<http://developer.intel.com/design/itanium/> Interoperabilität zwischen
den C++-Compilern verschiedener Hersteller erreichen zu können. Damit
ist es in Zukunft zumindest möglich, zwischen verschiedenen
Compiler-Versionen binärkompatibel zu bleiben oder gar Interoperabilität
mit den C++-Compilern anderer Hersteller auf Nicht-Itanium-Prozessoren
zu erreichen, sollten diese das neue Interface ebenfalls implementieren.
Allerdings ist diese Binärkompatibilität derzeit noch nicht gegeben, da
sich das Interface der GNU C++-Library libstdc++ derzeit zwischen Major
Releases noch inkompatibel ändern kann. Aber auch hier ist Abhilfe in
Arbeit, so daß dieses regelmäßige Rekompilieren von C++-Code bald der
Vergangenheit angehören sollte."

Translation:

Problems

Just as with previous GCC-Releases, the C++-Compiler g++'s ABI has been
made incompatible again, so that all C++-programs and -libraries will
have to be recompiled with the g++3.1 once again. Though g++ does on all
platforms implement a new C++-ABI http://www.codesourcery.com/cxx-abi/
now, that had initially been developed, to achieve interoperability
among different vendor's C++-Compilers on the Itanium architecture.
Hence it will at least be possible in the future, to stay
binary-compatible from g++ version to g++ version, if not even to
achieve interoperability with other vendor's C++-Compilers on
Non-Itanium-systems, if - and only if - those 3rd party compilers also
implement above new interface. However, this binary compatibility is not
yet provided until now, since the GNU C++-Library libstdc++'s interface
is still subject of potential change, from Major Release to Major
Release, and therefore can become incompatible again. But also on that
front is being worked on, so that the steady requirement of having to
recompile C++-code with g++ will soon be a thing of the past.


-Martin

_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to