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, 28 Feb 2023 13:10:23
Message-Id: 1677589688.f3eede30551c845370ff6a74844564d7f0ace375.mgorny@gentoo
1 commit: f3eede30551c845370ff6a74844564d7f0ace375
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 28 13:08:08 2023 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 28 13:08:08 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3eede30
7
8 sys-libs/compiler-rt: Remove old
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 sys-libs/compiler-rt/Manifest | 4 -
13 sys-libs/compiler-rt/compiler-rt-16.0.0_rc2.ebuild | 149 ---------------------
14 .../compiler-rt-17.0.0_pre20230211.ebuild | 149 ---------------------
15 .../compiler-rt-17.0.0_pre20230218.ebuild | 149 ---------------------
16 4 files changed, 451 deletions(-)
17
18 diff --git a/sys-libs/compiler-rt/Manifest b/sys-libs/compiler-rt/Manifest
19 index 6c11bb3baa85..03a17b99b940 100644
20 --- a/sys-libs/compiler-rt/Manifest
21 +++ b/sys-libs/compiler-rt/Manifest
22 @@ -4,10 +4,6 @@ DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f
23 DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6
24 DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52
25 DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
26 -DIST llvm-project-16.0.0rc2.src.tar.xz 117917640 BLAKE2B 92c6b1daaa500339403dcf530efb23e1d869c7b9cd8677a6680e57d5d087fb54182f009d58bdda714b62a5866d7fe3b10deedc1e251fffdaae513706d95325af SHA512 c68bb7f2a8004666ecc5c55e89e2ca1252b384e6240a2b7c5588b74794ffc6ce93bb4b0db394abba6436cce04a6de301e80821aeda04d7aab49efb96b6f8cf40
27 -DIST llvm-project-16.0.0rc2.src.tar.xz.sig 566 BLAKE2B 35b2a8edf3392e1c0e9bf7f1a5e6e18fdda3d98a2164947cebf0c19d7d7c7a459901060345745dff794cf99bea243fec5cb625ca68d7c73d31ac01f18cbaa58c SHA512 4f6d43f00c3bce36c3a005441473fe37fe2ca97df4b8dd306045bd0d8bd14406ae7068a3dea54d4535eaa37b7ccca54b3f5b6f5aef70a7dfc23ed336d4ad408c
28 DIST llvm-project-16.0.0rc3.src.tar.xz 117914548 BLAKE2B 18ffa35eb73c7cc4626d7b6b7b30aade7171ee2e17fb8d72e79a67185e809f611fefa4cfef17e5cd16822a5a70de2222534dc9f146fc53987eb49ff6a9d98c18 SHA512 d14e5e5ec984a0dc0292a2d27440398b3e32f120c1579517054dcb1a05dbc4ac5f1c6d078a3d6ef8597a71af6f22863868680a972a571839dcd573418b4a4697
29 DIST llvm-project-16.0.0rc3.src.tar.xz.sig 566 BLAKE2B 43683d2d7b266a847516f71412bf6236a355462430330fc0da1d624fb8dfbc98bfc982d367baee74d5b4964a9e82e7a4a6ea84bdcff3996d246932f516cced1a SHA512 61adc4dc3eb5a4c11a7f96f9267ff37895e5845a08d48a609a03a2696c1b6bca5af5861a6f28de936c48e6d621bf282170589187f2cb593a912b9078300cf47c
30 -DIST llvm-project-22fb66eb94b643c858c2beecbcfac438a7fa29ed.tar.gz 179795537 BLAKE2B aef57ef739c52a8f8b2b327a8f6d8cce4734d9704018fb43a21468e56748e5d5b3d2d47fb4e95fd72b2af9f2e4be88839553e26fd7da08df60c5cc0f51c001d4 SHA512 9ed093ef7dac4891660aafbc5cad66bddefa796bff4dd70c792cc636268742142d82b84520ac2f5a5963521d7b9e4325440763ce0c88937f89722f07d3acd4b8
31 -DIST llvm-project-5e262d58c42668c78d932fab6bf75cf8c3b9d07e.tar.gz 179975303 BLAKE2B 184e7ff6e9a7de77d4a8c36c6910e4e3c7c5e9ff73ed6111ec4704dd457205278abb258ff37170e41a6b21c9ae3f243a80b34e4b17f8977fb9a42876db6465b7 SHA512 ec7e16a4d8f8292d1184ae08c1c5eda0dba1876e7d9c228eb0added5cde45f3094fde7eb1da662d436f85315850310cc0612210ff3ddf82967d5c2de0047a724
32 DIST llvm-project-b0676fb0fb0a44a4a1c4ec1f0270fef1f1842817.tar.gz 180277698 BLAKE2B d2c1e6a1942e51f5844c18605f38b005e9bb4123850a173e4c4b3d7b6a14f4986c7b276b40df4d0594ae04e869e92ba1a4269c5055c0229cfd28aa1bd709da4f SHA512 d1281b942dcc254641865f11b0c4fbd1d562d016681b6b7268549bed1cdb7d4536f743a8ed089095eaab9f4bfb9de624153f448bf13d0e22f8ea24a4d264df7b
33
34 diff --git a/sys-libs/compiler-rt/compiler-rt-16.0.0_rc2.ebuild b/sys-libs/compiler-rt/compiler-rt-16.0.0_rc2.ebuild
35 deleted file mode 100644
36 index 44675fe040f5..000000000000
37 --- a/sys-libs/compiler-rt/compiler-rt-16.0.0_rc2.ebuild
38 +++ /dev/null
39 @@ -1,149 +0,0 @@
40 -# Copyright 1999-2023 Gentoo Authors
41 -# Distributed under the terms of the GNU General Public License v2
42 -
43 -EAPI=8
44 -
45 -PYTHON_COMPAT=( python3_{9..11} )
46 -inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
47 -
48 -DESCRIPTION="Compiler runtime library for clang (built-in part)"
49 -HOMEPAGE="https://llvm.org/"
50 -
51 -LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
52 -SLOT="${LLVM_MAJOR}"
53 -KEYWORDS="~loong"
54 -IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
55 -RESTRICT="!test? ( test ) !clang? ( test )"
56 -
57 -DEPEND="
58 - sys-devel/llvm:${LLVM_MAJOR}
59 -"
60 -BDEPEND="
61 - >=dev-util/cmake-3.16
62 - clang? ( sys-devel/clang )
63 - test? (
64 - $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
65 - =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
66 - )
67 - !test? (
68 - ${PYTHON_DEPS}
69 - )
70 -"
71 -
72 -LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
73 -llvm.org_set_globals
74 -
75 -python_check_deps() {
76 - use test || return 0
77 - python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
78 -}
79 -
80 -pkg_pretend() {
81 - if ! use clang && ! tc-is-clang; then
82 - ewarn "Building using a compiler other than clang may result in broken atomics"
83 - ewarn "library. Enable USE=clang unless you have a very good reason not to."
84 - fi
85 -}
86 -
87 -pkg_setup() {
88 - # Darwin Prefix builds do not have llvm installed yet, so rely on
89 - # bootstrap-prefix to set the appropriate path vars to LLVM instead
90 - # of using llvm_pkg_setup.
91 - if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
92 - LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
93 - fi
94 - python-any-r1_pkg_setup
95 -}
96 -
97 -test_compiler() {
98 - $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
99 - <<<'int main() { return 0; }' &>/dev/null
100 -}
101 -
102 -src_configure() {
103 - # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
104 - use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
105 -
106 - # pre-set since we need to pass it to cmake
107 - BUILD_DIR=${WORKDIR}/${P}_build
108 -
109 - if use clang; then
110 - # Only do this conditionally to allow overriding with
111 - # e.g. CC=clang-13 in case of breakage
112 - if ! tc-is-clang ; then
113 - local -x CC=${CHOST}-clang
114 - local -x CXX=${CHOST}-clang++
115 - fi
116 -
117 - strip-unsupported-flags
118 - fi
119 -
120 - if ! test_compiler; then
121 - local nolib_flags=( -nodefaultlibs -lc )
122 -
123 - if test_compiler "${nolib_flags[@]}"; then
124 - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
125 - ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
126 - elif test_compiler "${nolib_flags[@]}" -nostartfiles; then
127 - # Avoiding -nostartfiles earlier on for bug #862540,
128 - # and set available entry symbol for bug #862798.
129 - nolib_flags+=( -nostartfiles -emain )
130 -
131 - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
132 - ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
133 - fi
134 - fi
135 -
136 - local mycmakeargs=(
137 - -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
138 -
139 - -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
140 - -DCOMPILER_RT_BUILD_LIBFUZZER=OFF
141 - -DCOMPILER_RT_BUILD_MEMPROF=OFF
142 - -DCOMPILER_RT_BUILD_ORC=OFF
143 - -DCOMPILER_RT_BUILD_PROFILE=OFF
144 - -DCOMPILER_RT_BUILD_SANITIZERS=OFF
145 - -DCOMPILER_RT_BUILD_XRAY=OFF
146 -
147 - -DPython3_EXECUTABLE="${PYTHON}"
148 - )
149 -
150 - if use amd64; then
151 - mycmakeargs+=(
152 - -DCAN_TARGET_i386=$(usex abi_x86_32)
153 - -DCAN_TARGET_x86_64=$(usex abi_x86_64)
154 - )
155 - fi
156 -
157 - if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
158 - mycmakeargs+=(
159 - # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
160 - # this allows adding arm64 support using SDK in EPREFIX
161 - -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
162 - # Set version based on the SDK in EPREFIX.
163 - # This disables i386 for SDK >= 10.15
164 - -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
165 - # Use our libtool instead of looking it up with xcrun
166 - -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
167 - )
168 - fi
169 -
170 - if use test; then
171 - mycmakeargs+=(
172 - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
173 - -DLLVM_LIT_ARGS="$(get_lit_flags)"
174 -
175 - -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang"
176 - -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++"
177 - )
178 - fi
179 -
180 - cmake_src_configure
181 -}
182 -
183 -src_test() {
184 - # respect TMPDIR!
185 - local -x LIT_PRESERVES_TMP=1
186 -
187 - cmake_build check-builtins
188 -}
189
190 diff --git a/sys-libs/compiler-rt/compiler-rt-17.0.0_pre20230211.ebuild b/sys-libs/compiler-rt/compiler-rt-17.0.0_pre20230211.ebuild
191 deleted file mode 100644
192 index 2ed5fc860074..000000000000
193 --- a/sys-libs/compiler-rt/compiler-rt-17.0.0_pre20230211.ebuild
194 +++ /dev/null
195 @@ -1,149 +0,0 @@
196 -# Copyright 1999-2023 Gentoo Authors
197 -# Distributed under the terms of the GNU General Public License v2
198 -
199 -EAPI=8
200 -
201 -PYTHON_COMPAT=( python3_{9..11} )
202 -inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
203 -
204 -DESCRIPTION="Compiler runtime library for clang (built-in part)"
205 -HOMEPAGE="https://llvm.org/"
206 -
207 -LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
208 -SLOT="${LLVM_MAJOR}"
209 -KEYWORDS=""
210 -IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
211 -RESTRICT="!test? ( test ) !clang? ( test )"
212 -
213 -DEPEND="
214 - sys-devel/llvm:${LLVM_MAJOR}
215 -"
216 -BDEPEND="
217 - >=dev-util/cmake-3.16
218 - clang? ( sys-devel/clang )
219 - test? (
220 - $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
221 - =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
222 - )
223 - !test? (
224 - ${PYTHON_DEPS}
225 - )
226 -"
227 -
228 -LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
229 -llvm.org_set_globals
230 -
231 -python_check_deps() {
232 - use test || return 0
233 - python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
234 -}
235 -
236 -pkg_pretend() {
237 - if ! use clang && ! tc-is-clang; then
238 - ewarn "Building using a compiler other than clang may result in broken atomics"
239 - ewarn "library. Enable USE=clang unless you have a very good reason not to."
240 - fi
241 -}
242 -
243 -pkg_setup() {
244 - # Darwin Prefix builds do not have llvm installed yet, so rely on
245 - # bootstrap-prefix to set the appropriate path vars to LLVM instead
246 - # of using llvm_pkg_setup.
247 - if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
248 - LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
249 - fi
250 - python-any-r1_pkg_setup
251 -}
252 -
253 -test_compiler() {
254 - $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
255 - <<<'int main() { return 0; }' &>/dev/null
256 -}
257 -
258 -src_configure() {
259 - # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
260 - use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
261 -
262 - # pre-set since we need to pass it to cmake
263 - BUILD_DIR=${WORKDIR}/${P}_build
264 -
265 - if use clang; then
266 - # Only do this conditionally to allow overriding with
267 - # e.g. CC=clang-13 in case of breakage
268 - if ! tc-is-clang ; then
269 - local -x CC=${CHOST}-clang
270 - local -x CXX=${CHOST}-clang++
271 - fi
272 -
273 - strip-unsupported-flags
274 - fi
275 -
276 - if ! test_compiler; then
277 - local nolib_flags=( -nodefaultlibs -lc )
278 -
279 - if test_compiler "${nolib_flags[@]}"; then
280 - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
281 - ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
282 - elif test_compiler "${nolib_flags[@]}" -nostartfiles; then
283 - # Avoiding -nostartfiles earlier on for bug #862540,
284 - # and set available entry symbol for bug #862798.
285 - nolib_flags+=( -nostartfiles -emain )
286 -
287 - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
288 - ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
289 - fi
290 - fi
291 -
292 - local mycmakeargs=(
293 - -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
294 -
295 - -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
296 - -DCOMPILER_RT_BUILD_LIBFUZZER=OFF
297 - -DCOMPILER_RT_BUILD_MEMPROF=OFF
298 - -DCOMPILER_RT_BUILD_ORC=OFF
299 - -DCOMPILER_RT_BUILD_PROFILE=OFF
300 - -DCOMPILER_RT_BUILD_SANITIZERS=OFF
301 - -DCOMPILER_RT_BUILD_XRAY=OFF
302 -
303 - -DPython3_EXECUTABLE="${PYTHON}"
304 - )
305 -
306 - if use amd64; then
307 - mycmakeargs+=(
308 - -DCAN_TARGET_i386=$(usex abi_x86_32)
309 - -DCAN_TARGET_x86_64=$(usex abi_x86_64)
310 - )
311 - fi
312 -
313 - if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
314 - mycmakeargs+=(
315 - # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
316 - # this allows adding arm64 support using SDK in EPREFIX
317 - -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
318 - # Set version based on the SDK in EPREFIX.
319 - # This disables i386 for SDK >= 10.15
320 - -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
321 - # Use our libtool instead of looking it up with xcrun
322 - -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
323 - )
324 - fi
325 -
326 - if use test; then
327 - mycmakeargs+=(
328 - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
329 - -DLLVM_LIT_ARGS="$(get_lit_flags)"
330 -
331 - -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang"
332 - -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++"
333 - )
334 - fi
335 -
336 - cmake_src_configure
337 -}
338 -
339 -src_test() {
340 - # respect TMPDIR!
341 - local -x LIT_PRESERVES_TMP=1
342 -
343 - cmake_build check-builtins
344 -}
345
346 diff --git a/sys-libs/compiler-rt/compiler-rt-17.0.0_pre20230218.ebuild b/sys-libs/compiler-rt/compiler-rt-17.0.0_pre20230218.ebuild
347 deleted file mode 100644
348 index 2ed5fc860074..000000000000
349 --- a/sys-libs/compiler-rt/compiler-rt-17.0.0_pre20230218.ebuild
350 +++ /dev/null
351 @@ -1,149 +0,0 @@
352 -# Copyright 1999-2023 Gentoo Authors
353 -# Distributed under the terms of the GNU General Public License v2
354 -
355 -EAPI=8
356 -
357 -PYTHON_COMPAT=( python3_{9..11} )
358 -inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
359 -
360 -DESCRIPTION="Compiler runtime library for clang (built-in part)"
361 -HOMEPAGE="https://llvm.org/"
362 -
363 -LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
364 -SLOT="${LLVM_MAJOR}"
365 -KEYWORDS=""
366 -IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
367 -RESTRICT="!test? ( test ) !clang? ( test )"
368 -
369 -DEPEND="
370 - sys-devel/llvm:${LLVM_MAJOR}
371 -"
372 -BDEPEND="
373 - >=dev-util/cmake-3.16
374 - clang? ( sys-devel/clang )
375 - test? (
376 - $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
377 - =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
378 - )
379 - !test? (
380 - ${PYTHON_DEPS}
381 - )
382 -"
383 -
384 -LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
385 -llvm.org_set_globals
386 -
387 -python_check_deps() {
388 - use test || return 0
389 - python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
390 -}
391 -
392 -pkg_pretend() {
393 - if ! use clang && ! tc-is-clang; then
394 - ewarn "Building using a compiler other than clang may result in broken atomics"
395 - ewarn "library. Enable USE=clang unless you have a very good reason not to."
396 - fi
397 -}
398 -
399 -pkg_setup() {
400 - # Darwin Prefix builds do not have llvm installed yet, so rely on
401 - # bootstrap-prefix to set the appropriate path vars to LLVM instead
402 - # of using llvm_pkg_setup.
403 - if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
404 - LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
405 - fi
406 - python-any-r1_pkg_setup
407 -}
408 -
409 -test_compiler() {
410 - $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
411 - <<<'int main() { return 0; }' &>/dev/null
412 -}
413 -
414 -src_configure() {
415 - # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
416 - use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
417 -
418 - # pre-set since we need to pass it to cmake
419 - BUILD_DIR=${WORKDIR}/${P}_build
420 -
421 - if use clang; then
422 - # Only do this conditionally to allow overriding with
423 - # e.g. CC=clang-13 in case of breakage
424 - if ! tc-is-clang ; then
425 - local -x CC=${CHOST}-clang
426 - local -x CXX=${CHOST}-clang++
427 - fi
428 -
429 - strip-unsupported-flags
430 - fi
431 -
432 - if ! test_compiler; then
433 - local nolib_flags=( -nodefaultlibs -lc )
434 -
435 - if test_compiler "${nolib_flags[@]}"; then
436 - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
437 - ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
438 - elif test_compiler "${nolib_flags[@]}" -nostartfiles; then
439 - # Avoiding -nostartfiles earlier on for bug #862540,
440 - # and set available entry symbol for bug #862798.
441 - nolib_flags+=( -nostartfiles -emain )
442 -
443 - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
444 - ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
445 - fi
446 - fi
447 -
448 - local mycmakeargs=(
449 - -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
450 -
451 - -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
452 - -DCOMPILER_RT_BUILD_LIBFUZZER=OFF
453 - -DCOMPILER_RT_BUILD_MEMPROF=OFF
454 - -DCOMPILER_RT_BUILD_ORC=OFF
455 - -DCOMPILER_RT_BUILD_PROFILE=OFF
456 - -DCOMPILER_RT_BUILD_SANITIZERS=OFF
457 - -DCOMPILER_RT_BUILD_XRAY=OFF
458 -
459 - -DPython3_EXECUTABLE="${PYTHON}"
460 - )
461 -
462 - if use amd64; then
463 - mycmakeargs+=(
464 - -DCAN_TARGET_i386=$(usex abi_x86_32)
465 - -DCAN_TARGET_x86_64=$(usex abi_x86_64)
466 - )
467 - fi
468 -
469 - if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
470 - mycmakeargs+=(
471 - # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
472 - # this allows adding arm64 support using SDK in EPREFIX
473 - -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
474 - # Set version based on the SDK in EPREFIX.
475 - # This disables i386 for SDK >= 10.15
476 - -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
477 - # Use our libtool instead of looking it up with xcrun
478 - -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
479 - )
480 - fi
481 -
482 - if use test; then
483 - mycmakeargs+=(
484 - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
485 - -DLLVM_LIT_ARGS="$(get_lit_flags)"
486 -
487 - -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang"
488 - -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++"
489 - )
490 - fi
491 -
492 - cmake_src_configure
493 -}
494 -
495 -src_test() {
496 - # respect TMPDIR!
497 - local -x LIT_PRESERVES_TMP=1
498 -
499 - cmake_build check-builtins
500 -}