commit:     59128e1cbbe40a9d9ca966b308a785ff5ee035de
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Feb  9 10:03:54 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Feb  9 16:00:03 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59128e1c

sys-libs/compiler-rt-sanitizers: Bump to 6.0.0rc2

 sys-libs/compiler-rt-sanitizers/Manifest           |   2 +
 .../compiler-rt-sanitizers-6.0.0_rc2.ebuild        | 156 +++++++++++++++++++++
 2 files changed, 158 insertions(+)

diff --git a/sys-libs/compiler-rt-sanitizers/Manifest 
b/sys-libs/compiler-rt-sanitizers/Manifest
index cb8ead5dcaf..0990ba2ce84 100644
--- a/sys-libs/compiler-rt-sanitizers/Manifest
+++ b/sys-libs/compiler-rt-sanitizers/Manifest
@@ -1,5 +1,7 @@
 DIST compiler-rt-4.0.1.src.tar.xz 1434100 BLAKE2B 
ca6bf78fc07f387b7244a52ef648b06a5685effb46a66b241a9ee847ecafb17d02602f49b0dbe473d47202586874a043a6d75141400062f526d2f808da323e1e
 SHA512 
cfeb625884b273f7c0e6767b81a8d3e5f24e0b96a510d5764d9d47a0e215fc841b4cb9d1843c8fb428cd21def720cfbfe8d3593ff5bb390548ebc8c32a902649
 DIST compiler-rt-5.0.1.src.tar.xz 1498220 BLAKE2B 
61503df8a4075c2fe1e42d480753b861321b5de127e340f48d648fc38d81c7967cead17e136beaa5235cc92540f158915fccec77cf39aa7c336d106c9d265222
 SHA512 
61e23775db78bdeed3003a509b45ae609287db31302fed186f3210d481ecf062d1828571e63482215ab00ff732df8f3fa6c77334dfb677e4b76eb555d476b8c4
+DIST compiler-rt-6.0.0rc2.src.tar.xz 1635928 BLAKE2B 
6d60e40e61f4d3496d259dff9471bbe41656a1ced8aa1eff3d2443ddd17ffb1a13c54e1dc632d326f8185cc0ace8af72eaaeed3c7e5b1e86411240349b2858ca
 SHA512 
3c279f2c5fdad6ed3a2c49809eb2879cb6615d27920046f4d9bb1cc4d66da949b3b90f26dc8208dbea5602cb5f85e1a4d1e72daca7b7dfa4d405aed4743c7604
 DIST compiler-rt-sanitizers-4.0.1-patchset.tar.xz 2384 BLAKE2B 
6f9eee711c83570767f0bb634d0f91c18ee7f2af93a478938b8d5b6ce6f2c2fbaadb7bd5c7ee94a14dc1834359a046187db6bc7005b7c2efa539325dc0701ad9
 SHA512 
72d7357b4c27bbf8fa8b34803ddea905a9f1054e8fc7bf99a4ead9dc00408989ea2709f04be9cf45a27eeb4b9386c89feeb25b53a84f3cac9739196b89813887
 DIST llvm-4.0.1.src.tar.xz 21065652 BLAKE2B 
6327eed2d1feb108440f22d2581d1ff86c10a10c29793538d8d899c7e2dc83d3f7b147d3fd4bcce2bd2bf57c071b08c624aeafe40a3e7a3914506e7751727e6c
 SHA512 
16adc39b34ddb628f81b171119a8e2a0e9138b25011e803ef0b688e2fbea116fc4953d3a1b61b90a98a75e33619f81566b7cb06a9a2ea4d04ac5e0eb303a2d1d
 DIST llvm-5.0.1.src.tar.xz 23428720 BLAKE2B 
3db4d33df21018d17eef0042c0d8d82a8412bd5daa99cfb5405a6ec83c5774178fa76b220e8731c2a9a64dabf898aa90fe29c685327bd63a4f078e8e94a9a77e
 SHA512 
bee1d45fca15ce725b1f2b1339b13eb6f750a3a321cfd099075477ec25835a8ca55b5366172c4aad46592dfd8afe372349ecf264f581463d017f9cee2d63c1cb
+DIST llvm-6.0.0rc2.src.tar.xz 25288140 BLAKE2B 
095f054ce2ccb1eee3def2b8c6cecc610c4392283062338aa20d2de33c951484a2dc6774db2727e19e879307cfc95dda2730185cde8e52f4f45851d8dd809b3e
 SHA512 
3cb3521ba8d90bf2a90c49d753ab5e92f1e0ccfc86946f3767c06d0f276e2c4cf8ff2f984680835efbaa4dae1cd2d3a074468e547785e05a67ea55311b94a0e9

diff --git 
a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.0_rc2.ebuild 
b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.0_rc2.ebuild
new file mode 100644
index 00000000000..19492d445c2
--- /dev/null
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.0_rc2.ebuild
@@ -0,0 +1,156 @@
+# Copyright 1999-2018 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
+
+MY_P=compiler-rt-${PV/_/}.src
+LLVM_P=llvm-${PV/_/}.src
+
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
+HOMEPAGE="https://llvm.org/";
+SRC_URI="http://prereleases.llvm.org/${PV/_//}/${MY_P}.tar.xz
+       test? ( http://prereleases.llvm.org/${PV/_//}/${LLVM_P}.tar.xz )"
+
+LICENSE="|| ( UoI-NCSA MIT )"
+SLOT="${PV%_*}"
+KEYWORDS=""
+IUSE="+clang test"
+RESTRICT="!test? ( test ) !clang? ( test )"
+
+LLVM_SLOT=${SLOT%%.*}
+# llvm-6 for new lit options
+DEPEND="
+       >=sys-devel/llvm-6
+       clang? ( sys-devel/clang )
+       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}/${MY_P}
+
+# 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() {
+       einfo "Unpacking ${MY_P}.tar.xz ..."
+       tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die
+
+       if use test; then
+               einfo "Unpacking parts of ${LLVM_P}.tar.xz ..."
+               tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \
+                       "${LLVM_P}"/utils/{lit,unittest} || die
+               mv "${LLVM_P}" llvm || die
+       fi
+}
+
+src_configure() {
+       # pre-set since we need to pass it to cmake
+       BUILD_DIR=${WORKDIR}/${P}_build
+
+       if use clang; then
+               local -x CC=${CHOST}-clang
+               local -x CXX=${CHOST}-clang++
+               strip-unsupported-flags
+       fi
+
+       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_LIBFUZZER=ON
+               -DCOMPILER_RT_BUILD_PROFILE=ON
+               -DCOMPILER_RT_BUILD_SANITIZERS=ON
+               -DCOMPILER_RT_BUILD_XRAY=ON
+       )
+       if use test; then
+               cat > "${T}"/unsandbox-lit.py <<-EOF || die
+                       import os, sys
+                       os.execlp("unsandbox", sys.argv[0], "lit", 
*sys.argv[1:])
+               EOF
+
+               mycmakeargs+=(
+                       -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
+                       -DLLVM_EXTERNAL_LIT="${T}/unsandbox-lit.py"
+                       -DLLVM_LIT_ARGS="-vv"
+
+                       # 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
+
+       if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+               mycmakeargs+=(
+                       # disable use of SDK for the system itself
+                       -DDARWIN_macosx_CACHED_SYSROOT=/
+               )
+       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
+}

Reply via email to