Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/compiler-rt/
Date: Tue, 12 Mar 2019 13:14:20
Message-Id: 1552396445.2de2914cac9f1196784e172a5758227fbf3f47c8.mgorny@gentoo
1 commit: 2de2914cac9f1196784e172a5758227fbf3f47c8
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Mar 12 13:00:03 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Mar 12 13:14:05 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2de2914c
7
8 sys-libs/compiler-rt: Bump to 8.0.0rc5
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 sys-libs/compiler-rt/Manifest | 1 +
13 sys-libs/compiler-rt/compiler-rt-8.0.0_rc5.ebuild | 109 ++++++++++++++++++++++
14 2 files changed, 110 insertions(+)
15
16 diff --git a/sys-libs/compiler-rt/Manifest b/sys-libs/compiler-rt/Manifest
17 index b7f3bf50edd..3d4faccdad9 100644
18 --- a/sys-libs/compiler-rt/Manifest
19 +++ b/sys-libs/compiler-rt/Manifest
20 @@ -4,3 +4,4 @@ DIST compiler-rt-6.0.1.src.tar.xz 1686820 BLAKE2B 59fa3f6e478bd4d6dfa056c85dcdc4
21 DIST compiler-rt-7.0.1.src.tar.xz 1864520 BLAKE2B 14f72aad4379387f4212fb5efef3456cb5e8a03c7a91f98de2368e9b5ff2d02aeaed05da4fba6978b9e4e8698eb34c9c0c4c2df8d43b8c11e8e9d65079c7fa41 SHA512 b94a2a1fb9a6d587cef59b04b951628747bb35bdbcb67de8825aad402a2ba875916a347eef7a9575ac27264e8372e2d67cd477fe2d750c0ed3ce7d67bbbc7dba
22 DIST compiler-rt-8.0.0rc2.src.tar.xz 1902996 BLAKE2B e1f0046d130a9214ddf00cdb50e303316b9207eb8df946872992dd28b9fa89505e0c136104d372ea95305c1a9e9ff802cae7781c73bea53ac92378032986689c SHA512 49a34055a27efcee9fca1c0a50fe9061ae09945174a9076f76fce001621a3f8fa177ca0356313087a6d2b949d1d5149714036e89790868b984949721ce646685
23 DIST compiler-rt-8.0.0rc3.src.tar.xz 1904692 BLAKE2B 94faa29c6fc963da2cec5196547bf9814d94d4be45efdb0c057744b51055a8c0ab871cfab13bb21567f614d8da461398f35f8a7cf75475b925ffc4b2787f1683 SHA512 b40c4cae673c45763e722f32faf2db810591b92b1eb7ca46214f3686c2c96106d3eb4962f6ed4d340666502216994589269661f2169fc8f7044f0423d22c380f
24 +DIST compiler-rt-8.0.0rc5.src.tar.xz 1902880 BLAKE2B ef8a3eeb58845032f332cc3e0eed4ca33166450ef0ebf21d00fa6f0068ff61a3af54bddb696c9ab507c909baa5bf53ad1bc218ca5a3a354a021315fd6ad1b6b5 SHA512 6d7e520e2b16e097b35fcfce1637160ce8b3a174ef79b7c56e4fae466aef9dafc45f577de590426637f9950bbb2f0c18213cea90e566b05f4f6251e4e5de0dca
25
26 diff --git a/sys-libs/compiler-rt/compiler-rt-8.0.0_rc5.ebuild b/sys-libs/compiler-rt/compiler-rt-8.0.0_rc5.ebuild
27 new file mode 100644
28 index 00000000000..42b690e9883
29 --- /dev/null
30 +++ b/sys-libs/compiler-rt/compiler-rt-8.0.0_rc5.ebuild
31 @@ -0,0 +1,109 @@
32 +# Copyright 1999-2019 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=6
36 +
37 +: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
38 +# (needed due to CMAKE_BUILD_TYPE != Gentoo)
39 +CMAKE_MIN_VERSION=3.7.0-r1
40 +PYTHON_COMPAT=( python2_7 )
41 +
42 +inherit cmake-utils flag-o-matic llvm multiprocessing \
43 + python-any-r1 toolchain-funcs
44 +
45 +DESCRIPTION="Compiler runtime library for clang (built-in part)"
46 +HOMEPAGE="https://llvm.org/"
47 +SRC_URI="https://prereleases.llvm.org/${PV/_//}/${P/_/}.src.tar.xz"
48 +
49 +LICENSE="|| ( UoI-NCSA MIT )"
50 +SLOT="${PV%_*}"
51 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
52 +IUSE="+clang test"
53 +RESTRICT="!test? ( test ) !clang? ( test )"
54 +
55 +CLANG_SLOT=${SLOT%%.*}
56 +# llvm-6 for new lit options
57 +DEPEND="
58 + >=sys-devel/llvm-6
59 + clang? ( sys-devel/clang )
60 + test? (
61 + $(python_gen_any_dep "dev-python/lit[\${PYTHON_USEDEP}]")
62 + =sys-devel/clang-${PV%_*}*:${CLANG_SLOT} )
63 + ${PYTHON_DEPS}"
64 +
65 +S=${WORKDIR}/${P/_/}.src
66 +
67 +# least intrusive of all
68 +CMAKE_BUILD_TYPE=RelWithDebInfo
69 +
70 +pkg_pretend() {
71 + if ! use clang && ! tc-is-clang; then
72 + ewarn "Building using a compiler other than clang may result in broken atomics"
73 + ewarn "library. Enable USE=clang unless you have a very good reason not to."
74 + fi
75 +}
76 +
77 +pkg_setup() {
78 + llvm_pkg_setup
79 + python-any-r1_pkg_setup
80 +}
81 +
82 +test_compiler() {
83 + $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
84 + <<<'int main() { return 0; }' &>/dev/null
85 +}
86 +
87 +src_configure() {
88 + # pre-set since we need to pass it to cmake
89 + BUILD_DIR=${WORKDIR}/${P}_build
90 +
91 + local nolib_flags=( -nodefaultlibs -lc )
92 + if use clang; then
93 + local -x CC=${CHOST}-clang
94 + local -x CXX=${CHOST}-clang++
95 + # ensure we can use clang before installing compiler-rt
96 + local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
97 + strip-unsupported-flags
98 + elif ! test_compiler; then
99 + if test_compiler "${nolib_flags[@]}"; then
100 + local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
101 + ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
102 + fi
103 + fi
104 +
105 + local mycmakeargs=(
106 + -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
107 +
108 + -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
109 + -DCOMPILER_RT_BUILD_LIBFUZZER=OFF
110 + -DCOMPILER_RT_BUILD_PROFILE=OFF
111 + -DCOMPILER_RT_BUILD_SANITIZERS=OFF
112 + -DCOMPILER_RT_BUILD_XRAY=OFF
113 + )
114 +
115 + if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
116 + mycmakeargs+=(
117 + # disable use of SDK for the system itself
118 + -DDARWIN_macosx_CACHED_SYSROOT=/
119 + )
120 + fi
121 +
122 + if use test; then
123 + mycmakeargs+=(
124 + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
125 + -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
126 +
127 + -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang"
128 + -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++"
129 + )
130 + fi
131 +
132 + cmake-utils_src_configure
133 +}
134 +
135 +src_test() {
136 + # respect TMPDIR!
137 + local -x LIT_PRESERVES_TMP=1
138 +
139 + cmake-utils_src_make check-builtins
140 +}