[cfe-dev] libc++abi on linux

Leonid Borisenko leo.borisenko at gmail.com
Thu Jul 12 17:17:35 PDT 2012


> OK, so on Linux, we need some kind of unwind, it seems we have options
> (I haven't tested them all):
>
> 1) libc++abi and LLVM writes (or acquires) its own unwind
> 2) libc++abi with http://www.nongnu.org/libunwind/
> 3) libc++abi with unwind.h from GCC and libgcc_s
> 4) Pathscale libunwind/libcxxrt
>
> I very much doubt that list is complete.
>
> If libc++abi, libsupc++ and libcxxrt are "equivalent" we have a few
> hybrid options, that I definitely would not suggest!
>
> It looks like the second and third options are in common use, 2, if you
> want to be UoI (LLVM) compatible (libunwind is MIT licence) and 3, which
> is likely to "better" when linking with GCC built code.
>
> So... Shall I just throw together some instructions on installing your
> distributions libunwind7 (or now, libunwind8) and compiling libc++ and
> libc++abi against it?  Obviously I'll make sure it works first!
>
> I found a backport of clang-3.1 for Ubuntu 12.04 from 12.10, that seems
> to be option 3.

   FWIW, there is a WIP project of Debian package of libc++ [1] [2] [3] 
(link to project's SVN repository is included in [3]). Project is 
mentored by Debian developer in scope of GSOC 2012 [4].

   I've built it and installed in Debian Sid. It works just fine (with 
Clang 3.1 from official Debian repository). One just need to invoke 
clang++ with -stdlib=libc++. Using of ::std::cerr works without aborting.

   Project goes by path 3) (i.e. libc++abi is linked with libgcc_s). 
Also libc++abi is statically compiled in libc++.

[1] http://wiki.debian.org/SummerOfCode2012/StudentApplications/AndrejBelym
[2] http://thread.gmane.org/gmane.linux.debian.soc-coordination/751
[3] http://thread.gmane.org/gmane.linux.debian.soc-coordination/767
[4] 
http://wiki.debian.org/SummerOfCode2012/Projects#Provide_an_alternative_to_libstdc.2B-.2B-_with_libc.2B-.2B-



More information about the cfe-dev mailing list