From 7218e1b46bceac05841e90472501742d905fb3fc Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 12 Mar 2021 21:55:15 +0000 Subject: gentoo resync : 12.03.2021 --- sys-libs/compiler-rt-sanitizers/Manifest | 8 +- .../compiler-rt-sanitizers-12.0.0_rc1.ebuild | 198 -------------------- .../compiler-rt-sanitizers-12.0.0_rc3.ebuild | 206 +++++++++++++++++++++ .../compiler-rt-sanitizers-9.0.1-r1.ebuild | 160 ---------------- .../compiler-rt-sanitizers-9.0.1.ebuild | 158 ---------------- .../files/9.0.1/glibc-2.31.patch | 35 ---- 6 files changed, 208 insertions(+), 557 deletions(-) delete mode 100644 sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc1.ebuild create mode 100644 sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc3.ebuild delete mode 100644 sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1-r1.ebuild delete mode 100644 sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1.ebuild delete mode 100644 sys-libs/compiler-rt-sanitizers/files/9.0.1/glibc-2.31.patch (limited to 'sys-libs/compiler-rt-sanitizers') diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest index 69ac3b0d189e..1771a4ae9b2e 100644 --- a/sys-libs/compiler-rt-sanitizers/Manifest +++ b/sys-libs/compiler-rt-sanitizers/Manifest @@ -1,21 +1,17 @@ AUX 11.1.0/compiler-rt-prefix-paths.patch 3794 BLAKE2B f6e8992658e665bd9cc13bae00c9d7757d01438a73ffd8809be67bbcd1c6d3956e9965890fd84e573c9ef6cc74a7fc7a349e2e5eec21387150c8ef2ae2bf055d SHA512 23a05ce3805678e855be2a4678102e72fe81cb86208357df0dc95b85c7268fe95025603908dd114b27742f39432c4c860859904b287cf52f5a5b337b131bcb9e -AUX 9.0.1/glibc-2.31.patch 1728 BLAKE2B 96b52a5c287ad2a561134b6470904fc42c0ea14c6d453871b603048df7e0c9a1edb15624eca06726490d6fd874fa2a80279896f131041e0b70f5c9f672485ae4 SHA512 ca5e8fbff32066d137446fca870e93ad0f51a27621bc4954a1b07205f34332015d00465e644db539d8f35352ec547e027846ccbce36705a27fa758cc2f85a026 AUX 9999/compiler-rt-prefix-paths.patch 0 BLAKE2B 786a02f742015903c6c6fd852552d272912f4740e15847618a86e217f71f5419d25e1031afee585313896444934eb04b903a685b1448b755d56f701afe9be2ce SHA512 cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151 DIST llvmorg-11.0.0.tar.gz 122743665 BLAKE2B 3f95570240789fd68ddb747df817f5c6cdc9da40911bbe9ee3531c15ada9165e5002b1c2f778cf8735858485ea05a8754e3d3a5f4b15bdd6cb33d64a14692984 SHA512 b6d38871ccce0e086e27d35e42887618d68e57d8274735c59e3eabc42dee352412489296293f8d5169fe0044936345915ee7da61ebdc64ec10f7737f6ecd90f2 DIST llvmorg-11.0.1.tar.gz 122790338 BLAKE2B 0130996b4a8c4d9f757136fd7fb318068c9bfdc565060dec0d4336480c4ab66c4ae3185a7fdb05f13cf9ee8fd4123b09df938881b75d6e5d3689595114b7e32a SHA512 f5e6ef0b3111aae08a89cd01adb2ff4abfa9ef779c68b9190421d0447efd25c2cc00e5aae9f4764805f5fa31434866043d1510ae7389817e28ae53a5442e2fdf DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81 -DIST llvmorg-12.0.0-rc1.tar.gz 134164708 BLAKE2B d4261ff7d9586b47f4cfda3d2cda4b76534f9e17fbd5cdb8861895b8eb466021962f4608bfcdeb52f8fce78850a994fd5eda0560f7211e5c8d1ac9330a738a36 SHA512 3d07d013d0705bb99f56898cc55d054d0d95aeb53b3c756cfab80b4c9097cc4935bcea89b9efde2e503a899b9fccf0dacc0073c9991c8ea352755c5ec68a757a DIST llvmorg-12.0.0-rc2.tar.gz 134242619 BLAKE2B bb741a311db608fc2ba7eeaab71c5c9f2a430f7fee3f0c5c4334e5c14caa19738d18c87b568de963d57d9b53e808ac412cf8554eca7fcae9ecca65aa4442e197 SHA512 d8f9b3dfeb0fe9b91eb7f49da393784333044db2653373fbb168afd3c8d50f3e3ec7a7b8f44df522d0facafbfe4cfc4d9e2906d19f1e6feb0bdc569b6c10a17d -DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59 +DIST llvmorg-12.0.0-rc3.tar.gz 134244008 BLAKE2B ed09aa361b264387711ba1ee2e4b01c0c78ad97391df95e2542d4edc31f657cc33c8a2a45de63eb421908d5dadd9392a736610fbb04b3ecbd336d6514a649da8 SHA512 1fae53c6f255160cf4be53848b8b92c8b162ddcfbddf1bf0017faf249859040c15c862c4b52bc3ba894149139afb814e0674da88793ddebfc0756ba3aa7626ce EBUILD compiler-rt-sanitizers-10.0.1.ebuild 4490 BLAKE2B 5bbce4ab70e2b1434698eae6a37c529c7ffa58ae90236c0ddef3023a00cf1bb6d3ed8b3ae767b81f0abb9759e33fb5e1d9e8f755505db72ceb9cc46f6cb1a179 SHA512 fda208adbbb4fa7e14d3a27956bce3a809c202ecf5eceb0fac956a0ec0879579f8f94f69172cd934481a98d84cdc36ea2fdc46b8ad906dbb48795673d2d7c4eb EBUILD compiler-rt-sanitizers-11.0.0.ebuild 5092 BLAKE2B 243f8ddf60558abf5d1ad9e6a1e31333769d1e0e33ff401c915b243297583de8f21be8ab15605a2744a981ff8cd0d1ba760aafc7bc13c43586a901b6050fd0a6 SHA512 04af5692fd79ba8fe51d69664d09f4c2ef2546559a5e5538363d22dbfb791e0f313ce289fdb56dcbfd116e399a3d34dab293a1f355acaf6700bb3003bd50e729 EBUILD compiler-rt-sanitizers-11.0.1.ebuild 6080 BLAKE2B b276c7e47eea0a950ceb0aaac11beea427cc91e7c91adde1181fdf47e0aaa454ff9ede64ca3f9cf348a8e80336e916c26faf3c4318a42fc30d0a2f3856104c3a SHA512 75dc8e9bc49d82e5a1aeb2ff1b385095e9372200feeb8f3e0ffa2425f638ba89017b4a0262b57e6f24484ec39e35c3225def76f3330bada56cbcdffcbaf0e768 EBUILD compiler-rt-sanitizers-11.1.0.ebuild 6084 BLAKE2B 3c3ae974c0f1e9fea3ea102c8108c11b906db7a318af1210ef0b13e3b34cd7352d8645edbb5346b6b8b4f814f28449b3d0d0bbd397717ef00701d73b2dac8130 SHA512 7a24a080c33fcf574906d10e332a3faedb94853bce6c667b9afa6a1b4b59164e014aa9cca533dac8fedb1c6a666eb3cff8ed8211b84f03666aa49ac1f4bcf542 EBUILD compiler-rt-sanitizers-12.0.0.9999.ebuild 5928 BLAKE2B bb7e0bfb84cd7aa447eab7f0ac79d611b65ddfcafa4539a48a73fc4430178369e5be362bd7f3a2c5a9db9cc7a6b0ed815fd3b45553a06cc1c47493adf4902f8c SHA512 8c7d54a81388e13cea8d72c1cdd9f9828b184e05d06da547ddf90c3a2a23da7dad22805559fd9573f88fa91e21d6dfddd59b1c83f00002a31c590c023fe6869f -EBUILD compiler-rt-sanitizers-12.0.0_rc1.ebuild 5843 BLAKE2B 8d0cefba3aab132af0df86fbfc47369e5029929fd5ec0cd3b4bde3387f5fd8380b5273ee28b8217ff05691c868038decd172c94f5685b7c6c1b2e4962e1cab19 SHA512 0ea473d719537bf29f899674a6cb41b988799a5e4c96adeb87ed5a7efe4ce63dbb488f5157fe91194963fb761597b0109640e9577c10d92bed92e81babbe2045 EBUILD compiler-rt-sanitizers-12.0.0_rc2.ebuild 5928 BLAKE2B bb7e0bfb84cd7aa447eab7f0ac79d611b65ddfcafa4539a48a73fc4430178369e5be362bd7f3a2c5a9db9cc7a6b0ed815fd3b45553a06cc1c47493adf4902f8c SHA512 8c7d54a81388e13cea8d72c1cdd9f9828b184e05d06da547ddf90c3a2a23da7dad22805559fd9573f88fa91e21d6dfddd59b1c83f00002a31c590c023fe6869f +EBUILD compiler-rt-sanitizers-12.0.0_rc3.ebuild 6003 BLAKE2B 90595ab86e646385cf823452958c3f052093d12990c310917d55cff9f22c4e5a93e905e6e6731f31f8643340ccea08b46bccdb77dc8ebe9bf94b5e6bf313d3e8 SHA512 a0e0d604a1b87d07c262bf6ecdce01d5a301f3a6cc0d2192ffc0af671851a74cd167bf0b653e246f2a2429a796c3b69ed4f02724a3070993c43afd15b626aa0c EBUILD compiler-rt-sanitizers-13.0.0.9999.ebuild 5928 BLAKE2B bb7e0bfb84cd7aa447eab7f0ac79d611b65ddfcafa4539a48a73fc4430178369e5be362bd7f3a2c5a9db9cc7a6b0ed815fd3b45553a06cc1c47493adf4902f8c SHA512 8c7d54a81388e13cea8d72c1cdd9f9828b184e05d06da547ddf90c3a2a23da7dad22805559fd9573f88fa91e21d6dfddd59b1c83f00002a31c590c023fe6869f -EBUILD compiler-rt-sanitizers-9.0.1-r1.ebuild 4882 BLAKE2B 049a170fef22592067cf1d0e01a2100ae795b121c6d3f2479a42d3f5d3dcdf1042a4ce7bbb10670ac9b969735e3bd858ea09e707d83e1e35eb0bf91d07d37e01 SHA512 0549bab838b9aa14fc250d93ab72f3529f6f9b41fae0445c898a06e05d09172e8481738be578cc17ee1a391764cad21666e78398a2ee4e7cb70049bdb2b5604e -EBUILD compiler-rt-sanitizers-9.0.1.ebuild 4832 BLAKE2B 0f7203aa7d3925dd46ca9960fb18db39fe94915a194747a42f93b8a5d0061d975b6ffffc915f137688cd6d8e8463afd74728669712521e68561953d48ea361ac SHA512 90b3fa36860b4310a28b4f968beb0a60dd7a91daad217c22df3f716907487cf1bf07f3a1fcf99767a45ab3722d9da8eb1daa4e35d6ebc0899a6769ff3e03a400 MISC metadata.xml 1341 BLAKE2B d850193d6899816f33ec45aa714a9edcc04c668832a4148881ada810565cab45066e61d5b365b15ced7864220ce51cde31a559e4dadb83dc935955c9a68389ec SHA512 9fd1c971444f1d6dbd0b0559308a269385b0842767d97d3619b20b300569165cd807e52412d36d6ca9427a5fd5788ae5a19ef7d5c1b47cc73cc4eccf20b3fee7 diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc1.ebuild deleted file mode 100644 index 5fc5bbc62475..000000000000 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc1.ebuild +++ /dev/null @@ -1,198 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7..9} ) -inherit check-reqs cmake flag-o-matic llvm llvm.org python-any-r1 - -DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" -HOMEPAGE="https://llvm.org/" - -LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" -SLOT="$(ver_cut 1-3)" -KEYWORDS="" -IUSE="+clang test elibc_glibc" -# base targets -IUSE+=" +libfuzzer +memprof +profile +xray" -# sanitizer targets, keep in sync with config-ix.cmake -# NB: ubsan, scudo deliberately match two entries -SANITIZER_FLAGS=( - asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo - shadowcallstack gwp-asan -) -IUSE+=" ${SANITIZER_FLAGS[@]/#/+}" -REQUIRED_USE=" - || ( ${SANITIZER_FLAGS[*]} libfuzzer profile xray ) - gwp-asan? ( scudo ) - ubsan? ( cfi )" -RESTRICT="!test? ( test ) !clang? ( test )" - -CLANG_SLOT=${SLOT%%.*} -# llvm-6 for new lit options -DEPEND=" - >=sys-devel/llvm-6" -BDEPEND=" - >=dev-util/cmake-3.16 - clang? ( sys-devel/clang ) - elibc_glibc? ( net-libs/libtirpc ) - test? ( - !=dev-python/lit-5[\${PYTHON_USEDEP}]") - =sys-devel/clang-${PV%_*}*:${CLANG_SLOT} - sys-libs/compiler-rt:${SLOT} - ) - ${PYTHON_DEPS}" - -LLVM_COMPONENTS=( compiler-rt ) -LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest ) -llvm.org_set_globals - -PATCHES=( - "${FILESDIR}/9999/compiler-rt-prefix-paths.patch" -) - -python_check_deps() { - use test || return 0 - has_version "dev-python/lit[${PYTHON_USEDEP}]" -} - -check_space() { - if use test; then - local CHECKREQS_DISK_BUILD=11G - check-reqs_pkg_pretend - fi -} - -pkg_pretend() { - check_space -} - -pkg_setup() { - check_space - llvm_pkg_setup - python-any-r1_pkg_setup -} - -src_prepare() { - sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die - - local flag - for flag in "${SANITIZER_FLAGS[@]}"; do - if ! use "${flag}"; then - local cmake_flag=${flag/-/_} - sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \ - cmake/config-ix.cmake || die - fi - done - - if use asan && ! use profile; then - # TODO: fix these tests to be skipped upstream - rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die - fi - - llvm.org_src_prepare -} - -src_configure() { - # pre-set since we need to pass it to cmake - BUILD_DIR=${WORKDIR}/compiler-rt_build - - if use clang; then - local -x CC=${CHOST}-clang - local -x CXX=${CHOST}-clang++ - strip-unsupported-flags - fi - - local flag want_sanitizer=OFF - for flag in "${SANITIZER_FLAGS[@]}"; do - if use "${flag}"; then - want_sanitizer=ON - break - fi - done - - local mycmakeargs=( - -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" - # use a build dir structure consistent with install - # this makes it possible to easily deploy test-friendly clang - -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}" - - -DCOMPILER_RT_INCLUDE_TESTS=$(usex test) - # builtins & crt installed by sys-libs/compiler-rt - -DCOMPILER_RT_BUILD_BUILTINS=OFF - -DCOMPILER_RT_BUILD_CRT=OFF - -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer) - -DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof) - -DCOMPILER_RT_BUILD_PROFILE=$(usex profile) - -DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}" - -DCOMPILER_RT_BUILD_XRAY=$(usex xray) - - -DPython3_EXECUTABLE="${PYTHON}" - ) - if use test; then - mycmakeargs+=( - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" - -DLLVM_LIT_ARGS="$(get_lit_flags)" - - # they are created during src_test() - -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang" - -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++" - ) - - # same flags are passed for build & tests, so we need to strip - # them down to a subset supported by clang - CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \ - CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \ - strip-unsupported-flags - fi - - if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then - mycmakeargs+=( - # setting -isysroot is disabled with compiler-rt-prefix-paths.patch - # this allows adding arm64 support using SDK in EPREFIX - -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk" - # Set version based on the SDK in EPREFIX - # This disables i386 for SDK >= 10.15 - # Will error if has_use tsan and SDK < 10.12 - -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')" - # Use our libtool instead of looking it up with xcrun - -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool" - ) - fi - - cmake_src_configure - - if use test; then - local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* ) - [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}" - [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}" - - # copy clang over since resource_dir is located relatively to binary - # therefore, we can put our new libraries in it - mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die - cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \ - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die - cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \ - "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die - cp "${sys_dir}"/*builtins*.a \ - "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die - # we also need LLVMgold.so for gold-based tests - if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then - ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \ - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die - fi - fi -} - -src_test() { - # respect TMPDIR! - local -x LIT_PRESERVES_TMP=1 - # disable sandbox to have it stop clobbering LD_PRELOAD - local -x SANDBOX_ON=0 - # wipe LD_PRELOAD to make ASAN happy - local -x LD_PRELOAD= - - cmake_build check-all -} 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 new file mode 100644 index 000000000000..7d274c79c99e --- /dev/null +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc3.ebuild @@ -0,0 +1,206 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..9} ) +inherit check-reqs cmake flag-o-matic llvm llvm.org python-any-r1 + +DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" +SLOT="$(ver_cut 1-3)" +KEYWORDS="" +IUSE="+clang test elibc_glibc" +# base targets +IUSE+=" +libfuzzer +memprof +profile +xray" +# sanitizer targets, keep in sync with config-ix.cmake +# NB: ubsan, scudo deliberately match two entries +SANITIZER_FLAGS=( + asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo + shadowcallstack gwp-asan +) +IUSE+=" ${SANITIZER_FLAGS[@]/#/+}" +REQUIRED_USE=" + || ( ${SANITIZER_FLAGS[*]} libfuzzer profile xray ) + test? ( + cfi? ( ubsan ) + gwp-asan? ( scudo ) + )" +RESTRICT="!test? ( test ) !clang? ( test )" + +CLANG_SLOT=${SLOT%%.*} +# llvm-6 for new lit options +DEPEND=" + >=sys-devel/llvm-6" +BDEPEND=" + >=dev-util/cmake-3.16 + clang? ( sys-devel/clang ) + elibc_glibc? ( net-libs/libtirpc ) + test? ( + !=dev-python/lit-5[\${PYTHON_USEDEP}]") + =sys-devel/clang-${PV%_*}*:${CLANG_SLOT} + sys-libs/compiler-rt:${SLOT} + ) + ${PYTHON_DEPS}" + +LLVM_COMPONENTS=( compiler-rt ) +LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest ) +llvm.org_set_globals + +PATCHES=( + "${FILESDIR}/9999/compiler-rt-prefix-paths.patch" +) + +python_check_deps() { + use test || return 0 + has_version "dev-python/lit[${PYTHON_USEDEP}]" +} + +check_space() { + if use test; then + local CHECKREQS_DISK_BUILD=11G + check-reqs_pkg_pretend + fi +} + +pkg_pretend() { + check_space +} + +pkg_setup() { + check_space + llvm_pkg_setup + python-any-r1_pkg_setup +} + +src_prepare() { + sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die + + local flag + for flag in "${SANITIZER_FLAGS[@]}"; do + if ! use "${flag}"; then + local cmake_flag=${flag/-/_} + sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \ + cmake/config-ix.cmake || die + fi + done + + # Known failures. + rm test/lsan/TestCases/many_threads_detach.cpp || die + + # TODO: fix these tests to be skipped upstream + if use asan && ! use profile; then + rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die + fi + if use ubsan && ! use cfi; then + > test/cfi/CMakeLists.txt || die + fi + + llvm.org_src_prepare +} + +src_configure() { + # pre-set since we need to pass it to cmake + BUILD_DIR=${WORKDIR}/compiler-rt_build + + if use clang; then + local -x CC=${CHOST}-clang + local -x CXX=${CHOST}-clang++ + strip-unsupported-flags + fi + + local flag want_sanitizer=OFF + for flag in "${SANITIZER_FLAGS[@]}"; do + if use "${flag}"; then + want_sanitizer=ON + break + fi + done + + local mycmakeargs=( + -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" + # use a build dir structure consistent with install + # this makes it possible to easily deploy test-friendly clang + -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}" + + -DCOMPILER_RT_INCLUDE_TESTS=$(usex test) + # builtins & crt installed by sys-libs/compiler-rt + -DCOMPILER_RT_BUILD_BUILTINS=OFF + -DCOMPILER_RT_BUILD_CRT=OFF + -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer) + -DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof) + -DCOMPILER_RT_BUILD_PROFILE=$(usex profile) + -DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}" + -DCOMPILER_RT_BUILD_XRAY=$(usex xray) + + -DPython3_EXECUTABLE="${PYTHON}" + ) + if use test; then + mycmakeargs+=( + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" + -DLLVM_LIT_ARGS="$(get_lit_flags)" + + # they are created during src_test() + -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang" + -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++" + ) + + # same flags are passed for build & tests, so we need to strip + # them down to a subset supported by clang + CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \ + CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \ + strip-unsupported-flags + fi + + if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then + mycmakeargs+=( + # setting -isysroot is disabled with compiler-rt-prefix-paths.patch + # this allows adding arm64 support using SDK in EPREFIX + -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk" + # Set version based on the SDK in EPREFIX + # This disables i386 for SDK >= 10.15 + # Will error if has_use tsan and SDK < 10.12 + -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')" + # Use our libtool instead of looking it up with xcrun + -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool" + ) + fi + + cmake_src_configure + + if use test; then + local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* ) + [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}" + [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}" + + # copy clang over since resource_dir is located relatively to binary + # therefore, we can put our new libraries in it + mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die + cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \ + "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die + cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \ + "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die + cp "${sys_dir}"/*builtins*.a \ + "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die + # we also need LLVMgold.so for gold-based tests + if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then + ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \ + "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die + fi + fi +} + +src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + # disable sandbox to have it stop clobbering LD_PRELOAD + local -x SANDBOX_ON=0 + # wipe LD_PRELOAD to make ASAN happy + local -x LD_PRELOAD= + + cmake_build check-all +} diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1-r1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1-r1.ebuild deleted file mode 100644 index 7e1acf4a3bac..000000000000 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1-r1.ebuild +++ /dev/null @@ -1,160 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_7 ) -inherit check-reqs cmake-utils flag-o-matic llvm llvm.org \ - multiprocessing python-any-r1 - -DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" -HOMEPAGE="https://llvm.org/" -LLVM_COMPONENTS=( compiler-rt ) -LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest ) -llvm.org_set_globals - -LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" -SLOT="$(ver_cut 1-3)" -KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-linux ~ppc-macos ~x64-macos" -IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc" -# FIXME: libfuzzer does not enable all its necessary dependencies -REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )" -RESTRICT="!test? ( test ) !clang? ( test )" - -CLANG_SLOT=${SLOT%%.*} -# llvm-6 for new lit options -DEPEND=" - >=sys-devel/llvm-6" -BDEPEND=" - clang? ( sys-devel/clang ) - elibc_glibc? ( net-libs/libtirpc ) - test? ( - !=dev-python/lit-5[\${PYTHON_USEDEP}]") - =sys-devel/clang-${PV%_*}*:${CLANG_SLOT} - sys-libs/compiler-rt:${SLOT} ) - ${PYTHON_DEPS}" - -# least intrusive of all -CMAKE_BUILD_TYPE=RelWithDebInfo - -PATCHES=( "${FILESDIR}"/9.0.1/glibc-2.31.patch ) - -python_check_deps() { - use test || return 0 - has_version "dev-python/lit[${PYTHON_USEDEP}]" -} - -check_space() { - if use test; then - local CHECKREQS_DISK_BUILD=11G - check-reqs_pkg_pretend - fi -} - -pkg_pretend() { - check_space -} - -pkg_setup() { - check_space - llvm_pkg_setup - python-any-r1_pkg_setup -} - -src_prepare() { - cmake-utils_src_prepare - - if use test; then - # remove tests that are (still) broken by new glibc - # https://bugs.llvm.org/show_bug.cgi?id=36065 - if use elibc_glibc && has_version '>=sys-libs/glibc-2.25'; then - rm test/lsan/TestCases/Linux/fork_and_leak.cc || die - fi - fi -} - -src_configure() { - # pre-set since we need to pass it to cmake - BUILD_DIR=${WORKDIR}/compiler-rt_build - - if use clang; then - local -x CC=${CHOST}-clang - local -x CXX=${CHOST}-clang++ - strip-unsupported-flags - fi - - local mycmakeargs=( - -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" - # use a build dir structure consistent with install - # this makes it possible to easily deploy test-friendly clang - -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}" - - -DCOMPILER_RT_INCLUDE_TESTS=$(usex test) - # builtins & crt installed by sys-libs/compiler-rt - -DCOMPILER_RT_BUILD_BUILTINS=OFF - -DCOMPILER_RT_BUILD_CRT=OFF - -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer) - -DCOMPILER_RT_BUILD_PROFILE=$(usex profile) - -DCOMPILER_RT_BUILD_SANITIZERS=$(usex sanitize) - -DCOMPILER_RT_BUILD_XRAY=$(usex xray) - ) - if use test; then - mycmakeargs+=( - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" - -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" - - # they are created during src_test() - -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang" - -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++" - ) - - # same flags are passed for build & tests, so we need to strip - # them down to a subset supported by clang - CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \ - CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \ - strip-unsupported-flags - fi - - if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then - mycmakeargs+=( - # disable use of SDK for the system itself - -DDARWIN_macosx_CACHED_SYSROOT=/ - ) - fi - - cmake-utils_src_configure - - if use test; then - local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* ) - [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}" - [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}" - - # copy clang over since resource_dir is located relatively to binary - # therefore, we can put our new libraries in it - mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die - cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \ - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die - cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \ - "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die - cp "${sys_dir}"/*builtins*.a \ - "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die - # we also need LLVMgold.so for gold-based tests - if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then - ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \ - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die - fi - fi -} - -src_test() { - # respect TMPDIR! - local -x LIT_PRESERVES_TMP=1 - # disable sandbox to have it stop clobbering LD_PRELOAD - local -x SANDBOX_ON=0 - # wipe LD_PRELOAD to make ASAN happy - local -x LD_PRELOAD= - - cmake-utils_src_make check-all -} diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1.ebuild deleted file mode 100644 index 14f3d4c193b0..000000000000 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1.ebuild +++ /dev/null @@ -1,158 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_7 ) -inherit check-reqs cmake-utils flag-o-matic llvm llvm.org \ - multiprocessing python-any-r1 - -DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" -HOMEPAGE="https://llvm.org/" -LLVM_COMPONENTS=( compiler-rt ) -LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest ) -llvm.org_set_globals - -LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" -SLOT="$(ver_cut 1-3)" -KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-linux ~ppc-macos ~x64-macos" -IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc" -# FIXME: libfuzzer does not enable all its necessary dependencies -REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )" -RESTRICT="!test? ( test ) !clang? ( test )" - -CLANG_SLOT=${SLOT%%.*} -# llvm-6 for new lit options -DEPEND=" - >=sys-devel/llvm-6" -BDEPEND=" - clang? ( sys-devel/clang ) - elibc_glibc? ( net-libs/libtirpc ) - test? ( - !=dev-python/lit-5[\${PYTHON_USEDEP}]") - =sys-devel/clang-${PV%_*}*:${CLANG_SLOT} - sys-libs/compiler-rt:${SLOT} ) - ${PYTHON_DEPS}" - -# least intrusive of all -CMAKE_BUILD_TYPE=RelWithDebInfo - -python_check_deps() { - use test || return 0 - has_version "dev-python/lit[${PYTHON_USEDEP}]" -} - -check_space() { - if use test; then - local CHECKREQS_DISK_BUILD=11G - check-reqs_pkg_pretend - fi -} - -pkg_pretend() { - check_space -} - -pkg_setup() { - check_space - llvm_pkg_setup - python-any-r1_pkg_setup -} - -src_prepare() { - cmake-utils_src_prepare - - if use test; then - # remove tests that are (still) broken by new glibc - # https://bugs.llvm.org/show_bug.cgi?id=36065 - if use elibc_glibc && has_version '>=sys-libs/glibc-2.25'; then - rm test/lsan/TestCases/Linux/fork_and_leak.cc || die - fi - fi -} - -src_configure() { - # pre-set since we need to pass it to cmake - BUILD_DIR=${WORKDIR}/compiler-rt_build - - if use clang; then - local -x CC=${CHOST}-clang - local -x CXX=${CHOST}-clang++ - strip-unsupported-flags - fi - - local mycmakeargs=( - -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" - # use a build dir structure consistent with install - # this makes it possible to easily deploy test-friendly clang - -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}" - - -DCOMPILER_RT_INCLUDE_TESTS=$(usex test) - # builtins & crt installed by sys-libs/compiler-rt - -DCOMPILER_RT_BUILD_BUILTINS=OFF - -DCOMPILER_RT_BUILD_CRT=OFF - -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer) - -DCOMPILER_RT_BUILD_PROFILE=$(usex profile) - -DCOMPILER_RT_BUILD_SANITIZERS=$(usex sanitize) - -DCOMPILER_RT_BUILD_XRAY=$(usex xray) - ) - if use test; then - mycmakeargs+=( - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" - -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" - - # they are created during src_test() - -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang" - -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++" - ) - - # same flags are passed for build & tests, so we need to strip - # them down to a subset supported by clang - CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \ - CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \ - strip-unsupported-flags - fi - - if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then - mycmakeargs+=( - # disable use of SDK for the system itself - -DDARWIN_macosx_CACHED_SYSROOT=/ - ) - fi - - cmake-utils_src_configure - - if use test; then - local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* ) - [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}" - [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}" - - # copy clang over since resource_dir is located relatively to binary - # therefore, we can put our new libraries in it - mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die - cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \ - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die - cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \ - "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die - cp "${sys_dir}"/*builtins*.a \ - "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die - # we also need LLVMgold.so for gold-based tests - if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then - ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \ - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die - fi - fi -} - -src_test() { - # respect TMPDIR! - local -x LIT_PRESERVES_TMP=1 - # disable sandbox to have it stop clobbering LD_PRELOAD - local -x SANDBOX_ON=0 - # wipe LD_PRELOAD to make ASAN happy - local -x LD_PRELOAD= - - cmake-utils_src_make check-all -} diff --git a/sys-libs/compiler-rt-sanitizers/files/9.0.1/glibc-2.31.patch b/sys-libs/compiler-rt-sanitizers/files/9.0.1/glibc-2.31.patch deleted file mode 100644 index ed52c67dbc57..000000000000 --- a/sys-libs/compiler-rt-sanitizers/files/9.0.1/glibc-2.31.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff -ur compiler-rt.orig/lib/sanitizer_common/sanitizer_platform_limits_posix.cc compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc ---- compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc 2019-12-11 19:15:30.000000000 +0000 -+++ compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc 2020-09-27 17:38:13.848840427 +0000 -@@ -1126,8 +1126,9 @@ - CHECK_SIZE_AND_OFFSET(ipc_perm, gid); - CHECK_SIZE_AND_OFFSET(ipc_perm, cuid); - CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); --#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21) --/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ -+#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31) -+/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit -+ on many architectures. */ - CHECK_SIZE_AND_OFFSET(ipc_perm, mode); - #endif - -diff -ur compiler-rt.orig/lib/sanitizer_common/sanitizer_platform_limits_posix.h compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h ---- compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h 2019-12-11 19:15:30.000000000 +0000 -+++ compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h 2020-09-27 17:37:29.433597671 +0000 -@@ -214,15 +214,8 @@ - unsigned short __seq; - unsigned long long __unused1; - unsigned long long __unused2; --#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__) -- unsigned int mode; -- unsigned short __seq; -- unsigned short __pad1; -- unsigned long __unused1; -- unsigned long __unused2; - #else -- unsigned short mode; -- unsigned short __pad1; -+ unsigned int mode; - unsigned short __seq; - unsigned short __pad2; - #if defined(__x86_64__) && !defined(_LP64) -- cgit v1.2.3