[cfe-dev] clang, g++, icc link compatibity?
C Bergström
cbergstrom at pathscale.com
Mon May 11 12:47:52 PDT 2015
On Tue, May 12, 2015 at 2:21 AM, Christian Convey
<christian.convey at gmail.com> wrote:
> So, modulo any shenanigans about clang and gcc finding different STL
> headers/libs, and modulo any bugs, as long as they're using the same Itanium
> ABI version, I'm probably okay?
In theory yes, but in practice I would not count on this at all.
Think about it another way - if you have an object compiled with
g++-4.1 would you try to link and include it with other objects built
with clang or gcc-5?
FreeBSD, Linux and Solaris all use the Itanium ABI - Would you try to
take an object compiled on Solaris and link it against some stuff for
Linux. (This is an absurd example, but I hope it really shows my
point)
Bugs are unavoidable and c++ is *hard*
Don't get me wrong - I'm trying to give a conservative answer.
------------
(Disclaimer - I'm biased because I work on compilers for a living and
tell people to always recompile their c++ codes.)
More information about the cfe-dev
mailing list