[tlbuild] gcc vs. clang in icu
Philipp Stephani
p.stephani2 at gmail.com
Tue Mar 26 23:02:54 CET 2013
2013/3/26 Karl Berry <karl at freefriends.org>
> Dick reported the following. I wanted to reply on the list so it would
> end up in the archives.
>
> The whole compile uses [gcc], EXCEPT the icu compile. It's configure
> utility checks for clang and clang++, finds them, and uses
> them. Recall that llvm-clang is another open source compiler system,
> which Apple supports. In Lion Apple switched completely to this
> system and removed gcc. I believe gcc and clang are compatible, so
> the fact that clang is used for icu causes no harm. But I wouldn't
> bet my house on it.)
>
> I wouldn't bet a nickel on it. Indeed, I find it amazing that this
> works at all -- clang++ and g++ do precisely the same name-mangling of
> symbols?
>
>
Yes, clang/LLVM goes at some lengths to make sure its outputs are mostly
binary-compatible with GCC. Name mangling and the general C and C++ ABI are
definitely compatible.
Personally the only interoperability problems I had concerned the C++
standard library – libstdc++ (GCC's standard library) and libc++ (a common
choice for the standard library when Clang is used) are not
binary-compatible, and trying to use both in one program (through shared
libraries) will often fail with a segmentation fault or somesuch (linking
will still work!).
However it might still be more manageable to build all TL binaries with the
same compiler.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tlbuild/attachments/20130326/a7a67ae7/attachment.html>
More information about the tlbuild
mailing list