diff options
-rw-r--r-- | sys-libs/llvm-libunwind/Manifest | 3 | ||||
-rw-r--r-- | sys-libs/llvm-libunwind/llvm-libunwind-7.0.1_rc2.ebuild | 143 |
2 files changed, 146 insertions, 0 deletions
diff --git a/sys-libs/llvm-libunwind/Manifest b/sys-libs/llvm-libunwind/Manifest index 509d534b9bb6..968035a9ad1c 100644 --- a/sys-libs/llvm-libunwind/Manifest +++ b/sys-libs/llvm-libunwind/Manifest @@ -1,8 +1,11 @@ DIST libcxx-6.0.1.src.tar.xz 1552328 BLAKE2B 65a6addd04e530c2a72e8cba207282b9e9fafc01a594d7b11f63d10b6f88eca67a3cdf90b8055e410ede358d9be1f63fbe427f308e1337833447c0260d96e1c8 SHA512 c04f628b0924d76f035f615b59d19ce42dfc19c9a8eea4fe2b22a95cfe5a037ebdb30943fd741443939df5b4cf692bc1e51c840fefefbd134e3afbe2a75fe875 DIST libcxx-7.0.0.src.tar.xz 1652496 BLAKE2B 7c8e4b7743a775a5f41ef1a2e511b44ca67af32be03f4fec9a4f70b49b540a442724afd69a312d68719ace3eee9e3d600c7596bda68496212827e140da5a258e SHA512 5ebf8418bc9d311c1744c257ab7a26cf2436a64a47451905df70ec64b12d25ec33acf99e1b9d552fd54ed850bed8f53dffde2ea20292ecd9976eaa31f144caf5 +DIST libcxx-7.0.1rc2.src.tar.xz 1641280 BLAKE2B fec5ab41c7cdcc70582c812bd10bdcf6b400f865756bc60afbe4b84029c8ced4b519f1b3919baa381f086a0ef93b99f9f7bc47ec480ac2c49ef9c0e9d77e55b7 SHA512 04f1a26e21e082a685050c2f7696078d56e5a3b48e3b3916d6eb425b9b0b75354714faa5a78a2c003b9842215de07424b2d2361a0bdb3e4d6761d7cd28d53ded DIST libcxxabi-6.0.1.src.tar.xz 528356 BLAKE2B b301b750b2928864d3fc51e66cf91aab6837636ec2bce706b9a97296ec96af4bd2e80b1bf80c9b4afe449335ee12bbdd1905433c27e1770e16bc306baf206927 SHA512 bbb4c7b412e295cb735f637df48a83093eef45ed5444f7766790b4b047f75fd5fd634d8f3a8ac33a5c1407bd16fd450ba113f60a9bcc1d0a911fe0c54e9c81f2 DIST libcxxabi-7.0.0.src.tar.xz 535792 BLAKE2B caad3e2c9a89fcb8ba6b2dcaa23681b5a4f72330e77bdd8b48c6f1382d4414577b2ca130486cefce7a7ec2622712effd9aca0758d5f02d5ac23cedd0b5076be2 SHA512 95aa8f60477739e6d6eb6ba1e32c98928e1b8104d18d659336cf7f1c5bfd1ed505015077dfbe39329c0c9d2b5b428d853e5652b0106c0cde317d2d013ebd1cf0 +DIST libcxxabi-7.0.1rc2.src.tar.xz 535104 BLAKE2B 802bdada516a0dafceab55ecde19b88ba485f2254bc47af72e1caffc3c05f90fa721405c57bebaf8761c2c3ea1c1ae18afc10b3fbcd220d7f04699c8caa6de0c SHA512 acee0a8b782f351f7a4384a6c8054d7511a0a3af5a98973aab213363ead55a91673853b16f24cc6120c3420b089e86f9f4524491ceaba539e9414739fc6e1772 DIST libunwind-4.0.1.src.tar.xz 63388 BLAKE2B f49772beabaa8519a5f8dbbaef9c2d6554468a66b89a5f012946d59f772fe864809a5c95b726bcb4c059ca551a4eb023a88f4fa618756b34fef2058e272467e6 SHA512 8a0552a8ab830010d81420f4b778a3b831bff85b19bcce972958fc30e1ba5a2fa26a3deba499985a43dd7a103690775f6a20e7b3edda55f4eaff3541002d6b59 DIST libunwind-5.0.2.src.tar.xz 72340 BLAKE2B 8a62bd91f6decae1a9a51df19f708fcdf72a6fe6e57a5848c5dd0d36ff2dc64db8a0b3af469cdd5e787b9301f2718df0981f91857ecbc7a5f5d95a1a053652bc SHA512 137c4b269bff053d532a373e9f696ca68ad0bbf606a18dc98597e00fcfc6ce21d74bc2a0c03b96444654d688fa97d544c6f6b70822fcf7e190ed96f193ddc6ba DIST libunwind-6.0.1.src.tar.xz 77036 BLAKE2B b6c293285896c8ff1f64bb56eee5a88b102b7ed9902d46436ee3cb79f204f230fd08a07d39c7fa9aeeddd093036f2bb9af38dd54268099ea9e51e12a71ff4adb SHA512 78568c28720abdd1f8471c462421df9965e05e1db048689d16ac85378716c4080ec1723af78e9f61d133b0ff82ac8c1f0dde7fd42d194485f62c1a17c02db37f DIST libunwind-7.0.0.src.tar.xz 79316 BLAKE2B 2062e4c8fe00b8a72df5cc6a1ae688e2a142687a713d9181764f7d103c67ad1c06c62cb962d35fd3f99e4d058808188a40198d8de6635147fc06873ac489bcee SHA512 9ee573089f4d0bfb57bd9012e3ad3308fe53216a8e6745aa35dfaa16e56c1adbfc419e336e235a8e76f57b01b9e6e6c9ceff624bd99a90f519137e62f141738d +DIST libunwind-7.0.1rc2.src.tar.xz 79804 BLAKE2B a287946deef0ad9cd3b7ef8883559163cbc9154d6f31271544fe728bc89f80c298c2d9efd197143559793ccffd56470e90d1c0b02a5475ebb96ded12e6d47a12 SHA512 6eadd4a7375f1f474005a054d92552029602a5fc25293e0e9934f92313cce6b70006c9f9e99b7c417e36ba3da2e8cccac15125613c9f8b4de3d1bb870ec166d8 diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-7.0.1_rc2.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-7.0.1_rc2.ebuild new file mode 100644 index 000000000000..f2c9b67e6c7e --- /dev/null +++ b/sys-libs/llvm-libunwind/llvm-libunwind-7.0.1_rc2.ebuild @@ -0,0 +1,143 @@ +# Copyright 1999-2018 Gentoo Foundation +# 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 llvm multiprocessing python-any-r1 + +MY_P=libunwind-${PV/_/}.src +LIBCXX_P=libcxx-${PV/_/}.src +LIBCXXABI_P=libcxxabi-${PV/_/}.src + +DESCRIPTION="C++ runtime stack unwinder from LLVM" +HOMEPAGE="https://github.com/llvm-mirror/libunwind" +SRC_URI="https://prereleases.llvm.org/${PV/_//}/${MY_P}.tar.xz + test? ( + https://prereleases.llvm.org/${PV/_//}/${LIBCXX_P}.tar.xz + https://prereleases.llvm.org/${PV/_//}/${LIBCXXABI_P}.tar.xz )" + +LICENSE="|| ( UoI-NCSA MIT )" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-fbsd" +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}]') )" + +S=${WORKDIR}/${MY_P} + +# 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() { + default + + if use test; then + mv "${LIBCXX_P}" libcxx || die + mv "${LIBCXXABI_P}" libcxxabi || die + fi +} + +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 +} |