<div class="gmail_quote">On Sun, Jul 8, 2012 at 10:52 PM, soaliap <span dir="ltr"><<a href="mailto:soaliap@126.com" target="_blank">soaliap@126.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
&quot;C. Bergström&quot;-3 wrote<br>
<div class="im">><br>
> libcxxrt + libunwind is the way to go imho<br>
> <a href="https://github.com/pathscale/libcxxrt" target="_blank">https://github.com/pathscale/libcxxrt</a><br>
> <a href="https://github.com/pathscale/libunwind" target="_blank">https://github.com/pathscale/libunwind</a><br>
><br>
> These have been tested to work with clang - Admittedly the build process<br>
> may not be straight forward, but if enough interest maybe we solve that<br>
><br>
<br>
</div>Does this mean that if I want to build libcxxabi with clang++ or other<br>
compiler on linux, I must build libcxxrt and libunwind first? I have tried<br>
simply copying a file unwind.h from ${libunwind-path}/include to<br>
${libcxxabi-path}/include, and it can compile success. But I'm not sure<br>
whether that works right.</blockquote><div><br></div><div>I believe that should be fine; all unwind.h implementations should be essentially equivalent. The problem which libc++abi + Clang faces seems to be that the unwind.h provided by Clang is simply missing a bunch of the declarations that libc++abi expects it to contain. It tries to #include_next some other unwind.h to solve that problem, but that doesn't work so well if there's no system unwind.h and libunwind isn't installed. I don't know if there's a good reason why Clang's header is missing things which libc++abi uses, like _Unwind_Exception.</div>
</div>