<div dir="ltr">You can enable the old ABI with libstdc++ 5.X, via building your software with -D_GLIBCXX_USE_CXX11_ABI=0. That'll work fine if you only depend only on libstdc++ itself, because libstdc++ exports symbols for both the old and new ABIs at the same time.<div><br></div><div>But if your program depends on other C++ libraries that themslves expose c++ std types in their API, and which have been built against the new ABI, then you're in trouble, because clang cannot compile correctly for the new ABI. So, clang on Fedora 23 should be broken, as they've apparently rebuilt all libraries for the new ABI, and I'm sure nobody but libstdc++ bothers to export symbols for both the old and new ABIs.<div><br></div><div>See</div><div><a href="http://developerblog.redhat.com/2015/02/10/gcc-5-in-fedora/" target="_blank">http://developerblog.redhat.com/2015/02/10/gcc-5-in-fedora/</a><br></div><div>for some more info.</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 11, 2015 at 5:18 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Mon, May 11, 2015 at 12:47 PM, C Bergström <span dir="ltr"><<a href="mailto:cbergstrom@pathscale.com" target="_blank">cbergstrom@pathscale.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Tue, May 12, 2015 at 2:21 AM, Christian Convey<br>
<<a href="mailto:christian.convey@gmail.com" target="_blank">christian.convey@gmail.com</a>> wrote:<br>
> So, modulo any shenanigans about clang and gcc finding different STL<br>
> headers/libs, and modulo any bugs, as long as they're using the same Itanium<br>
> ABI version, I'm probably okay?<br>
<br>
</span>In theory yes, but in practice I would not count on this at all.<br>
<br>
Think about it another way - if you have an object compiled with<br>
g++-4.1 would you try to link and include it with other objects built<br>
with clang or gcc-5?<br></blockquote><div><br></div></span><div>Compatibility with GCC 5 is worth mentioning on its own merits:</div><div><br></div><div>libstdc++ from version 5 onwards uses a new abi_tag mechanism, which Clang does not yet support. Do not expect libstdc++ v5 onwards to work with Clang for the time being (unless you turn that mechanism off somehow).</div><div><br></div><div>This is regrettable: abi_tag is only marginally better than the standard solution of inline namespaces (you can tag member functions, not just namespace-scope entities, but otherwise it's essentially the same at the ABI level), and it means that GCC / libstdc++ is now sort-of deliberately violating the cross-vendor ABI. But... the GNU project is unlikely to be interested in making their code work with non-GCC compilers, so this is our problem to solve.</div><span class=""><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
FreeBSD, Linux and Solaris all use the Itanium ABI - Would you try to<br>
take an object compiled on Solaris and link it against some stuff for<br>
Linux. (This is an absurd example, but I hope it really shows my<br>
point)<br>
<br>
Bugs are unavoidable and c++ is *hard*<br>
<br>
Don't get me wrong - I'm trying to give a conservative answer.<br>
------------<br>
(Disclaimer - I'm biased because I work on compilers for a living and<br>
tell people to always recompile their c++ codes.)<br>
<div><div>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></span></div><br></div></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>