summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-12-01 11:39:25 +0100
committerMichał Górny <mgorny@gentoo.org>2017-12-02 00:40:35 +0100
commit6c2134d094ba00fa30576831cad3299ced65d4ff (patch)
tree3032f01a585dc5396fba1e55c877a6e124d4b639 /sys-libs
parentdev-util/lldb: Bump to 5.0.1_rc2 (diff)
downloadgentoo-6c2134d094ba00fa30576831cad3299ced65d4ff.tar.gz
gentoo-6c2134d094ba00fa30576831cad3299ced65d4ff.tar.bz2
gentoo-6c2134d094ba00fa30576831cad3299ced65d4ff.zip
sys-libs/compiler-rt: Bump to 5.0.1
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/compiler-rt/Manifest1
-rw-r--r--sys-libs/compiler-rt/compiler-rt-5.0.1_rc2.ebuild97
2 files changed, 98 insertions, 0 deletions
diff --git a/sys-libs/compiler-rt/Manifest b/sys-libs/compiler-rt/Manifest
index d03d168bb4df..ff880467dc3a 100644
--- a/sys-libs/compiler-rt/Manifest
+++ b/sys-libs/compiler-rt/Manifest
@@ -1,2 +1,3 @@
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 compiler-rt-5.0.1rc2.src.tar.xz 1509784 BLAKE2B 898e32e189589b6b72073cb791dc9498201d7267e13ad60704b9a66f3e4e839497a84c7cfc5817e72263b5287d00cf25debd2e739ea4174213c56ddb2aed6e38 SHA512 ec2a91e81bc7ac069849f07c31335c88734fd34b512ca3bedaed9c33116549853ac6ac7188552c181900ed8d7ff14ec08c004c87d7fbcbc234e73710c2047d2b
diff --git a/sys-libs/compiler-rt/compiler-rt-5.0.1_rc2.ebuild b/sys-libs/compiler-rt/compiler-rt-5.0.1_rc2.ebuild
new file mode 100644
index 000000000000..f0801a9eab43
--- /dev/null
+++ b/sys-libs/compiler-rt/compiler-rt-5.0.1_rc2.ebuild
@@ -0,0 +1,97 @@
+# 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 cmake-utils flag-o-matic llvm python-any-r1 toolchain-funcs
+
+DESCRIPTION="Compiler runtime library for clang (built-in part)"
+HOMEPAGE="https://llvm.org/"
+SRC_URI="http://prereleases.llvm.org/${PV/_//}/${P/_/}.src.tar.xz"
+
+LICENSE="|| ( UoI-NCSA MIT )"
+SLOT="${PV%_*}"
+KEYWORDS=""
+IUSE="+clang test"
+
+LLVM_SLOT=${SLOT%%.*}
+# llvm-4 needed for --cmakedir
+DEPEND="
+ >=sys-devel/llvm-4
+ clang? ( sys-devel/clang )
+ test? (
+ $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
+ =sys-devel/clang-${PV%_*}*:${LLVM_SLOT} )
+ ${PYTHON_DEPS}"
+
+S=${WORKDIR}/${P/_/}.src
+
+# least intrusive of all
+CMAKE_BUILD_TYPE=RelWithDebInfo
+
+pkg_pretend() {
+ if ! use clang && ! tc-is-clang; then
+ ewarn "Building using a compiler other than clang may result in broken atomics"
+ ewarn "library. Enable USE=clang unless you have a very good reason not to."
+ fi
+}
+
+pkg_setup() {
+ llvm_pkg_setup
+ python-any-r1_pkg_setup
+}
+
+test_compiler() {
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
+ <<<'int main() { return 0; }' &>/dev/null
+}
+
+src_configure() {
+ # pre-set since we need to pass it to cmake
+ BUILD_DIR=${WORKDIR}/${P}_build
+
+ local nolib_flags=( -nodefaultlibs -lc )
+ 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} ${nolib_flags[*]}"
+ strip-unsupported-flags
+ elif ! test_compiler; then
+ if test_compiler "${nolib_flags[@]}"; then
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
+ fi
+ fi
+
+ local mycmakeargs=(
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
+
+ -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+ -DCOMPILER_RT_BUILD_SANITIZERS=OFF
+ -DCOMPILER_RT_BUILD_XRAY=OFF
+ )
+
+ if use test; then
+ mycmakeargs+=(
+ -DLIT_COMMAND="${EPREFIX}/usr/bin/lit"
+
+ -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_SLOT}/bin/clang"
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_SLOT}/bin/clang++"
+ )
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+
+ cmake-utils_src_make check-builtins
+}