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-sanitizers/
Date: Mon, 20 Mar 2023 13:11:04
Message-Id: 1679317846.c0cf41dca32dcefff3cd691519d05a0d0881c363.mgorny@gentoo
1 commit: c0cf41dca32dcefff3cd691519d05a0d0881c363
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Mar 20 13:08:53 2023 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 20 13:10:46 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0cf41dc
7
8 sys-libs/compiler-rt-sanitizers: Remove old
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 sys-libs/compiler-rt-sanitizers/Manifest | 5 -
13 .../compiler-rt-sanitizers-16.0.0_rc3.ebuild | 216 ---------------------
14 .../compiler-rt-sanitizers-16.0.0_rc4.ebuild | 216 ---------------------
15 ...ompiler-rt-sanitizers-17.0.0_pre20230304.ebuild | 216 ---------------------
16 4 files changed, 653 deletions(-)
17
18 diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest
19 index 14953c635899..411822a684e2 100644
20 --- a/sys-libs/compiler-rt-sanitizers/Manifest
21 +++ b/sys-libs/compiler-rt-sanitizers/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-sanitizers/compiler-rt-sanitizers-16.0.0_rc3.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-16.0.0_rc3.ebuild
34 deleted file mode 100644
35 index 682d15574b6a..000000000000
36 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-16.0.0_rc3.ebuild
37 +++ /dev/null
38 @@ -1,216 +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 check-reqs cmake flag-o-matic llvm llvm.org python-any-r1
46 -
47 -DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
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 -# base targets
55 -IUSE+=" +libfuzzer +memprof +orc +profile +xray"
56 -# sanitizer targets, keep in sync with config-ix.cmake
57 -# NB: ubsan, scudo deliberately match two entries
58 -SANITIZER_FLAGS=(
59 - asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
60 - shadowcallstack gwp-asan
61 -)
62 -IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
63 -REQUIRED_USE="
64 - || ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
65 - test? (
66 - cfi? ( ubsan )
67 - gwp-asan? ( scudo )
68 - )
69 -"
70 -RESTRICT="
71 - !clang? ( test )
72 - !test? ( test )
73 -"
74 -
75 -DEPEND="
76 - sys-devel/llvm:${LLVM_MAJOR}
77 - virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
78 -"
79 -BDEPEND="
80 - >=dev-util/cmake-3.16
81 - clang? ( sys-devel/clang )
82 - elibc_glibc? ( net-libs/libtirpc )
83 - test? (
84 - $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
85 - =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
86 - sys-libs/compiler-rt:${LLVM_MAJOR}
87 - )
88 - !test? (
89 - ${PYTHON_DEPS}
90 - )
91 -"
92 -
93 -LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
94 -LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support third-party )
95 -llvm.org_set_globals
96 -
97 -python_check_deps() {
98 - use test || return 0
99 - python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
100 -}
101 -
102 -check_space() {
103 - if use test; then
104 - local CHECKREQS_DISK_BUILD=11G
105 - check-reqs_pkg_pretend
106 - fi
107 -}
108 -
109 -pkg_pretend() {
110 - check_space
111 -}
112 -
113 -pkg_setup() {
114 - check_space
115 - LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
116 - python-any-r1_pkg_setup
117 -}
118 -
119 -src_prepare() {
120 - sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
121 -
122 - local flag
123 - for flag in "${SANITIZER_FLAGS[@]}"; do
124 - if ! use "${flag}"; then
125 - local cmake_flag=${flag/-/_}
126 - sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
127 - cmake/config-ix.cmake || die
128 - fi
129 - done
130 -
131 - # TODO: fix these tests to be skipped upstream
132 - if use asan && ! use profile; then
133 - rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
134 - fi
135 - if use ubsan && ! use cfi; then
136 - > test/cfi/CMakeLists.txt || die
137 - fi
138 -
139 - llvm.org_src_prepare
140 -}
141 -
142 -src_configure() {
143 - # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
144 - use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
145 -
146 - # pre-set since we need to pass it to cmake
147 - BUILD_DIR=${WORKDIR}/compiler-rt_build
148 -
149 - if use clang; then
150 - local -x CC=${CHOST}-clang
151 - local -x CXX=${CHOST}-clang++
152 - strip-unsupported-flags
153 - fi
154 -
155 - local flag want_sanitizer=OFF
156 - for flag in "${SANITIZER_FLAGS[@]}"; do
157 - if use "${flag}"; then
158 - want_sanitizer=ON
159 - break
160 - fi
161 - done
162 -
163 - local mycmakeargs=(
164 - -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
165 - # use a build dir structure consistent with install
166 - # this makes it possible to easily deploy test-friendly clang
167 - -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
168 -
169 - -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
170 - # builtins & crt installed by sys-libs/compiler-rt
171 - -DCOMPILER_RT_BUILD_BUILTINS=OFF
172 - -DCOMPILER_RT_BUILD_CRT=OFF
173 - -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
174 - -DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
175 - -DCOMPILER_RT_BUILD_ORC=$(usex orc)
176 - -DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
177 - -DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
178 - -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
179 -
180 - -DPython3_EXECUTABLE="${PYTHON}"
181 - )
182 -
183 - if use amd64; then
184 - mycmakeargs+=(
185 - -DCAN_TARGET_i386=$(usex abi_x86_32)
186 - -DCAN_TARGET_x86_64=$(usex abi_x86_64)
187 - )
188 - fi
189 -
190 - if use test; then
191 - mycmakeargs+=(
192 - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
193 - -DLLVM_LIT_ARGS="$(get_lit_flags)"
194 -
195 - # they are created during src_test()
196 - -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
197 - -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
198 - )
199 -
200 - # same flags are passed for build & tests, so we need to strip
201 - # them down to a subset supported by clang
202 - CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
203 - CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
204 - strip-unsupported-flags
205 - fi
206 -
207 - if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
208 - mycmakeargs+=(
209 - # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
210 - # this allows adding arm64 support using SDK in EPREFIX
211 - -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
212 - # Set version based on the SDK in EPREFIX
213 - # This disables i386 for SDK >= 10.15
214 - # Will error if has_use tsan and SDK < 10.12
215 - -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
216 - # Use our libtool instead of looking it up with xcrun
217 - -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
218 - )
219 - fi
220 -
221 - cmake_src_configure
222 -
223 - if use test; then
224 - local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
225 - [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
226 - [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
227 -
228 - # copy clang over since resource_dir is located relatively to binary
229 - # therefore, we can put our new libraries in it
230 - mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
231 - cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
232 - "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
233 - cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
234 - "${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
235 - cp "${sys_dir}"/*builtins*.a \
236 - "${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
237 - # we also need LLVMgold.so for gold-based tests
238 - if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
239 - ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
240 - "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
241 - fi
242 - fi
243 -}
244 -
245 -src_test() {
246 - # respect TMPDIR!
247 - local -x LIT_PRESERVES_TMP=1
248 - # disable sandbox to have it stop clobbering LD_PRELOAD
249 - local -x SANDBOX_ON=0
250 - # wipe LD_PRELOAD to make ASAN happy
251 - local -x LD_PRELOAD=
252 -
253 - cmake_build check-all
254 -}
255
256 diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-16.0.0_rc4.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-16.0.0_rc4.ebuild
257 deleted file mode 100644
258 index 682d15574b6a..000000000000
259 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-16.0.0_rc4.ebuild
260 +++ /dev/null
261 @@ -1,216 +0,0 @@
262 -# Copyright 1999-2023 Gentoo Authors
263 -# Distributed under the terms of the GNU General Public License v2
264 -
265 -EAPI=8
266 -
267 -PYTHON_COMPAT=( python3_{9..11} )
268 -inherit check-reqs cmake flag-o-matic llvm llvm.org python-any-r1
269 -
270 -DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
271 -HOMEPAGE="https://llvm.org/"
272 -
273 -LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
274 -SLOT="${LLVM_MAJOR}"
275 -KEYWORDS="~loong"
276 -IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
277 -# base targets
278 -IUSE+=" +libfuzzer +memprof +orc +profile +xray"
279 -# sanitizer targets, keep in sync with config-ix.cmake
280 -# NB: ubsan, scudo deliberately match two entries
281 -SANITIZER_FLAGS=(
282 - asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
283 - shadowcallstack gwp-asan
284 -)
285 -IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
286 -REQUIRED_USE="
287 - || ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
288 - test? (
289 - cfi? ( ubsan )
290 - gwp-asan? ( scudo )
291 - )
292 -"
293 -RESTRICT="
294 - !clang? ( test )
295 - !test? ( test )
296 -"
297 -
298 -DEPEND="
299 - sys-devel/llvm:${LLVM_MAJOR}
300 - virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
301 -"
302 -BDEPEND="
303 - >=dev-util/cmake-3.16
304 - clang? ( sys-devel/clang )
305 - elibc_glibc? ( net-libs/libtirpc )
306 - test? (
307 - $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
308 - =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
309 - sys-libs/compiler-rt:${LLVM_MAJOR}
310 - )
311 - !test? (
312 - ${PYTHON_DEPS}
313 - )
314 -"
315 -
316 -LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
317 -LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support third-party )
318 -llvm.org_set_globals
319 -
320 -python_check_deps() {
321 - use test || return 0
322 - python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
323 -}
324 -
325 -check_space() {
326 - if use test; then
327 - local CHECKREQS_DISK_BUILD=11G
328 - check-reqs_pkg_pretend
329 - fi
330 -}
331 -
332 -pkg_pretend() {
333 - check_space
334 -}
335 -
336 -pkg_setup() {
337 - check_space
338 - LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
339 - python-any-r1_pkg_setup
340 -}
341 -
342 -src_prepare() {
343 - sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
344 -
345 - local flag
346 - for flag in "${SANITIZER_FLAGS[@]}"; do
347 - if ! use "${flag}"; then
348 - local cmake_flag=${flag/-/_}
349 - sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
350 - cmake/config-ix.cmake || die
351 - fi
352 - done
353 -
354 - # TODO: fix these tests to be skipped upstream
355 - if use asan && ! use profile; then
356 - rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
357 - fi
358 - if use ubsan && ! use cfi; then
359 - > test/cfi/CMakeLists.txt || die
360 - fi
361 -
362 - llvm.org_src_prepare
363 -}
364 -
365 -src_configure() {
366 - # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
367 - use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
368 -
369 - # pre-set since we need to pass it to cmake
370 - BUILD_DIR=${WORKDIR}/compiler-rt_build
371 -
372 - if use clang; then
373 - local -x CC=${CHOST}-clang
374 - local -x CXX=${CHOST}-clang++
375 - strip-unsupported-flags
376 - fi
377 -
378 - local flag want_sanitizer=OFF
379 - for flag in "${SANITIZER_FLAGS[@]}"; do
380 - if use "${flag}"; then
381 - want_sanitizer=ON
382 - break
383 - fi
384 - done
385 -
386 - local mycmakeargs=(
387 - -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
388 - # use a build dir structure consistent with install
389 - # this makes it possible to easily deploy test-friendly clang
390 - -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
391 -
392 - -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
393 - # builtins & crt installed by sys-libs/compiler-rt
394 - -DCOMPILER_RT_BUILD_BUILTINS=OFF
395 - -DCOMPILER_RT_BUILD_CRT=OFF
396 - -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
397 - -DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
398 - -DCOMPILER_RT_BUILD_ORC=$(usex orc)
399 - -DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
400 - -DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
401 - -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
402 -
403 - -DPython3_EXECUTABLE="${PYTHON}"
404 - )
405 -
406 - if use amd64; then
407 - mycmakeargs+=(
408 - -DCAN_TARGET_i386=$(usex abi_x86_32)
409 - -DCAN_TARGET_x86_64=$(usex abi_x86_64)
410 - )
411 - fi
412 -
413 - if use test; then
414 - mycmakeargs+=(
415 - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
416 - -DLLVM_LIT_ARGS="$(get_lit_flags)"
417 -
418 - # they are created during src_test()
419 - -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
420 - -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
421 - )
422 -
423 - # same flags are passed for build & tests, so we need to strip
424 - # them down to a subset supported by clang
425 - CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
426 - CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
427 - strip-unsupported-flags
428 - fi
429 -
430 - if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
431 - mycmakeargs+=(
432 - # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
433 - # this allows adding arm64 support using SDK in EPREFIX
434 - -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
435 - # Set version based on the SDK in EPREFIX
436 - # This disables i386 for SDK >= 10.15
437 - # Will error if has_use tsan and SDK < 10.12
438 - -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
439 - # Use our libtool instead of looking it up with xcrun
440 - -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
441 - )
442 - fi
443 -
444 - cmake_src_configure
445 -
446 - if use test; then
447 - local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
448 - [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
449 - [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
450 -
451 - # copy clang over since resource_dir is located relatively to binary
452 - # therefore, we can put our new libraries in it
453 - mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
454 - cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
455 - "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
456 - cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
457 - "${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
458 - cp "${sys_dir}"/*builtins*.a \
459 - "${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
460 - # we also need LLVMgold.so for gold-based tests
461 - if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
462 - ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
463 - "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
464 - fi
465 - fi
466 -}
467 -
468 -src_test() {
469 - # respect TMPDIR!
470 - local -x LIT_PRESERVES_TMP=1
471 - # disable sandbox to have it stop clobbering LD_PRELOAD
472 - local -x SANDBOX_ON=0
473 - # wipe LD_PRELOAD to make ASAN happy
474 - local -x LD_PRELOAD=
475 -
476 - cmake_build check-all
477 -}
478
479 diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-17.0.0_pre20230304.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-17.0.0_pre20230304.ebuild
480 deleted file mode 100644
481 index cc599404c49c..000000000000
482 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-17.0.0_pre20230304.ebuild
483 +++ /dev/null
484 @@ -1,216 +0,0 @@
485 -# Copyright 1999-2023 Gentoo Authors
486 -# Distributed under the terms of the GNU General Public License v2
487 -
488 -EAPI=8
489 -
490 -PYTHON_COMPAT=( python3_{9..11} )
491 -inherit check-reqs cmake flag-o-matic llvm llvm.org python-any-r1
492 -
493 -DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
494 -HOMEPAGE="https://llvm.org/"
495 -
496 -LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
497 -SLOT="${LLVM_MAJOR}"
498 -KEYWORDS=""
499 -IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
500 -# base targets
501 -IUSE+=" +libfuzzer +memprof +orc +profile +xray"
502 -# sanitizer targets, keep in sync with config-ix.cmake
503 -# NB: ubsan, scudo deliberately match two entries
504 -SANITIZER_FLAGS=(
505 - asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
506 - shadowcallstack gwp-asan
507 -)
508 -IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
509 -REQUIRED_USE="
510 - || ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
511 - test? (
512 - cfi? ( ubsan )
513 - gwp-asan? ( scudo )
514 - )
515 -"
516 -RESTRICT="
517 - !clang? ( test )
518 - !test? ( test )
519 -"
520 -
521 -DEPEND="
522 - sys-devel/llvm:${LLVM_MAJOR}
523 - virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
524 -"
525 -BDEPEND="
526 - >=dev-util/cmake-3.16
527 - clang? ( sys-devel/clang )
528 - elibc_glibc? ( net-libs/libtirpc )
529 - test? (
530 - $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
531 - =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
532 - sys-libs/compiler-rt:${LLVM_MAJOR}
533 - )
534 - !test? (
535 - ${PYTHON_DEPS}
536 - )
537 -"
538 -
539 -LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
540 -LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support third-party )
541 -llvm.org_set_globals
542 -
543 -python_check_deps() {
544 - use test || return 0
545 - python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
546 -}
547 -
548 -check_space() {
549 - if use test; then
550 - local CHECKREQS_DISK_BUILD=11G
551 - check-reqs_pkg_pretend
552 - fi
553 -}
554 -
555 -pkg_pretend() {
556 - check_space
557 -}
558 -
559 -pkg_setup() {
560 - check_space
561 - LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
562 - python-any-r1_pkg_setup
563 -}
564 -
565 -src_prepare() {
566 - sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
567 -
568 - local flag
569 - for flag in "${SANITIZER_FLAGS[@]}"; do
570 - if ! use "${flag}"; then
571 - local cmake_flag=${flag/-/_}
572 - sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
573 - cmake/config-ix.cmake || die
574 - fi
575 - done
576 -
577 - # TODO: fix these tests to be skipped upstream
578 - if use asan && ! use profile; then
579 - rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
580 - fi
581 - if use ubsan && ! use cfi; then
582 - > test/cfi/CMakeLists.txt || die
583 - fi
584 -
585 - llvm.org_src_prepare
586 -}
587 -
588 -src_configure() {
589 - # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
590 - use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
591 -
592 - # pre-set since we need to pass it to cmake
593 - BUILD_DIR=${WORKDIR}/compiler-rt_build
594 -
595 - if use clang; then
596 - local -x CC=${CHOST}-clang
597 - local -x CXX=${CHOST}-clang++
598 - strip-unsupported-flags
599 - fi
600 -
601 - local flag want_sanitizer=OFF
602 - for flag in "${SANITIZER_FLAGS[@]}"; do
603 - if use "${flag}"; then
604 - want_sanitizer=ON
605 - break
606 - fi
607 - done
608 -
609 - local mycmakeargs=(
610 - -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
611 - # use a build dir structure consistent with install
612 - # this makes it possible to easily deploy test-friendly clang
613 - -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
614 -
615 - -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
616 - # builtins & crt installed by sys-libs/compiler-rt
617 - -DCOMPILER_RT_BUILD_BUILTINS=OFF
618 - -DCOMPILER_RT_BUILD_CRT=OFF
619 - -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
620 - -DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
621 - -DCOMPILER_RT_BUILD_ORC=$(usex orc)
622 - -DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
623 - -DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
624 - -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
625 -
626 - -DPython3_EXECUTABLE="${PYTHON}"
627 - )
628 -
629 - if use amd64; then
630 - mycmakeargs+=(
631 - -DCAN_TARGET_i386=$(usex abi_x86_32)
632 - -DCAN_TARGET_x86_64=$(usex abi_x86_64)
633 - )
634 - fi
635 -
636 - if use test; then
637 - mycmakeargs+=(
638 - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
639 - -DLLVM_LIT_ARGS="$(get_lit_flags)"
640 -
641 - # they are created during src_test()
642 - -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
643 - -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
644 - )
645 -
646 - # same flags are passed for build & tests, so we need to strip
647 - # them down to a subset supported by clang
648 - CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
649 - CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
650 - strip-unsupported-flags
651 - fi
652 -
653 - if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
654 - mycmakeargs+=(
655 - # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
656 - # this allows adding arm64 support using SDK in EPREFIX
657 - -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
658 - # Set version based on the SDK in EPREFIX
659 - # This disables i386 for SDK >= 10.15
660 - # Will error if has_use tsan and SDK < 10.12
661 - -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
662 - # Use our libtool instead of looking it up with xcrun
663 - -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
664 - )
665 - fi
666 -
667 - cmake_src_configure
668 -
669 - if use test; then
670 - local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
671 - [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
672 - [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
673 -
674 - # copy clang over since resource_dir is located relatively to binary
675 - # therefore, we can put our new libraries in it
676 - mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
677 - cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
678 - "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
679 - cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
680 - "${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
681 - cp "${sys_dir}"/*builtins*.a \
682 - "${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
683 - # we also need LLVMgold.so for gold-based tests
684 - if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
685 - ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
686 - "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
687 - fi
688 - fi
689 -}
690 -
691 -src_test() {
692 - # respect TMPDIR!
693 - local -x LIT_PRESERVES_TMP=1
694 - # disable sandbox to have it stop clobbering LD_PRELOAD
695 - local -x SANDBOX_ON=0
696 - # wipe LD_PRELOAD to make ASAN happy
697 - local -x LD_PRELOAD=
698 -
699 - cmake_build check-all
700 -}