diff options
Diffstat (limited to 'sys-libs/compiler-rt')
-rw-r--r-- | sys-libs/compiler-rt/Manifest | 3 | ||||
-rw-r--r-- | sys-libs/compiler-rt/compiler-rt-6.0.9999.ebuild | 110 | ||||
-rw-r--r-- | sys-libs/compiler-rt/compiler-rt-9999.ebuild | 2 |
3 files changed, 113 insertions, 2 deletions
diff --git a/sys-libs/compiler-rt/Manifest b/sys-libs/compiler-rt/Manifest index a9bc1f73002a..b879f397368c 100644 --- a/sys-libs/compiler-rt/Manifest +++ b/sys-libs/compiler-rt/Manifest @@ -4,5 +4,6 @@ DIST compiler-rt-5.0.1.src.tar.xz 1498220 BLAKE2B 61503df8a4075c2fe1e42d480753b8 EBUILD compiler-rt-4.0.1.ebuild 4138 BLAKE2B e13bd10d0709bd482064b110742f7714306116e27c8123a3f61a446dc3a10e5de688c4b0ff0b5e43f392032c05e5abf8b1d429e9351090691e56c204c2341bed SHA512 76e4ca5084fa6c4e909cad6327d8e59a9a5ff8e88f6d7800c65ea0b19e464408598eb3c7e950ddc72b882dcb332f0ac094b15a3081739dfd0873a998e27d9bfb EBUILD compiler-rt-5.0.0.ebuild 2465 BLAKE2B 673b049f9f286223d377fd1f339e3d6854b9833cf8009b646f63ae36b4c885463d8f072332e19591e937b71f3189388353310599d903a8bd062c53e88a706869 SHA512 a6b6cc988d66efa33917031c30edac1685a2421250182b74e3ae50f86ad30e60b088b43697d256a77cc3e5a0ca44dd111801dd191f20563e35c5620f5d28580a EBUILD compiler-rt-5.0.1.ebuild 2661 BLAKE2B e2a9e0d2214676c52662e253f55d8d38c86c6626cdab73356fcf33218feb72eb5337c5166d32e3404401c65a739b1c458d4aa27bcf77b3fe4c56b40cd2b02112 SHA512 db193c5551f57d3bd30487a8bf6beb6cbef00aaec804a776d38897326e8c1204b1252558fbe912e9bcb6e6d603deea1d028c9e4ea26d1a6714a6ba9615d07c90 -EBUILD compiler-rt-9999.ebuild 2848 BLAKE2B 7d9d3f7cd038a9791fb894ca41c5d401599b3b83b23d37d2fa4a9b439bbdba749ca66d80148cb21955492b5a41dbf527f6c5d195fb72cf25218f9b6eae88b98f SHA512 85bde3d9c68a4041f1afcff82627e0a8ec3f932a2e2c214e1373c829a540b43d5e5e260cb7cf3dfdb9298401e6f3439336ebbc93410e040f86d60e0dceb87383 +EBUILD compiler-rt-6.0.9999.ebuild 2873 BLAKE2B 419ddb09e6413ac6a8948b7bcf43ecafd6fb822c4d54b74e9197cdcb6998a288d223429c82592fc580b3cc528daec003072523c7a32e3ec97b2ecf1daea42dfa SHA512 2a0814fdb3e2258f13fbc6c8ae1014e09bb6b680f7b784f6071f6edc08a95b5aa3b97abe9e32c83655d6ed590bbf29bd4f8eef8f44fed9ba385264b46bca91d1 +EBUILD compiler-rt-9999.ebuild 2848 BLAKE2B a44e7b05cacef04284cfdb7a1f31c48e85fc726da666479ca222605cb804c24900b0f360de5ef69065d3ddc4bf5d150a86980948d5340aa34b1295358bd2ce7f SHA512 9312c69639d82f59c08ceebbe062d57f12675772e9f3cb980c0328fe185e16300351415f91b12ccd3063c7d61ad739a45d11460e951a7640a07452633406c8dd MISC metadata.xml 333 BLAKE2B 24e417cb7b8ab7730b18a3e1e5e29d008042e4fd53cf1ba3cc9d18719160b0410854ddfae52315c690138e61fb0196015968fa09b98af6470cd8bdecc09205ef SHA512 97daa7452a696b7297c47f5f637a33425f82b51426060a75b3de6bc812f9ddcd3c70ae068bc3e88ce937ab1eb10d59b0ab48a2d2c0397a112b8b6a754e333bdc diff --git a/sys-libs/compiler-rt/compiler-rt-6.0.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-6.0.9999.ebuild new file mode 100644 index 000000000000..19b4ea1e2fd7 --- /dev/null +++ b/sys-libs/compiler-rt/compiler-rt-6.0.9999.ebuild @@ -0,0 +1,110 @@ +# 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 git-r3 llvm python-any-r1 toolchain-funcs + +DESCRIPTION="Compiler runtime library for clang (built-in part)" +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="+clang test" +RESTRICT="!test? ( test ) !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}" + +# 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 +} diff --git a/sys-libs/compiler-rt/compiler-rt-9999.ebuild b/sys-libs/compiler-rt/compiler-rt-9999.ebuild index 7c6eb6db761e..4f525a8bc4d4 100644 --- a/sys-libs/compiler-rt/compiler-rt-9999.ebuild +++ b/sys-libs/compiler-rt/compiler-rt-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="+clang test" RESTRICT="!test? ( test ) !clang? ( test )" |