diff options
Diffstat (limited to 'sys-libs/llvm-libunwind')
-rw-r--r-- | sys-libs/llvm-libunwind/Manifest | 1 | ||||
-rw-r--r-- | sys-libs/llvm-libunwind/llvm-libunwind-8.0.9999.ebuild | 146 |
2 files changed, 147 insertions, 0 deletions
diff --git a/sys-libs/llvm-libunwind/Manifest b/sys-libs/llvm-libunwind/Manifest index 44dd5df0b412..989f20406f83 100644 --- a/sys-libs/llvm-libunwind/Manifest +++ b/sys-libs/llvm-libunwind/Manifest @@ -11,5 +11,6 @@ EBUILD llvm-libunwind-5.0.2.ebuild 1094 BLAKE2B 3378498096da36b9cbd6e70c9f2646cf EBUILD llvm-libunwind-6.0.1.ebuild 3742 BLAKE2B a2e7fc30c8084cf48c4fd795c78351081cd58408eb8f60fe8c09bf8b87196c9e4fbb471da223f36369a25eecd8cdd6d92abae5cd7544729c50c47c55f0232c6a SHA512 6367327da3e0fae97282370e2762382588daf6e59d9f8ec882d52b974cb9bcd5209dd1f37a7c9e94d15cc411f4212b94b332aac5dd3d652ebb38893f74df8391 EBUILD llvm-libunwind-7.0.1.ebuild 3746 BLAKE2B 5f063fb9affa4730b2310d4c79d04699744a18cf0470e4a7463372f94933df9604727ad0e6d68097d830b48f0bb66228a5601a30655004e3cf648c00684cbaad SHA512 87766c87aaa2fa5c186fae3aa97692448da5cfca29510b428c8d69e0803e37a8d41b03dba68b8cf734f7229bb023e444fe6e3f26966909dfd2857068351b9205 EBUILD llvm-libunwind-7.0.9999.ebuild 3885 BLAKE2B b4b67285b574900596fe96caaa7733569686e2ddf898eb506b509de25895798e5521377c06503c8206517016a11060913399584072758114b9f0ce9c9f00cf66 SHA512 0e47757fb33b1b59cd8d989953b34ec22f01f993ce5e91d3390551a6b8b83df7678c4e747f297dbd1c76a21f99d1a1309b024b754d60e9b8fe8b3e606bc3cec0 +EBUILD llvm-libunwind-8.0.9999.ebuild 3882 BLAKE2B d779794a7428fc30151b688c0f207812a7919f2b6ccac4d424af11f4976d664e3fc9cc8eda569678f6ae7bc5bbf45a60489dc39d4798f43c3b60e18ae20e7b1a SHA512 8fbf23c4669f8078e6ed91a232ef4e86cbffacd9081a728659d2ce40204af425bff456a45c8b411752e318ad7a6903c8228e53383d2495538cf0384d270b5684 EBUILD llvm-libunwind-9999.ebuild 3860 BLAKE2B 177f9e223b61e3bd3a6fec78ff0b3d2efa1220228d55f78eb41a200518441d8b617998f13642338e91ff3f56dd224c1e1382df5031060c1783440ad20223d069 SHA512 b0cdcbe531188ffa9f7e294136a9238a79441b0768144116784fbf3e647b3fef11eb6a4e5569f08e7e7092d4aec46843c15a1c2b3b96ec63ee64028a0fb29c83 MISC metadata.xml 302 BLAKE2B 1cdee7813ed9a3766b2eddccd14f9e0576ba5cc7f812d7af4f35c8c2e5991790f3800c6473c37da90d72804832fd9af969a2e3bf7aa625f0d3a32da1dbcefacf SHA512 3afaef82e6a495a81e221524ae7604dc170ef5c103333728674faf0417c45ba7996118c10466eaa24f8feef9ed8f0fc60d535a5195462317d61c61a531c8a285 diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-8.0.9999.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-8.0.9999.ebuild new file mode 100644 index 000000000000..ccd4e8e6c89c --- /dev/null +++ b/sys-libs/llvm-libunwind/llvm-libunwind-8.0.9999.ebuild @@ -0,0 +1,146 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +: ${CMAKE_MAKEFILE_GENERATOR:=ninja} +# (needed due to CMAKE_BUILD_TYPE != Gentoo) +CMAKE_MIN_VERSION=3.7.0-r1 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) +inherit cmake-multilib git-r3 llvm multiprocessing python-any-r1 + +DESCRIPTION="C++ runtime stack unwinder from LLVM" +HOMEPAGE="https://github.com/llvm-mirror/libunwind" +SRC_URI="" +EGIT_REPO_URI="https://git.llvm.org/git/libunwind.git + https://github.com/llvm-mirror/libunwind.git" +EGIT_BRANCH="release_80" + +LICENSE="|| ( 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 + test? ( >=sys-devel/clang-3.9.0 + $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )" + +# least intrusive of all +CMAKE_BUILD_TYPE=RelWithDebInfo + +python_check_deps() { + has_version "dev-python/lit[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +src_unpack() { + if use test; then + git-r3_fetch "https://git.llvm.org/git/libcxx.git + https://github.com/llvm-mirror/libcxx.git" + git-r3_fetch "https://git.llvm.org/git/libcxxabi.git + https://github.com/llvm-mirror/libcxxabi.git" + fi + git-r3_fetch + + if use test; then + git-r3_checkout https://llvm.org/git/libcxx.git \ + "${WORKDIR}"/libcxx + git-r3_checkout https://llvm.org/git/libcxxabi.git \ + "${WORKDIR}"/libcxxabi + fi + git-r3_checkout +} + +multilib_src_configure() { + local libdir=$(get_libdir) + + 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 + ) + if use test; then + local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null) + local jobs=${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")} + + [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests" + + mycmakeargs+=( + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" + -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}" + -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}"/libcxx + ) + fi + + cmake-utils_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=ON + -DLIBCXXABI_ENABLE_STATIC=OFF + -DLIBCXXABI_USE_LLVM_UNWINDER=ON + -DLIBCXXABI_INCLUDE_TESTS=OFF + + -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include + -DLIBCXXABI_LIBUNWIND_INCLUDES="${S}"/include + ) + + cmake-utils_src_configure + cmake-utils_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=ON + -DLIBCXX_ENABLE_STATIC=OFF + -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-utils_src_configure + cmake-utils_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 + + cmake-utils_src_make check-unwind +} + +multilib_src_install() { + cmake-utils_src_install + + # install headers like sys-libs/libunwind + doheader "${S}"/include/*.h +} |