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