summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-12-27 21:37:46 +0100
committerMichał Górny <mgorny@gentoo.org>2024-12-27 22:25:01 +0100
commit818d9863e75f05dcbaf8e059d322b8b39458d36b (patch)
treeb87ace65cf1de4baed4887dcb12f3e8dfe7614a3 /llvm-runtimes
parentllvm-runtimes/compiler-rt-sanitizers: Add 20.0.0_pre20241227 snapshot (diff)
downloadgentoo-818d9863e75f05dcbaf8e059d322b8b39458d36b.tar.gz
gentoo-818d9863e75f05dcbaf8e059d322b8b39458d36b.tar.bz2
gentoo-818d9863e75f05dcbaf8e059d322b8b39458d36b.zip
llvm-runtimes/libunwind: Add 20.0.0_pre20241227 snapshot
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'llvm-runtimes')
-rw-r--r--llvm-runtimes/libunwind/Manifest1
-rw-r--r--llvm-runtimes/libunwind/libunwind-20.0.0_pre20241227.ebuild128
2 files changed, 129 insertions, 0 deletions
diff --git a/llvm-runtimes/libunwind/Manifest b/llvm-runtimes/libunwind/Manifest
index d3298cd16243..9d341938dab4 100644
--- a/llvm-runtimes/libunwind/Manifest
+++ b/llvm-runtimes/libunwind/Manifest
@@ -15,3 +15,4 @@ DIST llvm-project-19.1.6.src.tar.xz.sig 438 BLAKE2B 1791e98252ab78a9a762ef601ff9
DIST llvm-project-32f7f0010bca99ee4bd917f57272733fb2bf3bd9.tar.gz 223983502 BLAKE2B fd3e6b0b795abc42568ef98fa774d927029c18838a5d0f34eaa66c37976444a63f2fc5d883f3bf3a98533f51e387936f1c659230f31c757d26153425696a16cd SHA512 65a345ad5b77c627008f759947e5e9f28a62c8992d7146113e0446e5849feaf9088c15c8b22ca0824af5b927d6a417f5326258b489fb8ccea78ec9e0e0fe8fba
DIST llvm-project-49a5ad8e5714fd404210279303acc97b495d66d0.tar.gz 224456065 BLAKE2B 0077b9d37c479ac6190cc4b897cc35d6f1f3e6a772cd0620bcb1006afc19377e9968e38fb9d9adffe316e85290c9045deecbf9bf62b440c55968634b442edb31 SHA512 45d779eb27c230f656fda47c85127381cab8c8f7f75d77411c6960269f8aad5fa3c99c024a98ab8a349da1c88ad9d892cc82f91a6f344b791b281449031ae49a
DIST llvm-project-665d79f2e967a5eee6fff93685e45f50cf24cab2.tar.gz 224186302 BLAKE2B 6d4a02b6cfaf53324161c43ed02024f0fea0e7de25a9150cc0168602d7dff3f618026fa8318aa6e03904a9424afa1f12c5eb33bfdfa82e72210f34e5829a7804 SHA512 7482e176b1e2389b0dd0e67271cdb0489e9db0595874408156a034b40d336ecd960c63b89c237ca22eee3650880b0f08a97de14f8a17c918245915d422e568c9
+DIST llvm-project-ccfe0de0e1e37ed369c9bf89dd0188ba0afb2e9a.tar.gz 224396427 BLAKE2B 6e13c65d2ba83fdaf2db20a58b878106568406f07f9c2ceb47e4d2572fb041211384ed67c43801764060101ec4a1b04c18bf4097f37512d2751aa5860c1a8dc3 SHA512 ef4512b735568aaa627a7f4e9bac3fc4722db7a2b8bd1610faaf066856be9474fb297fd75b3c0dcc76f60ab35c3110fd329faad3e8d9b75e93844d56f41c03d1
diff --git a/llvm-runtimes/libunwind/libunwind-20.0.0_pre20241227.ebuild b/llvm-runtimes/libunwind/libunwind-20.0.0_pre20241227.ebuild
new file mode 100644
index 000000000000..6d8a5629bb47
--- /dev/null
+++ b/llvm-runtimes/libunwind/libunwind-20.0.0_pre20241227.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="
+ llvm-core/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ llvm-core/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
+}