summaryrefslogtreecommitdiff
path: root/sys-libs/llvm-libunwind
diff options
context:
space:
mode:
Diffstat (limited to 'sys-libs/llvm-libunwind')
-rw-r--r--sys-libs/llvm-libunwind/Manifest2
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-20.0.0_pre20241106.ebuild128
2 files changed, 130 insertions, 0 deletions
diff --git a/sys-libs/llvm-libunwind/Manifest b/sys-libs/llvm-libunwind/Manifest
index 235dd9ea405f..44b7823ce1a0 100644
--- a/sys-libs/llvm-libunwind/Manifest
+++ b/sys-libs/llvm-libunwind/Manifest
@@ -1,3 +1,4 @@
+DIST llvm-project-0e907c17214aa3b1a60b66867fea3cc0f0dcbaa0.tar.gz 222324382 BLAKE2B 8023108460d2af1688871d5534e18aa52e29f0e466bb5431194d1e710d7cd11bdab4be000433536b2d69c815a68624e347c69378a697d6fc55433bb4c2156767 SHA512 f0c23a0ac25de31f4c81f76ee82f3189da65d825579e923ace2b54714649c60d4d078220c9f2200b11f08d0c0e32c5b81a57ba368c11d67e763936df8a609279
DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52
DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7
@@ -16,4 +17,5 @@ EBUILD llvm-libunwind-18.1.8.ebuild 3407 BLAKE2B 1f0f6be6cd671b42d97bfa5ffc5fbf0
EBUILD llvm-libunwind-19.1.3.ebuild 3413 BLAKE2B 7f510e3b4b415a4178c5783a5252adf00ee264ec8173d459f1ee7df65dcb3c0c9bc8712384d2e4c9a5451a13c7868bef011d990158e4875f5ed8f343866bd228 SHA512 84de24446bb5b2239ef96155327e2c9b35a1a3d1c93c7acb5aaf046299dd8ebab6c89b9b2c6d36bd6adb6265492521c3a6f395f4fdecb37ea4b022e6a840f56f
EBUILD llvm-libunwind-20.0.0.9999.ebuild 3321 BLAKE2B 11e3226e8d8fd4781f2c3b9b4a40068a57fba8b0797726c88f592e69147a99bbfc78d98449daccfd0d30fd378ba8ced48d6dcd4df938fb7604d02dcee3f18f3e SHA512 9c815395dcb606b62f192c978185d88978c4f280a71c69611a1d106dcec1758b901cfd74652e2b4e4adcb944bec318de8f2aa8d32aaea3d471b43870dbf2d562
EBUILD llvm-libunwind-20.0.0_pre20241029.ebuild 3321 BLAKE2B 11e3226e8d8fd4781f2c3b9b4a40068a57fba8b0797726c88f592e69147a99bbfc78d98449daccfd0d30fd378ba8ced48d6dcd4df938fb7604d02dcee3f18f3e SHA512 9c815395dcb606b62f192c978185d88978c4f280a71c69611a1d106dcec1758b901cfd74652e2b4e4adcb944bec318de8f2aa8d32aaea3d471b43870dbf2d562
+EBUILD llvm-libunwind-20.0.0_pre20241106.ebuild 3321 BLAKE2B 11e3226e8d8fd4781f2c3b9b4a40068a57fba8b0797726c88f592e69147a99bbfc78d98449daccfd0d30fd378ba8ced48d6dcd4df938fb7604d02dcee3f18f3e SHA512 9c815395dcb606b62f192c978185d88978c4f280a71c69611a1d106dcec1758b901cfd74652e2b4e4adcb944bec318de8f2aa8d32aaea3d471b43870dbf2d562
MISC metadata.xml 438 BLAKE2B 2a36fbbc59e137056029c62aef6d167d9c82531c2582d7bad5cb13cc36e5c4c9518ffe8c56d06bbcfd97ad22eda71a8b776f3984195f53d06cf45659b438dc00 SHA512 4f18b054072d00e5440faa31a59f9ef587d035b5f25e30913f0b1449debee967fa794fae2548e87db3fb2177ce853ab075e1f11f3cc763f5d7fdf06147108845
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-20.0.0_pre20241106.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-20.0.0_pre20241106.ebuild
new file mode 100644
index 000000000000..f2972aaec14a
--- /dev/null
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-20.0.0_pre20241106.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit cmake-multilib flag-o-matic llvm.org llvm-utils python-any-r1
+inherit 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"
+IUSE="+clang +debug static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ !sys-libs/libunwind
+"
+DEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libunwind libcxx llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( libc libcxxabi llvm/utils/llvm-lit )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+multilib_src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ local libdir=$(get_libdir)
+
+ # https://github.com/llvm/llvm-project/issues/56825
+ # also separately bug #863917
+ filter-lto
+
+ if use clang; then
+ 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
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ # Respect upstream build type assumptions (bug #910436) where they do:
+ # -DLIBUNWIND_ENABLE_ASSERTIONS=ON =>
+ # -DCMAKE_BUILD_TYPE=DEBUG => -UNDEBUG
+ # -DCMAKE_BUILD_TYPE!=debug => -DNDEBUG
+ # -DLIBUNWIND_ENABLE_ASSERTIONS=OFF =>
+ # -UNDEBUG
+ # See also https://github.com/llvm/llvm-project/issues/86#issuecomment-1649668826.
+ use debug || append-cppflags -DNDEBUG
+
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -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
+}