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 C63811396DC for ; Fri, 8 Sep 2017 17:30:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 351791FC09A; Fri, 8 Sep 2017 17:30:54 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 046771FC09A for ; Fri, 8 Sep 2017 17:30:53 +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 7B3A034169C for ; Fri, 8 Sep 2017 17:30:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A16269034 for ; Fri, 8 Sep 2017 17:30:49 +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: <1504891837.46c6ace897a2fe104c176d09c4781cad90f6d860.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/compiler-rt-sanitizers/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/compiler-rt-sanitizers/Manifest sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.0.ebuild X-VCS-Directories: sys-libs/compiler-rt-sanitizers/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 46c6ace897a2fe104c176d09c4781cad90f6d860 X-VCS-Branch: master Date: Fri, 8 Sep 2017 17:30:49 +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: 1699e528-5a75-4c4b-9899-ab1a38d2ef75 X-Archives-Hash: 5741bb45e08f6cc6fe97d00209efc21c commit: 46c6ace897a2fe104c176d09c4781cad90f6d860 Author: Michał Górny gentoo org> AuthorDate: Fri Sep 8 09:18:21 2017 +0000 Commit: Michał Górny gentoo org> CommitDate: Fri Sep 8 17:30:37 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46c6ace8 sys-libs/compiler-rt-sanitizers: Bump to 5.0.0 sys-libs/compiler-rt-sanitizers/Manifest | 2 + .../compiler-rt-sanitizers-5.0.0.ebuild | 126 +++++++++++++++++++++ 2 files changed, 128 insertions(+) diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest index 8234a08f788..7c6cf871329 100644 --- a/sys-libs/compiler-rt-sanitizers/Manifest +++ b/sys-libs/compiler-rt-sanitizers/Manifest @@ -1,2 +1,4 @@ DIST compiler-rt-4.0.1.src.tar.xz 1434100 SHA256 a3c87794334887b93b7a766c507244a7cdcce1d48b2e9249fc9a94f2c3beb440 SHA512 cfeb625884b273f7c0e6767b81a8d3e5f24e0b96a510d5764d9d47a0e215fc841b4cb9d1843c8fb428cd21def720cfbfe8d3593ff5bb390548ebc8c32a902649 WHIRLPOOL 8b33c6841cacefe98da92435418b13b8f8ed97a982903be827e5c37f937dc9001975d6a709d60423b21509dd5670ee2e90cb34c96473fb4a66c2ab6f47af09e5 +DIST compiler-rt-5.0.0.src.tar.xz 1507996 SHA256 d5ad5266462134a482b381f1f8115b6cad3473741b3bb7d1acc7f69fd0f0c0b3 SHA512 5f3fd49736fba35232b0baa19a5f03c4ab3bf85ec16f23355eb3c516fe6d861c14272c224ca2f2092a80636df4307e49a3df1b60a3791949b3f1ba4a0c8c81fb WHIRLPOOL 7ac0eb36b59a7917b694e4b5e9a425a3ffed7c48eda0c211a7d1c52596b2d39fa4bc0a84db5f58492bf7b5b64c22b81cd2fcd8dee2bceb89583b6e190c70d2d8 DIST llvm-4.0.1.src.tar.xz 21065652 SHA256 da783db1f82d516791179fe103c71706046561f7972b18f0049242dee6712b51 SHA512 16adc39b34ddb628f81b171119a8e2a0e9138b25011e803ef0b688e2fbea116fc4953d3a1b61b90a98a75e33619f81566b7cb06a9a2ea4d04ac5e0eb303a2d1d WHIRLPOOL 1626ff270f7ce4801d02a0797b227fda9314ff5c0c01d653111599e9a4d2854c4d9edc3c698a7abee8d79d6bce8b18dc619fbced3c07ca610d44a248d65830cc +DIST llvm-5.0.0.src.tar.xz 23411980 SHA256 e35dcbae6084adcf4abb32514127c5eabd7d63b733852ccdb31e06f1373136da SHA512 e6d8fdcb5bf27bded814d02f39f69c6171bc3a512d5957c03e5ac2e231f903b7de87634b059bd5c5da670f7c3a8f7a538f6299225799f15f921857f1452f6b3a WHIRLPOOL 6a99edbdc3e6726dc8ff9126b110fd7560faac46601407722e6dd80b5d894ff242521dc8fda7f4d879de83dac51c65645a37224f7e8def0d8d2f1e564b0531bb diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.0.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.0.ebuild new file mode 100644 index 00000000000..17eb047a5e1 --- /dev/null +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.0.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +: ${CMAKE_MAKEFILE_GENERATOR:=ninja} +# (needed due to CMAKE_BUILD_TYPE != Gentoo) +CMAKE_MIN_VERSION=3.7.0-r1 +PYTHON_COMPAT=( python2_7 ) + +inherit check-reqs cmake-utils flag-o-matic llvm python-any-r1 versionator + +DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" +HOMEPAGE="https://llvm.org/" +SRC_URI="https://releases.llvm.org/${PV/_//}/compiler-rt-${PV/_/}.src.tar.xz + test? ( https://releases.llvm.org/${PV/_//}/llvm-${PV/_/}.src.tar.xz )" + +LICENSE="|| ( UoI-NCSA MIT )" +SLOT="${PV%_*}" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="test" + +LLVM_SLOT=${SLOT%%.*} +# llvm-4 needed for --cmakedir +DEPEND=" + >=sys-devel/llvm-4 + test? ( + app-portage/unsandbox + $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") + =sys-devel/clang-${PV%_*}*:${LLVM_SLOT} + sys-libs/compiler-rt:${SLOT} ) + ${PYTHON_DEPS}" + +S=${WORKDIR}/compiler-rt-${PV/_/}.src + +# least intrusive of all +CMAKE_BUILD_TYPE=RelWithDebInfo + +check_space() { + if use test; then + local CHECKREQS_DISK_BUILD=11G + check-reqs_pkg_pretend + fi +} + +pkg_pretend() { + check_space +} + +pkg_setup() { + check_space + llvm_pkg_setup + python-any-r1_pkg_setup +} + +src_unpack() { + default + + if use test; then + mv llvm-* llvm || die + fi +} + +src_configure() { + # pre-set since we need to pass it to cmake + BUILD_DIR=${WORKDIR}/${P}_build + + local mycmakeargs=( + -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/${SLOT}" + + -DCOMPILER_RT_INCLUDE_TESTS=$(usex test) + # built-ins installed by sys-libs/compiler-rt + -DCOMPILER_RT_BUILD_BUILTINS=OFF + -DCOMPILER_RT_BUILD_SANITIZERS=ON + -DCOMPILER_RT_BUILD_XRAY=ON + ) + if use test; then + mycmakeargs+=( + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" + -DLIT_COMMAND="${EPREFIX}/usr/bin/unsandbox;${EPREFIX}/usr/bin/lit" + + # they are created during src_test() + -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_SLOT}/bin/clang" + -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_SLOT}/bin/clang++" + ) + + # same flags are passed for build & tests, so we need to strip + # them down to a subset supported by clang + CC=${EPREFIX}/usr/lib/llvm/${LLVM_SLOT}/bin/clang \ + CXX=${EPREFIX}/usr/lib/llvm/${LLVM_SLOT}/bin/clang++ \ + strip-unsupported-flags + fi + + cmake-utils_src_configure + + if use test; then + local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* ) + [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}" + [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}" + + # copy clang over since resource_dir is located relatively to binary + # therefore, we can put our new libraries in it + 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 + cp "${sys_dir}"/*builtins*.a \ + "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die + # we also need LLVMgold.so for gold-based tests + if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_SLOT}/$(get_libdir)/LLVMgold.so ]]; then + ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_SLOT}/$(get_libdir)/LLVMgold.so \ + "${BUILD_DIR}"/lib/llvm/${LLVM_SLOT}/$(get_libdir)/ || die + fi + fi +} + +src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + + cmake-utils_src_make check-all +}