diff options
Diffstat (limited to 'sys-libs/compiler-rt-sanitizers')
4 files changed, 152 insertions, 28 deletions
diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest index 6d549df22727..5d75f8a22e1e 100644 --- a/sys-libs/compiler-rt-sanitizers/Manifest +++ b/sys-libs/compiler-rt-sanitizers/Manifest @@ -5,10 +5,12 @@ DIST compiler-rt-8.0.1.src.tar.xz 1954204 BLAKE2B cbba1d5fb37385116920da39dea267 DIST llvm-7.1.0.src.tar.xz 28313784 BLAKE2B b78d9a7fc5ef6e352e77d339e5c4eef5ccedf67c05e7abd949e72619aa8a5ed65e7e5e2008354be8e7916d75581719b99f34227838fcc86c5d0080913c2fb22c SHA512 a7dbd5693d1f2dae6b6e52893a100f9349cbfcfb25c5fdcad46364acbff0dbd3573f8fbc026c68eb9fd56335198aa94b866cc3dd7ea0cbd2cbfb5f8fe3444a7a DIST llvm-8.0.1.src.tar.xz 30477608 BLAKE2B 4319c837b36111401e3b0f9659b8d875c89463bcc7816df1aefe1e3ff989860bbaa92504718f8e15416cfd9f3491c13777cd5cb661877b237b342b0e515b93f5 SHA512 82e120be5cabdfd5111aebbea68a663fe229c8861d73802d6ab09a3bf48f60de333e07e61f8fb61beaa14ac2bea24fcd74fa6f761acaf62469f536b79fcb1e16 DIST llvmorg-10.0.0-rc1.tar.gz 120755822 BLAKE2B a729d37d96ba498cb865c6f708734dccb796b2caabb69167b9aa3b0e12c788f2a5980a048b99d5603da3d26af909fb31f406b4f4743cabae56c45f829a7bf695 SHA512 27137fc700971147c00ded6787eaae9f0bcf98c938fe227a5a559b38d983736f3d086f4ff6772d802c5f48a7d97a97c293261e4af88fcb5a720693b9cb5a4f02 +DIST llvmorg-10.0.0-rc2.tar.gz 120795019 BLAKE2B 6e701eddbd2313e777c7b37dff8455a08d3c599d01055b60afc0319373d4709deb429aac6bf9e80c4d2e2ab8ade03bf5b398b6ccd8882e4bde608d10cdbf2284 SHA512 ee571c9258a2d9fc411964f56b0b92b2e7134349ed21dbe7963eb61ef65da506e0c4f7c69259a3b6cecec23f55d24636608287ee4457ee667031e141f8f09aae DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59 -EBUILD compiler-rt-sanitizers-10.0.0.9999.ebuild 4777 BLAKE2B d1dd91d574ac9e009c064d3b7edcfbf2065884cd455db572a2ae294bdac6384176d778c002930309ae51bef925aa4c60a1b538655fa8c4581dade355c1efe47d SHA512 e8c297256cf1f74c531c17019c3f6664881e5d9263313d56e4b63abd8d922d48471185ecf1a255605e0194769c2347bb3f4676891c873dbed9cfa096ca1f2f16 +EBUILD compiler-rt-sanitizers-10.0.0.9999.ebuild 4481 BLAKE2B 3ddcb48c12169942e05ff5cb84daa5af199783913d0f5e55d19819b42a0dbe1c840ac35e1ba2e790749d8ac1ebbc37d7e8265c0db0499b88979500e59430aa26 SHA512 bd03f699f0a3635c88d4337a4182a8c3345e19262aa6bc7933143b3a8c51326f51278527c60c9f3a27e69079213be2e7f167aa595d1864dd5b61edada268705b EBUILD compiler-rt-sanitizers-10.0.0_rc1.ebuild 4777 BLAKE2B d1dd91d574ac9e009c064d3b7edcfbf2065884cd455db572a2ae294bdac6384176d778c002930309ae51bef925aa4c60a1b538655fa8c4581dade355c1efe47d SHA512 e8c297256cf1f74c531c17019c3f6664881e5d9263313d56e4b63abd8d922d48471185ecf1a255605e0194769c2347bb3f4676891c873dbed9cfa096ca1f2f16 -EBUILD compiler-rt-sanitizers-11.0.0.9999.ebuild 4777 BLAKE2B d1dd91d574ac9e009c064d3b7edcfbf2065884cd455db572a2ae294bdac6384176d778c002930309ae51bef925aa4c60a1b538655fa8c4581dade355c1efe47d SHA512 e8c297256cf1f74c531c17019c3f6664881e5d9263313d56e4b63abd8d922d48471185ecf1a255605e0194769c2347bb3f4676891c873dbed9cfa096ca1f2f16 +EBUILD compiler-rt-sanitizers-10.0.0_rc2.ebuild 4481 BLAKE2B 3ddcb48c12169942e05ff5cb84daa5af199783913d0f5e55d19819b42a0dbe1c840ac35e1ba2e790749d8ac1ebbc37d7e8265c0db0499b88979500e59430aa26 SHA512 bd03f699f0a3635c88d4337a4182a8c3345e19262aa6bc7933143b3a8c51326f51278527c60c9f3a27e69079213be2e7f167aa595d1864dd5b61edada268705b +EBUILD compiler-rt-sanitizers-11.0.0.9999.ebuild 4481 BLAKE2B 3ddcb48c12169942e05ff5cb84daa5af199783913d0f5e55d19819b42a0dbe1c840ac35e1ba2e790749d8ac1ebbc37d7e8265c0db0499b88979500e59430aa26 SHA512 bd03f699f0a3635c88d4337a4182a8c3345e19262aa6bc7933143b3a8c51326f51278527c60c9f3a27e69079213be2e7f167aa595d1864dd5b61edada268705b EBUILD compiler-rt-sanitizers-7.1.0.ebuild 5483 BLAKE2B d7feface9713919185a9d167fb34a4bb4ab97c63227e7ce280df81fb1d3382a18f6e29983276a9bab0f23fdb1437a528d974eaf7174f370cd61ed2f772b29b4f SHA512 1e540c5c7b555d6782098dc6e43e195b2e151b6075831b53848b10664f0a855d9d903b3f07bc9c815668964ab64566652cc2c7e39b1a614bb31f71cbf8cdc842 EBUILD compiler-rt-sanitizers-8.0.1.ebuild 5281 BLAKE2B 7041973d68007ccc56115a9748e901dc07b9228a8c513c30c234fd98253fb04072fc19faff4bcbb544dea7ac5aa2b17c7ce545083949ab6d54020c9dfa02bfa7 SHA512 19f5be642bc47a77beca5241f95b58c8b11fb580dee1db829eadbda00542d56a7b17cccc300b1eb7ebde2ec419f38e677d9800de00067e66df98f7cfdd2d47cd EBUILD compiler-rt-sanitizers-9.0.1.ebuild 4848 BLAKE2B 36a104e3d808986f7f0163d81e69da1d4c4bfa697bed15f3689ee0b6fd395e2dff66e561003fbcddf44c77d089f8de8f6593150aee98b1e9737bf4e25ea3e69e SHA512 a05888fd89f3cc5852efa7a7a810f9bc0916ca49c8b8d7ce5f03a8df8d0054b20cf172e8e5f9777a21f69a28791a6b1a5d0c38366807898e01bb4e2b2e008aea diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0.9999.ebuild index dfbc385859a8..593a9a3363c3 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0.9999.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0.9999.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( python3_{6,7} ) +PYTHON_COMPAT=( python3_{6,7,8} ) inherit check-reqs cmake-utils flag-o-matic llvm llvm.org \ multiprocessing python-any-r1 @@ -60,18 +60,6 @@ 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.cpp || die - fi - fi -} - src_configure() { # pre-set since we need to pass it to cmake BUILD_DIR=${WORKDIR}/compiler-rt_build diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0_rc2.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0_rc2.ebuild new file mode 100644 index 000000000000..593a9a3363c3 --- /dev/null +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0_rc2.ebuild @@ -0,0 +1,146 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) +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="" +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? ( + !<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} ) + ${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_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-11.0.0.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.0.9999.ebuild index dfbc385859a8..593a9a3363c3 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.0.9999.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.0.9999.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( python3_{6,7} ) +PYTHON_COMPAT=( python3_{6,7,8} ) inherit check-reqs cmake-utils flag-o-matic llvm llvm.org \ multiprocessing python-any-r1 @@ -60,18 +60,6 @@ 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.cpp || die - fi - fi -} - src_configure() { # pre-set since we need to pass it to cmake BUILD_DIR=${WORKDIR}/compiler-rt_build |