summaryrefslogtreecommitdiff
path: root/sys-libs/compiler-rt-sanitizers
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-01-04 18:55:01 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-01-04 18:55:01 +0000
commit423d21dcfee183cc4b04d29c1621615e8c30f834 (patch)
tree23bd6110b9a77b8d679b5ab60fb7663b8627f698 /sys-libs/compiler-rt-sanitizers
parent81e4fbcb846ed1cabdad699c0029b166dd7273b7 (diff)
gentoo resync : 04.01.2018
Diffstat (limited to 'sys-libs/compiler-rt-sanitizers')
-rw-r--r--sys-libs/compiler-rt-sanitizers/Manifest3
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.9999.ebuild150
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild2
3 files changed, 153 insertions, 2 deletions
diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest
index 67e699a10f84..40be6be3ac92 100644
--- a/sys-libs/compiler-rt-sanitizers/Manifest
+++ b/sys-libs/compiler-rt-sanitizers/Manifest
@@ -8,5 +8,6 @@ DIST llvm-5.0.1.src.tar.xz 23428720 BLAKE2B 3db4d33df21018d17eef0042c0d8d82a8412
EBUILD compiler-rt-sanitizers-4.0.1.ebuild 3840 BLAKE2B 72c9943e4bafed115dabfa2fa33a035af9259bc764e8ac6797a9fc7c62aa60110feba43305b25595b6819e7fab261edc2619113deb5ef5629d0b433fc788717a SHA512 1d0d63f67b71a718bf7ed8bb422659a1b83f7c5dddd7d5cf436d5e7c266eb5ffd9096a2653c18b5272c79d659b898ec9fe489ba94d8786cce7823acea11724a9
EBUILD compiler-rt-sanitizers-5.0.0.ebuild 3645 BLAKE2B 2ebf4a7189fce215a4c3bc91c59bd2af1e5ff20da607bbc80a5881b479a2c7a5e108c7efce269dffa5705141d0792842fb5227143bcb0afa84f0c03a88b7cffb SHA512 c54db543aafa607484f49bba0171c5e46c30ac461431711baa7ec1f65e81aae633c48bb5c83dc1f0b77a3aacaab539040e3fdadb842c27ae1b1fb4904ff1c95e
EBUILD compiler-rt-sanitizers-5.0.1.ebuild 4068 BLAKE2B 79ff907ad0db3ba46e1c498007d560e401d9b4b8a91513a3fd1bb511b89bcbcb964147e2f3abce02171cc660cbc47e6ecd43ae5df747494e830d60f44eba6a77 SHA512 6cda1b9e675962e0961e136ff581297626c7d8dea64a46e88fd037c300920953a86b16d893ecae7068596a44b238caa5b22d386209145ea64808245f196ad826
-EBUILD compiler-rt-sanitizers-9999.ebuild 4246 BLAKE2B 128372a0c7aba68b710f03534b3a3d21b3979ec8e3e8b8924f100bb2430de11656be21e0400d1d2ac3d1105637d65b49ddee81695eaae91aa0d65a137ab953d8 SHA512 2d07fb3a92f13e53fc4967fcd31c9a4c48a13bd0ff9be2580f181560111a903bee4e52def3110b60e7ffcebe2ce786289169da8883e545251e655b2d08524270
+EBUILD compiler-rt-sanitizers-6.0.9999.ebuild 4271 BLAKE2B 5c5e8f7a81037959bfe9515a33279dce7dfba47b74e8a46b4ed27bedb39f81fca7bb15e9969c886bd79fcda8e03dc5d40c01c1598bc9828ef4d00ec76d103334 SHA512 1ed9b07aa835485974e9b8b9514705009a3da40d4eb31d337730cde923ab6eadf9bec8b4b698edaf17b1f42ebf535c6cfcca74383224a7602d96e2d9f4146988
+EBUILD compiler-rt-sanitizers-9999.ebuild 4246 BLAKE2B 1eb7c0ff5a8cf6e7ef5ece56010902afc04a87c7e5f236f7fec722ac170d1c01550a2d333bd75f0ced5c9d120305bc224f2d04f932615319b02a0d45df918503 SHA512 f8a87073f3a9dd9a0f4b2d0587c5258193b761e39c45507474014136c624a7bb11e7b91c6fc950cb1c850ae2ae90384fdba40940b377201a5a3e6777b406e758
MISC metadata.xml 216 BLAKE2B fe5e49887842aa513fbf1f2e09bed09a884d531fd21bdaeb2d389e8bf590b6c0e7063f0af98f66e2db129308ab0f0804ba327c3c752bbb4c900c59ac109d99aa SHA512 3485598147c953e72e1785693a489a7e7d73d59620b76054db9c0ce95d8bfa0e8ffec29da7f7a9d73a32e5b77eac07ca3306c56a972dc57fd89d477edaebf3d5
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.9999.ebuild
new file mode 100644
index 000000000000..879e08005bbb
--- /dev/null
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.9999.ebuild
@@ -0,0 +1,150 @@
+# 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 git-r3 llvm python-any-r1
+
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
+HOMEPAGE="https://llvm.org/"
+SRC_URI=""
+EGIT_REPO_URI="https://git.llvm.org/git/compiler-rt.git
+ https://github.com/llvm-mirror/compiler-rt.git"
+EGIT_BRANCH="release_60"
+
+LICENSE="|| ( UoI-NCSA MIT )"
+# Note: this needs to be updated to match version of clang-9999
+SLOT="6.0.0"
+KEYWORDS=""
+IUSE="test"
+RESTRICT="!test? ( 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}"
+
+# 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() {
+ if use test; then
+ # needed for patched gtest
+ git-r3_fetch "https://git.llvm.org/git/llvm.git
+ https://github.com/llvm-mirror/llvm.git"
+ fi
+ git-r3_fetch
+
+ if use test; then
+ git-r3_checkout https://llvm.org/git/llvm.git \
+ "${WORKDIR}"/llvm '' utils/unittest
+ fi
+ git-r3_checkout
+}
+
+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_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
+}
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild
index ca1b11003293..97b8b578d56f 100644
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild
@@ -18,7 +18,7 @@ EGIT_REPO_URI="https://git.llvm.org/git/compiler-rt.git
LICENSE="|| ( UoI-NCSA MIT )"
# Note: this needs to be updated to match version of clang-9999
-SLOT="6.0.0"
+SLOT="7.0.0"
KEYWORDS=""
IUSE="test"
RESTRICT="!test? ( test )"