commit:     d896f358a7b9260be9fafabe4709d67757bf6905
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Aug  5 18:22:31 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Aug  5 18:22:31 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d896f358

sys-libs/llvm-libunwind: Add 19.1.0_rc2

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sys-libs/llvm-libunwind/Manifest                   |   2 +
 .../llvm-libunwind-19.1.0_rc2.ebuild               | 128 +++++++++++++++++++++
 2 files changed, 130 insertions(+)

diff --git a/sys-libs/llvm-libunwind/Manifest b/sys-libs/llvm-libunwind/Manifest
index 279925324291..0f284eff910c 100644
--- a/sys-libs/llvm-libunwind/Manifest
+++ b/sys-libs/llvm-libunwind/Manifest
@@ -9,3 +9,5 @@ DIST llvm-project-18.1.8.src.tar.xz 132067260 BLAKE2B 
a950492f1dbfb874dff63b1ffe
 DIST llvm-project-18.1.8.src.tar.xz.sig 566 BLAKE2B 
6ab0efc5b38d4483f4e32e8b85774b2edd5d88fdf29f23b88eb0b5130a7a7f0e80549612b025f927e92de4a08ff7c292cff224dbda91a5d598244e98f7ad0fbd
 SHA512 
ddfd1e8a06756759af6cbe488c82a6d6a62ba91f3e8a0eb4cece561321824f5d165b08ed91010588790b76e19790931d2651b24dba8567e3b151d3cb43bec25b
 DIST llvm-project-19.1.0-rc1.src.tar.xz 141259912 BLAKE2B 
e882ff54a96900b4948e572cf073c897df6b4ce159869a42c56a4c830187d83b8d9d9b3940dad22346f142f9674575191cc9d079312f0d9aa1105390c07f504f
 SHA512 
9f43dbe8d5f1322f73fb1c638ce4fc7a8179c9ca33fdbfbb6d72632a3d6bf4bc4993f8f5ec827510af55f4f013fba8fe3d7d9e45f262eec16ecf9ab39296b4b8
 DIST llvm-project-19.1.0-rc1.src.tar.xz.sig 438 BLAKE2B 
cc1acbd33440bb14f78c19cc3061a5c0cb3d9dbcd6f0d1516fe118ac02c500ba4df129f870ddf3fe1a52519feab4b631866413fce9c726272d52c3865a9eea27
 SHA512 
a3361992b55be13aeff5d91bb90a15e3a2ab89e486328fa4d9abc9efa3925aee70bea48449b003ae1926909d389bf71afcf6dc56d800ed2e0e3dbc65da6e4e92
+DIST llvm-project-19.1.0-rc2.src.tar.xz 141264388 BLAKE2B 
690b4912d9e4a8019b7990934dd6486362337ccb303dca119c0e75aa1063ad452222be1ee965e43b160dfcea20e491a20c289344152666b618712a1d76dc4780
 SHA512 
508a401e8433b1ac9a399246eb1a3c18faed7c3d41d8c118e77cefbb64cc6d6e171bd41a3e5584f6c84df141ba6819f1a1cce75b5c1ef33e3d2ac239e662d07c
+DIST llvm-project-19.1.0-rc2.src.tar.xz.sig 438 BLAKE2B 
1eaf10a1419ecf009c033a8f6ecb6eec86107d81621d5b4665c8d929b05f4845ce0c432017343d7b06f33e6ff6384df9e1d8fc7b9c6efe7f10ef69798891b7e5
 SHA512 
b46e9a1d40f891c5f3544d8cc6295900bff5dda9a4a526b8db55a42a37ae90deb216b316d2117984e82f4e918d15343e75b3b9e6d6c773866707c3398e032826

diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-19.1.0_rc2.ebuild 
b/sys-libs/llvm-libunwind/llvm-libunwind-19.1.0_rc2.ebuild
new file mode 100644
index 000000000000..e4c76c15ebc8
--- /dev/null
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-19.1.0_rc2.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=( 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
+}

Reply via email to