From d162ba1860a88062f4cd61f8b52fc303ba0b2991 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 7 Aug 2021 00:16:33 +0100 Subject: gentoo resync : 07.08.2021 --- sys-libs/compiler-rt-sanitizers/Manifest | 10 +- .../compiler-rt-sanitizers-12.0.1.ebuild | 2 +- .../compiler-rt-sanitizers-13.0.0.9999.ebuild | 5 +- .../compiler-rt-sanitizers-13.0.0_rc1.ebuild | 201 +++++++++++++++++++++ .../compiler-rt-sanitizers-14.0.0.9999.ebuild | 5 +- sys-libs/compiler-rt-sanitizers/metadata.xml | 1 + 6 files changed, 215 insertions(+), 9 deletions(-) create mode 100644 sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0_rc1.ebuild (limited to 'sys-libs/compiler-rt-sanitizers') diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest index ef3a6792e240..ed90ea3de5a9 100644 --- a/sys-libs/compiler-rt-sanitizers/Manifest +++ b/sys-libs/compiler-rt-sanitizers/Manifest @@ -7,10 +7,12 @@ DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3 DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81 DIST llvmorg-12.0.0.tar.gz 134226215 BLAKE2B f9c3ba8c58571855caa4f206fd285c9b5be66672fb0814cb8bc0964a051f57f5d35013aa1e27cbda502652b37df1ec23474129109e76a42066847860db441dbe SHA512 0cff02155c5ac0d6db2b72d60d9819d5b5dd859663b45f721b1c7540239c2fceb1f57d9173f6870c49de851c242ed8e85c5c6d6577a1f8092a7c5dcd12513b26 DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1 +DIST llvmorg-13.0.0-rc1.tar.gz 147235597 BLAKE2B 089fed119dee8a16f278cebb13808bd5a95629cc87ebee3050225cc041b78fee51acacc5bcc913d4a99e830bfe5774b19a04a845293c5087dd2a8c9d94d2fde9 SHA512 6e307e2c2dcb7ff41d11ee29d69f41c0ef55f200999847a3a924a2e773fc9c2160015746789af8b723c628bd232f97fce63370209bd0065491d80b0cc0017e85 EBUILD compiler-rt-sanitizers-10.0.1-r1.ebuild 4513 BLAKE2B daa067db497d6548d10041d7a2e99aca314c0b8c136e045d799f1205df135c04af2bce717e0fa281b67a6ef6bbf95fad014d1ae354eada02b2c79884af8e7576 SHA512 3579b322368ca2f350d2d373f6addc871aa8046d80dfead13d90a6564f288f35244bd5957b96d743356af7aa9560e3ca8ebb5863eea7c835fd8648e8b0fb4d8e EBUILD compiler-rt-sanitizers-11.1.0-r1.ebuild 6036 BLAKE2B 30bbe8f96289a6a4e66367728d74c3cd4631a11273dd0b2a597251c9742205577d4561c92ca9ba15d1afa7a58cb049441828b09b1d77ab1bee4d4cc6227d2673 SHA512 6755070c159402442b3e02ab21a9415313ddf82c6c54bd0a171b987c155bd85f6d0882d4146d02695fc4c157892106b9d1678235f92c28d7fe86fe8e9bb9486e EBUILD compiler-rt-sanitizers-12.0.0.ebuild 6081 BLAKE2B 7b72248427b99b3210a6aaab4d2d335c66d113bd3b473f16e660396009d1e1444241748d40b2d91851433754227fce0a893132dc668d43c7a8e962ddb83cd635 SHA512 ad69ec8901fa6273498b2b249d87c7546deeb7c294a8625fb3568faad9edaa2dd55443c00686ce18008201fecc3cba120e6282c2cec056db87af4440c920e293 -EBUILD compiler-rt-sanitizers-12.0.1.ebuild 5958 BLAKE2B 817b71b56351dd4ec5fd1b812949b5f02826b6d1122f7ab9d40975aa65f7ff8e8f068bbe4eb111ac579686485be06cf386f621386993cae1c628f1636bed3ab6 SHA512 0ba1217f5949313bd857fe62c0a773d587e629c640eee4d39c2db0a2b558db4398eb39b73cb52dfa0ec2eb5eba9b108fa9c4a219ebd9a979e894eb503d33a3bb -EBUILD compiler-rt-sanitizers-13.0.0.9999.ebuild 5886 BLAKE2B 63ff0582aae1fb2ec007553d3d0800f9caf900e95299fa8571d5151c2f029696391af2fab3358b5b378c1ae5fe6de4a60136c09b3f8f72435b92d353e948c24e SHA512 c553a0cd3d4849af21324eeb1498aee728bba3705d00c734f6f55ad6d0354cafd3078addfa691be494bf79b902fc8c669cd76b13a45868ddcb00ea196cd5454d -EBUILD compiler-rt-sanitizers-14.0.0.9999.ebuild 5886 BLAKE2B 63ff0582aae1fb2ec007553d3d0800f9caf900e95299fa8571d5151c2f029696391af2fab3358b5b378c1ae5fe6de4a60136c09b3f8f72435b92d353e948c24e SHA512 c553a0cd3d4849af21324eeb1498aee728bba3705d00c734f6f55ad6d0354cafd3078addfa691be494bf79b902fc8c669cd76b13a45868ddcb00ea196cd5454d -MISC metadata.xml 1341 BLAKE2B 27ba2b57b7ba21538680b5535aec8b0e8e772a040b25ac8c9285765ed00a485a01ce6dd47c32686c7d162d072f4d6d7d2e1a790e9bd867b61a460b01ad79bade SHA512 909a922e1b0e9649534d88bb7692b1d1d7a9d3d539a4926054dac834d672da065cfea5b2aab02dd23f2a7b0dde0eb0b10ae453990c3ecf99ec20f6a2d2bdbac6 +EBUILD compiler-rt-sanitizers-12.0.1.ebuild 5957 BLAKE2B ca70b1bcb71e5219a95cb27cead388818395c6b2f55cb775e3007be1c2c92cfeebf08718aefe27a0410bc623fd4b923d50fa9bd92f9e7b1614669d8809d5e11b SHA512 dd6c020c00eb22177c1db9a38ca15f016e91bd675a7a1832c972643f1d8317d1c29149ac0bfa78d41aa12cd69d58fc54c966af0d9b2852d7dad8e9959d6e9c02 +EBUILD compiler-rt-sanitizers-13.0.0.9999.ebuild 5933 BLAKE2B 74922d3c2fec0c97e72748142c4b3f4ebe38b7e488f1fa92593f5399efcbe4629afcf9587a8d5adbc68034c62110912c8882bc88deffdad4963d5841f6147b09 SHA512 86d8343941cb32e6fd8c3c8590c4e975fc40b3dc87dbb27c4b01db16c52ce68ca430dd90365ae8972e16c016a2ad780b6c569738856ef20081480832a67192ea +EBUILD compiler-rt-sanitizers-13.0.0_rc1.ebuild 5933 BLAKE2B 74922d3c2fec0c97e72748142c4b3f4ebe38b7e488f1fa92593f5399efcbe4629afcf9587a8d5adbc68034c62110912c8882bc88deffdad4963d5841f6147b09 SHA512 86d8343941cb32e6fd8c3c8590c4e975fc40b3dc87dbb27c4b01db16c52ce68ca430dd90365ae8972e16c016a2ad780b6c569738856ef20081480832a67192ea +EBUILD compiler-rt-sanitizers-14.0.0.9999.ebuild 5933 BLAKE2B 74922d3c2fec0c97e72748142c4b3f4ebe38b7e488f1fa92593f5399efcbe4629afcf9587a8d5adbc68034c62110912c8882bc88deffdad4963d5841f6147b09 SHA512 86d8343941cb32e6fd8c3c8590c4e975fc40b3dc87dbb27c4b01db16c52ce68ca430dd90365ae8972e16c016a2ad780b6c569738856ef20081480832a67192ea +MISC metadata.xml 1386 BLAKE2B cf5470df8e8b812b622d707ec7f6a8ec1e120fd24dea4ee52d07747f8b20600618e111002c6cb75d6f0fb209d6b8300e0ea3ada5441a8d0609145084079a0794 SHA512 7ed2225dfdd77711b46eb153149680fe340afcb2d57b912a59daf11d240fc1aad552b386ae41251b4cbc84ba9352dae0e1bb123274b0c1cbd300d42605424ecb diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.1.ebuild index 57d1ab1f3837..dd24d7b58862 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.1.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.1.ebuild @@ -11,7 +11,7 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="$(ver_cut 1-3)" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos" +KEYWORDS="amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos" IUSE="+clang test elibc_glibc" # base targets IUSE+=" +libfuzzer +memprof +profile +xray" diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0.9999.ebuild index cc239e8feec6..86e4d10a7c76 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0.9999.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0.9999.ebuild @@ -14,7 +14,7 @@ SLOT="$(ver_cut 1-3)" KEYWORDS="" IUSE="+clang test elibc_glibc" # base targets -IUSE+=" +libfuzzer +memprof +profile +xray" +IUSE+=" +libfuzzer +memprof +orc +profile +xray" # sanitizer targets, keep in sync with config-ix.cmake # NB: ubsan, scudo deliberately match two entries SANITIZER_FLAGS=( @@ -23,7 +23,7 @@ SANITIZER_FLAGS=( ) IUSE+=" ${SANITIZER_FLAGS[@]/#/+}" REQUIRED_USE=" - || ( ${SANITIZER_FLAGS[*]} libfuzzer profile xray ) + || ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray ) test? ( cfi? ( ubsan ) gwp-asan? ( scudo ) @@ -126,6 +126,7 @@ src_configure() { -DCOMPILER_RT_BUILD_CRT=OFF -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer) -DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof) + -DCOMPILER_RT_BUILD_ORC=$(usex orc) -DCOMPILER_RT_BUILD_PROFILE=$(usex profile) -DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}" -DCOMPILER_RT_BUILD_XRAY=$(usex xray) diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0_rc1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0_rc1.ebuild new file mode 100644 index 000000000000..86e4d10a7c76 --- /dev/null +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0_rc1.ebuild @@ -0,0 +1,201 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..10} ) +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 +orc +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 orc 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_PATCHSET=9999-1 +llvm.org_set_globals + +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 + + # 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_ORC=$(usex orc) + -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-14.0.0.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-14.0.0.9999.ebuild index cc239e8feec6..86e4d10a7c76 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-14.0.0.9999.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-14.0.0.9999.ebuild @@ -14,7 +14,7 @@ SLOT="$(ver_cut 1-3)" KEYWORDS="" IUSE="+clang test elibc_glibc" # base targets -IUSE+=" +libfuzzer +memprof +profile +xray" +IUSE+=" +libfuzzer +memprof +orc +profile +xray" # sanitizer targets, keep in sync with config-ix.cmake # NB: ubsan, scudo deliberately match two entries SANITIZER_FLAGS=( @@ -23,7 +23,7 @@ SANITIZER_FLAGS=( ) IUSE+=" ${SANITIZER_FLAGS[@]/#/+}" REQUIRED_USE=" - || ( ${SANITIZER_FLAGS[*]} libfuzzer profile xray ) + || ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray ) test? ( cfi? ( ubsan ) gwp-asan? ( scudo ) @@ -126,6 +126,7 @@ src_configure() { -DCOMPILER_RT_BUILD_CRT=OFF -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer) -DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof) + -DCOMPILER_RT_BUILD_ORC=$(usex orc) -DCOMPILER_RT_BUILD_PROFILE=$(usex profile) -DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}" -DCOMPILER_RT_BUILD_XRAY=$(usex xray) diff --git a/sys-libs/compiler-rt-sanitizers/metadata.xml b/sys-libs/compiler-rt-sanitizers/metadata.xml index b1905bb2cb09..bfdf4ba33fb5 100644 --- a/sys-libs/compiler-rt-sanitizers/metadata.xml +++ b/sys-libs/compiler-rt-sanitizers/metadata.xml @@ -9,6 +9,7 @@ than the default CC/CXX). Build fuzzing runtime. Build memory profiler runtime. + Build ORC runtime. Build profiling runtime. Build sanitizer runtimes. Build XRay runtime. -- cgit v1.2.3