summaryrefslogtreecommitdiff
path: root/sys-libs/llvm-libunwind
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-08-06 02:09:04 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-08-06 02:09:04 +0100
commit51f0d16e058c162dbce0f93d871ba45683b0ab3a (patch)
tree8dd3bc53a0d23549a8f210ce4bfdf74b36b9319f /sys-libs/llvm-libunwind
parent35bf81c760d4e362615c32e69329ef61a01281f7 (diff)
gentoo auto-resync : 06:08:2022 - 02:09:04
Diffstat (limited to 'sys-libs/llvm-libunwind')
-rw-r--r--sys-libs/llvm-libunwind/Manifest1
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-16.0.0.9999.ebuild123
2 files changed, 124 insertions, 0 deletions
diff --git a/sys-libs/llvm-libunwind/Manifest b/sys-libs/llvm-libunwind/Manifest
index 0a7c752dbcfc..3f9796151dad 100644
--- a/sys-libs/llvm-libunwind/Manifest
+++ b/sys-libs/llvm-libunwind/Manifest
@@ -5,4 +5,5 @@ DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69b
EBUILD llvm-libunwind-13.0.1.ebuild 3814 BLAKE2B 90b96e50590839f5bcc8e9d47219e0a6af25c23fd7a6851316596960c00481fbbd02ae606092d79f15648cfb511be9ce44cfec8bb3f185e098eb4eb6bec1c0da SHA512 ee5d861f886d8e33946056ac14a838788dcca42f9e3879fee79f7a211fa2b4eb4481b0f61ec1c77c9b41c9be97ded6fa4e32f63c35bd6ea2a28d0bc503f7ba29
EBUILD llvm-libunwind-14.0.6.ebuild 3203 BLAKE2B 8ae5c78793e1a71e5f884666d2248bf0495342c4e8bdd80a4fab994e0d46c561790f9dfab32a6d04007dbbe60e5be7b3aa858f379a10f57d6fed3e2e43efc839 SHA512 1065bb6669a83d982e901f50701daf16bd4ae776e0c858fdcfec96c5d41f3a87c7cf53634b6a391422664839e264b9df96752d88054085a498ba718294becc16
EBUILD llvm-libunwind-15.0.0.9999.ebuild 3025 BLAKE2B d5d6b962382b7c52ca4b95f81d2f3ebb38e35ed646653b0a277abdb53da4d88f195f7fb0dce10e46bc85b20815bebc26ded2aeacb962240c9e70ee6864305416 SHA512 caec661ab8860c6f992b41415f8d9ff215e5c2f95f3b446a2807ffe6ad59c686ef14b3d94f996cb1e090d4e8c49d1fcff67f7ee13b2d751c95adeea8fc78f26e
+EBUILD llvm-libunwind-16.0.0.9999.ebuild 3025 BLAKE2B d5d6b962382b7c52ca4b95f81d2f3ebb38e35ed646653b0a277abdb53da4d88f195f7fb0dce10e46bc85b20815bebc26ded2aeacb962240c9e70ee6864305416 SHA512 caec661ab8860c6f992b41415f8d9ff215e5c2f95f3b446a2807ffe6ad59c686ef14b3d94f996cb1e090d4e8c49d1fcff67f7ee13b2d751c95adeea8fc78f26e
MISC metadata.xml 438 BLAKE2B 2a36fbbc59e137056029c62aef6d167d9c82531c2582d7bad5cb13cc36e5c4c9518ffe8c56d06bbcfd97ad22eda71a8b776f3984195f53d06cf45659b438dc00 SHA512 4f18b054072d00e5440faa31a59f9ef587d035b5f25e30913f0b1449debee967fa794fae2548e87db3fb2177ce853ab075e1f11f3cc763f5d7fdf06147108845
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-16.0.0.9999.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-16.0.0.9999.ebuild
new file mode 100644
index 000000000000..2abe825b0946
--- /dev/null
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-16.0.0.9999.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CMAKE_ECLASS=cmake
+PYTHON_COMPAT=( python3_{8..11} )
+inherit cmake-multilib flag-o-matic llvm llvm.org python-any-r1 \
+ toolchain-funcs
+
+DESCRIPTION="C++ runtime stack unwinder from LLVM"
+HOMEPAGE="https://llvm.org/docs/ExceptionHandling.html"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS=""
+IUSE="+clang debug static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ !sys-libs/libunwind
+"
+# llvm-6 for new lit options
+DEPEND="
+ >=sys-devel/llvm-6
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libunwind libcxx llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( libcxxabi llvm/utils/llvm-lit )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+multilib_src_configure() {
+ local use_compiler_rt=OFF
+ local libdir=$(get_libdir)
+
+ if use clang && ! tc-is-clang; then
+ # Only do this conditionally to allow overriding with
+ # e.g. CC=clang-13 in case of breakage
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # 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=(
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES="libunwind"
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
+ -DLIBUNWIND_ENABLE_STATIC=$(usex static-libs)
+ -DLIBUNWIND_INCLUDE_TESTS=$(usex test)
+ -DLIBUNWIND_INSTALL_HEADERS=ON
+
+ # 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
+ mycmakeargs+=(
+ -DLLVM_ENABLE_RUNTIMES="libunwind;libcxxabi;libcxx"
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx"
+
+ -DLIBCXXABI_LIBDIR_SUFFIX=
+ -DLIBCXXABI_ENABLE_SHARED=OFF
+ -DLIBCXXABI_ENABLE_STATIC=ON
+ -DLIBCXXABI_USE_LLVM_UNWINDER=ON
+ -DLIBCXXABI_INCLUDE_TESTS=OFF
+
+ -DLIBCXX_LIBDIR_SUFFIX=
+ -DLIBCXX_ENABLE_SHARED=OFF
+ -DLIBCXX_ENABLE_STATIC=ON
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=OFF
+ -DLIBCXX_INCLUDE_TESTS=OFF
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ )
+ fi
+
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-unwind
+}
+
+multilib_src_install() {
+ DESTDIR=${D} cmake_build install-unwind
+}