[cfe-users] Using libunwind
Ben Pope
benpope81 at gmail.com
Mon May 4 23:14:48 PDT 2015
How do I build clang/libc++/libc++abi/libunwind/compiler-rt without
requiring libgcc_s?
Do I need --rtlib=compiler-rt somewhere?
I build like this:
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DLIBCXX_CXX_ABI=libcxxabi
-DLIBCXXABI_USE_LLVM_UNWINDER=YES
-DLIBCXX_CXX_ABI_INCLUDE_PATHS=../../llvm/projects/libcxxabi/include
-DLIT_EXECUTABLE=../../llvm/utils/lit/lit.py
-DLLVM_CONFIG_PATH=../../llvm/tools.llvm-config
-DCMAKE_C_COMPILER=clang-3.7 -DCMAKE_CXX_COMPILER=clang++-3.7
-DCMAKE_INSTALL_PREFIX=../../install/release ../../llvm/
And end up with:
ben at yyls03:~/development/test$ ldd
~/development/llvm/trunk/build/release/lib/libunwind.so
linux-vdso.so.1 => (0x00007fffdf168000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f42a0203000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f429ffff000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007f429fde0000)
/lib64/ld-linux-x86-64.so.2 (0x00007f42a0600000)
ben at yyls03:~/development/test$ ldd
~/development/llvm/trunk/build/release/lib/libc++abi.so
linux-vdso.so.1 => (0x00007ffcc90c2000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe3fad53000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007fe3fab35000)
libunwind.so.1 =>
/home/ben/development/llvm/trunk/build/release/lib/../lib/libunwind.so.1
(0x00007fe3fab27000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe3fa923000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe3fb18f000)
ben at yyls03:~/development/test$ ldd
~/development/llvm/trunk/build/release/lib/libc++.so
linux-vdso.so.1 => (0x00007ffd3bfc1000)
libc++abi.so.1 =>
/home/ben/development/llvm/trunk/build/release/lib/../lib/libc++abi.so.1
(0x00007fe8077aa000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007fe807563000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe80719d000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe806e97000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fe806c8f000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fe806a77000)
libunwind.so.1 =>
/home/ben/development/llvm/trunk/build/release/lib/../lib/../lib/libunwind.so.1
(0x00007fe806a6a000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe806865000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe8078b8000)
Is it correct that libc++ depends on libgcc_s?
Ben
More information about the cfe-users
mailing list