summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-02-09 11:02:41 +0100
committerMichał Górny <mgorny@gentoo.org>2018-02-09 17:00:02 +0100
commit8274f827479dd945caef9d3a9038684af77306b8 (patch)
tree66b0562ecbccf01aeae0b6931fe7f6b6f51855b7 /sys-libs/compiler-rt
parentdev-util/lldb: Bump to 6.0.0rc2 (diff)
downloadgentoo-8274f827479dd945caef9d3a9038684af77306b8.tar.gz
gentoo-8274f827479dd945caef9d3a9038684af77306b8.tar.bz2
gentoo-8274f827479dd945caef9d3a9038684af77306b8.zip
sys-libs/compiler-rt: Bump to 6.0.0rc2
Diffstat (limited to 'sys-libs/compiler-rt')
-rw-r--r--sys-libs/compiler-rt/Manifest1
-rw-r--r--sys-libs/compiler-rt/compiler-rt-6.0.0_rc2.ebuild108
2 files changed, 109 insertions, 0 deletions
diff --git a/sys-libs/compiler-rt/Manifest b/sys-libs/compiler-rt/Manifest
index 7065b8812492..a05df80762bf 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 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
diff --git a/sys-libs/compiler-rt/compiler-rt-6.0.0_rc2.ebuild b/sys-libs/compiler-rt/compiler-rt-6.0.0_rc2.ebuild
new file mode 100644
index 000000000000..8a3c3d0bdf15
--- /dev/null
+++ b/sys-libs/compiler-rt/compiler-rt-6.0.0_rc2.ebuild
@@ -0,0 +1,108 @@
+# 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 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"
+RESTRICT="!test? ( test ) !clang? ( test )"
+
+LLVM_SLOT=${SLOT%%.*}
+# llvm-6 for new lit options
+DEPEND="
+ >=sys-devel/llvm-6
+ 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_LIBFUZZER=OFF
+ -DCOMPILER_RT_BUILD_PROFILE=OFF
+ -DCOMPILER_RT_BUILD_SANITIZERS=OFF
+ -DCOMPILER_RT_BUILD_XRAY=OFF
+ )
+
+ if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+ mycmakeargs+=(
+ # disable use of SDK for the system itself
+ -DDARWIN_macosx_CACHED_SYSROOT=/
+ )
+ fi
+
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="-vv"
+
+ -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
+}