xref: /minix3/external/bsd/libc++/dist/libcxxrt/README (revision 4684ddb6aab0b36791c8099bc705d6140b3d05d0)
1*4684ddb6SLionel Sambuclibcxxabi
2*4684ddb6SLionel Sambuc=========
3*4684ddb6SLionel Sambuc
4*4684ddb6SLionel SambucThis library implements the Code Sourcery C++ ABI, as documented here:
5*4684ddb6SLionel Sambuc
6*4684ddb6SLionel Sambuchttp://www.codesourcery.com/public/cxx-abi/abi.html
7*4684ddb6SLionel Sambuc
8*4684ddb6SLionel SambucIt is intended to sit below an STL implementation, and provide features required by the compiler for implementation of the C++ language.
9*4684ddb6SLionel Sambuc
10*4684ddb6SLionel SambucCurrent Status
11*4684ddb6SLionel Sambuc--------------
12*4684ddb6SLionel Sambuc
13*4684ddb6SLionel SambucAt present, the library implements the following parts of the ABI specification:
14*4684ddb6SLionel Sambuc
15*4684ddb6SLionel Sambuc- RTTI classes and support for the dynamic_cast<> operator.
16*4684ddb6SLionel Sambuc- Exception handling.
17*4684ddb6SLionel Sambuc- Thread-safe initializers.
18*4684ddb6SLionel Sambuc
19*4684ddb6SLionel SambucException handling requires the assistance of a stack-unwinding library
20*4684ddb6SLionel Sambucimplementing the low-level parts of the ABI.  Either libgcc_s or libunwind
21*4684ddb6SLionel Sambucshould work for this purpose.
22*4684ddb6SLionel Sambuc
23*4684ddb6SLionel SambucThe library depends on various libc features, but does not depend on any C++
24*4684ddb6SLionel Sambucfeatures not implemented purely in the compiler or in the library itself.
25*4684ddb6SLionel Sambuc
26*4684ddb6SLionel SambucSupported Platforms
27*4684ddb6SLionel Sambuc-------------------
28*4684ddb6SLionel Sambuc
29*4684ddb6SLionel SambucThis code was initially developed on FreeBSD/x86, and has also been tested on FreeBSD/x86-64.  It should work on other platforms that use the Code Sourcery ABI, for example Itanium, however this is untested.
30*4684ddb6SLionel Sambuc
31*4684ddb6SLionel SambucThis library also supports the ARM EH ABI.
32*4684ddb6SLionel Sambuc
33*4684ddb6SLionel SambucInstallation
34*4684ddb6SLionel Sambuc------------
35*4684ddb6SLionel Sambuc
36*4684ddb6SLionel SambucThe default build system does not perform any installation.  It is expected that this will be done by at a higher level.  The exact installation steps depend on how you plan on deploying libcxxrt.
37*4684ddb6SLionel Sambuc
38*4684ddb6SLionel SambucThere are three files that you may consider installing:
39*4684ddb6SLionel Sambuc
40*4684ddb6SLionel Sambuc- cxxabi.h (and unwind.h and either unwind-arm.h or unwind-itanium.h)
41*4684ddb6SLionel Sambuc- libcxxrt.a
42*4684ddb6SLionel Sambuc- libcxxrt.so
43*4684ddb6SLionel Sambuc
44*4684ddb6SLionel SambucThe first describes the contract between this library and the compiler / STL implementation (lib[std]{cxx,c++}).  Its contents should be considered semi-private, as it is probably not a good idea to encourage any code above the STL implementation to depend on it.  Doing so will introduce portability issues.  You may install this file but I recommend simply copying or linking it into your STL implementation's build directory.
45*4684ddb6SLionel Sambuc
46*4684ddb6SLionel SambucIn general, I recommend against installing both the .a and the .so file.  For static linking, the .a file should be linked against the static and dynamic versions of your STL implementation.  Statically linking libcxxrt into your STL implementation means that users who dynamically link against the STL implementation can have libcxxrt upgraded automatically when you ship a new version of your STL implementation.
47*4684ddb6SLionel Sambuc
48*4684ddb6SLionel SambucThe other option, installing the .so, is recommended for situations where you have two or more STL implementations and wish to be able to link against both (e.g. where an application links one library using libstdc++ and another using libc++).  To support this case, you should link both STL implementations against libcxxrt.so.
49*4684ddb6SLionel Sambuc
50*4684ddb6SLionel SambucSupporting all of these options in the CMake build system is not practical - the amount of effort required to select the one that you want would be more than the effort required to perform the installation from an external script or build system.
51