[cfe-dev] Choosing the unwinder / C++ low-level libraries in Clang

David Chisnall David.Chisnall at cl.cam.ac.uk
Thu Jul 23 08:16:42 PDT 2015


On 23 Jul 2015, at 14:41, Renato Golin <renato.golin at linaro.org> wrote:
> 
> On 23 July 2015 at 14:16, David Chisnall <David.Chisnall at cl.cam.ac.uk> wrote:
>> I’m not sure what problem you’re trying to solve here.  These libraries tend to be tightly coupled to the platform, or possibly toolchain, not something that I’d want users to modify (unless they knew what they were doing enough to pass -nostdlib and provide the full set themselves).
> 
> The problem is that Compiler-RT doesn't include the low-level
> implementation libraries, such as unwinders and C++ ABI, but libgcc
> does via libgcc_s/eh.

Minor clarification, but libgcc also doesn’t include the C++ ABI stuff - that’s in libsupc++, which is usually statically linked to libstdc++.  I think FreeBSD 9 is the only system to ship a separate libsupc++ shared library, though some ship a libsupc++.a for static linking of C++ programs that don’t use the standard library.

The Compiler-RT repository does include an unwinder, so perhaps this should be built as libcompilerrt_eh.so for platforms that want to use -rtlib=compilerrt?

David





More information about the cfe-dev mailing list