Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As if you could expect any kind of ABI compatibility between GCC and clang binary libraries today, and apparently it doesn't make them a complete garbage, go figure.


umm, you can

edit: to elaborate both g++ and clang++ implement the Itanium C++ ABI[1]. You might get binary incompatibility by mixing standard libraries, so just don't do that.

[1] https://itanium-cxx-abi.github.io/cxx-abi/abi.html


Which is exactly what happens when using shared objects.

Additionally the C++ ABI doesn't tell anything about how each binary library was compiled regarding compiler and linker switches that affect runtime behaviour.


> Which is exactly what happens when using shared objects.

Right. This has nothing to do to gcc, clang and even C++ though. I would be surprised if you could freely link C shared objects linked to different libc implementations.

On most Linux distros both gcc and clang link to libstdc++, so everything works out of the box. I imagine this is not the case for MacOS xcode and gcc from homebrew.


Standard libraries is what makes most of C++.

(Like, literally, going by the size of the language spec.)


And the same applies to C and libc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: