commit:     ce5f9bf09140c0b214ae965200913b279ae711a4
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 21 08:12:59 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Aug 21 08:13:43 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce5f9bf0

llvm-runtimes/libunwind: Add 22.0.0_pre20250820 snapshot

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

 llvm-runtimes/libunwind/Manifest                   |   1 +
 .../libunwind/libunwind-22.0.0_pre20250820.ebuild  | 150 +++++++++++++++++++++
 2 files changed, 151 insertions(+)

diff --git a/llvm-runtimes/libunwind/Manifest b/llvm-runtimes/libunwind/Manifest
index c91e92b1bccb..c4708ba2bfd9 100644
--- a/llvm-runtimes/libunwind/Manifest
+++ b/llvm-runtimes/libunwind/Manifest
@@ -20,3 +20,4 @@ DIST llvm-project-21.1.0-rc3.src.tar.xz 158924056 BLAKE2B 
5f3f46a499120c810a9443
 DIST llvm-project-21.1.0-rc3.src.tar.xz.sig 438 BLAKE2B 
1a339fe00c27cddc508b369c4007e501266df42fbe0f448df3eecbf853ffa2915a6beef26e69c38169d37c12edcf60ac7c8ca5c0ae671b4c593356ccc6f3e3d5
 SHA512 
df8b3f747858fbb8c662899e6ea792556405cee2318be125a04e7b94c6dcebbed3ff01890f5e0c52e13b251243cfd1194806cf5ef52b482ae67d68be585574ad
 DIST llvm-project-92164faf17d553359418b9f49c1a41d680d0de49.tar.gz 245033829 
BLAKE2B 
7bf707e6455259417864a40c53beba4c4a9f6e4cf983671075016b95e537d2c249f97444089734718b5f2c989a2614028bd22142ccadae9c382e66b28758ecab
 SHA512 
bf4105173144e6bb9cdc99ae67b7350228b37eae248c15aae2ce29877a8ee4cb76781a6beff366961fa366d31683b43421d684d019e25f0280735ccd6c22a432
 DIST llvm-project-b075dadbd3e0e928bdeddb3d36af64e8a383e305.tar.gz 244584834 
BLAKE2B 
e6924d5fcc90431bdf859c3d728e44c348fa8ec336967c95fa9d253519c7bf9b3b200048ff8910eea78e5481a11704330ad72960fe753930036f75bca5b163b7
 SHA512 
80232cd00a2981392cf9fb22daceb164f965d5d5c9edb431226713a5e2f75ba5aaf747329ae5f4b852fd5e7f0be62ad978529080b4dce1bac7af480905b61c3b
+DIST llvm-project-d76bb2bb894a4641ed62447327b40a347a6ae883.tar.gz 245754836 
BLAKE2B 
487e6396f1b381743dfbbd13e8f55728f1f915c042c717433e498127ecdeb4405a67e998059f5eb1f84e851437b805ba9e9c0e390c61092c7ee336a801d6f342
 SHA512 
42e38f917357918e8d62d8893a1ba34b431cd8aabf924b89e5352013bb8984c10c0b2796fa9a725bab71e52f99216604b75606bde3b795d20082d97d0f7a82ad

diff --git a/llvm-runtimes/libunwind/libunwind-22.0.0_pre20250820.ebuild 
b/llvm-runtimes/libunwind/libunwind-22.0.0_pre20250820.ebuild
new file mode 100644
index 000000000000..1aba2f538f51
--- /dev/null
+++ b/llvm-runtimes/libunwind/libunwind-22.0.0_pre20250820.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..14} )
+inherit cmake-multilib crossdev flag-o-matic llvm.org llvm-utils
+inherit 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"
+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() {
+       if use clang; then
+               llvm_prepend_path -b "${LLVM_MAJOR}"
+       fi
+
+       local libdir=$(get_libdir)
+
+       # https://github.com/llvm/llvm-project/issues/56825
+       # also separately bug #863917
+       filter-lto
+
+       # Workaround for bgo #961153.
+       # TODO: Fix the multilib.eclass, so it sets CTARGET properly.
+       if ! is_crosspkg; then
+               export CTARGET=${CHOST}
+       fi
+
+       if use clang; then
+               local -x CC=${CTARGET}-clang
+               local -x CXX=${CTARGET}-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=(
+               -DLLVM_ROOT="${ESYSROOT}/usr/lib/llvm/${LLVM_MAJOR}"
+
+               -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+               -DCMAKE_CXX_COMPILER_TARGET="${CTARGET}"
+               -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
+
+               # cross-unwinding increases unwinding footprint (to account
+               # for the worst case) and causes some breakage on AArch64
+               # https://github.com/llvm/llvm-project/issues/152549
+               -DLIBUNWIND_ENABLE_CROSS_UNWINDING=OFF
+
+               # avoid dependency on libgcc_s if compiler-rt is used
+               -DLIBUNWIND_USE_COMPILER_RT=${use_compiler_rt}
+       )
+       if is_crosspkg; then
+               mycmakeargs+=(
+                       # Without this, the compiler will compile a test program
+                       # and fail due to no builtins.
+                       -DCMAKE_C_COMPILER_WORKS=1
+                       -DCMAKE_CXX_COMPILER_WORKS=1
+                       # Install inside the cross sysroot.
+                       -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/${CTARGET}/usr"
+               )
+       fi
+       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=$(llvm_cmake_use_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