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: Thu, 28 Feb 2019 17:41:52
Message-Id: 1551375694.88274e9ea8e98b66c647b0a4fb7a0cb3db894044.mgorny@gentoo
1 commit: 88274e9ea8e98b66c647b0a4fb7a0cb3db894044
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 28 17:11:48 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 28 17:41:34 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88274e9e
7
8 sys-libs/compiler-rt: Bump to 8.0.0rc3
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_rc3.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 1899ace9dfa..b7f3bf50edd 100644
18 --- a/sys-libs/compiler-rt/Manifest
19 +++ b/sys-libs/compiler-rt/Manifest
20 @@ -3,3 +3,4 @@ DIST compiler-rt-5.0.2.src.tar.xz 1543256 BLAKE2B 09fa84b8f3e9b8627a14387bc6eaa3
21 DIST compiler-rt-6.0.1.src.tar.xz 1686820 BLAKE2B 59fa3f6e478bd4d6dfa056c85dcdc4349cbce7cea7fc56519feddc9d66c88c9ca48bad7967432ceb81d754213577f12707035afd827cf630a58627575b73b798 SHA512 69850c1ad92c66977fa217cbfb42a6a3f502fbe3d1a08daa7fc4cfeb617a7736d231f8ad8d93b10b1ae29bd753315d2a2d70f9ff1f4d18a9a7cc81758d91f963
22 DIST compiler-rt-7.0.1.src.tar.xz 1864520 BLAKE2B 14f72aad4379387f4212fb5efef3456cb5e8a03c7a91f98de2368e9b5ff2d02aeaed05da4fba6978b9e4e8698eb34c9c0c4c2df8d43b8c11e8e9d65079c7fa41 SHA512 b94a2a1fb9a6d587cef59b04b951628747bb35bdbcb67de8825aad402a2ba875916a347eef7a9575ac27264e8372e2d67cd477fe2d750c0ed3ce7d67bbbc7dba
23 DIST compiler-rt-8.0.0rc2.src.tar.xz 1902996 BLAKE2B e1f0046d130a9214ddf00cdb50e303316b9207eb8df946872992dd28b9fa89505e0c136104d372ea95305c1a9e9ff802cae7781c73bea53ac92378032986689c SHA512 49a34055a27efcee9fca1c0a50fe9061ae09945174a9076f76fce001621a3f8fa177ca0356313087a6d2b949d1d5149714036e89790868b984949721ce646685
24 +DIST compiler-rt-8.0.0rc3.src.tar.xz 1904692 BLAKE2B 94faa29c6fc963da2cec5196547bf9814d94d4be45efdb0c057744b51055a8c0ab871cfab13bb21567f614d8da461398f35f8a7cf75475b925ffc4b2787f1683 SHA512 b40c4cae673c45763e722f32faf2db810591b92b1eb7ca46214f3686c2c96106d3eb4962f6ed4d340666502216994589269661f2169fc8f7044f0423d22c380f
25
26 diff --git a/sys-libs/compiler-rt/compiler-rt-8.0.0_rc3.ebuild b/sys-libs/compiler-rt/compiler-rt-8.0.0_rc3.ebuild
27 new file mode 100644
28 index 00000000000..42b690e9883
29 --- /dev/null
30 +++ b/sys-libs/compiler-rt/compiler-rt-8.0.0_rc3.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 +}