diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-12-18 09:41:23 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-12-18 09:41:23 +0000 |
commit | d93ba9788a6ad1e5da2bf47e804456ded6d5c65c (patch) | |
tree | e01c10bcfe477cecf1770c8a8186e4a5344057b9 /sys-libs/compiler-rt-sanitizers | |
parent | 7bf32644d8b70a318475609992d8e4853ec4ec0e (diff) |
gentoo auto-resync : 18:12:2022 - 09:41:22
Diffstat (limited to 'sys-libs/compiler-rt-sanitizers')
3 files changed, 220 insertions, 2 deletions
diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest index c6ca7ff933e8..e0626753e88d 100644 --- a/sys-libs/compiler-rt-sanitizers/Manifest +++ b/sys-libs/compiler-rt-sanitizers/Manifest @@ -12,14 +12,16 @@ DIST llvm-project-15.0.6.src.tar.xz.sig 438 BLAKE2B 3c97dbd55667f52dad964ef71257 DIST llvm-project-959c9cc7acf4d0aa433f2436e2a45b782e18022a.tar.gz 171575300 BLAKE2B 090d41a8913f8e061d297e66ca653d95e18b8da744464d7085d7a199c0a444753a82b6ff6503e142aec81be01b419323cdbe3709497738df74afa886d69fd63d SHA512 fc3b26e148ead7a07b4d1509909a42712a43b179da435b052c26a237b0d2ae88c3c8d76eaa93c415be1ed0f0b5fb55e0ad92f427a18d70bc9634a6e7d1b6a4d9 DIST llvm-project-d5987fe324fcaedcea12914d6f9644cc5329f364.tar.gz 172157522 BLAKE2B 3c201380e727f7db53d61ff7c411b85aef8b17f086bca0cf3e758284a92a9ced298584e6f92ac6a35f30231d59c916bb98d41a8939f9b1103996c9e09df32ec2 SHA512 dff559b1518bbf9c469a2f4624ba9e83d81df2f08223afc696fa7f3dc9fe1c0d4a17346db8946fb56806e12aa7cbddda8df05b032ffe29dafd8a66c630de0016 DIST llvm-project-e99edb92356b5ba078b5bc4d5846770414586a1d.tar.gz 171822327 BLAKE2B cdaa704c9f238f34751b92df92f8a767b1204f868dfd8a6f1eb3eeacaaf9c4b63c55a7c0534af124fddb65cf80263f72b79190696c8077e2990984a84a040f2a SHA512 37f45a56d6086df60c9832b75da3b2d78b8ec0fe094f07d41695f0565e4de0c13e460b1fef495864f07300d41f5b32769f0862b0fa5d53c0db9a0ccec1a09072 +DIST llvm-project-fb792ebaf2114ad11d673cf891ae560e2e604711.tar.gz 174312496 BLAKE2B dd7f30b911ef5049e9e2bff7b2768e31b48b1f4c7acaf159f535fe3deb5aa6630fdf7857c83fffcda1119a38a52101490d2b6cb41cb295bb7dd85cde0445b7ee SHA512 bef15e7d82a2faf8be24f784d3d34ff9b21c8f17256879587ea5471011a32a1eb885e1b020da55aa096f2e0b5fe4bcf9fe8f0f5b5d34f5f386c48899c68fb7d1 DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f EBUILD compiler-rt-sanitizers-13.0.1.ebuild 6369 BLAKE2B 4e8a715cd19dd39087fe7d6cad9e30a7e130c69bde12ea382fc748cc152099607c23b75915c644785820ded954eaba31779f7c58b63a71255f9c6b610afcee7d SHA512 f5a680a5de09feecde1a3038ab185cc3b321eb2dc15b5841cd58863323fd6da727307c44127d2af5077ce2b17744ee5d3f8a17dd3bceea71b1dec2a13555dd66 EBUILD compiler-rt-sanitizers-14.0.6.ebuild 6381 BLAKE2B 010ce621c56c1568eaddeb6f4af6e680f2596106768e3b40bffd3c221df20b565c565793ff14a46b2a96b080a696a9217be0f547c2e85430e9031bd86adc2b90 SHA512 d68b96a7458c8b0d1946523a7c1b20e413de38b7f53bd87b8729103935cdb9ad8fc38863138ba36ffc8da57e0ddcf591c7deeb23fba0d76003adea978b262e37 EBUILD compiler-rt-sanitizers-15.0.5.ebuild 6433 BLAKE2B 25dfdd2696b3c861dce89b740c12a382e6eae2a726d6302b7d2ccb609721be4add79169e129a917a88e8396f90112b2ec96e77eb7e1f64f4e65395d54f964dc0 SHA512 8418f40cd19e862ecf69475aeb26aface57f1e548de75760f474d4e03d52d6df3926f7a68eb11460d369b1465580c01c7e47c59b8b3d08571b60f454e5cab46a EBUILD compiler-rt-sanitizers-15.0.6.9999.ebuild 6363 BLAKE2B 640625391bc73444ed357c25028b641351e5e4f2661271e2d762a9d0a8bbf70a916018c82ddabb25f95679121eea1f35726e011f12d99bb88f1aa6aafef9f5ba SHA512 0c9b3e50c61cb6129fcc20e2fc08f7d32fd2ee180d2bad3e6ed9c7b71819320af9c74457332afac8c14b476d18b47ce7a353813e7bb29e0a568771d314f9c46a -EBUILD compiler-rt-sanitizers-15.0.6.ebuild 6437 BLAKE2B 5acf31e76c40eb3a2d5d7071a7ca6f6ad3f02678f311893dc72f6937e52883c093cac6fa87a34909f1c07e51df181b90c810cbfb8688b85aa6d3596ea9bdef34 SHA512 28a70d9831f5d96b25f74b2e4acf81bf23a230c0febd1c75d7fa1370a28249cfafb21f610c180d1970c5c01746dd5ed19229500faf18cc02675e76d46185e88b +EBUILD compiler-rt-sanitizers-15.0.6.ebuild 6436 BLAKE2B 8f595efb33bbb3e5f70192e7131f6dedaa5668a637ccf35e36a69306b410f34564d006cf8ac9d99f7f21b7340f66c0c3e51c9a7489bc042f9a180d2aa2e11a28 SHA512 7266a9a049a1e6ced4c7d9b03520cab33ac0491cf1cdf1a987aa00d60406e3dbfba928f951a5a78f87537649906b6beafcd98a6db02ef15f10b3bbc9bb8db245 EBUILD compiler-rt-sanitizers-16.0.0.9999.ebuild 6248 BLAKE2B 9845329e29b14c13818de01405cf3932c08c903e562b435502e0da0d3bf269adbb60b320c5f362dd0374123fc57f3d5e90c35a2b755ea129306b861b60e7c2b8 SHA512 2e7c8b7b1020602b1489dde3b0b1993059f1cdcc6d94f6087ddb9d4ce71e7daeed507bdc62fe8a8a0dce59edd8977a9c02e2ffa0f50edbcd2cde95f74dc728e4 EBUILD compiler-rt-sanitizers-16.0.0_pre20221126.ebuild 6275 BLAKE2B 793bc932cd71141515504b6532c8eadd6066727ef4dd2dd7ca0df91ca6afcc652e5425d16bf8e6f4e6f40d6f9955ef0508db4c3713a083f99d44d02dfce40e4b SHA512 3c5e3840467c908afdc52e8fe549d1cc25e76db1afed24ac312ed765cf77a0bbb2fcdf4fb0f64114bd1c89d9552299ce4467fb7e69f089c546d7a2353653e425 EBUILD compiler-rt-sanitizers-16.0.0_pre20221205.ebuild 6254 BLAKE2B a9959d562d550af23e4af7c4a3d83d66675e6bbdf1ea9e4139b3cadd0c4f4960e407ff3f24f590cb470525e3bd355b2be21a9444593631a1df8b0ef675c9d568 SHA512 c752234f7b2d1b5f9a743a93ea27424c472da4cdeec3b7172f5746bc3c40c0e3a7a7ddaafe34da58bc2ae70dabc8952d14884b04a5a888b7abd083dfdfa55ff5 EBUILD compiler-rt-sanitizers-16.0.0_pre20221210.ebuild 6254 BLAKE2B a9959d562d550af23e4af7c4a3d83d66675e6bbdf1ea9e4139b3cadd0c4f4960e407ff3f24f590cb470525e3bd355b2be21a9444593631a1df8b0ef675c9d568 SHA512 c752234f7b2d1b5f9a743a93ea27424c472da4cdeec3b7172f5746bc3c40c0e3a7a7ddaafe34da58bc2ae70dabc8952d14884b04a5a888b7abd083dfdfa55ff5 +EBUILD compiler-rt-sanitizers-16.0.0_pre20221217.ebuild 6254 BLAKE2B a9959d562d550af23e4af7c4a3d83d66675e6bbdf1ea9e4139b3cadd0c4f4960e407ff3f24f590cb470525e3bd355b2be21a9444593631a1df8b0ef675c9d568 SHA512 c752234f7b2d1b5f9a743a93ea27424c472da4cdeec3b7172f5746bc3c40c0e3a7a7ddaafe34da58bc2ae70dabc8952d14884b04a5a888b7abd083dfdfa55ff5 MISC metadata.xml 1412 BLAKE2B 75675507000fa6a6b8182e6b45a08a2716ae7fb9a7e3428dc8420464e4c1d1bdb5bea62cc2f553c579de5a4faa752b35cb3529d980fb07a055ff4ddf6e752707 SHA512 f05ea5168b923db72f4f5b53e9b748ebbcdae9eff09d86323313055933b47fc0089e1b2d73cd997d73dcfb2dca032344955816425fbddc09d27ca751463aadbb diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-15.0.6.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-15.0.6.ebuild index 9ee4580ef7ef..bdb080fc05e8 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-15.0.6.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-15.0.6.ebuild @@ -11,7 +11,7 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="${LLVM_VERSION}" -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="+abi_x86_32 abi_x86_64 +clang debug test" # base targets IUSE+=" +libfuzzer +memprof +orc +profile +xray" diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-16.0.0_pre20221217.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-16.0.0_pre20221217.ebuild new file mode 100644 index 000000000000..0615c74fe85d --- /dev/null +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-16.0.0_pre20221217.ebuild @@ -0,0 +1,216 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..11} ) +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="${LLVM_MAJOR}" +KEYWORDS="~loong" +IUSE="+abi_x86_32 abi_x86_64 +clang debug test" +# 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=" + !clang? ( test ) + !test? ( test ) +" + +DEPEND=" + sys-devel/llvm:${LLVM_MAJOR} + virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?] +" +BDEPEND=" + >=dev-util/cmake-3.16 + clang? ( sys-devel/clang ) + elibc_glibc? ( net-libs/libtirpc ) + test? ( + $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]") + =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR} + sys-libs/compiler-rt:${LLVM_MAJOR} + ) + !test? ( + ${PYTHON_DEPS} + ) +" + +LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake ) +LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support third-party ) +llvm.org_set_globals + +python_check_deps() { + use test || return 0 + python_has_version ">=dev-python/lit-15[${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_MAX_SLOT=${LLVM_MAJOR} 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() { + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + + # 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/${LLVM_MAJOR}" + # 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/${LLVM_MAJOR}" + + -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 amd64; then + mycmakeargs+=( + -DCAN_TARGET_i386=$(usex abi_x86_32) + -DCAN_TARGET_x86_64=$(usex abi_x86_64) + ) + fi + + if use test; then + mycmakeargs+=( + -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/${LLVM_MAJOR}/bin/clang" + -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/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/${LLVM_MAJOR}/bin/clang \ + CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/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/${LLVM_MAJOR}/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/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die + cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \ + "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die + cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \ + "${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die + cp "${sys_dir}"/*builtins*.a \ + "${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die + # we also need LLVMgold.so for gold-based tests + if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then + ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \ + "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(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 +} |