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 84C7D139694 for ; Wed, 15 Feb 2017 12:47:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4BC56E0C4B; Wed, 15 Feb 2017 12:47:49 +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 0EB1EE0C4A for ; Wed, 15 Feb 2017 12:47:49 +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 8DC4334164D for ; Wed, 15 Feb 2017 12:47:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F1C8B48AF for ; Wed, 15 Feb 2017 12:47:45 +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: <1487162836.ec4b14a0bf47f438ea97d0e601935992ab23b4df.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_rc1-r1.ebuild sys-libs/compiler-rt/compiler-rt-4.0.0_rc1.ebuild sys-libs/compiler-rt/compiler-rt-9999.ebuild X-VCS-Directories: sys-libs/compiler-rt/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: ec4b14a0bf47f438ea97d0e601935992ab23b4df X-VCS-Branch: master Date: Wed, 15 Feb 2017 12:47:45 +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: 063f19bd-1f61-4d6c-a8f4-6a6682b51ed4 X-Archives-Hash: 36fa4f7fec6b76b1d5b2392e115c3b3b commit: ec4b14a0bf47f438ea97d0e601935992ab23b4df Author: Michał Górny gentoo org> AuthorDate: Mon Jan 30 08:02:05 2017 +0000 Commit: Michał Górny gentoo org> CommitDate: Wed Feb 15 12:47:16 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec4b14a0 sys-libs/compiler-rt: Add slotted version Introduce a slotted variant of compiler-rt libraries with the slot matching the clang version. This will make it possible to install a new compiler-rt version before upgrading clang to the corresponding version, therefore preserving a working compiler through (even minor) clang upgrades. The alternative was to replace the complete version number with the major version in the runtime directory path. However, software (e.g. Mesa) hardcodes the default path and therefore breaks when it is changed. ..._rc1.ebuild => compiler-rt-4.0.0_rc1-r1.ebuild} | 36 ++++++++-------------- sys-libs/compiler-rt/compiler-rt-9999.ebuild | 36 ++++++++-------------- 2 files changed, 26 insertions(+), 46 deletions(-) diff --git a/sys-libs/compiler-rt/compiler-rt-4.0.0_rc1.ebuild b/sys-libs/compiler-rt/compiler-rt-4.0.0_rc1-r1.ebuild similarity index 76% rename from sys-libs/compiler-rt/compiler-rt-4.0.0_rc1.ebuild rename to sys-libs/compiler-rt/compiler-rt-4.0.0_rc1-r1.ebuild index 49f12b097e..43560c2edd 100644 --- a/sys-libs/compiler-rt/compiler-rt-4.0.0_rc1.ebuild +++ b/sys-libs/compiler-rt/compiler-rt-4.0.0_rc1-r1.ebuild @@ -17,16 +17,16 @@ HOMEPAGE="http://llvm.org/" SRC_URI="http://www.llvm.org/pre-releases/${PV/_//}/${P/_/}.src.tar.xz" LICENSE="|| ( UoI-NCSA MIT )" -SLOT="0/${PV%.*}" +SLOT="${PV%_*}" KEYWORDS="~amd64 ~arm64 ~x86" IUSE="test" -RDEPEND=" - !=sys-devel/llvm-4 - test? ( ~sys-devel/clang-${PV} ) + test? ( =sys-devel/clang-${PV%_*}*:${LLVM_SLOT} ) ${PYTHON_DEPS}" S=${WORKDIR}/${P/_/}.src @@ -51,14 +51,11 @@ src_configure() { fi fi - local llvm_version=$(llvm-config --version) || die - local clang_version=$(get_version_component_range 1-3 "${llvm_version}") - local libdir=$(get_libdir) local mycmakeargs=( - -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${clang_version}" + -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" # use a build dir structure consistent with install # this makes it possible to easily deploy test-friendly clang - -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${clang_version}" + -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}" # currently lit covers only sanitizer tests -DCOMPILER_RT_INCLUDE_TESTS=OFF @@ -69,22 +66,15 @@ src_configure() { cmake-utils_src_configure } -run_tests_for_abi() { - local ABI=${1} -} - src_test() { # prepare a test compiler - local llvm_version=$(llvm-config --version) || die - local clang_version=$(get_version_component_range 1-3 "${llvm_version}") - # copy clang over since resource_dir is located relatively to binary # therefore, we can put our new libraries in it - mkdir -p "${BUILD_DIR}"/{bin,$(get_libdir),lib/clang/"${clang_version}"/include} || die - cp "${EPREFIX}/usr/bin/clang" "${EPREFIX}/usr/bin/clang++" \ - "${BUILD_DIR}"/bin/ || die - cp "${EPREFIX}/usr/lib/clang/${clang_version}/include"/*.h \ - "${BUILD_DIR}/lib/clang/${clang_version}/include/" || die + mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_SLOT}{/bin,$(get_libdir)},clang/${SLOT}/include} || die + cp "${EPREFIX}"/usr/lib/llvm/${LLVM_SLOT}/bin/clang{,++} \ + "${BUILD_DIR}"/lib/llvm/${LLVM_SLOT}/bin/ || die + cp "${EPREFIX}/usr/lib/clang/${SLOT}/include"/*.h \ + "${BUILD_DIR}/lib/clang/${SLOT}/include/" || die # builtins are not converted to lit yet, so run them manually local tests=() f @@ -120,7 +110,7 @@ src_test() { einfo "Running tests for ABI=${ABI}" # use -k to run all tests even if some fail emake -k \ - CC="${BUILD_DIR}/bin/clang" \ + CC="${BUILD_DIR}/lib/llvm/${LLVM_SLOT}/bin/clang" \ CFLAGS="$(get_abi_CFLAGS)" \ CPPFLAGS='-I../../../lib/builtins' \ LDFLAGS='-rtlib=compiler-rt' \ diff --git a/sys-libs/compiler-rt/compiler-rt-9999.ebuild b/sys-libs/compiler-rt/compiler-rt-9999.ebuild index 4f6d080ee4..450177ae5c 100644 --- a/sys-libs/compiler-rt/compiler-rt-9999.ebuild +++ b/sys-libs/compiler-rt/compiler-rt-9999.ebuild @@ -19,16 +19,16 @@ EGIT_REPO_URI="http://llvm.org/git/compiler-rt.git https://github.com/llvm-mirror/compiler-rt.git" LICENSE="|| ( UoI-NCSA MIT )" -SLOT="0/${PV%.*}" +# Note: this needs to be updated to match version of clang-9999 +SLOT="5.0.0" KEYWORDS="" IUSE="test" -RDEPEND=" - !=sys-devel/llvm-4 - test? ( ~sys-devel/clang-${PV} ) + test? ( =sys-devel/clang-${PV%_*}*:${LLVM_SLOT} ) ${PYTHON_DEPS}" # least intrusive of all @@ -51,14 +51,11 @@ src_configure() { fi fi - local llvm_version=$(llvm-config --version) || die - local clang_version=$(get_version_component_range 1-3 "${llvm_version}") - local libdir=$(get_libdir) local mycmakeargs=( - -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${clang_version}" + -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" # use a build dir structure consistent with install # this makes it possible to easily deploy test-friendly clang - -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${clang_version}" + -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}" # currently lit covers only sanitizer tests -DCOMPILER_RT_INCLUDE_TESTS=OFF @@ -69,22 +66,15 @@ src_configure() { cmake-utils_src_configure } -run_tests_for_abi() { - local ABI=${1} -} - src_test() { # prepare a test compiler - local llvm_version=$(llvm-config --version) || die - local clang_version=$(get_version_component_range 1-3 "${llvm_version}") - # copy clang over since resource_dir is located relatively to binary # therefore, we can put our new libraries in it - mkdir -p "${BUILD_DIR}"/{bin,$(get_libdir),lib/clang/"${clang_version}"/include} || die - cp "${EPREFIX}/usr/bin/clang" "${EPREFIX}/usr/bin/clang++" \ - "${BUILD_DIR}"/bin/ || die - cp "${EPREFIX}/usr/lib/clang/${clang_version}/include"/*.h \ - "${BUILD_DIR}/lib/clang/${clang_version}/include/" || die + mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_SLOT}{/bin,$(get_libdir)},clang/${SLOT}/include} || die + cp "${EPREFIX}"/usr/lib/llvm/${LLVM_SLOT}/bin/clang{,++} \ + "${BUILD_DIR}"/lib/llvm/${LLVM_SLOT}/bin/ || die + cp "${EPREFIX}/usr/lib/clang/${SLOT}/include"/*.h \ + "${BUILD_DIR}/lib/clang/${SLOT}/include/" || die # builtins are not converted to lit yet, so run them manually local tests=() f @@ -120,7 +110,7 @@ src_test() { einfo "Running tests for ABI=${ABI}" # use -k to run all tests even if some fail emake -k \ - CC="${BUILD_DIR}/bin/clang" \ + CC="${BUILD_DIR}/lib/llvm/${LLVM_SLOT}/bin/clang" \ CFLAGS="$(get_abi_CFLAGS)" \ CPPFLAGS='-I../../../lib/builtins' \ LDFLAGS='-rtlib=compiler-rt' \