summaryrefslogtreecommitdiff
path: root/sys-libs/llvm-libunwind/llvm-libunwind-12.0.1.9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-07-08 15:03:58 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-07-08 15:03:58 +0100
commit814f4cf860e299a046b649eaee5463427984c09c (patch)
tree74c45f097899310e599dad6b8df5b63e0f085bc0 /sys-libs/llvm-libunwind/llvm-libunwind-12.0.1.9999.ebuild
parent7f0ccc917c7abe6223784c703d86cd14755691fb (diff)
gentoo resync : 08.07.2021
Diffstat (limited to 'sys-libs/llvm-libunwind/llvm-libunwind-12.0.1.9999.ebuild')
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-12.0.1.9999.ebuild18
1 files changed, 16 insertions, 2 deletions
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-12.0.1.9999.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-12.0.1.9999.ebuild
index bf538b66689b..d64e79cc6b30 100644
--- a/sys-libs/llvm-libunwind/llvm-libunwind-12.0.1.9999.ebuild
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-12.0.1.9999.ebuild
@@ -4,8 +4,8 @@
EAPI=7
CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{7..9} )
-inherit cmake-multilib llvm llvm.org python-any-r1
+PYTHON_COMPAT=( python3_{8..10} )
+inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="C++ runtime stack unwinder from LLVM"
HOMEPAGE="https://github.com/llvm-mirror/libunwind"
@@ -38,8 +38,19 @@ pkg_setup() {
}
multilib_src_configure() {
+ local use_compiler_rt=OFF
local libdir=$(get_libdir)
+ # link to compiler-rt
+ # https://github.com/gentoo/gentoo/pull/21516
+ if tc-is-clang; then
+ local compiler-rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
+ ${LD_FLAGS} -print-libgcc-file-name)
+ if [[ ${compiler_rt} == *libclang_rt* ]]; then
+ use_compiler_rt=ON
+ fi
+ fi
+
local mycmakeargs=(
-DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
@@ -49,6 +60,9 @@ multilib_src_configure() {
# support non-native unwinding; given it's small enough,
# enable it unconditionally
-DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON
+
+ # avoid dependency on libgcc_s if compiler-rt is used
+ -DLIBUNWIND_USE_COMPILER_RT=${use_compiler_rt}
)
if use test; then
local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)