From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 88C91158176 for ; Tue, 21 Oct 2025 18:44:06 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 73D71341F5E for ; Tue, 21 Oct 2025 18:44:06 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id ACF5311057E; Tue, 21 Oct 2025 18:43:42 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id A7D2211057E for ; Tue, 21 Oct 2025 18:43:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5C1CA341CBA for ; Tue, 21 Oct 2025 18:43:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B05EC3B5F for ; Tue, 21 Oct 2025 18:43:38 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1761072105.a0ba16ac18a3aa7cd270d3bca4c1fe8601825cf7.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/libunwind/ X-VCS-Repository: repo/gentoo X-VCS-Files: llvm-runtimes/libunwind/Manifest llvm-runtimes/libunwind/libunwind-21.1.4.ebuild X-VCS-Directories: llvm-runtimes/libunwind/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: a0ba16ac18a3aa7cd270d3bca4c1fe8601825cf7 X-VCS-Branch: master Date: Tue, 21 Oct 2025 18:43:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 7be8c040-32f1-402f-9530-291cc7b1c71d X-Archives-Hash: 7e618c19ddb604821fc66c75a7480145 commit: a0ba16ac18a3aa7cd270d3bca4c1fe8601825cf7 Author: Michał Górny gentoo org> AuthorDate: Tue Oct 21 10:56:29 2025 +0000 Commit: Michał Górny gentoo org> CommitDate: Tue Oct 21 18:41:45 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0ba16ac llvm-runtimes/libunwind: Add 21.1.4 Signed-off-by: Michał Górny gentoo.org> llvm-runtimes/libunwind/Manifest | 2 + llvm-runtimes/libunwind/libunwind-21.1.4.ebuild | 194 ++++++++++++++++++++++++ 2 files changed, 196 insertions(+) diff --git a/llvm-runtimes/libunwind/Manifest b/llvm-runtimes/libunwind/Manifest index 0a27b50f01b5..006c05ea3c64 100644 --- a/llvm-runtimes/libunwind/Manifest +++ b/llvm-runtimes/libunwind/Manifest @@ -14,6 +14,8 @@ DIST llvm-project-21.1.2.src.tar.xz 158926856 BLAKE2B 1b5684586297ad637c6da09768 DIST llvm-project-21.1.2.src.tar.xz.sig 566 BLAKE2B 6209caf851c681e6f63ed1bd9589ac139c104d6ee21f463aacda472e30a847c32f3bd74a04208af05bb6203d8fa31bdc0028c0e72736a3037940e75eda615415 SHA512 dd8aa57451752a9207c276117a4b8a86f41263ea3ccc4fa198cd40d6fec79acd0ba126c4b84a1acbb52bbb2bce029fbc336deac8131be94747dd04e4a0f69331 DIST llvm-project-21.1.3.src.tar.xz 158943752 BLAKE2B ad9ee083584cb72fea3722feb518f6c933c3a34ba91b1ca8b724f461aa744475a783512dd6f0ab60d533c73b37e42b32a06f905d4869f770a68180649656df44 SHA512 d3058e7c18ada2a6a6192c7e75970406520e0d2ba390dba3b89e99f05959198fd2976d38c200f8e6af37fb569d866b6367bf6e0e249fe4b340dfab74499e5723 DIST llvm-project-21.1.3.src.tar.xz.sig 119 BLAKE2B 675873fb6ce9a6b682d0ecdc5ec6ca8691d7f8f6bc72e6039a90c21f99d753a4b595f06676f9b5c1a23ebce872320cc67bd1687e8324f163ecbc4f22032bdf52 SHA512 d218a4071451e32a77890dd2e7de7a3b8a310ca85c7e6d90b88d85bad128979cf6866c9d772b880b50da2ec117832e77ba162049478c1deb7b0299cae008151a +DIST llvm-project-21.1.4.src.tar.xz 158939036 BLAKE2B b87eff4e3cb881d86aafcfdb46d85344ad6ae92d5c1e72c05282f375b4b11844756d0e6b4d0da5e522a348170a5da9842917737e272b758d8dde7e1fb2bee135 SHA512 a8c0883abe7c5a3e55ca7ed0fd974fae4351184a0b0df18295a982ca8ddb0f8d167353564204ed00f0cd9a1d8baef7074c0b39a99e0b5c52ced6bbee73dde3da +DIST llvm-project-21.1.4.src.tar.xz.sig 119 BLAKE2B c74a56448ad3e325234fcbe7d62ea888831e1e7696afb5aa5a185ea76a0880abe2d755f9e69a07760bbf9380534c3bb96c920ed6359ffd0f5f51c962d1494dcf SHA512 4812c2e3861aa3b726d842c3ca259b19ef1aa531fed9f6f47099483de91de2b2a165f40d243f6f40f2eea749741d5f8b7090f394399c56db02053f308921077a DIST llvm-project-6a0e5b2fd7c340a872ae1e011cfb9de0d188feba.tar.gz 249848364 BLAKE2B 5d8eadfd43e1a131d7c061968c7d306b0537c0983c9366973d5b8d1bab4b384d1319604e12f097e235e077aefcd8b9c8395c3e16b53612f9f06fb11ba358aad6 SHA512 d931218ca1dafab09525f862f4b993cb6dde2f8738092e84b87542318d05c81fd41499098833f8629501c19f4fa741a35fc6447631f1c8830b2bb0b2cb64cc43 DIST llvm-project-89ed5255b9ee88119e409a6d986eb1ad0e8f08e3.tar.gz 248431210 BLAKE2B b98dfe5ae46190a5a2460c965f0ec51d2f65a9d1d14f82afa19a10f00a2c29520c52309ee66d71efed6361aa675abcc9bd1b5e61e1c3b1aa9bac4984050c2bc2 SHA512 f860f529f4eb67f4a5875d9931accae2f48b88486dd6715a2ca2add7d5aa1541a30e323612394162e65597054d61a879a9ba94e4dbf417c3fb5f8ff069c2d924 DIST llvm-project-b1e29ec3b73b9dd06656c7e30ace597ff72cde70.tar.gz 248630276 BLAKE2B ea1532ba05661de37f3d6bac6643f2f3000710f4c4b8c508c9b980da64964e60cd46d0b8e18d666b75089f8ad8e2f653ac6098b4054ce8adf7cb0c36220cdf29 SHA512 36471abffd9202c637aa89c53072f0f286beffad2d3908ad50bb4c395a1be0c8138ddcbd67e0c764f59842bcc6c6c31f04a14986c7145c369217a156885ac506 diff --git a/llvm-runtimes/libunwind/libunwind-21.1.4.ebuild b/llvm-runtimes/libunwind/libunwind-21.1.4.ebuild new file mode 100644 index 000000000000..dfc694046f38 --- /dev/null +++ b/llvm-runtimes/libunwind/libunwind-21.1.4.ebuild @@ -0,0 +1,194 @@ +# 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" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~arm64-macos ~x64-macos" +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 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}]" +} + +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 +}