[cfe-dev] Issues with building libcxxabi (and libcxx) on Linux
Sebastian Redl
sebastian.redl at getdesigned.at
Wed Apr 9 05:52:05 PDT 2014
On Apr 8, 2014, at 9:59, Derrick Johnson wrote:
> I’m trying to create a non-gcc toolchain (i.e., no libstdc++ or gcc involved). I began here: http://clang.llvm.org/get_started.html
>
> I successfully built Clang with these steps. Next up is libcxx, so I went here: http://libcxx.llvm.org
>
> It seems that if I want to build a non-gcc toolchain, I should follow the directions listed here:
> "Build on Linux using CMake and libc++abi.
>
> You will need to keep the source tree of libc++abi available on your build machine and your copy of the libc++abi shared library must be placed where your linker will find it."
>
> OK, so I went to the libcxxabi page here: http://libcxxabi.llvm.org
>
> I see no instructions how to build libcxxabi… There does seem to be a “buildit” inside of libcxxabi/lib, but what envvars / parameters should I feed it? For example, do I need to set the triple?
Use libcxxrt. While libc++abi is theoretically possible, it's really aimed at MacOS which has a separate libunwind, which means you would need to find and build a libunwind for Linux too.
libcxxrt is easier. Also, I recently submitted a patch that should make usage of the resulting libc++ easier. You might want to grab it (mail thread is called "Fixing common linking issues in Linux" or something like that) and apply it to your libc++ tree.
>
> Again, I have already built Clang 3.5 successfully using GCC, so I’m wondering also if I need to build libcxxabi and/or libcxx using Clang or GCC?
You should build these things with Clang. In theory it shouldn't matter, but I recommend Clang, because you will link them with your Clang-built actual code.
Sebastian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140409/7178d54d/attachment.html>
More information about the cfe-dev
mailing list