1 |
commit: 566059c6b81614bc9640f854f91cab1bc0e724c3 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Mar 1 22:56:57 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Mar 1 22:58:06 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=566059c6 |
7 |
|
8 |
sys-libs/compiler-rt-sanitizers: Relax the component constraints |
9 |
|
10 |
Relax the component constraints to apply only with USE=test. Reverse |
11 |
the constraint between ubsan and cfi -- it is cfi that requires ubsan |
12 |
for its tests to work. At the same time, stub out automagically enabled |
13 |
cfi tests when ubsan is enabled but cfi is not. This should fix |
14 |
impossible constraints on architectures that support ubsan but not cfi. |
15 |
|
16 |
Closes: https://bugs.gentoo.org/773661 |
17 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
18 |
|
19 |
.../compiler-rt-sanitizers-11.0.1.ebuild | 11 ++++++++--- |
20 |
.../compiler-rt-sanitizers-11.1.0.ebuild | 11 ++++++++--- |
21 |
.../compiler-rt-sanitizers-12.0.0.9999.ebuild | 11 ++++++++--- |
22 |
.../compiler-rt-sanitizers-12.0.0_rc2.ebuild | 11 ++++++++--- |
23 |
.../compiler-rt-sanitizers-13.0.0.9999.ebuild | 11 ++++++++--- |
24 |
5 files changed, 40 insertions(+), 15 deletions(-) |
25 |
|
26 |
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 |
27 |
index c7da5f747b3..d139a2006ac 100644 |
28 |
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.1.ebuild |
29 |
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.1.ebuild |
30 |
@@ -24,8 +24,10 @@ SANITIZER_FLAGS=( |
31 |
IUSE+=" ${SANITIZER_FLAGS[@]/#/+}" |
32 |
REQUIRED_USE=" |
33 |
|| ( ${SANITIZER_FLAGS[*]} libfuzzer profile xray ) |
34 |
- gwp-asan? ( scudo ) |
35 |
- ubsan? ( cfi )" |
36 |
+ test? ( |
37 |
+ cfi? ( ubsan ) |
38 |
+ gwp-asan? ( scudo ) |
39 |
+ )" |
40 |
RESTRICT="!test? ( test ) !clang? ( test )" |
41 |
|
42 |
CLANG_SLOT=${SLOT%%.*} |
43 |
@@ -86,10 +88,13 @@ src_prepare() { |
44 |
fi |
45 |
done |
46 |
|
47 |
+ # TODO: fix these tests to be skipped upstream |
48 |
if use asan && ! use profile; then |
49 |
- # TODO: fix these tests to be skipped upstream |
50 |
rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die |
51 |
fi |
52 |
+ if use ubsan && ! use cfi; then |
53 |
+ > test/cfi/CMakeLists.txt || die |
54 |
+ fi |
55 |
|
56 |
# broken with new glibc |
57 |
sed -i -e '/EXPECT_EQ.*ThreadDescriptorSize/d' \ |
58 |
|
59 |
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 |
60 |
index 5ae20f93336..c877ae4241f 100644 |
61 |
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.1.0.ebuild |
62 |
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.1.0.ebuild |
63 |
@@ -24,8 +24,10 @@ SANITIZER_FLAGS=( |
64 |
IUSE+=" ${SANITIZER_FLAGS[@]/#/+}" |
65 |
REQUIRED_USE=" |
66 |
|| ( ${SANITIZER_FLAGS[*]} libfuzzer profile xray ) |
67 |
- gwp-asan? ( scudo ) |
68 |
- ubsan? ( cfi )" |
69 |
+ test? ( |
70 |
+ cfi? ( ubsan ) |
71 |
+ gwp-asan? ( scudo ) |
72 |
+ )" |
73 |
RESTRICT="!test? ( test ) !clang? ( test )" |
74 |
|
75 |
CLANG_SLOT=${SLOT%%.*} |
76 |
@@ -86,10 +88,13 @@ src_prepare() { |
77 |
fi |
78 |
done |
79 |
|
80 |
+ # TODO: fix these tests to be skipped upstream |
81 |
if use asan && ! use profile; then |
82 |
- # TODO: fix these tests to be skipped upstream |
83 |
rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die |
84 |
fi |
85 |
+ if use ubsan && ! use cfi; then |
86 |
+ > test/cfi/CMakeLists.txt || die |
87 |
+ fi |
88 |
|
89 |
# broken with new glibc |
90 |
sed -i -e '/EXPECT_EQ.*ThreadDescriptorSize/d' \ |
91 |
|
92 |
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 |
93 |
index 5fc5bbc6247..b9f483144cd 100644 |
94 |
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0.9999.ebuild |
95 |
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0.9999.ebuild |
96 |
@@ -24,8 +24,10 @@ SANITIZER_FLAGS=( |
97 |
IUSE+=" ${SANITIZER_FLAGS[@]/#/+}" |
98 |
REQUIRED_USE=" |
99 |
|| ( ${SANITIZER_FLAGS[*]} libfuzzer profile xray ) |
100 |
- gwp-asan? ( scudo ) |
101 |
- ubsan? ( cfi )" |
102 |
+ test? ( |
103 |
+ cfi? ( ubsan ) |
104 |
+ gwp-asan? ( scudo ) |
105 |
+ )" |
106 |
RESTRICT="!test? ( test ) !clang? ( test )" |
107 |
|
108 |
CLANG_SLOT=${SLOT%%.*} |
109 |
@@ -86,10 +88,13 @@ src_prepare() { |
110 |
fi |
111 |
done |
112 |
|
113 |
+ # TODO: fix these tests to be skipped upstream |
114 |
if use asan && ! use profile; then |
115 |
- # TODO: fix these tests to be skipped upstream |
116 |
rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die |
117 |
fi |
118 |
+ if use ubsan && ! use cfi; then |
119 |
+ > test/cfi/CMakeLists.txt || die |
120 |
+ fi |
121 |
|
122 |
llvm.org_src_prepare |
123 |
} |
124 |
|
125 |
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 |
126 |
index 5fc5bbc6247..b9f483144cd 100644 |
127 |
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc2.ebuild |
128 |
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0_rc2.ebuild |
129 |
@@ -24,8 +24,10 @@ SANITIZER_FLAGS=( |
130 |
IUSE+=" ${SANITIZER_FLAGS[@]/#/+}" |
131 |
REQUIRED_USE=" |
132 |
|| ( ${SANITIZER_FLAGS[*]} libfuzzer profile xray ) |
133 |
- gwp-asan? ( scudo ) |
134 |
- ubsan? ( cfi )" |
135 |
+ test? ( |
136 |
+ cfi? ( ubsan ) |
137 |
+ gwp-asan? ( scudo ) |
138 |
+ )" |
139 |
RESTRICT="!test? ( test ) !clang? ( test )" |
140 |
|
141 |
CLANG_SLOT=${SLOT%%.*} |
142 |
@@ -86,10 +88,13 @@ src_prepare() { |
143 |
fi |
144 |
done |
145 |
|
146 |
+ # TODO: fix these tests to be skipped upstream |
147 |
if use asan && ! use profile; then |
148 |
- # TODO: fix these tests to be skipped upstream |
149 |
rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die |
150 |
fi |
151 |
+ if use ubsan && ! use cfi; then |
152 |
+ > test/cfi/CMakeLists.txt || die |
153 |
+ fi |
154 |
|
155 |
llvm.org_src_prepare |
156 |
} |
157 |
|
158 |
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 |
159 |
index 5fc5bbc6247..b9f483144cd 100644 |
160 |
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0.9999.ebuild |
161 |
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0.9999.ebuild |
162 |
@@ -24,8 +24,10 @@ SANITIZER_FLAGS=( |
163 |
IUSE+=" ${SANITIZER_FLAGS[@]/#/+}" |
164 |
REQUIRED_USE=" |
165 |
|| ( ${SANITIZER_FLAGS[*]} libfuzzer profile xray ) |
166 |
- gwp-asan? ( scudo ) |
167 |
- ubsan? ( cfi )" |
168 |
+ test? ( |
169 |
+ cfi? ( ubsan ) |
170 |
+ gwp-asan? ( scudo ) |
171 |
+ )" |
172 |
RESTRICT="!test? ( test ) !clang? ( test )" |
173 |
|
174 |
CLANG_SLOT=${SLOT%%.*} |
175 |
@@ -86,10 +88,13 @@ src_prepare() { |
176 |
fi |
177 |
done |
178 |
|
179 |
+ # TODO: fix these tests to be skipped upstream |
180 |
if use asan && ! use profile; then |
181 |
- # TODO: fix these tests to be skipped upstream |
182 |
rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die |
183 |
fi |
184 |
+ if use ubsan && ! use cfi; then |
185 |
+ > test/cfi/CMakeLists.txt || die |
186 |
+ fi |
187 |
|
188 |
llvm.org_src_prepare |
189 |
} |