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: Thu, 15 Apr 2021 20:44:53
Message-Id: 1618519465.ab4d0ab47102bf0519e61c9350389b4cbdbf8748.mgorny@gentoo
1 commit: ab4d0ab47102bf0519e61c9350389b4cbdbf8748
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 15 20:37:45 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 15 20:44:25 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab4d0ab4
7
8 sys-libs/compiler-rt-sanitizers: Remove 12.0.0 RCs
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-12.0.0_rc2.ebuild | 203 --------------------
14 .../compiler-rt-sanitizers-12.0.0_rc3.ebuild | 206 ---------------------
15 .../compiler-rt-sanitizers-12.0.0_rc4.ebuild | 206 ---------------------
16 .../compiler-rt-sanitizers-12.0.0_rc5.ebuild | 206 ---------------------
17 5 files changed, 825 deletions(-)
18
19 diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest
20 index 087d75cb29b..09cfebc2769 100644
21 --- a/sys-libs/compiler-rt-sanitizers/Manifest
22 +++ b/sys-libs/compiler-rt-sanitizers/Manifest
23 @@ -2,8 +2,4 @@ DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3
24 DIST llvmorg-11.0.0.tar.gz 122743665 BLAKE2B 3f95570240789fd68ddb747df817f5c6cdc9da40911bbe9ee3531c15ada9165e5002b1c2f778cf8735858485ea05a8754e3d3a5f4b15bdd6cb33d64a14692984 SHA512 b6d38871ccce0e086e27d35e42887618d68e57d8274735c59e3eabc42dee352412489296293f8d5169fe0044936345915ee7da61ebdc64ec10f7737f6ecd90f2
25 DIST llvmorg-11.0.1.tar.gz 122790338 BLAKE2B 0130996b4a8c4d9f757136fd7fb318068c9bfdc565060dec0d4336480c4ab66c4ae3185a7fdb05f13cf9ee8fd4123b09df938881b75d6e5d3689595114b7e32a SHA512 f5e6ef0b3111aae08a89cd01adb2ff4abfa9ef779c68b9190421d0447efd25c2cc00e5aae9f4764805f5fa31434866043d1510ae7389817e28ae53a5442e2fdf
26 DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81
27 -DIST llvmorg-12.0.0-rc2.tar.gz 134242619 BLAKE2B bb741a311db608fc2ba7eeaab71c5c9f2a430f7fee3f0c5c4334e5c14caa19738d18c87b568de963d57d9b53e808ac412cf8554eca7fcae9ecca65aa4442e197 SHA512 d8f9b3dfeb0fe9b91eb7f49da393784333044db2653373fbb168afd3c8d50f3e3ec7a7b8f44df522d0facafbfe4cfc4d9e2906d19f1e6feb0bdc569b6c10a17d
28 -DIST llvmorg-12.0.0-rc3.tar.gz 134244008 BLAKE2B ed09aa361b264387711ba1ee2e4b01c0c78ad97391df95e2542d4edc31f657cc33c8a2a45de63eb421908d5dadd9392a736610fbb04b3ecbd336d6514a649da8 SHA512 1fae53c6f255160cf4be53848b8b92c8b162ddcfbddf1bf0017faf249859040c15c862c4b52bc3ba894149139afb814e0674da88793ddebfc0756ba3aa7626ce
29 -DIST llvmorg-12.0.0-rc4.tar.gz 134245842 BLAKE2B 860a0551a42e2c6a28f213c151076c5ae64a9d85f7bfb2e2df4737acd5fe968f29d368a689d9a857e01038587e872722d216f044b3f665857d7ed71122fe334e SHA512 20e4440664227c9ea7af84df3643599cd7c96f5e2b6404c42be0ce0f0d7f989f5c7b8df1f1ba93d1473d3a30325cda5a53d3900c0229ccb042b365583b5aa846
30 -DIST llvmorg-12.0.0-rc5.tar.gz 134247991 BLAKE2B 9721e211d39611f9c48b57386fb57c1dcf964c39ff5f32c593a6390c06659fcd5a1f76063004d2ecd3d1af32281a69994c7478b7fdfacd9f50ebf5fbb2050a71 SHA512 a289fdc55c25454e8cbfd370387fdd11c7555d03b3c479213e37dd01189c077d67bd04b8cab62ce82f3746877f5f02619afb3a5110191048511efee38c191d16
31 DIST llvmorg-12.0.0.tar.gz 134226215 BLAKE2B f9c3ba8c58571855caa4f206fd285c9b5be66672fb0814cb8bc0964a051f57f5d35013aa1e27cbda502652b37df1ec23474129109e76a42066847860db441dbe SHA512 0cff02155c5ac0d6db2b72d60d9819d5b5dd859663b45f721b1c7540239c2fceb1f57d9173f6870c49de851c242ed8e85c5c6d6577a1f8092a7c5dcd12513b26
32
33 diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc2.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc2.ebuild
34 deleted file mode 100644
35 index b9f483144cd..00000000000
36 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc2.ebuild
37 +++ /dev/null
38 @@ -1,203 +0,0 @@
39 -# Copyright 1999-2021 Gentoo Authors
40 -# Distributed under the terms of the GNU General Public License v2
41 -
42 -EAPI=7
43 -
44 -PYTHON_COMPAT=( python3_{7..9} )
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="$(ver_cut 1-3)"
52 -KEYWORDS=""
53 -IUSE="+clang test elibc_glibc"
54 -# base targets
55 -IUSE+=" +libfuzzer +memprof +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 profile xray )
65 - test? (
66 - cfi? ( ubsan )
67 - gwp-asan? ( scudo )
68 - )"
69 -RESTRICT="!test? ( test ) !clang? ( test )"
70 -
71 -CLANG_SLOT=${SLOT%%.*}
72 -# llvm-6 for new lit options
73 -DEPEND="
74 - >=sys-devel/llvm-6"
75 -BDEPEND="
76 - >=dev-util/cmake-3.16
77 - clang? ( sys-devel/clang )
78 - elibc_glibc? ( net-libs/libtirpc )
79 - test? (
80 - !<sys-apps/sandbox-2.13
81 - $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]")
82 - =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
83 - sys-libs/compiler-rt:${SLOT}
84 - )
85 - ${PYTHON_DEPS}"
86 -
87 -LLVM_COMPONENTS=( compiler-rt )
88 -LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
89 -llvm.org_set_globals
90 -
91 -PATCHES=(
92 - "${FILESDIR}/9999/compiler-rt-prefix-paths.patch"
93 -)
94 -
95 -python_check_deps() {
96 - use test || return 0
97 - has_version "dev-python/lit[${PYTHON_USEDEP}]"
98 -}
99 -
100 -check_space() {
101 - if use test; then
102 - local CHECKREQS_DISK_BUILD=11G
103 - check-reqs_pkg_pretend
104 - fi
105 -}
106 -
107 -pkg_pretend() {
108 - check_space
109 -}
110 -
111 -pkg_setup() {
112 - check_space
113 - llvm_pkg_setup
114 - python-any-r1_pkg_setup
115 -}
116 -
117 -src_prepare() {
118 - sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
119 -
120 - local flag
121 - for flag in "${SANITIZER_FLAGS[@]}"; do
122 - if ! use "${flag}"; then
123 - local cmake_flag=${flag/-/_}
124 - sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
125 - cmake/config-ix.cmake || die
126 - fi
127 - done
128 -
129 - # TODO: fix these tests to be skipped upstream
130 - if use asan && ! use profile; then
131 - rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
132 - fi
133 - if use ubsan && ! use cfi; then
134 - > test/cfi/CMakeLists.txt || die
135 - fi
136 -
137 - llvm.org_src_prepare
138 -}
139 -
140 -src_configure() {
141 - # pre-set since we need to pass it to cmake
142 - BUILD_DIR=${WORKDIR}/compiler-rt_build
143 -
144 - if use clang; then
145 - local -x CC=${CHOST}-clang
146 - local -x CXX=${CHOST}-clang++
147 - strip-unsupported-flags
148 - fi
149 -
150 - local flag want_sanitizer=OFF
151 - for flag in "${SANITIZER_FLAGS[@]}"; do
152 - if use "${flag}"; then
153 - want_sanitizer=ON
154 - break
155 - fi
156 - done
157 -
158 - local mycmakeargs=(
159 - -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
160 - # use a build dir structure consistent with install
161 - # this makes it possible to easily deploy test-friendly clang
162 - -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}"
163 -
164 - -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
165 - # builtins & crt installed by sys-libs/compiler-rt
166 - -DCOMPILER_RT_BUILD_BUILTINS=OFF
167 - -DCOMPILER_RT_BUILD_CRT=OFF
168 - -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
169 - -DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
170 - -DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
171 - -DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
172 - -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
173 -
174 - -DPython3_EXECUTABLE="${PYTHON}"
175 - )
176 - if use test; then
177 - mycmakeargs+=(
178 - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
179 - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
180 - -DLLVM_LIT_ARGS="$(get_lit_flags)"
181 -
182 - # they are created during src_test()
183 - -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang"
184 - -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++"
185 - )
186 -
187 - # same flags are passed for build & tests, so we need to strip
188 - # them down to a subset supported by clang
189 - CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \
190 - CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \
191 - strip-unsupported-flags
192 - fi
193 -
194 - if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
195 - mycmakeargs+=(
196 - # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
197 - # this allows adding arm64 support using SDK in EPREFIX
198 - -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
199 - # Set version based on the SDK in EPREFIX
200 - # This disables i386 for SDK >= 10.15
201 - # Will error if has_use tsan and SDK < 10.12
202 - -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
203 - # Use our libtool instead of looking it up with xcrun
204 - -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
205 - )
206 - fi
207 -
208 - cmake_src_configure
209 -
210 - if use test; then
211 - local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* )
212 - [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
213 - [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
214 -
215 - # copy clang over since resource_dir is located relatively to binary
216 - # therefore, we can put our new libraries in it
217 - mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die
218 - cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \
219 - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die
220 - cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \
221 - "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die
222 - cp "${sys_dir}"/*builtins*.a \
223 - "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die
224 - # we also need LLVMgold.so for gold-based tests
225 - if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then
226 - ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \
227 - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die
228 - fi
229 - fi
230 -}
231 -
232 -src_test() {
233 - # respect TMPDIR!
234 - local -x LIT_PRESERVES_TMP=1
235 - # disable sandbox to have it stop clobbering LD_PRELOAD
236 - local -x SANDBOX_ON=0
237 - # wipe LD_PRELOAD to make ASAN happy
238 - local -x LD_PRELOAD=
239 -
240 - cmake_build check-all
241 -}
242
243 diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc3.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc3.ebuild
244 deleted file mode 100644
245 index 7d274c79c99..00000000000
246 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc3.ebuild
247 +++ /dev/null
248 @@ -1,206 +0,0 @@
249 -# Copyright 1999-2021 Gentoo Authors
250 -# Distributed under the terms of the GNU General Public License v2
251 -
252 -EAPI=7
253 -
254 -PYTHON_COMPAT=( python3_{7..9} )
255 -inherit check-reqs cmake flag-o-matic llvm llvm.org python-any-r1
256 -
257 -DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
258 -HOMEPAGE="https://llvm.org/"
259 -
260 -LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
261 -SLOT="$(ver_cut 1-3)"
262 -KEYWORDS=""
263 -IUSE="+clang test elibc_glibc"
264 -# base targets
265 -IUSE+=" +libfuzzer +memprof +profile +xray"
266 -# sanitizer targets, keep in sync with config-ix.cmake
267 -# NB: ubsan, scudo deliberately match two entries
268 -SANITIZER_FLAGS=(
269 - asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
270 - shadowcallstack gwp-asan
271 -)
272 -IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
273 -REQUIRED_USE="
274 - || ( ${SANITIZER_FLAGS[*]} libfuzzer profile xray )
275 - test? (
276 - cfi? ( ubsan )
277 - gwp-asan? ( scudo )
278 - )"
279 -RESTRICT="!test? ( test ) !clang? ( test )"
280 -
281 -CLANG_SLOT=${SLOT%%.*}
282 -# llvm-6 for new lit options
283 -DEPEND="
284 - >=sys-devel/llvm-6"
285 -BDEPEND="
286 - >=dev-util/cmake-3.16
287 - clang? ( sys-devel/clang )
288 - elibc_glibc? ( net-libs/libtirpc )
289 - test? (
290 - !<sys-apps/sandbox-2.13
291 - $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]")
292 - =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
293 - sys-libs/compiler-rt:${SLOT}
294 - )
295 - ${PYTHON_DEPS}"
296 -
297 -LLVM_COMPONENTS=( compiler-rt )
298 -LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
299 -llvm.org_set_globals
300 -
301 -PATCHES=(
302 - "${FILESDIR}/9999/compiler-rt-prefix-paths.patch"
303 -)
304 -
305 -python_check_deps() {
306 - use test || return 0
307 - has_version "dev-python/lit[${PYTHON_USEDEP}]"
308 -}
309 -
310 -check_space() {
311 - if use test; then
312 - local CHECKREQS_DISK_BUILD=11G
313 - check-reqs_pkg_pretend
314 - fi
315 -}
316 -
317 -pkg_pretend() {
318 - check_space
319 -}
320 -
321 -pkg_setup() {
322 - check_space
323 - llvm_pkg_setup
324 - python-any-r1_pkg_setup
325 -}
326 -
327 -src_prepare() {
328 - sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
329 -
330 - local flag
331 - for flag in "${SANITIZER_FLAGS[@]}"; do
332 - if ! use "${flag}"; then
333 - local cmake_flag=${flag/-/_}
334 - sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
335 - cmake/config-ix.cmake || die
336 - fi
337 - done
338 -
339 - # Known failures.
340 - rm test/lsan/TestCases/many_threads_detach.cpp || die
341 -
342 - # TODO: fix these tests to be skipped upstream
343 - if use asan && ! use profile; then
344 - rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
345 - fi
346 - if use ubsan && ! use cfi; then
347 - > test/cfi/CMakeLists.txt || die
348 - fi
349 -
350 - llvm.org_src_prepare
351 -}
352 -
353 -src_configure() {
354 - # pre-set since we need to pass it to cmake
355 - BUILD_DIR=${WORKDIR}/compiler-rt_build
356 -
357 - if use clang; then
358 - local -x CC=${CHOST}-clang
359 - local -x CXX=${CHOST}-clang++
360 - strip-unsupported-flags
361 - fi
362 -
363 - local flag want_sanitizer=OFF
364 - for flag in "${SANITIZER_FLAGS[@]}"; do
365 - if use "${flag}"; then
366 - want_sanitizer=ON
367 - break
368 - fi
369 - done
370 -
371 - local mycmakeargs=(
372 - -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
373 - # use a build dir structure consistent with install
374 - # this makes it possible to easily deploy test-friendly clang
375 - -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}"
376 -
377 - -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
378 - # builtins & crt installed by sys-libs/compiler-rt
379 - -DCOMPILER_RT_BUILD_BUILTINS=OFF
380 - -DCOMPILER_RT_BUILD_CRT=OFF
381 - -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
382 - -DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
383 - -DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
384 - -DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
385 - -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
386 -
387 - -DPython3_EXECUTABLE="${PYTHON}"
388 - )
389 - if use test; then
390 - mycmakeargs+=(
391 - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
392 - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
393 - -DLLVM_LIT_ARGS="$(get_lit_flags)"
394 -
395 - # they are created during src_test()
396 - -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang"
397 - -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++"
398 - )
399 -
400 - # same flags are passed for build & tests, so we need to strip
401 - # them down to a subset supported by clang
402 - CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \
403 - CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \
404 - strip-unsupported-flags
405 - fi
406 -
407 - if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
408 - mycmakeargs+=(
409 - # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
410 - # this allows adding arm64 support using SDK in EPREFIX
411 - -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
412 - # Set version based on the SDK in EPREFIX
413 - # This disables i386 for SDK >= 10.15
414 - # Will error if has_use tsan and SDK < 10.12
415 - -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
416 - # Use our libtool instead of looking it up with xcrun
417 - -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
418 - )
419 - fi
420 -
421 - cmake_src_configure
422 -
423 - if use test; then
424 - local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* )
425 - [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
426 - [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
427 -
428 - # copy clang over since resource_dir is located relatively to binary
429 - # therefore, we can put our new libraries in it
430 - mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die
431 - cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \
432 - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die
433 - cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \
434 - "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die
435 - cp "${sys_dir}"/*builtins*.a \
436 - "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die
437 - # we also need LLVMgold.so for gold-based tests
438 - if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then
439 - ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \
440 - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die
441 - fi
442 - fi
443 -}
444 -
445 -src_test() {
446 - # respect TMPDIR!
447 - local -x LIT_PRESERVES_TMP=1
448 - # disable sandbox to have it stop clobbering LD_PRELOAD
449 - local -x SANDBOX_ON=0
450 - # wipe LD_PRELOAD to make ASAN happy
451 - local -x LD_PRELOAD=
452 -
453 - cmake_build check-all
454 -}
455
456 diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc4.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc4.ebuild
457 deleted file mode 100644
458 index 7d274c79c99..00000000000
459 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc4.ebuild
460 +++ /dev/null
461 @@ -1,206 +0,0 @@
462 -# Copyright 1999-2021 Gentoo Authors
463 -# Distributed under the terms of the GNU General Public License v2
464 -
465 -EAPI=7
466 -
467 -PYTHON_COMPAT=( python3_{7..9} )
468 -inherit check-reqs cmake flag-o-matic llvm llvm.org python-any-r1
469 -
470 -DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
471 -HOMEPAGE="https://llvm.org/"
472 -
473 -LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
474 -SLOT="$(ver_cut 1-3)"
475 -KEYWORDS=""
476 -IUSE="+clang test elibc_glibc"
477 -# base targets
478 -IUSE+=" +libfuzzer +memprof +profile +xray"
479 -# sanitizer targets, keep in sync with config-ix.cmake
480 -# NB: ubsan, scudo deliberately match two entries
481 -SANITIZER_FLAGS=(
482 - asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
483 - shadowcallstack gwp-asan
484 -)
485 -IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
486 -REQUIRED_USE="
487 - || ( ${SANITIZER_FLAGS[*]} libfuzzer profile xray )
488 - test? (
489 - cfi? ( ubsan )
490 - gwp-asan? ( scudo )
491 - )"
492 -RESTRICT="!test? ( test ) !clang? ( test )"
493 -
494 -CLANG_SLOT=${SLOT%%.*}
495 -# llvm-6 for new lit options
496 -DEPEND="
497 - >=sys-devel/llvm-6"
498 -BDEPEND="
499 - >=dev-util/cmake-3.16
500 - clang? ( sys-devel/clang )
501 - elibc_glibc? ( net-libs/libtirpc )
502 - test? (
503 - !<sys-apps/sandbox-2.13
504 - $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]")
505 - =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
506 - sys-libs/compiler-rt:${SLOT}
507 - )
508 - ${PYTHON_DEPS}"
509 -
510 -LLVM_COMPONENTS=( compiler-rt )
511 -LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
512 -llvm.org_set_globals
513 -
514 -PATCHES=(
515 - "${FILESDIR}/9999/compiler-rt-prefix-paths.patch"
516 -)
517 -
518 -python_check_deps() {
519 - use test || return 0
520 - has_version "dev-python/lit[${PYTHON_USEDEP}]"
521 -}
522 -
523 -check_space() {
524 - if use test; then
525 - local CHECKREQS_DISK_BUILD=11G
526 - check-reqs_pkg_pretend
527 - fi
528 -}
529 -
530 -pkg_pretend() {
531 - check_space
532 -}
533 -
534 -pkg_setup() {
535 - check_space
536 - llvm_pkg_setup
537 - python-any-r1_pkg_setup
538 -}
539 -
540 -src_prepare() {
541 - sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
542 -
543 - local flag
544 - for flag in "${SANITIZER_FLAGS[@]}"; do
545 - if ! use "${flag}"; then
546 - local cmake_flag=${flag/-/_}
547 - sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
548 - cmake/config-ix.cmake || die
549 - fi
550 - done
551 -
552 - # Known failures.
553 - rm test/lsan/TestCases/many_threads_detach.cpp || die
554 -
555 - # TODO: fix these tests to be skipped upstream
556 - if use asan && ! use profile; then
557 - rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
558 - fi
559 - if use ubsan && ! use cfi; then
560 - > test/cfi/CMakeLists.txt || die
561 - fi
562 -
563 - llvm.org_src_prepare
564 -}
565 -
566 -src_configure() {
567 - # pre-set since we need to pass it to cmake
568 - BUILD_DIR=${WORKDIR}/compiler-rt_build
569 -
570 - if use clang; then
571 - local -x CC=${CHOST}-clang
572 - local -x CXX=${CHOST}-clang++
573 - strip-unsupported-flags
574 - fi
575 -
576 - local flag want_sanitizer=OFF
577 - for flag in "${SANITIZER_FLAGS[@]}"; do
578 - if use "${flag}"; then
579 - want_sanitizer=ON
580 - break
581 - fi
582 - done
583 -
584 - local mycmakeargs=(
585 - -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
586 - # use a build dir structure consistent with install
587 - # this makes it possible to easily deploy test-friendly clang
588 - -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}"
589 -
590 - -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
591 - # builtins & crt installed by sys-libs/compiler-rt
592 - -DCOMPILER_RT_BUILD_BUILTINS=OFF
593 - -DCOMPILER_RT_BUILD_CRT=OFF
594 - -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
595 - -DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
596 - -DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
597 - -DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
598 - -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
599 -
600 - -DPython3_EXECUTABLE="${PYTHON}"
601 - )
602 - if use test; then
603 - mycmakeargs+=(
604 - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
605 - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
606 - -DLLVM_LIT_ARGS="$(get_lit_flags)"
607 -
608 - # they are created during src_test()
609 - -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang"
610 - -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++"
611 - )
612 -
613 - # same flags are passed for build & tests, so we need to strip
614 - # them down to a subset supported by clang
615 - CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \
616 - CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \
617 - strip-unsupported-flags
618 - fi
619 -
620 - if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
621 - mycmakeargs+=(
622 - # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
623 - # this allows adding arm64 support using SDK in EPREFIX
624 - -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
625 - # Set version based on the SDK in EPREFIX
626 - # This disables i386 for SDK >= 10.15
627 - # Will error if has_use tsan and SDK < 10.12
628 - -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
629 - # Use our libtool instead of looking it up with xcrun
630 - -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
631 - )
632 - fi
633 -
634 - cmake_src_configure
635 -
636 - if use test; then
637 - local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* )
638 - [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
639 - [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
640 -
641 - # copy clang over since resource_dir is located relatively to binary
642 - # therefore, we can put our new libraries in it
643 - mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die
644 - cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \
645 - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die
646 - cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \
647 - "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die
648 - cp "${sys_dir}"/*builtins*.a \
649 - "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die
650 - # we also need LLVMgold.so for gold-based tests
651 - if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then
652 - ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \
653 - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die
654 - fi
655 - fi
656 -}
657 -
658 -src_test() {
659 - # respect TMPDIR!
660 - local -x LIT_PRESERVES_TMP=1
661 - # disable sandbox to have it stop clobbering LD_PRELOAD
662 - local -x SANDBOX_ON=0
663 - # wipe LD_PRELOAD to make ASAN happy
664 - local -x LD_PRELOAD=
665 -
666 - cmake_build check-all
667 -}
668
669 diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc5.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc5.ebuild
670 deleted file mode 100644
671 index 7d274c79c99..00000000000
672 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc5.ebuild
673 +++ /dev/null
674 @@ -1,206 +0,0 @@
675 -# Copyright 1999-2021 Gentoo Authors
676 -# Distributed under the terms of the GNU General Public License v2
677 -
678 -EAPI=7
679 -
680 -PYTHON_COMPAT=( python3_{7..9} )
681 -inherit check-reqs cmake flag-o-matic llvm llvm.org python-any-r1
682 -
683 -DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
684 -HOMEPAGE="https://llvm.org/"
685 -
686 -LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
687 -SLOT="$(ver_cut 1-3)"
688 -KEYWORDS=""
689 -IUSE="+clang test elibc_glibc"
690 -# base targets
691 -IUSE+=" +libfuzzer +memprof +profile +xray"
692 -# sanitizer targets, keep in sync with config-ix.cmake
693 -# NB: ubsan, scudo deliberately match two entries
694 -SANITIZER_FLAGS=(
695 - asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
696 - shadowcallstack gwp-asan
697 -)
698 -IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
699 -REQUIRED_USE="
700 - || ( ${SANITIZER_FLAGS[*]} libfuzzer profile xray )
701 - test? (
702 - cfi? ( ubsan )
703 - gwp-asan? ( scudo )
704 - )"
705 -RESTRICT="!test? ( test ) !clang? ( test )"
706 -
707 -CLANG_SLOT=${SLOT%%.*}
708 -# llvm-6 for new lit options
709 -DEPEND="
710 - >=sys-devel/llvm-6"
711 -BDEPEND="
712 - >=dev-util/cmake-3.16
713 - clang? ( sys-devel/clang )
714 - elibc_glibc? ( net-libs/libtirpc )
715 - test? (
716 - !<sys-apps/sandbox-2.13
717 - $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]")
718 - =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
719 - sys-libs/compiler-rt:${SLOT}
720 - )
721 - ${PYTHON_DEPS}"
722 -
723 -LLVM_COMPONENTS=( compiler-rt )
724 -LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
725 -llvm.org_set_globals
726 -
727 -PATCHES=(
728 - "${FILESDIR}/9999/compiler-rt-prefix-paths.patch"
729 -)
730 -
731 -python_check_deps() {
732 - use test || return 0
733 - has_version "dev-python/lit[${PYTHON_USEDEP}]"
734 -}
735 -
736 -check_space() {
737 - if use test; then
738 - local CHECKREQS_DISK_BUILD=11G
739 - check-reqs_pkg_pretend
740 - fi
741 -}
742 -
743 -pkg_pretend() {
744 - check_space
745 -}
746 -
747 -pkg_setup() {
748 - check_space
749 - llvm_pkg_setup
750 - python-any-r1_pkg_setup
751 -}
752 -
753 -src_prepare() {
754 - sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
755 -
756 - local flag
757 - for flag in "${SANITIZER_FLAGS[@]}"; do
758 - if ! use "${flag}"; then
759 - local cmake_flag=${flag/-/_}
760 - sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
761 - cmake/config-ix.cmake || die
762 - fi
763 - done
764 -
765 - # Known failures.
766 - rm test/lsan/TestCases/many_threads_detach.cpp || die
767 -
768 - # TODO: fix these tests to be skipped upstream
769 - if use asan && ! use profile; then
770 - rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
771 - fi
772 - if use ubsan && ! use cfi; then
773 - > test/cfi/CMakeLists.txt || die
774 - fi
775 -
776 - llvm.org_src_prepare
777 -}
778 -
779 -src_configure() {
780 - # pre-set since we need to pass it to cmake
781 - BUILD_DIR=${WORKDIR}/compiler-rt_build
782 -
783 - if use clang; then
784 - local -x CC=${CHOST}-clang
785 - local -x CXX=${CHOST}-clang++
786 - strip-unsupported-flags
787 - fi
788 -
789 - local flag want_sanitizer=OFF
790 - for flag in "${SANITIZER_FLAGS[@]}"; do
791 - if use "${flag}"; then
792 - want_sanitizer=ON
793 - break
794 - fi
795 - done
796 -
797 - local mycmakeargs=(
798 - -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
799 - # use a build dir structure consistent with install
800 - # this makes it possible to easily deploy test-friendly clang
801 - -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}"
802 -
803 - -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
804 - # builtins & crt installed by sys-libs/compiler-rt
805 - -DCOMPILER_RT_BUILD_BUILTINS=OFF
806 - -DCOMPILER_RT_BUILD_CRT=OFF
807 - -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
808 - -DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
809 - -DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
810 - -DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
811 - -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
812 -
813 - -DPython3_EXECUTABLE="${PYTHON}"
814 - )
815 - if use test; then
816 - mycmakeargs+=(
817 - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
818 - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
819 - -DLLVM_LIT_ARGS="$(get_lit_flags)"
820 -
821 - # they are created during src_test()
822 - -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang"
823 - -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++"
824 - )
825 -
826 - # same flags are passed for build & tests, so we need to strip
827 - # them down to a subset supported by clang
828 - CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \
829 - CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \
830 - strip-unsupported-flags
831 - fi
832 -
833 - if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
834 - mycmakeargs+=(
835 - # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
836 - # this allows adding arm64 support using SDK in EPREFIX
837 - -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
838 - # Set version based on the SDK in EPREFIX
839 - # This disables i386 for SDK >= 10.15
840 - # Will error if has_use tsan and SDK < 10.12
841 - -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
842 - # Use our libtool instead of looking it up with xcrun
843 - -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
844 - )
845 - fi
846 -
847 - cmake_src_configure
848 -
849 - if use test; then
850 - local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* )
851 - [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
852 - [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
853 -
854 - # copy clang over since resource_dir is located relatively to binary
855 - # therefore, we can put our new libraries in it
856 - mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die
857 - cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \
858 - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die
859 - cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \
860 - "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die
861 - cp "${sys_dir}"/*builtins*.a \
862 - "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die
863 - # we also need LLVMgold.so for gold-based tests
864 - if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then
865 - ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \
866 - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die
867 - fi
868 - fi
869 -}
870 -
871 -src_test() {
872 - # respect TMPDIR!
873 - local -x LIT_PRESERVES_TMP=1
874 - # disable sandbox to have it stop clobbering LD_PRELOAD
875 - local -x SANDBOX_ON=0
876 - # wipe LD_PRELOAD to make ASAN happy
877 - local -x LD_PRELOAD=
878 -
879 - cmake_build check-all
880 -}