From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AE4411382C5 for ; Fri, 16 Mar 2018 09:32:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D3A4BE088C; Fri, 16 Mar 2018 09:32:58 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 97844E088C for ; Fri, 16 Mar 2018 09:32:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 549FA335C4A for ; Fri, 16 Mar 2018 09:32:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A965F25B for ; Fri, 16 Mar 2018 09:32:53 +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: <1521192770.f05b02c57d0282b587d4a9b3d8ac7c00d0efc075.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/llvm-libunwind/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/llvm-libunwind/Manifest sys-libs/llvm-libunwind/llvm-libunwind-6.0.0.ebuild sys-libs/llvm-libunwind/llvm-libunwind-6.0.9999.ebuild sys-libs/llvm-libunwind/llvm-libunwind-9999.ebuild X-VCS-Directories: sys-libs/llvm-libunwind/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: f05b02c57d0282b587d4a9b3d8ac7c00d0efc075 X-VCS-Branch: master Date: Fri, 16 Mar 2018 09:32:53 +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-Archives-Salt: ad102829-f047-4e49-9cdd-7e95c40dfff7 X-Archives-Hash: 8d7a9b59ac56c7c07af23eb0a4a4f600 commit: f05b02c57d0282b587d4a9b3d8ac7c00d0efc075 Author: Michał Górny gentoo org> AuthorDate: Fri Mar 16 09:30:22 2018 +0000 Commit: Michał Górny gentoo org> CommitDate: Fri Mar 16 09:32:50 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f05b02c5 sys-libs/llvm-libunwind: Build local copy of libcxx for tests Build a local copy of libcxx+libcxxabi for tests. This avoids a circular dependency between llvm-libunwind and libcxx/libcxxabi, and also makes it possible to run tests while building libcxx/libcxxabi against different backends. sys-libs/llvm-libunwind/Manifest | 1 + .../llvm-libunwind/llvm-libunwind-6.0.0.ebuild | 63 ++++++++++++++++++---- .../llvm-libunwind/llvm-libunwind-6.0.9999.ebuild | 58 +++++++++++++++++--- sys-libs/llvm-libunwind/llvm-libunwind-9999.ebuild | 58 +++++++++++++++++--- 4 files changed, 158 insertions(+), 22 deletions(-) diff --git a/sys-libs/llvm-libunwind/Manifest b/sys-libs/llvm-libunwind/Manifest index 18e0d0de59c..98f7ad1e00f 100644 --- a/sys-libs/llvm-libunwind/Manifest +++ b/sys-libs/llvm-libunwind/Manifest @@ -1,4 +1,5 @@ DIST libcxx-6.0.0.src.tar.xz 1549328 BLAKE2B 93adb339b0e849fca1850d379c8e74b407b0db8220f3a05f888db70d83ad07c3200dbd2a7827f92c60a2ba91d3395e4d1b4434ba70479c29a95aceda6c213e02 SHA512 3d93910f85a778f36c5f7a4429639008acba5713a2c8ac79a9de09463af6f9a388af45d39af23423a7223660701697ba067f3391f25d5a970973691dd88635e3 +DIST libcxxabi-6.0.0.src.tar.xz 529212 BLAKE2B ae020e8831a6ae71d59d71e294bbb0aa6dbedf1b3036b2536d9456db8c51f21e57d082c5abf5e00921a14876328bdfafab3c04b4d761cb76d52e35ff97107510 SHA512 c5e4cc05105770b42b20595fdbda5e1483be4582bc94335da1a15531ba43a0ecf30e1e0a252f62d4d0e6c79cda9d44ff5fdbe69a0a295b2431fd6de158410e2e DIST libunwind-3.8.1.src.tar.xz 60596 BLAKE2B e200beab1388dc73a4ed6b1be0c4931124e48e21a3d5cc0bf01ac2ce57bbc2295bd0f72acb8fc08556aed963f0cb220bd3e47c3c953f570cf2860ae822a270c7 SHA512 2a60d7c4b0aee6c58f50089ac9fa2b756ab1d74faaee32f7436ddace4510589c7ffdd20478919966ed2fa8a23ee1b5d1b26115dbd8ee2834b00b5bcd61d00b14 DIST libunwind-3.9.0.src.tar.xz 61764 BLAKE2B 215aa7cabf9e5d8d3e3dfc3bad50f0aad1b4d2d6bef96ac4c14d987b6aa4afd0a1c0f186d63d84edcc822fd8495a000b2a24899e61176831e0ddfabea1d5c3c2 SHA512 dce384bea99ed61b363b847e20946fc9d70377389a227cc7054fbaa916e7cb5ba0b9d89f0df6ed33409dbf38beefd3654c18c1abcf0e50b5d0315ce0135a1d25 DIST libunwind-3.9.1.src.tar.xz 61788 BLAKE2B bab410d714e2dc012273997bb3fb3c366f64608b712eae15f8c08a2b049b6bdba0660a1f4942906e2e9cd7b11563c8a5b3007b92b1485c32036ac84f55fe7053 SHA512 a80f5d0660e209f5bf709316b5df2ca63b9f0db49f5f74dfe9c9e580c654f61a15acc071a739fdb84baf5ffa9420b92498f8560331173642d80f6b74e1e2afb7 diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-6.0.0.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-6.0.0.ebuild index 6da407e13a1..a276429001f 100644 --- a/sys-libs/llvm-libunwind/llvm-libunwind-6.0.0.ebuild +++ b/sys-libs/llvm-libunwind/llvm-libunwind-6.0.0.ebuild @@ -11,11 +11,14 @@ 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://releases.llvm.org/${PV/_//}/${MY_P}.tar.xz - test? ( https://releases.llvm.org/${PV/_//}/${LIBCXX_P}.tar.xz )" + test? ( + https://releases.llvm.org/${PV/_//}/${LIBCXX_P}.tar.xz + https://releases.llvm.org/${PV/_//}/${LIBCXXABI_P}.tar.xz )" LICENSE="|| ( UoI-NCSA MIT )" SLOT="0" @@ -25,13 +28,9 @@ RESTRICT="!test? ( test )" RDEPEND="!sys-libs/libunwind" # llvm-6 for new lit options -# tests need libcxx with implicit -lunwind and libcxxabi -# (but libcxx does not need to be built against it) DEPEND=" >=sys-devel/llvm-6 test? ( >=sys-devel/clang-3.9.0 - sys-libs/libcxx[libunwind,${MULTILIB_USEDEP}] - sys-libs/libcxxabi[${MULTILIB_USEDEP}] $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )" S=${WORKDIR}/${MY_P} @@ -48,14 +47,11 @@ pkg_setup() { } src_unpack() { - einfo "Unpacking ${MY_P}.tar.xz ..." - tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die + default if use test; then - einfo "Unpacking parts of ${LIBCXX_P}.tar.xz ..." - tar -xf "${DISTDIR}/${LIBCXX_P}.tar.xz" \ - "${LIBCXX_P}"/{include,utils/libcxx} || die mv "${LIBCXX_P}" libcxx || die + mv "${LIBCXXABI_P}" libcxxabi || die fi } @@ -88,7 +84,54 @@ multilib_src_configure() { 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 } diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-6.0.9999.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-6.0.9999.ebuild index 367803c62f0..303cfec21c9 100644 --- a/sys-libs/llvm-libunwind/llvm-libunwind-6.0.9999.ebuild +++ b/sys-libs/llvm-libunwind/llvm-libunwind-6.0.9999.ebuild @@ -24,13 +24,9 @@ RESTRICT="!test? ( test )" RDEPEND="!sys-libs/libunwind" # llvm-6 for new lit options -# tests need libcxx with implicit -lunwind and libcxxabi -# (but libcxx does not need to be built against it) DEPEND=" >=sys-devel/llvm-6 test? ( >=sys-devel/clang-3.9.0 - sys-libs/libcxx[libunwind,${MULTILIB_USEDEP}] - sys-libs/libcxxabi[${MULTILIB_USEDEP}] $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )" # least intrusive of all @@ -45,16 +41,19 @@ pkg_setup() { } src_unpack() { - # we need headers & test utilities 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 '' include utils/libcxx + "${WORKDIR}"/libcxx + git-r3_checkout https://llvm.org/git/libcxxabi.git \ + "${WORKDIR}"/libcxxabi fi git-r3_checkout } @@ -88,7 +87,54 @@ multilib_src_configure() { 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 } diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-9999.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-9999.ebuild index f38e06e1ba4..366cb023102 100644 --- a/sys-libs/llvm-libunwind/llvm-libunwind-9999.ebuild +++ b/sys-libs/llvm-libunwind/llvm-libunwind-9999.ebuild @@ -23,13 +23,9 @@ RESTRICT="!test? ( test )" RDEPEND="!sys-libs/libunwind" # llvm-6 for new lit options -# tests need libcxx with implicit -lunwind and libcxxabi -# (but libcxx does not need to be built against it) DEPEND=" >=sys-devel/llvm-6 test? ( >=sys-devel/clang-3.9.0 - sys-libs/libcxx[libunwind,${MULTILIB_USEDEP}] - sys-libs/libcxxabi[${MULTILIB_USEDEP}] $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )" # least intrusive of all @@ -44,16 +40,19 @@ pkg_setup() { } src_unpack() { - # we need headers & test utilities 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 '' include utils/libcxx + "${WORKDIR}"/libcxx + git-r3_checkout https://llvm.org/git/libcxxabi.git \ + "${WORKDIR}"/libcxxabi fi git-r3_checkout } @@ -87,7 +86,54 @@ multilib_src_configure() { 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 }