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 0A2B5158094 for ; Thu, 28 Jul 2022 13:58:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EBBFDE0AEA; Thu, 28 Jul 2022 13:58:41 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 D3094E0AEA for ; Thu, 28 Jul 2022 13:58:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 F365934117E for ; Thu, 28 Jul 2022 13:58:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 48699553 for ; Thu, 28 Jul 2022 13:58:39 +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: <1659016716.20dbb4082fb980c0b89165d0186aa17c10fcb2c9.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 sys-libs/libcxx/metadata.xml X-VCS-Directories: sys-libs/libcxx/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 20dbb4082fb980c0b89165d0186aa17c10fcb2c9 X-VCS-Branch: master Date: Thu, 28 Jul 2022 13:58:39 +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: 040d5167-2067-41b0-9f59-21e1cbe6e3bb X-Archives-Hash: b49f2bc71f8902be97e933fffa0cfc2e commit: 20dbb4082fb980c0b89165d0186aa17c10fcb2c9 Author: Michał Górny gentoo org> AuthorDate: Thu Jul 28 13:57:07 2022 +0000 Commit: Michał Górny gentoo org> CommitDate: Thu Jul 28 13:58:36 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20dbb408 sys-libs/libcxx: Default to building w/ clang, part. fix tests Signed-off-by: Michał Górny gentoo.org> sys-libs/libcxx/libcxx-15.0.0.9999.ebuild | 23 ++++++++++++++++++----- sys-libs/libcxx/metadata.xml | 2 ++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/sys-libs/libcxx/libcxx-15.0.0.9999.ebuild b/sys-libs/libcxx/libcxx-15.0.0.9999.ebuild index b65a070744cd..25841a822b4c 100644 --- a/sys-libs/libcxx/libcxx-15.0.0.9999.ebuild +++ b/sys-libs/libcxx/libcxx-15.0.0.9999.ebuild @@ -13,9 +13,12 @@ HOMEPAGE="https://libcxx.llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="0" KEYWORDS="" -IUSE="+libcxxabi +libunwind static-libs test" +IUSE="+clang +libcxxabi +libunwind static-libs test" +REQUIRED_USE=" + libunwind? ( libcxxabi ) + test? ( clang ) +" RESTRICT="!test? ( test )" -REQUIRED_USE="libunwind? ( libcxxabi )" RDEPEND=" libcxxabi? ( @@ -31,12 +34,14 @@ DEPEND=" >=sys-devel/llvm-6 " BDEPEND=" + clang? ( + sys-devel/clang + ) !test? ( ${PYTHON_DEPS} ) test? ( >=dev-util/cmake-3.16 - >=sys-devel/clang-3.9.0 sys-devel/gdb[python] $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') ) @@ -90,6 +95,14 @@ src_configure() { } multilib_src_configure() { + if use clang && ! tc-is-clang; then + # Only do this conditionally to allow overriding with + # e.g. CC=clang-13 in case of breakage + local -x CC=${CHOST}-clang + local -x CXX=${CHOST}-clang++ + strip-unsupported-flags + fi + # we want -lgcc_s for unwinder, and for compiler runtime when using # gcc, clang with gcc runtime (or any unknown compiler) local extra_libs=() want_gcc_s=ON want_compiler_rt=OFF @@ -129,6 +142,7 @@ multilib_src_configure() { local libdir=$(get_libdir) local mycmakeargs=( + -DCMAKE_CXX_COMPILER_TARGET="${CHOST}" -DPython3_EXECUTABLE="${PYTHON}" -DLLVM_ENABLE_RUNTIMES=libcxx -DLLVM_INCLUDE_TESTS=OFF @@ -155,8 +169,7 @@ multilib_src_configure() { mycmakeargs+=( -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" - -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}" - -DLIBCXX_LINK_TESTS_WITH_SHARED_LIBCXXABI=ON + -DLLVM_LIT_ARGS="$(get_lit_flags)" -DPython3_EXECUTABLE="${PYTHON}" ) fi diff --git a/sys-libs/libcxx/metadata.xml b/sys-libs/libcxx/metadata.xml index 88b259915838..81bfc59aae3f 100644 --- a/sys-libs/libcxx/metadata.xml +++ b/sys-libs/libcxx/metadata.xml @@ -10,6 +10,8 @@ LLVM Project + Force building using installed clang (rather + than the default CC/CXX; required for testing). Build on top of sys-libs/libcxxabi instead of gcc's libsupc++ (avoids depending on gcc). Use libunwind instead of libgcc_s for stack unwinding, thus avoiding dependence on gcc.