From 4b19be30aa626b327c885dae62c559ec0e9fb935 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 13 Oct 2019 22:19:36 +0100 Subject: gentoo resync : 13.10.2019 --- sys-libs/compiler-rt/Manifest | 12 +-- sys-libs/compiler-rt/compiler-rt-6.0.1.ebuild | 2 +- sys-libs/compiler-rt/compiler-rt-7.1.0.ebuild | 2 +- sys-libs/compiler-rt/compiler-rt-8.0.0.ebuild | 109 -------------------- sys-libs/compiler-rt/compiler-rt-8.0.1.ebuild | 2 +- sys-libs/compiler-rt/compiler-rt-9.0.0.9999.ebuild | 111 --------------------- sys-libs/compiler-rt/compiler-rt-9.0.0.ebuild | 2 +- sys-libs/compiler-rt/compiler-rt-9.0.1.9999.ebuild | 111 +++++++++++++++++++++ 8 files changed, 120 insertions(+), 231 deletions(-) delete mode 100644 sys-libs/compiler-rt/compiler-rt-8.0.0.ebuild delete mode 100644 sys-libs/compiler-rt/compiler-rt-9.0.0.9999.ebuild create mode 100644 sys-libs/compiler-rt/compiler-rt-9.0.1.9999.ebuild (limited to 'sys-libs/compiler-rt') diff --git a/sys-libs/compiler-rt/Manifest b/sys-libs/compiler-rt/Manifest index e0cfebe21caf..d6b20e0bb439 100644 --- a/sys-libs/compiler-rt/Manifest +++ b/sys-libs/compiler-rt/Manifest @@ -1,13 +1,11 @@ DIST compiler-rt-6.0.1.src.tar.xz 1686820 BLAKE2B 59fa3f6e478bd4d6dfa056c85dcdc4349cbce7cea7fc56519feddc9d66c88c9ca48bad7967432ceb81d754213577f12707035afd827cf630a58627575b73b798 SHA512 69850c1ad92c66977fa217cbfb42a6a3f502fbe3d1a08daa7fc4cfeb617a7736d231f8ad8d93b10b1ae29bd753315d2a2d70f9ff1f4d18a9a7cc81758d91f963 DIST compiler-rt-7.1.0.src.tar.xz 1864248 BLAKE2B 42ab86416f7f85c5833cf85dbfb66b18a5d5cf53fa0560ad43b2ef39f5a2cd7ec1dbe4192cc8dac9b3f658b828c8306f26745c4d0e8f846d9f550ac22717eb33 SHA512 54d3ad80936f011dbf2ecebba3f1b7d4a156044b178228411ba855be5ec48eb646155b74dea1a96674adab6f93803456ae1435395e3240a4423a3f65f4566b55 -DIST compiler-rt-8.0.0.src.tar.xz 1903020 BLAKE2B dc42c4772132fee5e225bb94805cd6917214c1d830b8ba4f1c774e6e1726ec7846432d1d6881085676b6d094ec04060ec2a95749eb7d93be79268ee7de1bd828 SHA512 fe9f69fe2269fa3d560ae97fdacd462f855fb0b7a5f647f5b8595206ff7febca6496725adc953de411a827c761e2b3ca11a2149f25707d6c62af0722b68ba913 DIST compiler-rt-8.0.1.src.tar.xz 1954204 BLAKE2B cbba1d5fb37385116920da39dea26739d09e3f11c392503f8bc45293f1ef00c97f6a9fbd3ba67094d7f1e532410d0eca461943dadfdb10646110470a8e3b5f1f SHA512 12bf1bdabe25c0c3a84cc73a718fe154573dd729ec3ff5e099bd5f74c6bec9c80521b87ded646d3b20dfdb9aa51dea0234281418c7eb81805e1dd5d3107d3d8e DIST compiler-rt-9.0.0.src.tar.xz 1993084 BLAKE2B 4aece9570df4cc38aaa58a3740aa0e1b5cbfe0bfc2d1a590e9e95871fda6ba4dcdeab6125d243c31ce5130386235475339f13da9f900b505eb2fec850a711646 SHA512 a7bb0a67165d29317cee58c22ed79f0d6a9cb9279dcd355d4267f3cd6c531a7be455a28267c591d6e2c0f9c56e363d40c10a405391e07d02ab3e30f00ffef2a8 EBUILD compiler-rt-10.0.0.9999.ebuild 2921 BLAKE2B 3f96154943747cc7a8945c8af75880650e919266dda3232fb1c6984c8fb2af92dde32e0557f2c3b9805cefac69166fa34aa42b42f6bb1ec328b389757f7f2fa1 SHA512 fc713062020b5ed70e12ceaaf2043d4e907a8d840e152b43a8177f892985d116475818048262162fd856392ba2080a6c7b830a52bc590b5d12c379d375e7c1be -EBUILD compiler-rt-6.0.1.ebuild 2911 BLAKE2B 9ee423b460c62366af5525ab3b32cd2980aff78331a65b5658a50e0f808c9cb694d2e5d85bd753d291e1b5f96ab9e6cbc6a6d9f0cddcd9f7f8521ed5280f8291 SHA512 ecce0303d9db8ec0c74b3d0b248547402c32b7bceef52a5bb999f076c8fa82e209d5d113e6c14a1511e99dbf04bfd4d79077da1c010d9069a1bd284a168b26e0 -EBUILD compiler-rt-7.1.0.ebuild 2912 BLAKE2B 62a9f92312dcbc67366f8cafd7fde15d721480b92ea068cb56456a70139b3278e738e15265fbc4c0dcfa6c4eb27a17e6889063326f77a2b9801b50121dce247a SHA512 96d7c9a5e5bf2e66dd61b585480314bee2aa1b208ed231d52e2e7387a6289b349f03ec5a858403b491e0d1f8d6fe663eecfa90a7d9918e90e74253c585129588 -EBUILD compiler-rt-8.0.0.ebuild 2916 BLAKE2B cb63ba2b0e7a3f913fe58f2e53fb5deaa827c0fa7b10a89891a7da7fcf658fb6d9ab0fd50e501d35a788c9f53b3c267c85a03dbbb9722f4a3294aec4a1c0e4b8 SHA512 d11deefc294f5d99e4b92384a154dfebcb9ab5a7549aaefefbe791bf5cc319c1ea547eb076bb416702d8812d967e4721f7d51f18ec9d741a0347cd79b8172ad1 -EBUILD compiler-rt-8.0.1.ebuild 2950 BLAKE2B 56fc9e86b8236aed100ea4a8260bdff741055074ccd24d18e5bb6143b3024cfd7b82ad47cf8702386249c8a3871feda31ae75d360ba1f0d196ef0875c37ef385 SHA512 905eb05686637d5b7017c21d69f8bbc1f129563199f5ab8e59d3ce4f8b04867f2304347c6ab0a9547169fa3a5eddf06c8bf3825ae25272abd78638b89262094a -EBUILD compiler-rt-9.0.0.9999.ebuild 2946 BLAKE2B 94fd398f887d1d5726a8397621864353d72b081b57e981bb2cc77199cb42419f590c0f45cb7c2e3ea8ad431efccef0091557d7169b009c5796a92d384c0c84f1 SHA512 8ea75505267484b1aa9f9f873fba4bdb745903f4618d38a151cfb1f66b9e251c5f6647731fb99d108447a4bac1d9878e06b958cf4d922cb8a4a5601d879219b0 -EBUILD compiler-rt-9.0.0.ebuild 2978 BLAKE2B 732502046085034443755b34112d1027581124149177e2c2f4d08c7b6c632b072f0b75df11a6718cf55a6732f00d67c9f94de17013932713c3577fe5df68bb61 SHA512 2e99a75b4a0e8898c9454bc5b3afd7427d40d89dcc27fc73bdfcfb9c72c25904bbf0312cbd8838b8cea5789f5dfb929b6a4007499aaea488103d1c8fe16e80fb +EBUILD compiler-rt-6.0.1.ebuild 2899 BLAKE2B 9db37364c5e328b38c64dc2c6ed076b944e2d3528e17bb34ec2ade4e498226f8c3f26196ac416ff51bd0b64335856b7161a6ca2b264a8db331fa4626d9b3eac6 SHA512 ea9086fc9943fc9910522d1672fb0448b47c51ad81aa3c0d59282c6109f63a87190392c46c3cb234427ef190fa116e8b4232f089c428e1b28ea80744285e8e50 +EBUILD compiler-rt-7.1.0.ebuild 2900 BLAKE2B 60bec479b6e5caa39b98e5bf54621e9cf395c7e20ce0269d336153811f39de065b53744c11bded995899a6be33cf207c0c4a091b4be8a9ce8b8b479d26b057e8 SHA512 6cf5d533db3bbc75125f40439f8a6132f6c0c4fa04bd1d6007e9014ae4638fb1e99d475da780e07d12509873c26d129696cbd657c6c0b79521aa0561a927b23e +EBUILD compiler-rt-8.0.1.ebuild 2938 BLAKE2B 6ce7229e928bbd6b269b3d37ad233f188e831fc2dd3153346eecad4a031a6a6f7a82fa8c25020fc8169eeeeede6e138aee2d7b3f520be02c1f5450bb802fac9a SHA512 567c3cd3d932f02a5d0f627cac45fbbeb403b346a421e805a8a48289bddc8868d1307f35cd37f7d6ab60ecf466c0651c93dc1ace24b99971a3a131f0d12d6261 +EBUILD compiler-rt-9.0.0.ebuild 2966 BLAKE2B 242c593f1dda27843a3bd6c929ea535d8455435392f48fb2581bddc3e9e6ed81bca70838d94553892c82e306ad40ec5a9ca0a639e97c2ff422b2febde226cb02 SHA512 3edb443f357d3e2508b08616259e668b5f49281a90ccd32c6c5d290c6ec4dd2b500f28cc631974806d8c7006340c21b45034b76ebe4026eb88cd116be49c2e88 +EBUILD compiler-rt-9.0.1.9999.ebuild 2946 BLAKE2B 94fd398f887d1d5726a8397621864353d72b081b57e981bb2cc77199cb42419f590c0f45cb7c2e3ea8ad431efccef0091557d7169b009c5796a92d384c0c84f1 SHA512 8ea75505267484b1aa9f9f873fba4bdb745903f4618d38a151cfb1f66b9e251c5f6647731fb99d108447a4bac1d9878e06b958cf4d922cb8a4a5601d879219b0 MISC metadata.xml 333 BLAKE2B 24e417cb7b8ab7730b18a3e1e5e29d008042e4fd53cf1ba3cc9d18719160b0410854ddfae52315c690138e61fb0196015968fa09b98af6470cd8bdecc09205ef SHA512 97daa7452a696b7297c47f5f637a33425f82b51426060a75b3de6bc812f9ddcd3c70ae068bc3e88ce937ab1eb10d59b0ab48a2d2c0397a112b8b6a754e333bdc diff --git a/sys-libs/compiler-rt/compiler-rt-6.0.1.ebuild b/sys-libs/compiler-rt/compiler-rt-6.0.1.ebuild index 1f0466008d9f..459d60b022a4 100644 --- a/sys-libs/compiler-rt/compiler-rt-6.0.1.ebuild +++ b/sys-libs/compiler-rt/compiler-rt-6.0.1.ebuild @@ -17,7 +17,7 @@ SRC_URI="https://releases.llvm.org/${PV/_//}/${P/_/}.src.tar.xz" LICENSE="|| ( UoI-NCSA MIT )" SLOT="${PV%_*}" -KEYWORDS="amd64 arm64 ~ppc64 x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" +KEYWORDS="amd64 arm64 ~ppc64 x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" IUSE="+clang test" RESTRICT="!test? ( test ) !clang? ( test )" diff --git a/sys-libs/compiler-rt/compiler-rt-7.1.0.ebuild b/sys-libs/compiler-rt/compiler-rt-7.1.0.ebuild index cceccb1149a5..1c2404f43c0f 100644 --- a/sys-libs/compiler-rt/compiler-rt-7.1.0.ebuild +++ b/sys-libs/compiler-rt/compiler-rt-7.1.0.ebuild @@ -17,7 +17,7 @@ SRC_URI="https://releases.llvm.org/${PV/_//}/${P/_/}.src.tar.xz" LICENSE="|| ( UoI-NCSA MIT )" SLOT="${PV%_*}" -KEYWORDS="amd64 arm arm64 ~ppc64 x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" +KEYWORDS="amd64 arm arm64 ~ppc64 x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" IUSE="+clang test" RESTRICT="!test? ( test ) !clang? ( test )" diff --git a/sys-libs/compiler-rt/compiler-rt-8.0.0.ebuild b/sys-libs/compiler-rt/compiler-rt-8.0.0.ebuild deleted file mode 100644 index 6f7b07f58986..000000000000 --- a/sys-libs/compiler-rt/compiler-rt-8.0.0.ebuild +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# 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 multiprocessing \ - python-any-r1 toolchain-funcs - -DESCRIPTION="Compiler runtime library for clang (built-in part)" -HOMEPAGE="https://llvm.org/" -SRC_URI="https://releases.llvm.org/${PV/_//}/${P/_/}.src.tar.xz" - -LICENSE="|| ( UoI-NCSA MIT )" -SLOT="${PV%_*}" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" -IUSE="+clang test" -RESTRICT="!test? ( test ) !clang? ( test )" - -CLANG_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[\${PYTHON_USEDEP}]") - =sys-devel/clang-${PV%_*}*:${CLANG_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;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" - - -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang" - -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_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-8.0.1.ebuild b/sys-libs/compiler-rt/compiler-rt-8.0.1.ebuild index 4bb883a980cc..ca77d0bb9d83 100644 --- a/sys-libs/compiler-rt/compiler-rt-8.0.1.ebuild +++ b/sys-libs/compiler-rt/compiler-rt-8.0.1.ebuild @@ -18,7 +18,7 @@ SRC_URI="https://github.com/llvm/llvm-project/releases/download/llvmorg-${PV}/${ LICENSE="|| ( UoI-NCSA MIT )" SLOT="${PV%_*}" -KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" +KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" IUSE="+clang test" RESTRICT="!test? ( test ) !clang? ( test )" diff --git a/sys-libs/compiler-rt/compiler-rt-9.0.0.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-9.0.0.9999.ebuild deleted file mode 100644 index 88bfd8aa0ad2..000000000000 --- a/sys-libs/compiler-rt/compiler-rt-9.0.0.9999.ebuild +++ /dev/null @@ -1,111 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 -PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) - -inherit cmake-utils flag-o-matic git-r3 llvm multiprocessing \ - 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_90" - -LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" -SLOT="$(ver_cut 1-3)" -KEYWORDS="" -IUSE="+clang test" -RESTRICT="!test? ( test ) !clang? ( test )" - -CLANG_SLOT=${SLOT%%.*} -# llvm-6 for new lit options -DEPEND=" - >=sys-devel/llvm-6" -BDEPEND=" - clang? ( sys-devel/clang ) - test? ( - $(python_gen_any_dep "dev-python/lit[\${PYTHON_USEDEP}]") - =sys-devel/clang-${PV%_*}*:${CLANG_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;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" - - -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang" - -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_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-9.0.0.ebuild b/sys-libs/compiler-rt/compiler-rt-9.0.0.ebuild index 2f5058cb169f..bfb57a667381 100644 --- a/sys-libs/compiler-rt/compiler-rt-9.0.0.ebuild +++ b/sys-libs/compiler-rt/compiler-rt-9.0.0.ebuild @@ -19,7 +19,7 @@ S=${WORKDIR}/${MY_P} LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="$(ver_cut 1-3)" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" IUSE="+clang test" RESTRICT="!test? ( test ) !clang? ( test )" diff --git a/sys-libs/compiler-rt/compiler-rt-9.0.1.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-9.0.1.9999.ebuild new file mode 100644 index 000000000000..88bfd8aa0ad2 --- /dev/null +++ b/sys-libs/compiler-rt/compiler-rt-9.0.1.9999.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +: ${CMAKE_MAKEFILE_GENERATOR:=ninja} +# (needed due to CMAKE_BUILD_TYPE != Gentoo) +CMAKE_MIN_VERSION=3.7.0-r1 +PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) + +inherit cmake-utils flag-o-matic git-r3 llvm multiprocessing \ + 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_90" + +LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" +SLOT="$(ver_cut 1-3)" +KEYWORDS="" +IUSE="+clang test" +RESTRICT="!test? ( test ) !clang? ( test )" + +CLANG_SLOT=${SLOT%%.*} +# llvm-6 for new lit options +DEPEND=" + >=sys-devel/llvm-6" +BDEPEND=" + clang? ( sys-devel/clang ) + test? ( + $(python_gen_any_dep "dev-python/lit[\${PYTHON_USEDEP}]") + =sys-devel/clang-${PV%_*}*:${CLANG_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;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" + + -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang" + -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++" + ) + fi + + cmake-utils_src_configure +} + +src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + + cmake-utils_src_make check-builtins +} -- cgit v1.2.3