diff options
Diffstat (limited to 'sys-libs/llvm-libunwind')
-rw-r--r-- | sys-libs/llvm-libunwind/Manifest | 3 | ||||
-rw-r--r-- | sys-libs/llvm-libunwind/llvm-libunwind-13.0.0.9999.ebuild | 2 | ||||
-rw-r--r-- | sys-libs/llvm-libunwind/llvm-libunwind-14.0.0.9999.ebuild | 138 |
3 files changed, 141 insertions, 2 deletions
diff --git a/sys-libs/llvm-libunwind/Manifest b/sys-libs/llvm-libunwind/Manifest index 9ebb475da545..0026d73ea600 100644 --- a/sys-libs/llvm-libunwind/Manifest +++ b/sys-libs/llvm-libunwind/Manifest @@ -6,5 +6,6 @@ EBUILD llvm-libunwind-10.0.1.ebuild 3185 BLAKE2B 150bde0a85684ac2cbc01d20139e458 EBUILD llvm-libunwind-11.1.0.ebuild 3223 BLAKE2B c39bdefd6bf0656db7d84f3cd868da01aa4b37f51c729951d1bcb73336f6ab1d8beb114a7d10d79c1441ce945b03aaf9444481e5e1b3e7dd7fdb9a7e971c451d SHA512 ad8cb081326e4dd6cd888882fabcc3fa1a152c37b28197c9565d46d8f8419f233a1a9f6cc9f3bcfe4ba1441cf97147dafb684e3eb60453020d2b64ccfb56d1c1 EBUILD llvm-libunwind-12.0.0.ebuild 3657 BLAKE2B 4370cc5e2c1d423a7ab3bb3ed6c208d02e785c89d6d5159c5f6f967591dadf6a49602b34f6e94a66e3c8700b3cab273140aeeaabf941eac49c03cf0926470b7e SHA512 0d0aaadc05b8beca6e692b9b6325e426a4c29186b45376d1501cde2c1ee66f69ab5b60b2f148188f7ae708908a200395a51b02920a62c755101176b035aafd2d EBUILD llvm-libunwind-12.0.1.ebuild 3662 BLAKE2B cca4b3398c6ab63c31d06e49e81de202cab987c85b0cdb98faa2f91989f27f8c2853d53acc5ed5b80bcedf931d2750d4cf9db21d1c6c08a1b1f59255e1d3a15b SHA512 482caf63adb19a49809a7ca2350c5d9801aa765de96ede422e346da3c5d961b820c629cb77405789d7cfb68fdfca9a5692ca50d54b1e5ee7fe3299910637073c -EBUILD llvm-libunwind-13.0.0.9999.ebuild 3614 BLAKE2B 3e47e7add3d6d0092623c8206fd8a2945ebcb83e067a0d77218d2eadd391ad1202678e9a8315f4c55f21c167e68461b593871f1d3e183b5b297d70f05886ec86 SHA512 2d78c6359c2bc744ff1c857832c619cf4b4cc1f3788d6a13f1614baadab091b6e12fcc688d240efa347606cdf21f50bc086b9dbee1cbea19aa96a63cd0f27614 +EBUILD llvm-libunwind-13.0.0.9999.ebuild 3606 BLAKE2B d1f27261c22950e15e904340132567781446e14a349f5e39d538ed4eee3659d4a93a27efaf4350e2de14829c93560e66d5a123bebcb04f731c80f81075548e83 SHA512 adfc61c4c2d9f09d5573d04c200fa84f7ca61d59073406ea01d35ff9b6095f8d7aabb30fb09f7a4f97a19fff9368816dae099e8d52427e1c7b32613cfcb3dc83 +EBUILD llvm-libunwind-14.0.0.9999.ebuild 3606 BLAKE2B d1f27261c22950e15e904340132567781446e14a349f5e39d538ed4eee3659d4a93a27efaf4350e2de14829c93560e66d5a123bebcb04f731c80f81075548e83 SHA512 adfc61c4c2d9f09d5573d04c200fa84f7ca61d59073406ea01d35ff9b6095f8d7aabb30fb09f7a4f97a19fff9368816dae099e8d52427e1c7b32613cfcb3dc83 MISC metadata.xml 302 BLAKE2B ef8858b3c26dfa1727e57685381dbf71eb74008e74127b06467aaff9eea2fd7f3fdcdb1819529b8e828d42720745855e948d608bbe3eb40778fe1e4e260118ad SHA512 d5e641d63402052ef7af157f98998868a816d5e5072424725b09ded5c2477b26aaafbb8874473367a860d3fc365e0f4f0db451315ec4be3df23cce4c1194f2d7 diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-13.0.0.9999.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-13.0.0.9999.ebuild index d64e79cc6b30..ba5225ffe696 100644 --- a/sys-libs/llvm-libunwind/llvm-libunwind-13.0.0.9999.ebuild +++ b/sys-libs/llvm-libunwind/llvm-libunwind-13.0.0.9999.ebuild @@ -25,7 +25,7 @@ BDEPEND=" $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )" -LLVM_COMPONENTS=( libunwind libcxx llvm/cmake/modules ) +LLVM_COMPONENTS=( libunwind libcxx llvm/cmake ) LLVM_TEST_COMPONENTS=( libcxxabi ) llvm.org_set_globals diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-14.0.0.9999.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-14.0.0.9999.ebuild new file mode 100644 index 000000000000..ba5225ffe696 --- /dev/null +++ b/sys-libs/llvm-libunwind/llvm-libunwind-14.0.0.9999.ebuild @@ -0,0 +1,138 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CMAKE_ECLASS=cmake +PYTHON_COMPAT=( python3_{8..10} ) +inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs + +DESCRIPTION="C++ runtime stack unwinder from LLVM" +HOMEPAGE="https://github.com/llvm-mirror/libunwind" + +LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" +SLOT="0" +KEYWORDS="" +IUSE="debug static-libs test" +RESTRICT="!test? ( test )" + +RDEPEND="!sys-libs/libunwind" +# llvm-6 for new lit options +DEPEND=" + >=sys-devel/llvm-6" +BDEPEND=" + test? ( >=sys-devel/clang-3.9.0 + $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') + )" + +LLVM_COMPONENTS=( libunwind libcxx llvm/cmake ) +LLVM_TEST_COMPONENTS=( libcxxabi ) +llvm.org_set_globals + +python_check_deps() { + has_version "dev-python/lit[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +multilib_src_configure() { + local use_compiler_rt=OFF + local libdir=$(get_libdir) + + # link to compiler-rt + # https://github.com/gentoo/gentoo/pull/21516 + if tc-is-clang; then + local compiler-rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \ + ${LD_FLAGS} -print-libgcc-file-name) + if [[ ${compiler_rt} == *libclang_rt* ]]; then + use_compiler_rt=ON + fi + fi + + local mycmakeargs=( + -DLLVM_LIBDIR_SUFFIX=${libdir#lib} + -DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug) + -DLIBUNWIND_ENABLE_STATIC=$(usex static-libs) + -DLLVM_INCLUDE_TESTS=$(usex test) + + # 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 + local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null) + [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests" + + mycmakeargs+=( + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" + -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}" + -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx" + ) + fi + + cmake_src_configure +} + +build_libcxxabi() { + local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)" + local CMAKE_USE_DIR=${WORKDIR}/libcxxabi + local BUILD_DIR=${BUILD_DIR}/libcxxabi + local mycmakeargs=( + -DLIBCXXABI_LIBDIR_SUFFIX= + -DLIBCXXABI_ENABLE_SHARED=OFF + -DLIBCXXABI_ENABLE_STATIC=ONF + -DLIBCXXABI_USE_LLVM_UNWINDER=ON + -DLIBCXXABI_INCLUDE_TESTS=OFF + + -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include + -DLIBCXXABI_LIBUNWIND_INCLUDES="${S}"/include + ) + + cmake_src_configure + cmake_src_compile +} + +build_libcxx() { + local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/libcxxabi/lib -L${BUILD_DIR}/$(get_libdir)" + local CMAKE_USE_DIR=${WORKDIR}/libcxx + local BUILD_DIR=${BUILD_DIR}/libcxx + local mycmakeargs=( + -DLIBCXX_LIBDIR_SUFFIX= + -DLIBCXX_ENABLE_SHARED=OFF + -DLIBCXX_ENABLE_STATIC=ON + -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF + -DLIBCXXABI_USE_LLVM_UNWINDER=ON + -DLIBCXX_CXX_ABI=libcxxabi + -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${WORKDIR}"/libcxxabi/include + -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF + -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl) + -DLIBCXX_HAS_GCC_S_LIB=OFF + -DLIBCXX_INCLUDE_TESTS=OFF + ) + + cmake_src_configure + cmake_src_compile +} + +multilib_src_test() { + # build local copies of libc++ & libc++abi for testing to avoid + # circular deps + build_libcxxabi + build_libcxx + mv "${BUILD_DIR}"/libcxx*/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die + + local -x LIT_PRESERVES_TMP=1 + cmake_build check-unwind +} + +multilib_src_install() { + cmake_src_install + + # install headers like sys-libs/libunwind + doheader "${S}"/include/*.h +} |