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