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 C644D139695 for ; Thu, 16 Feb 2017 14:16:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E3503E0C28; Thu, 16 Feb 2017 14:16:31 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B0837E0C28 for ; Thu, 16 Feb 2017 14:16:31 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 510243414C1 for ; Thu, 16 Feb 2017 14:16:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B51B749E1 for ; Thu, 16 Feb 2017 14:16:28 +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: <1487254581.04bb278e03b7a36b5a5682c77355c68aee632e78.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/compiler-rt/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/compiler-rt/compiler-rt-4.0.0_rc2.ebuild sys-libs/compiler-rt/compiler-rt-9999.ebuild sys-libs/compiler-rt/metadata.xml X-VCS-Directories: sys-libs/compiler-rt/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 04bb278e03b7a36b5a5682c77355c68aee632e78 X-VCS-Branch: master Date: Thu, 16 Feb 2017 14:16:28 +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: ebe69cea-25ca-44a5-acf0-88c2724bc079 X-Archives-Hash: 60d79ea5280e8546e0062d89ceba25a1 commit: 04bb278e03b7a36b5a5682c77355c68aee632e78 Author: Michał Górny gentoo org> AuthorDate: Thu Feb 16 13:36:42 2017 +0000 Commit: Michał Górny gentoo org> CommitDate: Thu Feb 16 14:16:21 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04bb278e sys-libs/compiler-rt: Prefer building using clang Add a USE=clang flag to prefer building using installed clang, to work around limited/broken support for '#pragma redefine_extname' which results in incomplete runtime being emitted when building using GCC. sys-libs/compiler-rt/compiler-rt-4.0.0_rc2.ebuild | 10 ++++++++-- sys-libs/compiler-rt/compiler-rt-9999.ebuild | 11 +++++++++-- sys-libs/compiler-rt/metadata.xml | 4 ++++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/sys-libs/compiler-rt/compiler-rt-4.0.0_rc2.ebuild b/sys-libs/compiler-rt/compiler-rt-4.0.0_rc2.ebuild index 43560c2edd..82b3dcffe1 100644 --- a/sys-libs/compiler-rt/compiler-rt-4.0.0_rc2.ebuild +++ b/sys-libs/compiler-rt/compiler-rt-4.0.0_rc2.ebuild @@ -19,7 +19,7 @@ SRC_URI="http://www.llvm.org/pre-releases/${PV/_//}/${P/_/}.src.tar.xz" LICENSE="|| ( UoI-NCSA MIT )" SLOT="${PV%_*}" KEYWORDS="~amd64 ~arm64 ~x86" -IUSE="test" +IUSE="+clang test" LLVM_SLOT=${SLOT%%.*} RDEPEND="!=sys-libs/compiler-rt-${SLOT}*:0" @@ -43,7 +43,13 @@ src_configure() { # pre-set since we need to pass it to cmake BUILD_DIR=${WORKDIR}/${P}_build - if ! test_compiler; then + if use clang; then + local -x CC=${CHOST}-clang + local -x CXX=${CHOST}-clang++ + # ensure we can use clang before installing compiler-rt + local -x LDFLAGS="${LDFLAGS} -nodefaultlibs -lc" + strip-unsupported-flags + elif ! test_compiler; then local extra_flags=( -nodefaultlibs -lc ) if test_compiler "${extra_flags[@]}"; then local -x LDFLAGS="${LDFLAGS} ${extra_flags[*]}" diff --git a/sys-libs/compiler-rt/compiler-rt-9999.ebuild b/sys-libs/compiler-rt/compiler-rt-9999.ebuild index 450177ae5c..034b1d2531 100644 --- a/sys-libs/compiler-rt/compiler-rt-9999.ebuild +++ b/sys-libs/compiler-rt/compiler-rt-9999.ebuild @@ -22,12 +22,13 @@ LICENSE="|| ( UoI-NCSA MIT )" # Note: this needs to be updated to match version of clang-9999 SLOT="5.0.0" KEYWORDS="" -IUSE="test" +IUSE="+clang test" LLVM_SLOT=${SLOT%%.*} # llvm-4 needed for --cmakedir DEPEND=" >=sys-devel/llvm-4 + clang? ( sys-devel/clang ) test? ( =sys-devel/clang-${PV%_*}*:${LLVM_SLOT} ) ${PYTHON_DEPS}" @@ -43,7 +44,13 @@ src_configure() { # pre-set since we need to pass it to cmake BUILD_DIR=${WORKDIR}/${P}_build - if ! test_compiler; then + if use clang; then + local -x CC=${CHOST}-clang + local -x CXX=${CHOST}-clang++ + # ensure we can use clang before installing compiler-rt + local -x LDFLAGS="${LDFLAGS} -nodefaultlibs -lc" + strip-unsupported-flags + elif ! test_compiler; then local extra_flags=( -nodefaultlibs -lc ) if test_compiler "${extra_flags[@]}"; then local -x LDFLAGS="${LDFLAGS} ${extra_flags[*]}" diff --git a/sys-libs/compiler-rt/metadata.xml b/sys-libs/compiler-rt/metadata.xml index 89c4bdb960..3b99602138 100644 --- a/sys-libs/compiler-rt/metadata.xml +++ b/sys-libs/compiler-rt/metadata.xml @@ -4,4 +4,8 @@ llvm@gentoo.org + + Force building using installed clang (rather + than the default CC/CXX). +