commit: 566059c6b81614bc9640f854f91cab1bc0e724c3 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Mon Mar 1 22:56:57 2021 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Mon Mar 1 22:58:06 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=566059c6
sys-libs/compiler-rt-sanitizers: Relax the component constraints Relax the component constraints to apply only with USE=test. Reverse the constraint between ubsan and cfi -- it is cfi that requires ubsan for its tests to work. At the same time, stub out automagically enabled cfi tests when ubsan is enabled but cfi is not. This should fix impossible constraints on architectures that support ubsan but not cfi. Closes: https://bugs.gentoo.org/773661 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> .../compiler-rt-sanitizers-11.0.1.ebuild | 11 ++++++++--- .../compiler-rt-sanitizers-11.1.0.ebuild | 11 ++++++++--- .../compiler-rt-sanitizers-12.0.0.9999.ebuild | 11 ++++++++--- .../compiler-rt-sanitizers-12.0.0_rc2.ebuild | 11 ++++++++--- .../compiler-rt-sanitizers-13.0.0.9999.ebuild | 11 ++++++++--- 5 files changed, 40 insertions(+), 15 deletions(-) diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.1.ebuild index c7da5f747b3..d139a2006ac 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.1.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.1.ebuild @@ -24,8 +24,10 @@ SANITIZER_FLAGS=( IUSE+=" ${SANITIZER_FLAGS[@]/#/+}" REQUIRED_USE=" || ( ${SANITIZER_FLAGS[*]} libfuzzer profile xray ) - gwp-asan? ( scudo ) - ubsan? ( cfi )" + test? ( + cfi? ( ubsan ) + gwp-asan? ( scudo ) + )" RESTRICT="!test? ( test ) !clang? ( test )" CLANG_SLOT=${SLOT%%.*} @@ -86,10 +88,13 @@ src_prepare() { fi done + # TODO: fix these tests to be skipped upstream 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 + if use ubsan && ! use cfi; then + > test/cfi/CMakeLists.txt || die + fi # broken with new glibc sed -i -e '/EXPECT_EQ.*ThreadDescriptorSize/d' \ diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.1.0.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.1.0.ebuild index 5ae20f93336..c877ae4241f 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.1.0.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.1.0.ebuild @@ -24,8 +24,10 @@ SANITIZER_FLAGS=( IUSE+=" ${SANITIZER_FLAGS[@]/#/+}" REQUIRED_USE=" || ( ${SANITIZER_FLAGS[*]} libfuzzer profile xray ) - gwp-asan? ( scudo ) - ubsan? ( cfi )" + test? ( + cfi? ( ubsan ) + gwp-asan? ( scudo ) + )" RESTRICT="!test? ( test ) !clang? ( test )" CLANG_SLOT=${SLOT%%.*} @@ -86,10 +88,13 @@ src_prepare() { fi done + # TODO: fix these tests to be skipped upstream 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 + if use ubsan && ! use cfi; then + > test/cfi/CMakeLists.txt || die + fi # broken with new glibc sed -i -e '/EXPECT_EQ.*ThreadDescriptorSize/d' \ diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0.9999.ebuild index 5fc5bbc6247..b9f483144cd 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0.9999.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0.9999.ebuild @@ -24,8 +24,10 @@ SANITIZER_FLAGS=( IUSE+=" ${SANITIZER_FLAGS[@]/#/+}" REQUIRED_USE=" || ( ${SANITIZER_FLAGS[*]} libfuzzer profile xray ) - gwp-asan? ( scudo ) - ubsan? ( cfi )" + test? ( + cfi? ( ubsan ) + gwp-asan? ( scudo ) + )" RESTRICT="!test? ( test ) !clang? ( test )" CLANG_SLOT=${SLOT%%.*} @@ -86,10 +88,13 @@ src_prepare() { fi done + # TODO: fix these tests to be skipped upstream 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 + if use ubsan && ! use cfi; then + > test/cfi/CMakeLists.txt || die + fi llvm.org_src_prepare } diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc2.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc2.ebuild index 5fc5bbc6247..b9f483144cd 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc2.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc2.ebuild @@ -24,8 +24,10 @@ SANITIZER_FLAGS=( IUSE+=" ${SANITIZER_FLAGS[@]/#/+}" REQUIRED_USE=" || ( ${SANITIZER_FLAGS[*]} libfuzzer profile xray ) - gwp-asan? ( scudo ) - ubsan? ( cfi )" + test? ( + cfi? ( ubsan ) + gwp-asan? ( scudo ) + )" RESTRICT="!test? ( test ) !clang? ( test )" CLANG_SLOT=${SLOT%%.*} @@ -86,10 +88,13 @@ src_prepare() { fi done + # TODO: fix these tests to be skipped upstream 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 + if use ubsan && ! use cfi; then + > test/cfi/CMakeLists.txt || die + fi llvm.org_src_prepare } 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 5fc5bbc6247..b9f483144cd 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 @@ -24,8 +24,10 @@ SANITIZER_FLAGS=( IUSE+=" ${SANITIZER_FLAGS[@]/#/+}" REQUIRED_USE=" || ( ${SANITIZER_FLAGS[*]} libfuzzer profile xray ) - gwp-asan? ( scudo ) - ubsan? ( cfi )" + test? ( + cfi? ( ubsan ) + gwp-asan? ( scudo ) + )" RESTRICT="!test? ( test ) !clang? ( test )" CLANG_SLOT=${SLOT%%.*} @@ -86,10 +88,13 @@ src_prepare() { fi done + # TODO: fix these tests to be skipped upstream 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 + if use ubsan && ! use cfi; then + > test/cfi/CMakeLists.txt || die + fi llvm.org_src_prepare }
