<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">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 class="">On Tue, May 12, 2015 at 2:21 AM, Christian Convey<br>
<<a href="mailto:christian.convey@gmail.com">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><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><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 class="HOEnZb"><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br></div></div>