[cfe-dev] unraveling libcxxabi/libcxx

Howard Hinnant hhinnant at apple.com
Tue Apr 2 17:46:50 PDT 2013

On Apr 2, 2013, at 8:35 PM, David Fang <fang at csl.cornell.edu> wrote:

> Hi,
> 	I'm currently looking into porting libcxx to an ancient system (powerpc-darwin8), and I noticed that libcxx depends on libcxxabi. However, libcxxabi's sources include headers like <exception> which are expected to be in some C++ library.  Does it (mutually) depend on libcxx? Maybe this was obvious, but I take it libcxxabi needs a c++11 compiler to build, correct?  (This would be fine, as I have stage-1 clang built from gcc-4.0/libstdc++.)  Does one {libcxx,libcxxabi} need to be installed before the other, or should they be built cross-referencing each others include dirs?  In terms of shared-library dependencies, libcxx should link to libcxxabi, right?
> Is there better documentation somewhere that I don't know about?
> All I see are html pages at http://libcxxabi.llvm.org and http://libcxx.llvm.org/.

Contributions to better documentation (and your experiences in doing this) are welcome. :-)

Yes, libcxxabi is the lower-level library.  libcxx should link to libcxxabi.

Yes, currently libcxxabi is using -std=c++0x and probably needs it, though I can't think offhand of a specific need.  If you need to, try changing that to -std=c++03.  If there's any breakage it will almost certainly be compile-time breakage.  So that is a safe experiment.

libcxxabi is designed to be ABI compatible with a gcc-4.2 era libstdc++.  And therefore could almost certainly use a libstdc++-4.2 set of headers if need be to build against (another untested theory).

As libcxxabi is the lower-level library, I would go with installing that first.  But understand you're traversing territory where few have gone before.

Keep us posted, and blogs of your experience which might help future porters are welcome.


More information about the cfe-dev mailing list