From 40bcae8f68792cae36f7ccaed5989abf8d0a9c8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Tue, 28 Jul 2026 16:41:56 +0200 Subject: [PATCH] llvm-runtimes/libunwind: Remove old MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- llvm-runtimes/libunwind/Manifest | 3 - .../libunwind-23.0.0_pre20260707.ebuild | 193 ------------------ .../libunwind-23.0.0_pre20260716.ebuild | 193 ------------------ .../libunwind-24.0.0_pre20260716.ebuild | 193 ------------------ 4 files changed, 582 deletions(-) delete mode 100644 llvm-runtimes/libunwind/libunwind-23.0.0_pre20260707.ebuild delete mode 100644 llvm-runtimes/libunwind/libunwind-23.0.0_pre20260716.ebuild delete mode 100644 llvm-runtimes/libunwind/libunwind-24.0.0_pre20260716.ebuild diff --git a/llvm-runtimes/libunwind/Manifest b/llvm-runtimes/libunwind/Manifest index 819bec3375552..cbdbeb0abde8a 100644 --- a/llvm-runtimes/libunwind/Manifest +++ b/llvm-runtimes/libunwind/Manifest @@ -1,5 +1,4 @@ DIST llvm-project-0bf3638ddfe6e8bb3b79ebe8c2a918384a5df612.tar.gz 278258416 BLAKE2B 85007e0dfc4d5908c2fb0863923ef86e6a6c0d4302da6cbefd97097d6c19066234ca76a06af1c404aab7c3fe85ba6d9ac08aca5343b5f24fc3727dde1de2245e SHA512 91c6bab8974b95725cb70d2e3bef5abc5358e6836fe00c6348d4a886914b424fb49e9b0a85cf67af7b3a8f0c863d33d22fe74fffc63da813d7d63e3e0e32cf85 -DIST llvm-project-16c6374250a465204e067b518577a2b4fd655f93.tar.gz 277748803 BLAKE2B a34e8c3b9f8a36dd32b99abfb2f027541838724e6f6046b1ba0596e763bcd23b1c1e158bd67b6db7e08af415afb32bf2609ab17f82df799fa028d41c59e70973 SHA512 5857455b00331b8ae1927cf822a203a6ff1fb69b901a30232fe3df423e14a0ec71997b99fcbc94e6cd545291dc65ae28b909792830333aaf403847d152aad71c DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30 DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 DIST llvm-project-18.1.8.src.tar.xz 132067260 BLAKE2B a950492f1dbfb874dff63b1ffef86468169ba2f211a9733ec2d4cf30040f7f277ef00f048bb44dee9f97d7d762f0f241f19e5a2a7b0b49217d3821ddfc8c354f SHA512 25eeee9984c8b4d0fbc240df90f33cbb000d3b0414baff5c8982beafcc5e59e7ef18f6f85d95b3a5f60cb3d4cd4f877c80487b5768bc21bc833f107698ad93db @@ -12,6 +11,4 @@ DIST llvm-project-21.1.8.src.tar.xz 158958576 BLAKE2B 0d3d4ee920f8e5db50e9815261 DIST llvm-project-21.1.8.src.tar.xz.sig 119 BLAKE2B cffc1825f5778a3e3c128ec3e856ff6ee50687319d621cdf42e895abf67e05cc51cb7493308e2b506ab60dbdbaca7aa75eb9f78d91d42c81f9682a36f4042e9d SHA512 10f58eff58ed6e701d0f123b15e68c82ab8cbdf99b1c86c0d83e3b8553e90ea51055e30327e8e442ded57c8f503e2a2de9ee075e9c28b5ba815a0f8922f8671c DIST llvm-project-22.1.8.src.tar.xz 167061596 BLAKE2B 092204f62e0f0364a041c737eb2c25fd073cb5689663d6ccd5a9e4e1743d6d80822360d59b64bff7b4d7872a68a79e899bf2f75f384e55c7d313a79243576f03 SHA512 2615b20ba08534f83ab8ecc7b5ba43b5f1dfcf9cdb2534a32fcdbf0ccdd9a008b46276e45ef26ed9377f65b5e4ae89ea798f3863fd034484b5715140f3a7b35c DIST llvm-project-22.1.8.src.tar.xz.sig 119 BLAKE2B 2ce93472036e68782252991e4a8bdbeeec8706a56022220083a38a42ef18714a7894c41aaa04dc0d03f18601d8bfc1a5a030ed0ef0f0d64a662eae9843a4b362 SHA512 99a457b5b1fb409a5fe72b59ebd4ddae5cade3e5f2493e33b44d4f4b4625f7a1743f80106efb1134668842b15ea3400ce2c29263bec8ff986e05040910125e15 -DIST llvm-project-43ccdbc84774da0ae4cb5131f2245a9633d977b9.tar.gz 276747748 BLAKE2B 874e5d95e8f3a8401ec989f093095be6203fa77c9729ef66981a13cbff91e6937a9925257f051650c820ea82f6ab8c03884a5a3599e2b450bed11b95c54cc440 SHA512 a84e2f97abc92bdf4da8a00cc89f22d28adef44b316f02992708ee2ebb78f0d4ce38254389a1408caa4b0846134af47ca4bccbfe987f014fefe439495bed3848 DIST llvm-project-bb9934d4dfef9033ded36d26827dbb6d3ac1dd92.tar.gz 277566365 BLAKE2B 401320655d19b3d430d15a48e2daf1f00567ef87fd2d1f86c3d505a1b2f5920db6cbfa620bf1b0561cd318d6046830d5b19fe0e7b58647863372c6c96526526c SHA512 354b901ca80227abe6b0514eeba437f237ea2658dd1927bb6e1d3b0b298bdb0dfdb7855c0f359eea4977dd344f6d0f6d1ce486ea0100d4a5615a9139ef198fca -DIST llvm-project-ce6af707aac85db6e176ad0faa3bfe608e1a68f5.tar.gz 277486383 BLAKE2B 03b4df53f1605e4cbe2a8b23a875b78f1336c5b0212d5e9591bf8f898abf0d947f8ff4551b2c9c0044fa18da1dd98e4ded4fe6ce7cb56df17e6cf9c1912afafe SHA512 5be1db6b9cabeed3b7db4c94c7dc06b5fac0dd5f4225a8dd06792494a0ca1dce45959b03e342edf2bce076fd19de81aa6f1451eda09047532e61546cf1f8d283 diff --git a/llvm-runtimes/libunwind/libunwind-23.0.0_pre20260707.ebuild b/llvm-runtimes/libunwind/libunwind-23.0.0_pre20260707.ebuild deleted file mode 100644 index abea5eaa8ce76..0000000000000 --- a/llvm-runtimes/libunwind/libunwind-23.0.0_pre20260707.ebuild +++ /dev/null @@ -1,193 +0,0 @@ -# Copyright 1999-2026 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} - llvm-core/clang-linker-config:${LLVM_MAJOR} - llvm-runtimes/clang-rtlib-config:${LLVM_MAJOR} - ) - !test? ( - ${PYTHON_DEPS} - ) - test? ( - $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') - ) -" - -LLVM_COMPONENTS=( runtimes libunwind libcxx llvm/{cmake,utils} cmake ) -LLVM_TEST_COMPONENTS=( libc libcxxabi ) -llvm.org_set_globals - -python_check_deps() { - use test || return 0 - python_has_version "dev-python/lit[${PYTHON_USEDEP}]" -} - -test_compiler() { - target_is_not_host && return - local compiler=${1} - shift - ${compiler} ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \ - <<<'int main() { return 0; }' &>/dev/null -} - -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-${LLVM_MAJOR} - local -x CXX=${CTARGET}-clang++-${LLVM_MAJOR} - strip-unsupported-flags - - # The full clang configuration might not be ready yet. Use the partial - # configuration files that are guaranteed to exist even during initial - # installations and upgrades. - local flags=( - --config="${ESYSROOT}"/etc/clang/"${LLVM_MAJOR}"/gentoo-{rtlib,linker}.cfg - ) - local -x CFLAGS="${CFLAGS} ${flags[@]}" - local -x CXXFLAGS="${CXXFLAGS} ${flags[@]}" - local -x LDFLAGS="${LDFLAGS} ${flags[@]}" - fi - - # Check whether C compiler runtime is available. - if ! test_compiler "$(tc-getCC)"; then - local nolib_flags=( -nodefaultlibs -lc ) - if test_compiler "$(tc-getCC)" "${nolib_flags[@]}"; then - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" - ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}" - elif test_compiler "$(tc-getCC)" "${nolib_flags[@]}" -nostartfiles; then - # Avoiding -nostartfiles earlier on for bug #862540, - # and set available entry symbol for bug #862798. - nolib_flags+=( -nostartfiles -e main ) - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" - ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}" - fi - fi - # Check whether C++ standard library is available, - local nostdlib_flags=( -nostdlib++ ) - if ! test_compiler "$(tc-getCXX)" && - test_compiler "$(tc-getCXX)" "${nostdlib_flags[@]}" - then - local -x LDFLAGS="${LDFLAGS} ${nostdlib_flags[*]}" - ewarn "${CXX} seems to lack runtime, trying with ${nostdlib_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 -} diff --git a/llvm-runtimes/libunwind/libunwind-23.0.0_pre20260716.ebuild b/llvm-runtimes/libunwind/libunwind-23.0.0_pre20260716.ebuild deleted file mode 100644 index abea5eaa8ce76..0000000000000 --- a/llvm-runtimes/libunwind/libunwind-23.0.0_pre20260716.ebuild +++ /dev/null @@ -1,193 +0,0 @@ -# Copyright 1999-2026 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} - llvm-core/clang-linker-config:${LLVM_MAJOR} - llvm-runtimes/clang-rtlib-config:${LLVM_MAJOR} - ) - !test? ( - ${PYTHON_DEPS} - ) - test? ( - $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') - ) -" - -LLVM_COMPONENTS=( runtimes libunwind libcxx llvm/{cmake,utils} cmake ) -LLVM_TEST_COMPONENTS=( libc libcxxabi ) -llvm.org_set_globals - -python_check_deps() { - use test || return 0 - python_has_version "dev-python/lit[${PYTHON_USEDEP}]" -} - -test_compiler() { - target_is_not_host && return - local compiler=${1} - shift - ${compiler} ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \ - <<<'int main() { return 0; }' &>/dev/null -} - -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-${LLVM_MAJOR} - local -x CXX=${CTARGET}-clang++-${LLVM_MAJOR} - strip-unsupported-flags - - # The full clang configuration might not be ready yet. Use the partial - # configuration files that are guaranteed to exist even during initial - # installations and upgrades. - local flags=( - --config="${ESYSROOT}"/etc/clang/"${LLVM_MAJOR}"/gentoo-{rtlib,linker}.cfg - ) - local -x CFLAGS="${CFLAGS} ${flags[@]}" - local -x CXXFLAGS="${CXXFLAGS} ${flags[@]}" - local -x LDFLAGS="${LDFLAGS} ${flags[@]}" - fi - - # Check whether C compiler runtime is available. - if ! test_compiler "$(tc-getCC)"; then - local nolib_flags=( -nodefaultlibs -lc ) - if test_compiler "$(tc-getCC)" "${nolib_flags[@]}"; then - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" - ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}" - elif test_compiler "$(tc-getCC)" "${nolib_flags[@]}" -nostartfiles; then - # Avoiding -nostartfiles earlier on for bug #862540, - # and set available entry symbol for bug #862798. - nolib_flags+=( -nostartfiles -e main ) - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" - ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}" - fi - fi - # Check whether C++ standard library is available, - local nostdlib_flags=( -nostdlib++ ) - if ! test_compiler "$(tc-getCXX)" && - test_compiler "$(tc-getCXX)" "${nostdlib_flags[@]}" - then - local -x LDFLAGS="${LDFLAGS} ${nostdlib_flags[*]}" - ewarn "${CXX} seems to lack runtime, trying with ${nostdlib_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 -} diff --git a/llvm-runtimes/libunwind/libunwind-24.0.0_pre20260716.ebuild b/llvm-runtimes/libunwind/libunwind-24.0.0_pre20260716.ebuild deleted file mode 100644 index abea5eaa8ce76..0000000000000 --- a/llvm-runtimes/libunwind/libunwind-24.0.0_pre20260716.ebuild +++ /dev/null @@ -1,193 +0,0 @@ -# Copyright 1999-2026 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} - llvm-core/clang-linker-config:${LLVM_MAJOR} - llvm-runtimes/clang-rtlib-config:${LLVM_MAJOR} - ) - !test? ( - ${PYTHON_DEPS} - ) - test? ( - $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') - ) -" - -LLVM_COMPONENTS=( runtimes libunwind libcxx llvm/{cmake,utils} cmake ) -LLVM_TEST_COMPONENTS=( libc libcxxabi ) -llvm.org_set_globals - -python_check_deps() { - use test || return 0 - python_has_version "dev-python/lit[${PYTHON_USEDEP}]" -} - -test_compiler() { - target_is_not_host && return - local compiler=${1} - shift - ${compiler} ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \ - <<<'int main() { return 0; }' &>/dev/null -} - -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-${LLVM_MAJOR} - local -x CXX=${CTARGET}-clang++-${LLVM_MAJOR} - strip-unsupported-flags - - # The full clang configuration might not be ready yet. Use the partial - # configuration files that are guaranteed to exist even during initial - # installations and upgrades. - local flags=( - --config="${ESYSROOT}"/etc/clang/"${LLVM_MAJOR}"/gentoo-{rtlib,linker}.cfg - ) - local -x CFLAGS="${CFLAGS} ${flags[@]}" - local -x CXXFLAGS="${CXXFLAGS} ${flags[@]}" - local -x LDFLAGS="${LDFLAGS} ${flags[@]}" - fi - - # Check whether C compiler runtime is available. - if ! test_compiler "$(tc-getCC)"; then - local nolib_flags=( -nodefaultlibs -lc ) - if test_compiler "$(tc-getCC)" "${nolib_flags[@]}"; then - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" - ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}" - elif test_compiler "$(tc-getCC)" "${nolib_flags[@]}" -nostartfiles; then - # Avoiding -nostartfiles earlier on for bug #862540, - # and set available entry symbol for bug #862798. - nolib_flags+=( -nostartfiles -e main ) - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" - ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}" - fi - fi - # Check whether C++ standard library is available, - local nostdlib_flags=( -nostdlib++ ) - if ! test_compiler "$(tc-getCXX)" && - test_compiler "$(tc-getCXX)" "${nostdlib_flags[@]}" - then - local -x LDFLAGS="${LDFLAGS} ${nostdlib_flags[*]}" - ewarn "${CXX} seems to lack runtime, trying with ${nostdlib_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 -}