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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 325F8158094 for ; Sun, 31 Jul 2022 13:56:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 71F2DE0E7C; Sun, 31 Jul 2022 13:56:53 +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 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 542ECE0E7C for ; Sun, 31 Jul 2022 13:56:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 smtp.gentoo.org (Postfix) with ESMTPS id 559CC34069A for ; Sun, 31 Jul 2022 13:56:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CB1CD500 for ; Sun, 31 Jul 2022 13:56:50 +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: <1659275798.ca8f5b8a1452e77cbde2c85c93f4b32d64412556.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libcxx/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/libcxx/libcxx-15.0.0.9999.ebuild X-VCS-Directories: sys-libs/libcxx/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: ca8f5b8a1452e77cbde2c85c93f4b32d64412556 X-VCS-Branch: master Date: Sun, 31 Jul 2022 13:56:50 +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: df832dd1-73ae-4246-816f-c4bf999d43d6 X-Archives-Hash: a32c1c20f9fe57eb7b305c40e3129a57 commit: ca8f5b8a1452e77cbde2c85c93f4b32d64412556 Author: Michał Górny gentoo org> AuthorDate: Sun Jul 31 09:58:20 2022 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Jul 31 13:56:38 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca8f5b8a sys-libs/libcxx: Fix testing against shared libc++abi.so Signed-off-by: Michał Górny gentoo.org> sys-libs/libcxx/libcxx-15.0.0.9999.ebuild | 57 +++++++++++++++++++------------ 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/sys-libs/libcxx/libcxx-15.0.0.9999.ebuild b/sys-libs/libcxx/libcxx-15.0.0.9999.ebuild index 22e74228d61a..ee78990d53b4 100644 --- a/sys-libs/libcxx/libcxx-15.0.0.9999.ebuild +++ b/sys-libs/libcxx/libcxx-15.0.0.9999.ebuild @@ -177,11 +177,29 @@ multilib_src_configure() { cmake_src_configure } +multilib_src_compile() { + cmake_src_compile + if [[ ${CHOST} != *-darwin* ]] ; then + gen_shared_ldscript + use static-libs && gen_static_ldscript + fi +} + multilib_src_test() { local -x LIT_PRESERVES_TMP=1 cmake_build check-cxx } +multilib_src_install() { + cmake_src_install + # since we've replaced libc++.{a,so} with ldscripts, now we have to + # install the extra symlinks + if [[ ${CHOST} != *-darwin* ]] ; then + dolib.so lib/libc++_shared.so + use static-libs && dolib.a lib/libc++_static.a + fi +} + # Usage: deps gen_ldscript() { local output_format @@ -198,38 +216,33 @@ END_LDSCRIPT } gen_static_ldscript() { - local libdir=$(get_libdir) - local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "libsupc++.a") - # Move it first. - mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${libdir}/libc++_static.a" || die + mv lib/libc++{,_static}.a || die # Generate libc++.a ldscript for inclusion of its dependencies so that # clang++ -stdlib=libc++ -static works out of the box. - local deps="libc++_static.a ${cxxabi_lib} $(usex libunwind libunwind.a libgcc_eh.a)" + local deps=( + libc++_static.a + $(usex libcxxabi libc++abi.a libsupc++.a) + $(usex libunwind libunwind.a libgcc_eh.a) + ) # On Linux/glibc it does not link without libpthread or libdl. It is # fine on FreeBSD. - use elibc_glibc && deps+=" libpthread.a libdl.a" + use elibc_glibc && deps+=( libpthread.a libdl.a ) - gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.a" || die + gen_ldscript "${deps[*]}" > lib/libc++.a || die } gen_shared_ldscript() { - local libdir=$(get_libdir) - # libsupc++ doesn't have a shared version - local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "libsupc++.a") - - mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die - local deps="libc++_shared.so ${cxxabi_lib} $(usex libunwind libunwind.so libgcc_s.so)" - - gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.so" || die -} + # Move it first. + mv lib/libc++{,_shared}.so || die + local deps=( + libc++_shared.so + # libsupc++ doesn't have a shared version + $(usex libcxxabi libc++abi.so libsupc++.a) + $(usex libunwind libunwind.so libgcc_s.so) + ) -multilib_src_install() { - cmake_src_install - if [[ ${CHOST} != *-darwin* ]] ; then - gen_shared_ldscript - use static-libs && gen_static_ldscript - fi + gen_ldscript "${deps[*]}" > lib/libc++.so || die } pkg_postinst() {