diff options
Diffstat (limited to 'sys-libs/compiler-rt-sanitizers')
-rw-r--r-- | sys-libs/compiler-rt-sanitizers/Manifest | 10 | ||||
-rw-r--r-- | sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.1.ebuild | 215 | ||||
-rw-r--r-- | sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-14.0.0_rc4.ebuild (renamed from sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.1.9999.ebuild) | 2 | ||||
-rw-r--r-- | sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-15.0.0.9999.ebuild (renamed from sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.1_rc3.ebuild) | 4 |
4 files changed, 224 insertions, 7 deletions
diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest index 5e3723091c9f..b7c5762e66b7 100644 --- a/sys-libs/compiler-rt-sanitizers/Manifest +++ b/sys-libs/compiler-rt-sanitizers/Manifest @@ -2,17 +2,19 @@ DIST llvm-gentoo-patchset-11.1.0-3.tar.xz 5984 BLAKE2B 89056fb8e82c7a29ae76c643a DIST llvm-gentoo-patchset-12.0.1.tar.xz 5280 BLAKE2B 963d005bc7b636570be90eb841ac5bcaeb927538cc7de27683167111a17d6496677c7517de2ecfaf14b5d8ac22bad357be490b8a2ed9aba502fd5f447ecc99e9 SHA512 fc7c38e671555751650299c3a8bee44d5c7f26e11b68d5538c507fb7fe9ff2d349bdcd43bce90a448a747f082d523b3849d6bcda5e3ae2e998edcb926d6aa249 DIST llvm-gentoo-patchset-13.0.0-r3.tar.xz 10176 BLAKE2B fc5825a4bd3b85bd9c970901e5e036cc4c928373495a8a6f63c7f4531c7f52575d06f80dfbd80671d9f0fcd32d5c48d96f5961602b024c7a936362aeba8a612a SHA512 2289eef3f6301ade2e1110ebc4b66ad3db91ed10868ca7296a29c55667007e06739b01f38c0783bb2c56deadfb8a04605c370df9c5a4c6bc9aea9382e6ed52a5 DIST llvm-gentoo-patchset-13.0.0.tar.xz 5012 BLAKE2B 6760c78c086aaf6629143fd920b0a2c68cad9278628fbea8164dfeb59db95984a5b5d6b3505b510c697e8c95bf8d2be782c6b73c01622d52f2da9b07ecff39e0 SHA512 7764d49343b795b6bebae64f646ba27e3e6cc2a20b8a1aee645ce0d8474633c34acfbb73c08546fee415755dd4ea5a98c1d84db5e394cf5f4fc802eb61148ab6 -DIST llvm-gentoo-patchset-13.0.1-rc3.tar.xz 4808 BLAKE2B d8ed3ae424914437413e2e8c029880072e93d79ca79b842ad59451df46594c9b0d73ee5d49d3b65c4c7a40c86b2e0d43501ef106aea7c481f22425a5245a3411 SHA512 10430a720b120a340a681fa435a7f050741c75270607e3f5214bf829313d274c11f019f1ac072857dc5d7f868e6eb013932d1c94446e8cb2e151ac818a081914 +DIST llvm-gentoo-patchset-13.0.1.tar.xz 6288 BLAKE2B 899222b962486e924e4f8a2b574d285531a3f87af9385ff68c81db92aa224a0cde6d4ee049b5405056bedb4b232b50e1d5840024071a4a215f6311853304c92d SHA512 b2805337f1deca626768a44c5e7ac9ed16e0c31bead1647d44a493a8123c1b8e8f1c8ceee3536bcc6fa87fdd3fcec408229f701adf30eff07e7ef9889b847b01 DIST llvm-gentoo-patchset-9999-1.tar.xz 4032 BLAKE2B b9413484dafed8ae0c68c2c164b45fd07bb8d5d0898f03abe118fd2120ffcb1fb6c949de9649a97c2e8105f24b9d131a725c67c0a502ca4d4d192c1a0d65f49d SHA512 e64449eeaf756c5bd945109937b84ba4bd8a015222bd792d39cf3947871e87571a4ca57814790e51544cb05ad4c2d1f044e818e4caaac7c2e2a02cb1aa290fcc DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81 DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1 DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2 -DIST llvmorg-13.0.1-rc3.tar.gz 147302323 BLAKE2B 9ac2f97568062d7dd618295a68d6e14898fcd69e2bb66290b999ceb8c12132371f4e9b59d8ba2b252e5e5cb249045676b24fc50c117b2afae20abab98f426582 SHA512 88a04ad02af2d41ec21c7a62bad21ee0e627b7276a16795875afd062ed29ac7fb4aadec5b5e48785a6502c9fd797a4b67d648a21f193c9f7602112870b10a3d1 +DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f +DIST llvmorg-14.0.0-rc4.tar.gz 158082013 BLAKE2B 0e717898d8f1ed160e525a68aba56a84b7d31856ea72fdb8fa02e863c5a2074245a38d4a4aa7d178beab1ea64aa92d0ba9dcad4373ebb03868070bf718112107 SHA512 a942848aa5042b97bab6d0d5bcee11ea2f85f1244d7eaadb8f7000bf104b2160e6034c04e3755501dd178bc99c26669cf4aca40edb4bba598fdde6bcf3f40ddc EBUILD compiler-rt-sanitizers-11.1.0-r1.ebuild 6042 BLAKE2B b2e497920258f581395f794ac977615e42e153ea966fead3a7ce5fbd9c93831ec807f4b711ffc41a1ecb84214e3bd386ffc038b549bc9ade691b7f843a5032a4 SHA512 05092de752ccb3a1832eb834315a63e161b52a7bd4a52ec77b24adeff9611368fe1166bf7bd12b2111e15364a44d2573527111641d97b9e989e593342a4fbc9a EBUILD compiler-rt-sanitizers-12.0.1.ebuild 5959 BLAKE2B acfa1240b3ffa450fe5ede50a6d8bc9d32b06bea46da57f82c004fbde8e69693242037f9571bf885f56d16d3ead4711402f1c3a2bf65fb42741ea95b12a1baff SHA512 cf095eeaf547d431d60b11f147e5e8a03e3659a3b56ec98be4af3fdbd4cb3ed16891eb8066187bff27613f0c6a37d30d08725df95419b515f1038087c149ad82 EBUILD compiler-rt-sanitizers-13.0.0-r1.ebuild 6162 BLAKE2B e9f41c36aa12ed0257e3fa3298a5504e13243c1f73a0c4e425a9660751011f05856d09f72eb6d6c5fe9c901b670173931899858420352bc63627df69feccb975 SHA512 b134ad7badbd4f6540f8d683c5a0b0b583702879465caa16a13ab0f528328d7db92ed214dae6698371671fec582429032b0d7dbcdcefa94721395f4d366de60a EBUILD compiler-rt-sanitizers-13.0.0.ebuild 6154 BLAKE2B 97eaca6637d5f368d5f21e6640486734d1fb60fca89cc330ab19b7d129c425f8eefabfa225711a624018972b403329434e44e55fd1f69cf148d2b0d642ba08ae SHA512 31c7c45eec392795267f8ca2efa1f2894e183ef4fc5f575fbc531a60ebee3c90c4bb4a551f82a6723a3010ac5196a8c83cbd1b7e49704d9b9cfbe1cc68753cf9 -EBUILD compiler-rt-sanitizers-13.0.1.9999.ebuild 6267 BLAKE2B b7ecec747a68860103387e1cae25abf3a1ac58bfbc50ee5c688eff80db144e36d2ae6f8ba799b8dbaf20f28c8c4d84059db61666bf99b3d54c462178c610d35e SHA512 75abb9c5f490c94d5f405fc77420996977fe471c4fbf8948ef9cf0c731bf4a418f6bb8697b1426e6e30b804dfd5f5a1c88af69f47ba944ab0cd5e0b99c650e5b -EBUILD compiler-rt-sanitizers-13.0.1_rc3.ebuild 6270 BLAKE2B 060af26424afc513543999476cc0dcecd68bc99dd69c651d7ba79c87cc8be4dd4d1639cb8fa0247e79c9eac55df60d17a634a6681fed277f50fcdb5cfa254ff4 SHA512 33e847e8cdffcf2bfe45f88797c944eac17d4526ba7a3dbb1ac4ecf8ae559e91b46a03eb540d164ec3a03c6f6acf38984e8e8e5835d0cb311bb6e01781f8196a +EBUILD compiler-rt-sanitizers-13.0.1.ebuild 6339 BLAKE2B 0b59bece9f63cbbd363b8724dcff68626d6117446d0a21972a8147e7794873ae19841ea045b140c5c8d632f01d219f80211a371415b91a6acc58257726f8c437 SHA512 f53ac3fbc24fd119f3809563c772d72cfc0702d935cf5172f9876a5edf215f41f3b18249f2f3366e365a7828ce4bbd08389bc49ded65ec6cd7309e42ea16fcf2 EBUILD compiler-rt-sanitizers-14.0.0.9999.ebuild 6273 BLAKE2B 74cecea17e26529cf75ada6ba68c169d587033de3320ed5ed5f31ae85935cff691e9b025011338b34ea50d1a747f8fe2f3fe25874072cfb328704906d0c298bb SHA512 701c5f5d70c20d7cd1276763d7198438dc53772c2b2713be82a96b05d5ef3797d2866eb94b65b16d2a0e3f842caffe4578c12dc3e775368ebc0d7afc8811be0e +EBUILD compiler-rt-sanitizers-14.0.0_rc4.ebuild 6273 BLAKE2B 74cecea17e26529cf75ada6ba68c169d587033de3320ed5ed5f31ae85935cff691e9b025011338b34ea50d1a747f8fe2f3fe25874072cfb328704906d0c298bb SHA512 701c5f5d70c20d7cd1276763d7198438dc53772c2b2713be82a96b05d5ef3797d2866eb94b65b16d2a0e3f842caffe4578c12dc3e775368ebc0d7afc8811be0e +EBUILD compiler-rt-sanitizers-15.0.0.9999.ebuild 6273 BLAKE2B 74cecea17e26529cf75ada6ba68c169d587033de3320ed5ed5f31ae85935cff691e9b025011338b34ea50d1a747f8fe2f3fe25874072cfb328704906d0c298bb SHA512 701c5f5d70c20d7cd1276763d7198438dc53772c2b2713be82a96b05d5ef3797d2866eb94b65b16d2a0e3f842caffe4578c12dc3e775368ebc0d7afc8811be0e MISC metadata.xml 1330 BLAKE2B 8381c36fb0ee37358cebacf512ee2a0ff6f2c0fc8e05544d9dc1bb1e11bc53f4196c2ecc6c8eb66c833f266c8d12da2c92a5f0b94cb3404397f925f9ebfc2a72 SHA512 6ea6159eb0929dc9f009ab326295549db329f7594dd5ff82e255238ed1fb17e3e8909079c915c6ae4829bb853666456772d17fa2078a332f6340807d6cd4f20e diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.1.ebuild new file mode 100644 index 000000000000..c14d9aa7edd5 --- /dev/null +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.1.ebuild @@ -0,0 +1,215 @@ +# Copyright 1999-2022 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="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" +# 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 + virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]" +BDEPEND=" + >=dev-util/cmake-3.16 + clang? ( sys-devel/clang ) + elibc_glibc? ( net-libs/libtirpc ) + test? ( + !<sys-apps/sandbox-2.13 + $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]") + =sys-devel/clang-${PV%_*}*:${CLANG_SLOT} + sys-libs/compiler-rt:${SLOT} + ) + !test? ( + ${PYTHON_DEPS} + )" + +LLVM_COMPONENTS=( compiler-rt ) +LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest ) +LLVM_PATCHSET=${PV/_/-} +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() { + # 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/${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 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_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-13.0.1.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-14.0.0_rc4.ebuild index 6a19654cbc0a..12e5eb2d01e7 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.1.9999.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-14.0.0_rc4.ebuild @@ -49,7 +49,7 @@ BDEPEND=" ${PYTHON_DEPS} )" -LLVM_COMPONENTS=( compiler-rt ) +LLVM_COMPONENTS=( compiler-rt cmake ) LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest ) LLVM_PATCHSET=9999-1 llvm.org_set_globals diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.1_rc3.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-15.0.0.9999.ebuild index 203bcf1a2488..12e5eb2d01e7 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.1_rc3.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-15.0.0.9999.ebuild @@ -49,9 +49,9 @@ BDEPEND=" ${PYTHON_DEPS} )" -LLVM_COMPONENTS=( compiler-rt ) +LLVM_COMPONENTS=( compiler-rt cmake ) LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest ) -LLVM_PATCHSET=${PV/_/-} +LLVM_PATCHSET=9999-1 llvm.org_set_globals python_check_deps() { |