1 |
commit: 715e8027bf90583084edf76bfa0a6ff5f3ee5d85 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Aug 3 01:22:53 2018 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 3 01:22:53 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=715e8027 |
7 |
|
8 |
sys-libs/compiler-rt-sanitizers: clean up older versions |
9 |
|
10 |
Package-Manager: Portage-2.3.40, Repoman-2.3.9 |
11 |
|
12 |
sys-libs/compiler-rt-sanitizers/Manifest | 9 - |
13 |
.../compiler-rt-sanitizers-4.0.1.ebuild | 169 ---------- |
14 |
.../compiler-rt-sanitizers-5.0.1.ebuild | 180 ----------- |
15 |
.../compiler-rt-sanitizers-5.0.2.ebuild | 180 ----------- |
16 |
.../compiler-rt-sanitizers-6.0.0.ebuild | 172 ----------- |
17 |
...compiler-rt-sanitizers-4.0.0-musl-patches.patch | 344 --------------------- |
18 |
...compiler-rt-sanitizers-5.0.0-musl-patches.patch | 344 --------------------- |
19 |
...compiler-rt-sanitizers-6.0.0-musl-patches.patch | 306 ------------------ |
20 |
8 files changed, 1704 deletions(-) |
21 |
|
22 |
diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest |
23 |
index 4ce4f0d..be9fc14 100644 |
24 |
--- a/sys-libs/compiler-rt-sanitizers/Manifest |
25 |
+++ b/sys-libs/compiler-rt-sanitizers/Manifest |
26 |
@@ -1,12 +1,3 @@ |
27 |
-DIST compiler-rt-4.0.1.src.tar.xz 1434100 BLAKE2B ca6bf78fc07f387b7244a52ef648b06a5685effb46a66b241a9ee847ecafb17d02602f49b0dbe473d47202586874a043a6d75141400062f526d2f808da323e1e SHA512 cfeb625884b273f7c0e6767b81a8d3e5f24e0b96a510d5764d9d47a0e215fc841b4cb9d1843c8fb428cd21def720cfbfe8d3593ff5bb390548ebc8c32a902649 |
28 |
-DIST compiler-rt-5.0.1.src.tar.xz 1498220 BLAKE2B 61503df8a4075c2fe1e42d480753b861321b5de127e340f48d648fc38d81c7967cead17e136beaa5235cc92540f158915fccec77cf39aa7c336d106c9d265222 SHA512 61e23775db78bdeed3003a509b45ae609287db31302fed186f3210d481ecf062d1828571e63482215ab00ff732df8f3fa6c77334dfb677e4b76eb555d476b8c4 |
29 |
-DIST compiler-rt-5.0.2.src.tar.xz 1543256 BLAKE2B 09fa84b8f3e9b8627a14387bc6eaa3d6b4588b9c8f1ac5a0114135fd830e3d45922408b237866789eb81bf38defde1186e0f7430a69f825bee12776b7cd9f74e SHA512 605a6d064877a860d6c9097e0220896dfceafed0a2392ad495c97aa347b97899d89f7e21932e29d3274f396615837414a3e730a915fe4f53eaa858ce3642a666 |
30 |
-DIST compiler-rt-6.0.0.src.tar.xz 1633096 BLAKE2B d5df9b16ad474f687507013fb6eda8c7c3bbe479c85aab6ce428b93bbef2467538c0ba59c54dd9266b978da53c8c312a59e3b7abac843702048900f5cdbc1011 SHA512 717bed116ef43ebb2e18daf6fb737472edf57564947f53fe6368d3bbb080f63e986c0d1b94dbd087be998196ad7be54f4361854f8eb5214600b82449ba02c9c1 |
31 |
DIST compiler-rt-6.0.1.src.tar.xz 1686820 BLAKE2B 59fa3f6e478bd4d6dfa056c85dcdc4349cbce7cea7fc56519feddc9d66c88c9ca48bad7967432ceb81d754213577f12707035afd827cf630a58627575b73b798 SHA512 69850c1ad92c66977fa217cbfb42a6a3f502fbe3d1a08daa7fc4cfeb617a7736d231f8ad8d93b10b1ae29bd753315d2a2d70f9ff1f4d18a9a7cc81758d91f963 |
32 |
-DIST compiler-rt-sanitizers-4.0.1-patchset.tar.xz 2384 BLAKE2B 6f9eee711c83570767f0bb634d0f91c18ee7f2af93a478938b8d5b6ce6f2c2fbaadb7bd5c7ee94a14dc1834359a046187db6bc7005b7c2efa539325dc0701ad9 SHA512 72d7357b4c27bbf8fa8b34803ddea905a9f1054e8fc7bf99a4ead9dc00408989ea2709f04be9cf45a27eeb4b9386c89feeb25b53a84f3cac9739196b89813887 |
33 |
DIST compiler-rt-sanitizers-6.0.1-patchset.tar.xz 8820 BLAKE2B d53ca357e060d058c7f20c51e74684f4c032fdf3ccec4c9f227dc7a5757206f331b9eda25a72c5c66faf4c44b2cc63eb439bd21bdd55d37a93918ab428fd7cd4 SHA512 782a34c56134bd061da30c1f598ddb9e90cb34a4e4ef058fa9634f6da372fd8693ff5e6cf98b59700942273240f83052b89ee2736b22f4e19bc8b519fbec8cad |
34 |
-DIST llvm-4.0.1.src.tar.xz 21065652 BLAKE2B 6327eed2d1feb108440f22d2581d1ff86c10a10c29793538d8d899c7e2dc83d3f7b147d3fd4bcce2bd2bf57c071b08c624aeafe40a3e7a3914506e7751727e6c SHA512 16adc39b34ddb628f81b171119a8e2a0e9138b25011e803ef0b688e2fbea116fc4953d3a1b61b90a98a75e33619f81566b7cb06a9a2ea4d04ac5e0eb303a2d1d |
35 |
-DIST llvm-5.0.1.src.tar.xz 23428720 BLAKE2B 3db4d33df21018d17eef0042c0d8d82a8412bd5daa99cfb5405a6ec83c5774178fa76b220e8731c2a9a64dabf898aa90fe29c685327bd63a4f078e8e94a9a77e SHA512 bee1d45fca15ce725b1f2b1339b13eb6f750a3a321cfd099075477ec25835a8ca55b5366172c4aad46592dfd8afe372349ecf264f581463d017f9cee2d63c1cb |
36 |
-DIST llvm-5.0.2.src.tar.xz 23451868 BLAKE2B b7082be2e4ad557b29b9f6869811f262adcf5c73d552faf91b339bede75cf5eab58afefa12fa779a38be71fe2b8f4ea297c3213ee4e8370cc01972c59249d91c SHA512 3588be5ed969c3f7f6f16f56a12a6af2814d3d3c960d4a36ffebb0446cc75f19220bccee7fc605f9b01f5d5c188a905a046193cc12dec42dd5922048b5c27fe1 |
37 |
-DIST llvm-6.0.0.src.tar.xz 25296048 BLAKE2B 7ea90bb63d6f26cfbc1c1ed2f243b0fcd8ad2ceb7963cf768d262cd55e9a0c71a9cfdea0333fb220faacf4540d924d2512532774dcfb52b52490ad74e38c09e0 SHA512 a71fdd5ddc46f01327ad891cfcc198febdbe10769c57f14d8a4fb7d514621ee4080e1a641200d3353c16a16731d390270499ec6cd3dc98fadc570f3eb6b52b8c |
38 |
DIST llvm-6.0.1.src.tar.xz 25306628 BLAKE2B 60232d4d22f8096b565cc8d81fea0639f24f14e8fc4f66ade69fa15479181f07f655f26dff3fa24bf105762b495da316c5c9352db234bd0af6b9c3fff6d4d881 SHA512 cbbb00eb99cfeb4aff623ee1a5ba075e7b5a76fc00c5f9f539ff28c108598f5708a0369d5bd92683def5a20c2fe60cab7827b42d628dbfcc79b57e0e91b84dd9 |
39 |
|
40 |
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-4.0.1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-4.0.1.ebuild |
41 |
deleted file mode 100644 |
42 |
index 2cf1883..0000000 |
43 |
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-4.0.1.ebuild |
44 |
+++ /dev/null |
45 |
@@ -1,169 +0,0 @@ |
46 |
-# Copyright 1999-2018 Gentoo Foundation |
47 |
-# Distributed under the terms of the GNU General Public License v2 |
48 |
- |
49 |
-EAPI=6 |
50 |
- |
51 |
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
52 |
-# (needed due to CMAKE_BUILD_TYPE != Gentoo) |
53 |
-CMAKE_MIN_VERSION=3.7.0-r1 |
54 |
-PYTHON_COMPAT=( python2_7 ) |
55 |
- |
56 |
-inherit check-reqs cmake-utils flag-o-matic llvm python-any-r1 |
57 |
- |
58 |
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" |
59 |
-HOMEPAGE="https://llvm.org/" |
60 |
-SRC_URI="https://releases.llvm.org/${PV/_//}/compiler-rt-${PV/_/}.src.tar.xz |
61 |
- https://dev.gentoo.org/~mgorny/dist/llvm/${P}-patchset.tar.xz |
62 |
- test? ( https://releases.llvm.org/${PV/_//}/llvm-${PV/_/}.src.tar.xz )" |
63 |
- |
64 |
-LICENSE="|| ( UoI-NCSA MIT )" |
65 |
-SLOT="${PV%_*}" |
66 |
-KEYWORDS="amd64 x86" |
67 |
-IUSE="+clang test" |
68 |
- |
69 |
-CLANG_SLOT=${SLOT%%.*} |
70 |
-RDEPEND="!=sys-libs/compiler-rt-sanitizers-${SLOT}*:0" |
71 |
-# llvm-4 needed for --cmakedir |
72 |
-DEPEND=" |
73 |
- >=sys-devel/llvm-4 |
74 |
- clang? ( sys-devel/clang ) |
75 |
- test? ( |
76 |
- !<sys-apps/sandbox-2.13 |
77 |
- $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") |
78 |
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT} |
79 |
- sys-libs/compiler-rt:${SLOT} ) |
80 |
- ${PYTHON_DEPS}" |
81 |
- |
82 |
-S=${WORKDIR}/compiler-rt-${PV/_/}.src |
83 |
- |
84 |
-PATCHES=( "${FILESDIR}"/${PN}-4.0.0-musl-patches.patch ) |
85 |
- |
86 |
-# least intrusive of all |
87 |
-CMAKE_BUILD_TYPE=RelWithDebInfo |
88 |
- |
89 |
-check_space() { |
90 |
- if use test; then |
91 |
- local CHECKREQS_DISK_BUILD=11G |
92 |
- check-reqs_pkg_pretend |
93 |
- fi |
94 |
-} |
95 |
- |
96 |
-pkg_pretend() { |
97 |
- check_space |
98 |
-} |
99 |
- |
100 |
-pkg_setup() { |
101 |
- check_space |
102 |
- llvm_pkg_setup |
103 |
- python-any-r1_pkg_setup |
104 |
-} |
105 |
- |
106 |
-src_unpack() { |
107 |
- default |
108 |
- |
109 |
- if use test; then |
110 |
- mv llvm-* llvm || die |
111 |
- fi |
112 |
-} |
113 |
- |
114 |
-src_prepare() { |
115 |
- eapply "${WORKDIR}/${P}-patchset" |
116 |
- cmake-utils_src_prepare |
117 |
- |
118 |
- if use test; then |
119 |
- # remove tests that are broken by new glibc |
120 |
- # (disabled in 6.0.0+, r313069) |
121 |
- if use elibc_glibc && has_version '>=sys-libs/glibc-2.24'; then |
122 |
- rm test/tsan/Linux/user_malloc.cc || die |
123 |
- fi |
124 |
- # https://bugs.llvm.org/show_bug.cgi?id=36065 |
125 |
- if use elibc_glibc && has_version '>=sys-libs/glibc-2.25'; then |
126 |
- rm test/lsan/TestCases/use_tls_dynamic.cc || die |
127 |
- rm test/msan/dtls_test.c || die |
128 |
- rm test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc || die |
129 |
- fi |
130 |
- fi |
131 |
-} |
132 |
- |
133 |
-src_configure() { |
134 |
- # pre-set since we need to pass it to cmake |
135 |
- BUILD_DIR=${WORKDIR}/${P}_build |
136 |
- |
137 |
- if use clang; then |
138 |
- local -x CC=${CHOST}-clang |
139 |
- local -x CXX=${CHOST}-clang++ |
140 |
- strip-unsupported-flags |
141 |
- fi |
142 |
- |
143 |
- local mycmakeargs=( |
144 |
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" |
145 |
- # use a build dir structure consistent with install |
146 |
- # this makes it possible to easily deploy test-friendly clang |
147 |
- -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}" |
148 |
- |
149 |
- -DCOMPILER_RT_INCLUDE_TESTS=$(usex test) |
150 |
- # built-ins installed by sys-libs/compiler-rt |
151 |
- -DCOMPILER_RT_BUILD_BUILTINS=OFF |
152 |
- -DCOMPILER_RT_BUILD_SANITIZERS=ON |
153 |
- -DCOMPILER_RT_BUILD_XRAY=ON |
154 |
- ) |
155 |
- if use test; then |
156 |
- if has_version '>=sys-devel/llvm-6'; then |
157 |
- mycmakeargs+=( |
158 |
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" |
159 |
- ) |
160 |
- else |
161 |
- mycmakeargs+=( |
162 |
- -DLIT_COMMAND="${EPREFIX}"/usr/bin/lit |
163 |
- ) |
164 |
- fi |
165 |
- |
166 |
- mycmakeargs+=( |
167 |
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" |
168 |
- |
169 |
- # they are created during src_test() |
170 |
- -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang" |
171 |
- -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++" |
172 |
- ) |
173 |
- |
174 |
- # same flags are passed for build & tests, so we need to strip |
175 |
- # them down to a subset supported by clang |
176 |
- CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \ |
177 |
- CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \ |
178 |
- strip-unsupported-flags |
179 |
- fi |
180 |
- |
181 |
- cmake-utils_src_configure |
182 |
- |
183 |
- if use test; then |
184 |
- local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* ) |
185 |
- [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}" |
186 |
- [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}" |
187 |
- |
188 |
- # copy clang over since resource_dir is located relatively to binary |
189 |
- # therefore, we can put our new libraries in it |
190 |
- mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die |
191 |
- cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \ |
192 |
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die |
193 |
- cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \ |
194 |
- "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die |
195 |
- cp "${sys_dir}"/*builtins*.a \ |
196 |
- "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die |
197 |
- # we also need LLVMgold.so for gold-based tests |
198 |
- if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then |
199 |
- ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \ |
200 |
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die |
201 |
- fi |
202 |
- fi |
203 |
-} |
204 |
- |
205 |
-src_test() { |
206 |
- # respect TMPDIR! |
207 |
- local -x LIT_PRESERVES_TMP=1 |
208 |
- # disable sandbox to have it stop clobbering LD_PRELOAD |
209 |
- local -x SANDBOX_ON=0 |
210 |
- # wipe LD_PRELOAD to make ASAN happy |
211 |
- local -x LD_PRELOAD= |
212 |
- |
213 |
- cmake-utils_src_make check-all |
214 |
-} |
215 |
|
216 |
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.1.ebuild |
217 |
deleted file mode 100644 |
218 |
index d52ef04..0000000 |
219 |
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.1.ebuild |
220 |
+++ /dev/null |
221 |
@@ -1,180 +0,0 @@ |
222 |
-# Copyright 1999-2018 Gentoo Foundation |
223 |
-# Distributed under the terms of the GNU General Public License v2 |
224 |
- |
225 |
-EAPI=6 |
226 |
- |
227 |
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
228 |
-# (needed due to CMAKE_BUILD_TYPE != Gentoo) |
229 |
-CMAKE_MIN_VERSION=3.7.0-r1 |
230 |
-PYTHON_COMPAT=( python2_7 ) |
231 |
- |
232 |
-inherit check-reqs cmake-utils flag-o-matic llvm python-any-r1 |
233 |
- |
234 |
-MY_P=compiler-rt-${PV/_/}.src |
235 |
-LLVM_P=llvm-${PV/_/}.src |
236 |
- |
237 |
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" |
238 |
-HOMEPAGE="https://llvm.org/" |
239 |
-SRC_URI="https://releases.llvm.org/${PV/_//}/${MY_P}.tar.xz |
240 |
- test? ( https://releases.llvm.org/${PV/_//}/${LLVM_P}.tar.xz )" |
241 |
- |
242 |
-LICENSE="|| ( UoI-NCSA MIT )" |
243 |
-SLOT="${PV%_*}" |
244 |
-KEYWORDS="amd64 x86" |
245 |
-IUSE="+clang test elibc_glibc" |
246 |
- |
247 |
-CLANG_SLOT=${SLOT%%.*} |
248 |
-# llvm-4 needed for --cmakedir |
249 |
-DEPEND=" |
250 |
- >=sys-devel/llvm-4 |
251 |
- clang? ( sys-devel/clang ) |
252 |
- test? ( |
253 |
- !<sys-apps/sandbox-2.13 |
254 |
- $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]") |
255 |
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT} |
256 |
- sys-libs/compiler-rt:${SLOT} ) |
257 |
- ${PYTHON_DEPS}" |
258 |
- |
259 |
-S=${WORKDIR}/${MY_P} |
260 |
- |
261 |
-PATCHES=( "${FILESDIR}"/${PN}-5.0.0-musl-patches.patch ) |
262 |
- |
263 |
-# least intrusive of all |
264 |
-CMAKE_BUILD_TYPE=RelWithDebInfo |
265 |
- |
266 |
-check_space() { |
267 |
- if use test; then |
268 |
- local CHECKREQS_DISK_BUILD=11G |
269 |
- check-reqs_pkg_pretend |
270 |
- fi |
271 |
-} |
272 |
- |
273 |
-pkg_pretend() { |
274 |
- check_space |
275 |
-} |
276 |
- |
277 |
-pkg_setup() { |
278 |
- check_space |
279 |
- llvm_pkg_setup |
280 |
- python-any-r1_pkg_setup |
281 |
-} |
282 |
- |
283 |
-src_unpack() { |
284 |
- einfo "Unpacking ${MY_P}.tar.xz ..." |
285 |
- tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die |
286 |
- |
287 |
- if use test; then |
288 |
- einfo "Unpacking parts of ${LLVM_P}.tar.xz ..." |
289 |
- tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \ |
290 |
- "${LLVM_P}"/utils/{lit,unittest} || die |
291 |
- mv "${LLVM_P}" llvm || die |
292 |
- fi |
293 |
-} |
294 |
- |
295 |
-src_prepare() { |
296 |
- cmake-utils_src_prepare |
297 |
- |
298 |
- if use test; then |
299 |
- # remove tests that are broken by new glibc |
300 |
- # (disabled in 6.0.0+, r313069) |
301 |
- if use elibc_glibc && has_version '>=sys-libs/glibc-2.24'; then |
302 |
- rm test/tsan/Linux/user_malloc.cc || die |
303 |
- fi |
304 |
- # https://bugs.llvm.org/show_bug.cgi?id=36065 |
305 |
- if use elibc_glibc && has_version '>=sys-libs/glibc-2.25'; then |
306 |
- rm test/lsan/TestCases/Linux/use_tls_dynamic.cc || die |
307 |
- rm test/msan/dtls_test.c || die |
308 |
- rm test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc || die |
309 |
- fi |
310 |
- fi |
311 |
-} |
312 |
- |
313 |
-src_configure() { |
314 |
- # pre-set since we need to pass it to cmake |
315 |
- BUILD_DIR=${WORKDIR}/${P}_build |
316 |
- |
317 |
- if use clang; then |
318 |
- local -x CC=${CHOST}-clang |
319 |
- local -x CXX=${CHOST}-clang++ |
320 |
- strip-unsupported-flags |
321 |
- fi |
322 |
- |
323 |
- local mycmakeargs=( |
324 |
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" |
325 |
- # use a build dir structure consistent with install |
326 |
- # this makes it possible to easily deploy test-friendly clang |
327 |
- -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}" |
328 |
- |
329 |
- -DCOMPILER_RT_INCLUDE_TESTS=$(usex test) |
330 |
- # built-ins installed by sys-libs/compiler-rt |
331 |
- -DCOMPILER_RT_BUILD_BUILTINS=OFF |
332 |
- -DCOMPILER_RT_BUILD_SANITIZERS=ON |
333 |
- -DCOMPILER_RT_BUILD_XRAY=ON |
334 |
- ) |
335 |
- if use test; then |
336 |
- if has_version '>=sys-devel/llvm-6'; then |
337 |
- mycmakeargs+=( |
338 |
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" |
339 |
- ) |
340 |
- else |
341 |
- mycmakeargs+=( |
342 |
- -DLIT_COMMAND="${EPREFIX}"/usr/bin/lit |
343 |
- ) |
344 |
- fi |
345 |
- |
346 |
- mycmakeargs+=( |
347 |
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" |
348 |
- |
349 |
- # they are created during src_test() |
350 |
- -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang" |
351 |
- -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++" |
352 |
- ) |
353 |
- |
354 |
- # same flags are passed for build & tests, so we need to strip |
355 |
- # them down to a subset supported by clang |
356 |
- CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \ |
357 |
- CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \ |
358 |
- strip-unsupported-flags |
359 |
- fi |
360 |
- |
361 |
- if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then |
362 |
- mycmakeargs+=( |
363 |
- # disable use of SDK for the system itself |
364 |
- -DDARWIN_macosx_CACHED_SYSROOT=/ |
365 |
- ) |
366 |
- fi |
367 |
- |
368 |
- cmake-utils_src_configure |
369 |
- |
370 |
- if use test; then |
371 |
- local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* ) |
372 |
- [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}" |
373 |
- [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}" |
374 |
- |
375 |
- # copy clang over since resource_dir is located relatively to binary |
376 |
- # therefore, we can put our new libraries in it |
377 |
- mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die |
378 |
- cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \ |
379 |
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die |
380 |
- cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \ |
381 |
- "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die |
382 |
- cp "${sys_dir}"/*builtins*.a \ |
383 |
- "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die |
384 |
- # we also need LLVMgold.so for gold-based tests |
385 |
- if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then |
386 |
- ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \ |
387 |
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die |
388 |
- fi |
389 |
- fi |
390 |
-} |
391 |
- |
392 |
-src_test() { |
393 |
- # respect TMPDIR! |
394 |
- local -x LIT_PRESERVES_TMP=1 |
395 |
- # disable sandbox to have it stop clobbering LD_PRELOAD |
396 |
- local -x SANDBOX_ON=0 |
397 |
- # wipe LD_PRELOAD to make ASAN happy |
398 |
- local -x LD_PRELOAD= |
399 |
- |
400 |
- cmake-utils_src_make check-all |
401 |
-} |
402 |
|
403 |
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.2.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.2.ebuild |
404 |
deleted file mode 100644 |
405 |
index d52ef04..0000000 |
406 |
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.2.ebuild |
407 |
+++ /dev/null |
408 |
@@ -1,180 +0,0 @@ |
409 |
-# Copyright 1999-2018 Gentoo Foundation |
410 |
-# Distributed under the terms of the GNU General Public License v2 |
411 |
- |
412 |
-EAPI=6 |
413 |
- |
414 |
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
415 |
-# (needed due to CMAKE_BUILD_TYPE != Gentoo) |
416 |
-CMAKE_MIN_VERSION=3.7.0-r1 |
417 |
-PYTHON_COMPAT=( python2_7 ) |
418 |
- |
419 |
-inherit check-reqs cmake-utils flag-o-matic llvm python-any-r1 |
420 |
- |
421 |
-MY_P=compiler-rt-${PV/_/}.src |
422 |
-LLVM_P=llvm-${PV/_/}.src |
423 |
- |
424 |
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" |
425 |
-HOMEPAGE="https://llvm.org/" |
426 |
-SRC_URI="https://releases.llvm.org/${PV/_//}/${MY_P}.tar.xz |
427 |
- test? ( https://releases.llvm.org/${PV/_//}/${LLVM_P}.tar.xz )" |
428 |
- |
429 |
-LICENSE="|| ( UoI-NCSA MIT )" |
430 |
-SLOT="${PV%_*}" |
431 |
-KEYWORDS="amd64 x86" |
432 |
-IUSE="+clang test elibc_glibc" |
433 |
- |
434 |
-CLANG_SLOT=${SLOT%%.*} |
435 |
-# llvm-4 needed for --cmakedir |
436 |
-DEPEND=" |
437 |
- >=sys-devel/llvm-4 |
438 |
- clang? ( sys-devel/clang ) |
439 |
- test? ( |
440 |
- !<sys-apps/sandbox-2.13 |
441 |
- $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]") |
442 |
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT} |
443 |
- sys-libs/compiler-rt:${SLOT} ) |
444 |
- ${PYTHON_DEPS}" |
445 |
- |
446 |
-S=${WORKDIR}/${MY_P} |
447 |
- |
448 |
-PATCHES=( "${FILESDIR}"/${PN}-5.0.0-musl-patches.patch ) |
449 |
- |
450 |
-# least intrusive of all |
451 |
-CMAKE_BUILD_TYPE=RelWithDebInfo |
452 |
- |
453 |
-check_space() { |
454 |
- if use test; then |
455 |
- local CHECKREQS_DISK_BUILD=11G |
456 |
- check-reqs_pkg_pretend |
457 |
- fi |
458 |
-} |
459 |
- |
460 |
-pkg_pretend() { |
461 |
- check_space |
462 |
-} |
463 |
- |
464 |
-pkg_setup() { |
465 |
- check_space |
466 |
- llvm_pkg_setup |
467 |
- python-any-r1_pkg_setup |
468 |
-} |
469 |
- |
470 |
-src_unpack() { |
471 |
- einfo "Unpacking ${MY_P}.tar.xz ..." |
472 |
- tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die |
473 |
- |
474 |
- if use test; then |
475 |
- einfo "Unpacking parts of ${LLVM_P}.tar.xz ..." |
476 |
- tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \ |
477 |
- "${LLVM_P}"/utils/{lit,unittest} || die |
478 |
- mv "${LLVM_P}" llvm || die |
479 |
- fi |
480 |
-} |
481 |
- |
482 |
-src_prepare() { |
483 |
- cmake-utils_src_prepare |
484 |
- |
485 |
- if use test; then |
486 |
- # remove tests that are broken by new glibc |
487 |
- # (disabled in 6.0.0+, r313069) |
488 |
- if use elibc_glibc && has_version '>=sys-libs/glibc-2.24'; then |
489 |
- rm test/tsan/Linux/user_malloc.cc || die |
490 |
- fi |
491 |
- # https://bugs.llvm.org/show_bug.cgi?id=36065 |
492 |
- if use elibc_glibc && has_version '>=sys-libs/glibc-2.25'; then |
493 |
- rm test/lsan/TestCases/Linux/use_tls_dynamic.cc || die |
494 |
- rm test/msan/dtls_test.c || die |
495 |
- rm test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc || die |
496 |
- fi |
497 |
- fi |
498 |
-} |
499 |
- |
500 |
-src_configure() { |
501 |
- # pre-set since we need to pass it to cmake |
502 |
- BUILD_DIR=${WORKDIR}/${P}_build |
503 |
- |
504 |
- if use clang; then |
505 |
- local -x CC=${CHOST}-clang |
506 |
- local -x CXX=${CHOST}-clang++ |
507 |
- strip-unsupported-flags |
508 |
- fi |
509 |
- |
510 |
- local mycmakeargs=( |
511 |
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" |
512 |
- # use a build dir structure consistent with install |
513 |
- # this makes it possible to easily deploy test-friendly clang |
514 |
- -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}" |
515 |
- |
516 |
- -DCOMPILER_RT_INCLUDE_TESTS=$(usex test) |
517 |
- # built-ins installed by sys-libs/compiler-rt |
518 |
- -DCOMPILER_RT_BUILD_BUILTINS=OFF |
519 |
- -DCOMPILER_RT_BUILD_SANITIZERS=ON |
520 |
- -DCOMPILER_RT_BUILD_XRAY=ON |
521 |
- ) |
522 |
- if use test; then |
523 |
- if has_version '>=sys-devel/llvm-6'; then |
524 |
- mycmakeargs+=( |
525 |
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" |
526 |
- ) |
527 |
- else |
528 |
- mycmakeargs+=( |
529 |
- -DLIT_COMMAND="${EPREFIX}"/usr/bin/lit |
530 |
- ) |
531 |
- fi |
532 |
- |
533 |
- mycmakeargs+=( |
534 |
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" |
535 |
- |
536 |
- # they are created during src_test() |
537 |
- -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang" |
538 |
- -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++" |
539 |
- ) |
540 |
- |
541 |
- # same flags are passed for build & tests, so we need to strip |
542 |
- # them down to a subset supported by clang |
543 |
- CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \ |
544 |
- CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \ |
545 |
- strip-unsupported-flags |
546 |
- fi |
547 |
- |
548 |
- if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then |
549 |
- mycmakeargs+=( |
550 |
- # disable use of SDK for the system itself |
551 |
- -DDARWIN_macosx_CACHED_SYSROOT=/ |
552 |
- ) |
553 |
- fi |
554 |
- |
555 |
- cmake-utils_src_configure |
556 |
- |
557 |
- if use test; then |
558 |
- local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* ) |
559 |
- [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}" |
560 |
- [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}" |
561 |
- |
562 |
- # copy clang over since resource_dir is located relatively to binary |
563 |
- # therefore, we can put our new libraries in it |
564 |
- mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die |
565 |
- cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \ |
566 |
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die |
567 |
- cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \ |
568 |
- "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die |
569 |
- cp "${sys_dir}"/*builtins*.a \ |
570 |
- "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die |
571 |
- # we also need LLVMgold.so for gold-based tests |
572 |
- if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then |
573 |
- ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \ |
574 |
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die |
575 |
- fi |
576 |
- fi |
577 |
-} |
578 |
- |
579 |
-src_test() { |
580 |
- # respect TMPDIR! |
581 |
- local -x LIT_PRESERVES_TMP=1 |
582 |
- # disable sandbox to have it stop clobbering LD_PRELOAD |
583 |
- local -x SANDBOX_ON=0 |
584 |
- # wipe LD_PRELOAD to make ASAN happy |
585 |
- local -x LD_PRELOAD= |
586 |
- |
587 |
- cmake-utils_src_make check-all |
588 |
-} |
589 |
|
590 |
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.0.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.0.ebuild |
591 |
deleted file mode 100644 |
592 |
index 7537996..0000000 |
593 |
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.0.ebuild |
594 |
+++ /dev/null |
595 |
@@ -1,172 +0,0 @@ |
596 |
-# Copyright 1999-2018 Gentoo Foundation |
597 |
-# Distributed under the terms of the GNU General Public License v2 |
598 |
- |
599 |
-EAPI=6 |
600 |
- |
601 |
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
602 |
-# (needed due to CMAKE_BUILD_TYPE != Gentoo) |
603 |
-CMAKE_MIN_VERSION=3.7.0-r1 |
604 |
-PYTHON_COMPAT=( python2_7 ) |
605 |
- |
606 |
-inherit check-reqs cmake-utils flag-o-matic llvm \ |
607 |
- multiprocessing python-any-r1 |
608 |
- |
609 |
-MY_P=compiler-rt-${PV/_/}.src |
610 |
-LLVM_P=llvm-${PV/_/}.src |
611 |
- |
612 |
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" |
613 |
-HOMEPAGE="https://llvm.org/" |
614 |
-SRC_URI="https://releases.llvm.org/${PV/_//}/${MY_P}.tar.xz |
615 |
- test? ( https://releases.llvm.org/${PV/_//}/${LLVM_P}.tar.xz )" |
616 |
- |
617 |
-LICENSE="|| ( UoI-NCSA MIT )" |
618 |
-SLOT="${PV%_*}" |
619 |
-KEYWORDS="~amd64 ~x86" |
620 |
-IUSE="+clang test elibc_glibc" |
621 |
-RESTRICT="!test? ( test ) !clang? ( test )" |
622 |
- |
623 |
-CLANG_SLOT=${SLOT%%.*} |
624 |
-# llvm-6 for new lit options |
625 |
-DEPEND=" |
626 |
- >=sys-devel/llvm-6 |
627 |
- clang? ( sys-devel/clang ) |
628 |
- test? ( |
629 |
- !<sys-apps/sandbox-2.13 |
630 |
- $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]") |
631 |
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT} |
632 |
- sys-libs/compiler-rt:${SLOT} ) |
633 |
- ${PYTHON_DEPS}" |
634 |
- |
635 |
-S=${WORKDIR}/${MY_P} |
636 |
- |
637 |
-PATCHES=( "${FILESDIR}"/${PN}-6.0.0-musl-patches.patch ) |
638 |
- |
639 |
-# least intrusive of all |
640 |
-CMAKE_BUILD_TYPE=RelWithDebInfo |
641 |
- |
642 |
-check_space() { |
643 |
- if use test; then |
644 |
- local CHECKREQS_DISK_BUILD=11G |
645 |
- check-reqs_pkg_pretend |
646 |
- fi |
647 |
-} |
648 |
- |
649 |
-pkg_pretend() { |
650 |
- check_space |
651 |
-} |
652 |
- |
653 |
-pkg_setup() { |
654 |
- check_space |
655 |
- llvm_pkg_setup |
656 |
- python-any-r1_pkg_setup |
657 |
-} |
658 |
- |
659 |
-src_unpack() { |
660 |
- einfo "Unpacking ${MY_P}.tar.xz ..." |
661 |
- tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die |
662 |
- |
663 |
- if use test; then |
664 |
- einfo "Unpacking parts of ${LLVM_P}.tar.xz ..." |
665 |
- tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \ |
666 |
- "${LLVM_P}"/utils/{lit,unittest} || die |
667 |
- mv "${LLVM_P}" llvm || die |
668 |
- fi |
669 |
-} |
670 |
- |
671 |
-src_prepare() { |
672 |
- cmake-utils_src_prepare |
673 |
- |
674 |
- if use test; then |
675 |
- # remove tests that are broken by new glibc |
676 |
- # https://bugs.llvm.org/show_bug.cgi?id=36065 |
677 |
- if use elibc_glibc && has_version '>=sys-libs/glibc-2.25'; then |
678 |
- rm test/lsan/TestCases/Linux/use_tls_dynamic.cc || die |
679 |
- rm test/msan/dtls_test.c || die |
680 |
- rm test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc || die |
681 |
- fi |
682 |
- fi |
683 |
-} |
684 |
- |
685 |
-src_configure() { |
686 |
- # pre-set since we need to pass it to cmake |
687 |
- BUILD_DIR=${WORKDIR}/${P}_build |
688 |
- |
689 |
- if use clang; then |
690 |
- local -x CC=${CHOST}-clang |
691 |
- local -x CXX=${CHOST}-clang++ |
692 |
- strip-unsupported-flags |
693 |
- fi |
694 |
- |
695 |
- local mycmakeargs=( |
696 |
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" |
697 |
- # use a build dir structure consistent with install |
698 |
- # this makes it possible to easily deploy test-friendly clang |
699 |
- -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}" |
700 |
- |
701 |
- -DCOMPILER_RT_INCLUDE_TESTS=$(usex test) |
702 |
- # built-ins installed by sys-libs/compiler-rt |
703 |
- -DCOMPILER_RT_BUILD_BUILTINS=OFF |
704 |
- -DCOMPILER_RT_BUILD_LIBFUZZER=ON |
705 |
- -DCOMPILER_RT_BUILD_PROFILE=ON |
706 |
- -DCOMPILER_RT_BUILD_SANITIZERS=ON |
707 |
- -DCOMPILER_RT_BUILD_XRAY=ON |
708 |
- ) |
709 |
- if use test; then |
710 |
- mycmakeargs+=( |
711 |
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" |
712 |
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" |
713 |
- -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" |
714 |
- |
715 |
- # they are created during src_test() |
716 |
- -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang" |
717 |
- -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++" |
718 |
- ) |
719 |
- |
720 |
- # same flags are passed for build & tests, so we need to strip |
721 |
- # them down to a subset supported by clang |
722 |
- CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \ |
723 |
- CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \ |
724 |
- strip-unsupported-flags |
725 |
- fi |
726 |
- |
727 |
- if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then |
728 |
- mycmakeargs+=( |
729 |
- # disable use of SDK for the system itself |
730 |
- -DDARWIN_macosx_CACHED_SYSROOT=/ |
731 |
- ) |
732 |
- fi |
733 |
- |
734 |
- cmake-utils_src_configure |
735 |
- |
736 |
- if use test; then |
737 |
- local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* ) |
738 |
- [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}" |
739 |
- [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}" |
740 |
- |
741 |
- # copy clang over since resource_dir is located relatively to binary |
742 |
- # therefore, we can put our new libraries in it |
743 |
- mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die |
744 |
- cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \ |
745 |
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die |
746 |
- cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \ |
747 |
- "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die |
748 |
- cp "${sys_dir}"/*builtins*.a \ |
749 |
- "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die |
750 |
- # we also need LLVMgold.so for gold-based tests |
751 |
- if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then |
752 |
- ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \ |
753 |
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die |
754 |
- fi |
755 |
- fi |
756 |
-} |
757 |
- |
758 |
-src_test() { |
759 |
- # respect TMPDIR! |
760 |
- local -x LIT_PRESERVES_TMP=1 |
761 |
- # disable sandbox to have it stop clobbering LD_PRELOAD |
762 |
- local -x SANDBOX_ON=0 |
763 |
- # wipe LD_PRELOAD to make ASAN happy |
764 |
- local -x LD_PRELOAD= |
765 |
- |
766 |
- cmake-utils_src_make check-all |
767 |
-} |
768 |
|
769 |
diff --git a/sys-libs/compiler-rt-sanitizers/files/compiler-rt-sanitizers-4.0.0-musl-patches.patch b/sys-libs/compiler-rt-sanitizers/files/compiler-rt-sanitizers-4.0.0-musl-patches.patch |
770 |
deleted file mode 100644 |
771 |
index 7e543f6..0000000 |
772 |
--- a/sys-libs/compiler-rt-sanitizers/files/compiler-rt-sanitizers-4.0.0-musl-patches.patch |
773 |
+++ /dev/null |
774 |
@@ -1,344 +0,0 @@ |
775 |
-From 50aa0d694e2fa53b8671e093c42147458ed4e692 Mon Sep 17 00:00:00 2001 |
776 |
-From: Matthias Maier <tamiko@××××.org> |
777 |
-Date: Fri, 5 May 2017 17:47:39 +0000 |
778 |
-Subject: [PATCH] Musl patches |
779 |
- |
780 |
-Ported to compiler-rt-sanitizers-4.0.0. Taken from |
781 |
- |
782 |
- https://gist.githubusercontent.com/pwaller/2337f3290f12634cad3e3730cff0a6c1/raw/83c87a8585e2f9662494db5662e5361beb093c26/nongnu.patch |
783 |
---- |
784 |
- lib/asan/asan_linux.cc | 4 +-- |
785 |
- lib/interception/interception_linux.cc | 2 +- |
786 |
- lib/msan/msan_linux.cc | 2 +- |
787 |
- .../sanitizer_common_interceptors_ioctl.inc | 4 +-- |
788 |
- lib/sanitizer_common/sanitizer_common_syscalls.inc | 2 +- |
789 |
- lib/sanitizer_common/sanitizer_linux_libcdep.cc | 12 +++---- |
790 |
- lib/sanitizer_common/sanitizer_platform.h | 7 ++++ |
791 |
- .../sanitizer_platform_interceptors.h | 2 +- |
792 |
- .../sanitizer_platform_limits_posix.cc | 37 ++++++++++++---------- |
793 |
- lib/tsan/rtl/tsan_platform_linux.cc | 2 +- |
794 |
- 10 files changed, 43 insertions(+), 31 deletions(-) |
795 |
- |
796 |
-diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc |
797 |
-index c051573..e295f60 100644 |
798 |
---- a/lib/asan/asan_linux.cc |
799 |
-+++ b/lib/asan/asan_linux.cc |
800 |
-@@ -39,7 +39,7 @@ |
801 |
- #include <sys/link_elf.h> |
802 |
- #endif |
803 |
- |
804 |
--#if SANITIZER_ANDROID || SANITIZER_FREEBSD |
805 |
-+#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_NONGNU |
806 |
- #include <ucontext.h> |
807 |
- extern "C" void* _DYNAMIC; |
808 |
- #else |
809 |
-@@ -80,7 +80,7 @@ void AsanApplyToGlobals(globals_op_fptr op, const void *needle) { |
810 |
- UNIMPLEMENTED(); |
811 |
- } |
812 |
- |
813 |
--#if SANITIZER_ANDROID |
814 |
-+#if SANITIZER_ANDROID || SANITIZER_NONGNU |
815 |
- // FIXME: should we do anything for Android? |
816 |
- void AsanCheckDynamicRTPrereqs() {} |
817 |
- void AsanCheckIncompatibleRT() {} |
818 |
-diff --git a/lib/interception/interception_linux.cc b/lib/interception/interception_linux.cc |
819 |
-index 6e908ac..76c1688 100644 |
820 |
---- a/lib/interception/interception_linux.cc |
821 |
-+++ b/lib/interception/interception_linux.cc |
822 |
-@@ -24,7 +24,7 @@ bool GetRealFunctionAddress(const char *func_name, uptr *func_addr, |
823 |
- return real == wrapper; |
824 |
- } |
825 |
- |
826 |
--#if !defined(__ANDROID__) // android does not have dlvsym |
827 |
-+#if !defined(__ANDROID__) && defined(__GLIBC__) // android does not have dlvsym |
828 |
- void *GetFuncAddrVer(const char *func_name, const char *ver) { |
829 |
- return dlvsym(RTLD_NEXT, func_name, ver); |
830 |
- } |
831 |
-diff --git a/lib/msan/msan_linux.cc b/lib/msan/msan_linux.cc |
832 |
-index 0a687f6..0852d97 100644 |
833 |
---- a/lib/msan/msan_linux.cc |
834 |
-+++ b/lib/msan/msan_linux.cc |
835 |
-@@ -13,7 +13,7 @@ |
836 |
- //===----------------------------------------------------------------------===// |
837 |
- |
838 |
- #include "sanitizer_common/sanitizer_platform.h" |
839 |
--#if SANITIZER_FREEBSD || SANITIZER_LINUX |
840 |
-+#if SANITIZER_FREEBSD || SANITIZER_LINUX && !SANITIZER_NONGNU |
841 |
- |
842 |
- #include "msan.h" |
843 |
- #include "msan_thread.h" |
844 |
-diff --git a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc |
845 |
-index 4ed9afe..64f584e 100644 |
846 |
---- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc |
847 |
-+++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc |
848 |
-@@ -100,7 +100,7 @@ static void ioctl_table_fill() { |
849 |
- _(SIOCGETVIFCNT, WRITE, struct_sioc_vif_req_sz); |
850 |
- #endif |
851 |
- |
852 |
--#if SANITIZER_LINUX |
853 |
-+#if SANITIZER_LINUX && !SANITIZER_NONGNU |
854 |
- // Conflicting request ids. |
855 |
- // _(CDROMAUDIOBUFSIZ, NONE, 0); |
856 |
- // _(SNDCTL_TMR_CONTINUE, NONE, 0); |
857 |
-@@ -361,7 +361,7 @@ static void ioctl_table_fill() { |
858 |
- _(VT_WAITACTIVE, NONE, 0); |
859 |
- #endif |
860 |
- |
861 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
862 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
863 |
- // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE |
864 |
- _(CYGETDEFTHRESH, WRITE, sizeof(int)); |
865 |
- _(CYGETDEFTIMEOUT, WRITE, sizeof(int)); |
866 |
-diff --git a/lib/sanitizer_common/sanitizer_common_syscalls.inc b/lib/sanitizer_common/sanitizer_common_syscalls.inc |
867 |
-index 469c8eb..24f8786 100644 |
868 |
---- a/lib/sanitizer_common/sanitizer_common_syscalls.inc |
869 |
-+++ b/lib/sanitizer_common/sanitizer_common_syscalls.inc |
870 |
-@@ -2038,7 +2038,7 @@ POST_SYSCALL(setrlimit)(long res, long resource, void *rlim) { |
871 |
- } |
872 |
- } |
873 |
- |
874 |
--#if !SANITIZER_ANDROID |
875 |
-+#if !SANITIZER_ANDROID && !SANITIZER_NONGNU |
876 |
- PRE_SYSCALL(prlimit64)(long pid, long resource, const void *new_rlim, |
877 |
- void *old_rlim) { |
878 |
- if (new_rlim) PRE_READ(new_rlim, struct_rlimit64_sz); |
879 |
-diff --git a/lib/sanitizer_common/sanitizer_linux_libcdep.cc b/lib/sanitizer_common/sanitizer_linux_libcdep.cc |
880 |
-index f99f0b5..3a773a9 100644 |
881 |
---- a/lib/sanitizer_common/sanitizer_linux_libcdep.cc |
882 |
-+++ b/lib/sanitizer_common/sanitizer_linux_libcdep.cc |
883 |
-@@ -152,7 +152,7 @@ bool SanitizerGetThreadName(char *name, int max_len) { |
884 |
- #endif |
885 |
- } |
886 |
- |
887 |
--#if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO |
888 |
-+#if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO && !SANITIZER_NONGNU |
889 |
- static uptr g_tls_size; |
890 |
- |
891 |
- #ifdef __i386__ |
892 |
-@@ -180,11 +180,11 @@ void InitTlsSize() { |
893 |
- } |
894 |
- #else |
895 |
- void InitTlsSize() { } |
896 |
--#endif // !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO |
897 |
-+#endif // !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO && !SANITIZER_NONGNU |
898 |
- |
899 |
- #if (defined(__x86_64__) || defined(__i386__) || defined(__mips__) \ |
900 |
- || defined(__aarch64__) || defined(__powerpc64__) || defined(__s390__)) \ |
901 |
-- && SANITIZER_LINUX && !SANITIZER_ANDROID |
902 |
-+ && SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
903 |
- // sizeof(struct pthread) from glibc. |
904 |
- static atomic_uintptr_t kThreadDescriptorSize; |
905 |
- |
906 |
-@@ -338,7 +338,7 @@ uptr ThreadSelf() { |
907 |
- |
908 |
- #if !SANITIZER_GO |
909 |
- static void GetTls(uptr *addr, uptr *size) { |
910 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
911 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
912 |
- # if defined(__x86_64__) || defined(__i386__) || defined(__s390__) |
913 |
- *addr = ThreadSelf(); |
914 |
- *size = GetTlsSize(); |
915 |
-@@ -364,7 +364,7 @@ static void GetTls(uptr *addr, uptr *size) { |
916 |
- *addr = (uptr) dtv[2]; |
917 |
- *size = (*addr == 0) ? 0 : ((uptr) segbase[0] - (uptr) dtv[2]); |
918 |
- } |
919 |
--#elif SANITIZER_ANDROID |
920 |
-+#elif SANITIZER_ANDROID || SANITIZER_NONGNU |
921 |
- *addr = 0; |
922 |
- *size = 0; |
923 |
- #else |
924 |
-@@ -375,7 +375,7 @@ static void GetTls(uptr *addr, uptr *size) { |
925 |
- |
926 |
- #if !SANITIZER_GO |
927 |
- uptr GetTlsSize() { |
928 |
--#if SANITIZER_FREEBSD || SANITIZER_ANDROID |
929 |
-+#if SANITIZER_FREEBSD || SANITIZER_ANDROID || SANITIZER_NONGNU |
930 |
- uptr addr, size; |
931 |
- GetTls(&addr, &size); |
932 |
- return size; |
933 |
-diff --git a/lib/sanitizer_common/sanitizer_platform.h b/lib/sanitizer_common/sanitizer_platform.h |
934 |
-index d9a8e8d..fe01c57 100644 |
935 |
---- a/lib/sanitizer_common/sanitizer_platform.h |
936 |
-+++ b/lib/sanitizer_common/sanitizer_platform.h |
937 |
-@@ -162,6 +162,13 @@ |
938 |
- # define SANITIZER_PPC64V2 0 |
939 |
- #endif |
940 |
- |
941 |
-+ |
942 |
-+#if defined(__linux__) && !defined(__GLIBC__) |
943 |
-+# define SANITIZER_NONGNU 1 |
944 |
-+#else |
945 |
-+# define SANITIZER_NONGNU 0 |
946 |
-+#endif |
947 |
-+ |
948 |
- // By default we allow to use SizeClassAllocator64 on 64-bit platform. |
949 |
- // But in some cases (e.g. AArch64's 39-bit address space) SizeClassAllocator64 |
950 |
- // does not work well and we need to fallback to SizeClassAllocator32. |
951 |
-diff --git a/lib/sanitizer_common/sanitizer_platform_interceptors.h b/lib/sanitizer_common/sanitizer_platform_interceptors.h |
952 |
-index 62875d1..212e6e8 100644 |
953 |
---- a/lib/sanitizer_common/sanitizer_platform_interceptors.h |
954 |
-+++ b/lib/sanitizer_common/sanitizer_platform_interceptors.h |
955 |
-@@ -23,7 +23,7 @@ |
956 |
- # define SI_NOT_WINDOWS 0 |
957 |
- #endif |
958 |
- |
959 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
960 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
961 |
- # define SI_LINUX_NOT_ANDROID 1 |
962 |
- #else |
963 |
- # define SI_LINUX_NOT_ANDROID 0 |
964 |
-diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc |
965 |
-index 683f019..245f856 100644 |
966 |
---- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc |
967 |
-+++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc |
968 |
-@@ -139,12 +139,14 @@ typedef struct user_fpregs elf_fpregset_t; |
969 |
- |
970 |
- #if SANITIZER_LINUX && !SANITIZER_ANDROID |
971 |
- #include <glob.h> |
972 |
--#include <obstack.h> |
973 |
-+# if !SANITIZER_NONGNU |
974 |
-+# include <obstack.h> |
975 |
-+# endif |
976 |
- #include <mqueue.h> |
977 |
--#include <net/if_ppp.h> |
978 |
--#include <netax25/ax25.h> |
979 |
--#include <netipx/ipx.h> |
980 |
--#include <netrom/netrom.h> |
981 |
-+#include <linux/if_ppp.h> |
982 |
-+#include <linux/ax25.h> |
983 |
-+#include <linux/ipx.h> |
984 |
-+#include <linux/netrom.h> |
985 |
- #if HAVE_RPC_XDR_H |
986 |
- # include <rpc/xdr.h> |
987 |
- #elif HAVE_TIRPC_RPC_XDR_H |
988 |
-@@ -160,7 +162,8 @@ typedef struct user_fpregs elf_fpregset_t; |
989 |
- # include <sys/procfs.h> |
990 |
- #endif |
991 |
- #include <sys/user.h> |
992 |
--#include <sys/ustat.h> |
993 |
-+// #include <sys/ustat.h> |
994 |
-+#include <sys/statfs.h> |
995 |
- #include <linux/cyclades.h> |
996 |
- #include <linux/if_eql.h> |
997 |
- #include <linux/if_plip.h> |
998 |
-@@ -252,7 +255,7 @@ namespace __sanitizer { |
999 |
- unsigned struct_itimerspec_sz = sizeof(struct itimerspec); |
1000 |
- #endif // SANITIZER_LINUX || SANITIZER_FREEBSD |
1001 |
- |
1002 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1003 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1004 |
- unsigned struct_ustat_sz = sizeof(struct ustat); |
1005 |
- unsigned struct_rlimit64_sz = sizeof(struct rlimit64); |
1006 |
- unsigned struct_statvfs64_sz = sizeof(struct statvfs64); |
1007 |
-@@ -310,7 +313,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(ElfW(Phdr)); |
1008 |
- unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); |
1009 |
- #endif |
1010 |
- |
1011 |
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID |
1012 |
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1013 |
- int glob_nomatch = GLOB_NOMATCH; |
1014 |
- int glob_altdirfunc = GLOB_ALTDIRFUNC; |
1015 |
- #endif |
1016 |
-@@ -404,7 +407,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); |
1017 |
- unsigned struct_termios_sz = sizeof(struct termios); |
1018 |
- unsigned struct_winsize_sz = sizeof(struct winsize); |
1019 |
- |
1020 |
--#if SANITIZER_LINUX |
1021 |
-+#if SANITIZER_LINUX && !SANITIZER_NONGNU |
1022 |
- unsigned struct_arpreq_sz = sizeof(struct arpreq); |
1023 |
- unsigned struct_cdrom_msf_sz = sizeof(struct cdrom_msf); |
1024 |
- unsigned struct_cdrom_multisession_sz = sizeof(struct cdrom_multisession); |
1025 |
-@@ -454,7 +457,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); |
1026 |
- unsigned struct_vt_mode_sz = sizeof(struct vt_mode); |
1027 |
- #endif // SANITIZER_LINUX || SANITIZER_FREEBSD |
1028 |
- |
1029 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1030 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1031 |
- unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct); |
1032 |
- unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor); |
1033 |
- #if EV_VERSION > (0x010000) |
1034 |
-@@ -822,7 +825,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); |
1035 |
- unsigned IOCTL_VT_WAITACTIVE = VT_WAITACTIVE; |
1036 |
- #endif // SANITIZER_LINUX || SANITIZER_FREEBSD |
1037 |
- |
1038 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1039 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1040 |
- unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH; |
1041 |
- unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT; |
1042 |
- unsigned IOCTL_CYGETMON = CYGETMON; |
1043 |
-@@ -985,7 +988,7 @@ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phdr); |
1044 |
- CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phnum); |
1045 |
- #endif // SANITIZER_LINUX || SANITIZER_FREEBSD |
1046 |
- |
1047 |
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID |
1048 |
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1049 |
- CHECK_TYPE_SIZE(glob_t); |
1050 |
- CHECK_SIZE_AND_OFFSET(glob_t, gl_pathc); |
1051 |
- CHECK_SIZE_AND_OFFSET(glob_t, gl_pathv); |
1052 |
-@@ -1019,6 +1022,7 @@ CHECK_TYPE_SIZE(iovec); |
1053 |
- CHECK_SIZE_AND_OFFSET(iovec, iov_base); |
1054 |
- CHECK_SIZE_AND_OFFSET(iovec, iov_len); |
1055 |
- |
1056 |
-+#if !SANITIZER_NONGNU |
1057 |
- CHECK_TYPE_SIZE(msghdr); |
1058 |
- CHECK_SIZE_AND_OFFSET(msghdr, msg_name); |
1059 |
- CHECK_SIZE_AND_OFFSET(msghdr, msg_namelen); |
1060 |
-@@ -1032,6 +1036,7 @@ CHECK_TYPE_SIZE(cmsghdr); |
1061 |
- CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_len); |
1062 |
- CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_level); |
1063 |
- CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type); |
1064 |
-+#endif |
1065 |
- |
1066 |
- COMPILER_CHECK(sizeof(__sanitizer_dirent) <= sizeof(dirent)); |
1067 |
- CHECK_SIZE_AND_OFFSET(dirent, d_ino); |
1068 |
-@@ -1134,7 +1139,7 @@ CHECK_SIZE_AND_OFFSET(mntent, mnt_passno); |
1069 |
- |
1070 |
- CHECK_TYPE_SIZE(ether_addr); |
1071 |
- |
1072 |
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID |
1073 |
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1074 |
- CHECK_TYPE_SIZE(ipc_perm); |
1075 |
- # if SANITIZER_FREEBSD |
1076 |
- CHECK_SIZE_AND_OFFSET(ipc_perm, key); |
1077 |
-@@ -1195,7 +1200,7 @@ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr); |
1078 |
- CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_data); |
1079 |
- #endif |
1080 |
- |
1081 |
--#if SANITIZER_LINUX |
1082 |
-+#if SANITIZER_LINUX && !SANITIZER_NONGNU |
1083 |
- COMPILER_CHECK(sizeof(__sanitizer_mallinfo) == sizeof(struct mallinfo)); |
1084 |
- #endif |
1085 |
- |
1086 |
-@@ -1245,7 +1250,7 @@ COMPILER_CHECK(__sanitizer_XDR_DECODE == XDR_DECODE); |
1087 |
- COMPILER_CHECK(__sanitizer_XDR_FREE == XDR_FREE); |
1088 |
- #endif |
1089 |
- |
1090 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1091 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1092 |
- COMPILER_CHECK(sizeof(__sanitizer_FILE) <= sizeof(FILE)); |
1093 |
- CHECK_SIZE_AND_OFFSET(FILE, _flags); |
1094 |
- CHECK_SIZE_AND_OFFSET(FILE, _IO_read_ptr); |
1095 |
-@@ -1264,7 +1269,7 @@ CHECK_SIZE_AND_OFFSET(FILE, _chain); |
1096 |
- CHECK_SIZE_AND_OFFSET(FILE, _fileno); |
1097 |
- #endif |
1098 |
- |
1099 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1100 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1101 |
- COMPILER_CHECK(sizeof(__sanitizer__obstack_chunk) <= sizeof(_obstack_chunk)); |
1102 |
- CHECK_SIZE_AND_OFFSET(_obstack_chunk, limit); |
1103 |
- CHECK_SIZE_AND_OFFSET(_obstack_chunk, prev); |
1104 |
-diff --git a/lib/tsan/rtl/tsan_platform_linux.cc b/lib/tsan/rtl/tsan_platform_linux.cc |
1105 |
-index 3313288..103c7b6 100644 |
1106 |
---- a/lib/tsan/rtl/tsan_platform_linux.cc |
1107 |
-+++ b/lib/tsan/rtl/tsan_platform_linux.cc |
1108 |
-@@ -287,7 +287,7 @@ void InitializePlatform() { |
1109 |
- // This is required to properly "close" the fds, because we do not see internal |
1110 |
- // closes within glibc. The code is a pure hack. |
1111 |
- int ExtractResolvFDs(void *state, int *fds, int nfd) { |
1112 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1113 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1114 |
- int cnt = 0; |
1115 |
- __res_state *statp = (__res_state*)state; |
1116 |
- for (int i = 0; i < MAXNS && cnt < nfd; i++) { |
1117 |
--- |
1118 |
-2.12.2 |
1119 |
|
1120 |
diff --git a/sys-libs/compiler-rt-sanitizers/files/compiler-rt-sanitizers-5.0.0-musl-patches.patch b/sys-libs/compiler-rt-sanitizers/files/compiler-rt-sanitizers-5.0.0-musl-patches.patch |
1121 |
deleted file mode 100644 |
1122 |
index a3ecec8..0000000 |
1123 |
--- a/sys-libs/compiler-rt-sanitizers/files/compiler-rt-sanitizers-5.0.0-musl-patches.patch |
1124 |
+++ /dev/null |
1125 |
@@ -1,344 +0,0 @@ |
1126 |
-From c7108b15fcb3a4b9e12009b07b1db7fbcf19ad07 Mon Sep 17 00:00:00 2001 |
1127 |
-From: "Jory A. Pratt" <anarchy@g.o> |
1128 |
-Date: Sat, 9 Sep 2017 08:31:15 -0500 |
1129 |
-Subject: [PATCH] Ported to compiler-rt-sanitizers-5.0.0. Taken from |
1130 |
- |
1131 |
-https://gist.githubusercontent.com/pwaller/2337f3290f12634cad3e3730cff0a6c1/raw/83c87a8585e2f9662494db5662e5361beb093c26/nongnu.patch |
1132 |
-Signed-off-by: Jory A. Pratt <anarchy@g.o> |
1133 |
---- |
1134 |
- lib/asan/asan_linux.cc | 4 +-- |
1135 |
- lib/interception/interception_linux.cc | 2 +- |
1136 |
- lib/msan/msan_linux.cc | 2 +- |
1137 |
- .../sanitizer_common_interceptors_ioctl.inc | 4 +-- |
1138 |
- lib/sanitizer_common/sanitizer_common_syscalls.inc | 2 +- |
1139 |
- lib/sanitizer_common/sanitizer_linux_libcdep.cc | 12 +++---- |
1140 |
- lib/sanitizer_common/sanitizer_platform.h | 7 ++++ |
1141 |
- .../sanitizer_platform_interceptors.h | 2 +- |
1142 |
- .../sanitizer_platform_limits_posix.cc | 37 ++++++++++++---------- |
1143 |
- lib/tsan/rtl/tsan_platform_linux.cc | 2 +- |
1144 |
- 10 files changed, 43 insertions(+), 31 deletions(-) |
1145 |
- |
1146 |
-diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc |
1147 |
-index 6d47ba4..c58dd48 100644 |
1148 |
---- a/lib/asan/asan_linux.cc |
1149 |
-+++ b/lib/asan/asan_linux.cc |
1150 |
-@@ -39,7 +39,7 @@ |
1151 |
- #include <sys/link_elf.h> |
1152 |
- #endif |
1153 |
- |
1154 |
--#if SANITIZER_ANDROID || SANITIZER_FREEBSD |
1155 |
-+#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_NONGNU |
1156 |
- #include <ucontext.h> |
1157 |
- extern "C" void* _DYNAMIC; |
1158 |
- #else |
1159 |
-@@ -86,7 +86,7 @@ void AsanApplyToGlobals(globals_op_fptr op, const void *needle) { |
1160 |
- UNIMPLEMENTED(); |
1161 |
- } |
1162 |
- |
1163 |
--#if SANITIZER_ANDROID |
1164 |
-+#if SANITIZER_ANDROID || SANITIZER_NONGNU |
1165 |
- // FIXME: should we do anything for Android? |
1166 |
- void AsanCheckDynamicRTPrereqs() {} |
1167 |
- void AsanCheckIncompatibleRT() {} |
1168 |
-diff --git a/lib/interception/interception_linux.cc b/lib/interception/interception_linux.cc |
1169 |
-index 6e908ac..76c1688 100644 |
1170 |
---- a/lib/interception/interception_linux.cc |
1171 |
-+++ b/lib/interception/interception_linux.cc |
1172 |
-@@ -24,7 +24,7 @@ bool GetRealFunctionAddress(const char *func_name, uptr *func_addr, |
1173 |
- return real == wrapper; |
1174 |
- } |
1175 |
- |
1176 |
--#if !defined(__ANDROID__) // android does not have dlvsym |
1177 |
-+#if !defined(__ANDROID__) && defined(__GLIBC__) // android does not have dlvsym |
1178 |
- void *GetFuncAddrVer(const char *func_name, const char *ver) { |
1179 |
- return dlvsym(RTLD_NEXT, func_name, ver); |
1180 |
- } |
1181 |
-diff --git a/lib/msan/msan_linux.cc b/lib/msan/msan_linux.cc |
1182 |
-index 0a687f6..0852d97 100644 |
1183 |
---- a/lib/msan/msan_linux.cc |
1184 |
-+++ b/lib/msan/msan_linux.cc |
1185 |
-@@ -13,7 +13,7 @@ |
1186 |
- //===----------------------------------------------------------------------===// |
1187 |
- |
1188 |
- #include "sanitizer_common/sanitizer_platform.h" |
1189 |
--#if SANITIZER_FREEBSD || SANITIZER_LINUX |
1190 |
-+#if SANITIZER_FREEBSD || SANITIZER_LINUX && !SANITIZER_NONGNU |
1191 |
- |
1192 |
- #include "msan.h" |
1193 |
- #include "msan_thread.h" |
1194 |
-diff --git a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc |
1195 |
-index 4ed9afe..64f584e 100644 |
1196 |
---- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc |
1197 |
-+++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc |
1198 |
-@@ -100,7 +100,7 @@ static void ioctl_table_fill() { |
1199 |
- _(SIOCGETVIFCNT, WRITE, struct_sioc_vif_req_sz); |
1200 |
- #endif |
1201 |
- |
1202 |
--#if SANITIZER_LINUX |
1203 |
-+#if SANITIZER_LINUX && !SANITIZER_NONGNU |
1204 |
- // Conflicting request ids. |
1205 |
- // _(CDROMAUDIOBUFSIZ, NONE, 0); |
1206 |
- // _(SNDCTL_TMR_CONTINUE, NONE, 0); |
1207 |
-@@ -361,7 +361,7 @@ static void ioctl_table_fill() { |
1208 |
- _(VT_WAITACTIVE, NONE, 0); |
1209 |
- #endif |
1210 |
- |
1211 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1212 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1213 |
- // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE |
1214 |
- _(CYGETDEFTHRESH, WRITE, sizeof(int)); |
1215 |
- _(CYGETDEFTIMEOUT, WRITE, sizeof(int)); |
1216 |
-diff --git a/lib/sanitizer_common/sanitizer_common_syscalls.inc b/lib/sanitizer_common/sanitizer_common_syscalls.inc |
1217 |
-index 469c8eb..24f8786 100644 |
1218 |
---- a/lib/sanitizer_common/sanitizer_common_syscalls.inc |
1219 |
-+++ b/lib/sanitizer_common/sanitizer_common_syscalls.inc |
1220 |
-@@ -2038,7 +2038,7 @@ POST_SYSCALL(setrlimit)(long res, long resource, void *rlim) { |
1221 |
- } |
1222 |
- } |
1223 |
- |
1224 |
--#if !SANITIZER_ANDROID |
1225 |
-+#if !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1226 |
- PRE_SYSCALL(prlimit64)(long pid, long resource, const void *new_rlim, |
1227 |
- void *old_rlim) { |
1228 |
- if (new_rlim) PRE_READ(new_rlim, struct_rlimit64_sz); |
1229 |
-diff --git a/lib/sanitizer_common/sanitizer_linux_libcdep.cc b/lib/sanitizer_common/sanitizer_linux_libcdep.cc |
1230 |
-index 52196db..045d933 100644 |
1231 |
---- a/lib/sanitizer_common/sanitizer_linux_libcdep.cc |
1232 |
-+++ b/lib/sanitizer_common/sanitizer_linux_libcdep.cc |
1233 |
-@@ -148,7 +148,7 @@ bool SanitizerGetThreadName(char *name, int max_len) { |
1234 |
- #endif |
1235 |
- } |
1236 |
- |
1237 |
--#if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO |
1238 |
-+#if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO && !SANITIZER_NONGNU |
1239 |
- static uptr g_tls_size; |
1240 |
- |
1241 |
- #ifdef __i386__ |
1242 |
-@@ -176,11 +176,11 @@ void InitTlsSize() { |
1243 |
- } |
1244 |
- #else |
1245 |
- void InitTlsSize() { } |
1246 |
--#endif // !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO |
1247 |
-+#endif // !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO && !SANITIZER_NONGNU |
1248 |
- |
1249 |
- #if (defined(__x86_64__) || defined(__i386__) || defined(__mips__) \ |
1250 |
- || defined(__aarch64__) || defined(__powerpc64__) || defined(__s390__) \ |
1251 |
-- || defined(__arm__)) && SANITIZER_LINUX && !SANITIZER_ANDROID |
1252 |
-+ || defined(__arm__)) && SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1253 |
- // sizeof(struct pthread) from glibc. |
1254 |
- static atomic_uintptr_t kThreadDescriptorSize; |
1255 |
- |
1256 |
-@@ -335,7 +335,7 @@ uptr ThreadSelf() { |
1257 |
- |
1258 |
- #if !SANITIZER_GO |
1259 |
- static void GetTls(uptr *addr, uptr *size) { |
1260 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1261 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1262 |
- # if defined(__x86_64__) || defined(__i386__) || defined(__s390__) |
1263 |
- *addr = ThreadSelf(); |
1264 |
- *size = GetTlsSize(); |
1265 |
-@@ -362,7 +362,7 @@ static void GetTls(uptr *addr, uptr *size) { |
1266 |
- *addr = (uptr) dtv[2]; |
1267 |
- *size = (*addr == 0) ? 0 : ((uptr) segbase[0] - (uptr) dtv[2]); |
1268 |
- } |
1269 |
--#elif SANITIZER_ANDROID |
1270 |
-+#elif SANITIZER_ANDROID || SANITIZER_NONGNU |
1271 |
- *addr = 0; |
1272 |
- *size = 0; |
1273 |
- #else |
1274 |
-@@ -373,7 +373,7 @@ static void GetTls(uptr *addr, uptr *size) { |
1275 |
- |
1276 |
- #if !SANITIZER_GO |
1277 |
- uptr GetTlsSize() { |
1278 |
--#if SANITIZER_FREEBSD || SANITIZER_ANDROID |
1279 |
-+#if SANITIZER_FREEBSD || SANITIZER_ANDROID || SANITIZER_NONGNU |
1280 |
- uptr addr, size; |
1281 |
- GetTls(&addr, &size); |
1282 |
- return size; |
1283 |
-diff --git a/lib/sanitizer_common/sanitizer_platform.h b/lib/sanitizer_common/sanitizer_platform.h |
1284 |
-index 396f7c9..5af6f1e 100644 |
1285 |
---- a/lib/sanitizer_common/sanitizer_platform.h |
1286 |
-+++ b/lib/sanitizer_common/sanitizer_platform.h |
1287 |
-@@ -175,6 +175,13 @@ |
1288 |
- # define SANITIZER_ARM 0 |
1289 |
- #endif |
1290 |
- |
1291 |
-+ |
1292 |
-+#if defined(__linux__) && !defined(__GLIBC__) |
1293 |
-+# define SANITIZER_NONGNU 1 |
1294 |
-+#else |
1295 |
-+# define SANITIZER_NONGNU 0 |
1296 |
-+#endif |
1297 |
-+ |
1298 |
- // By default we allow to use SizeClassAllocator64 on 64-bit platform. |
1299 |
- // But in some cases (e.g. AArch64's 39-bit address space) SizeClassAllocator64 |
1300 |
- // does not work well and we need to fallback to SizeClassAllocator32. |
1301 |
-diff --git a/lib/sanitizer_common/sanitizer_platform_interceptors.h b/lib/sanitizer_common/sanitizer_platform_interceptors.h |
1302 |
-index 0380cee..0a39abb 100644 |
1303 |
---- a/lib/sanitizer_common/sanitizer_platform_interceptors.h |
1304 |
-+++ b/lib/sanitizer_common/sanitizer_platform_interceptors.h |
1305 |
-@@ -31,7 +31,7 @@ |
1306 |
- # define SI_POSIX 0 |
1307 |
- #endif |
1308 |
- |
1309 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1310 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1311 |
- # define SI_LINUX_NOT_ANDROID 1 |
1312 |
- #else |
1313 |
- # define SI_LINUX_NOT_ANDROID 0 |
1314 |
-diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc |
1315 |
-index 83f4fd2..c75a979 100644 |
1316 |
---- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc |
1317 |
-+++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc |
1318 |
-@@ -138,12 +138,14 @@ typedef struct user_fpregs elf_fpregset_t; |
1319 |
- |
1320 |
- #if SANITIZER_LINUX && !SANITIZER_ANDROID |
1321 |
- #include <glob.h> |
1322 |
--#include <obstack.h> |
1323 |
-+# if !SANITIZER_NONGNU |
1324 |
-+# include <obstack.h> |
1325 |
-+# endif |
1326 |
- #include <mqueue.h> |
1327 |
--#include <net/if_ppp.h> |
1328 |
--#include <netax25/ax25.h> |
1329 |
--#include <netipx/ipx.h> |
1330 |
--#include <netrom/netrom.h> |
1331 |
-+#include <linux/if_ppp.h> |
1332 |
-+#include <linux/ax25.h> |
1333 |
-+#include <linux/ipx.h> |
1334 |
-+#include <linux/netrom.h> |
1335 |
- #if HAVE_RPC_XDR_H |
1336 |
- # include <rpc/xdr.h> |
1337 |
- #elif HAVE_TIRPC_RPC_XDR_H |
1338 |
-@@ -159,7 +161,8 @@ typedef struct user_fpregs elf_fpregset_t; |
1339 |
- # include <sys/procfs.h> |
1340 |
- #endif |
1341 |
- #include <sys/user.h> |
1342 |
--#include <sys/ustat.h> |
1343 |
-+// #include <sys/ustat.h> |
1344 |
-+#include <sys/statfs.h> |
1345 |
- #include <linux/cyclades.h> |
1346 |
- #include <linux/if_eql.h> |
1347 |
- #include <linux/if_plip.h> |
1348 |
-@@ -251,7 +254,7 @@ namespace __sanitizer { |
1349 |
- unsigned struct_itimerspec_sz = sizeof(struct itimerspec); |
1350 |
- #endif // SANITIZER_LINUX || SANITIZER_FREEBSD |
1351 |
- |
1352 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1353 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1354 |
- unsigned struct_ustat_sz = sizeof(struct ustat); |
1355 |
- unsigned struct_rlimit64_sz = sizeof(struct rlimit64); |
1356 |
- unsigned struct_statvfs64_sz = sizeof(struct statvfs64); |
1357 |
-@@ -309,7 +312,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(ElfW(Phdr)); |
1358 |
- unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); |
1359 |
- #endif |
1360 |
- |
1361 |
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID |
1362 |
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1363 |
- int glob_nomatch = GLOB_NOMATCH; |
1364 |
- int glob_altdirfunc = GLOB_ALTDIRFUNC; |
1365 |
- #endif |
1366 |
-@@ -403,7 +406,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); |
1367 |
- unsigned struct_termios_sz = sizeof(struct termios); |
1368 |
- unsigned struct_winsize_sz = sizeof(struct winsize); |
1369 |
- |
1370 |
--#if SANITIZER_LINUX |
1371 |
-+#if SANITIZER_LINUX && !SANITIZER_NONGNU |
1372 |
- unsigned struct_arpreq_sz = sizeof(struct arpreq); |
1373 |
- unsigned struct_cdrom_msf_sz = sizeof(struct cdrom_msf); |
1374 |
- unsigned struct_cdrom_multisession_sz = sizeof(struct cdrom_multisession); |
1375 |
-@@ -453,7 +456,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); |
1376 |
- unsigned struct_vt_mode_sz = sizeof(struct vt_mode); |
1377 |
- #endif // SANITIZER_LINUX || SANITIZER_FREEBSD |
1378 |
- |
1379 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1380 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1381 |
- unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct); |
1382 |
- unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor); |
1383 |
- #if EV_VERSION > (0x010000) |
1384 |
-@@ -821,7 +824,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); |
1385 |
- unsigned IOCTL_VT_WAITACTIVE = VT_WAITACTIVE; |
1386 |
- #endif // SANITIZER_LINUX || SANITIZER_FREEBSD |
1387 |
- |
1388 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1389 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1390 |
- unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH; |
1391 |
- unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT; |
1392 |
- unsigned IOCTL_CYGETMON = CYGETMON; |
1393 |
-@@ -976,7 +979,7 @@ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phdr); |
1394 |
- CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phnum); |
1395 |
- #endif // SANITIZER_LINUX || SANITIZER_FREEBSD |
1396 |
- |
1397 |
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID |
1398 |
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1399 |
- CHECK_TYPE_SIZE(glob_t); |
1400 |
- CHECK_SIZE_AND_OFFSET(glob_t, gl_pathc); |
1401 |
- CHECK_SIZE_AND_OFFSET(glob_t, gl_pathv); |
1402 |
-@@ -1010,6 +1013,7 @@ CHECK_TYPE_SIZE(iovec); |
1403 |
- CHECK_SIZE_AND_OFFSET(iovec, iov_base); |
1404 |
- CHECK_SIZE_AND_OFFSET(iovec, iov_len); |
1405 |
- |
1406 |
-+#if !SANITIZER_NONGNU |
1407 |
- CHECK_TYPE_SIZE(msghdr); |
1408 |
- CHECK_SIZE_AND_OFFSET(msghdr, msg_name); |
1409 |
- CHECK_SIZE_AND_OFFSET(msghdr, msg_namelen); |
1410 |
-@@ -1023,6 +1027,7 @@ CHECK_TYPE_SIZE(cmsghdr); |
1411 |
- CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_len); |
1412 |
- CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_level); |
1413 |
- CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type); |
1414 |
-+#endif |
1415 |
- |
1416 |
- COMPILER_CHECK(sizeof(__sanitizer_dirent) <= sizeof(dirent)); |
1417 |
- CHECK_SIZE_AND_OFFSET(dirent, d_ino); |
1418 |
-@@ -1125,7 +1130,7 @@ CHECK_SIZE_AND_OFFSET(mntent, mnt_passno); |
1419 |
- |
1420 |
- CHECK_TYPE_SIZE(ether_addr); |
1421 |
- |
1422 |
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID |
1423 |
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1424 |
- CHECK_TYPE_SIZE(ipc_perm); |
1425 |
- # if SANITIZER_FREEBSD |
1426 |
- CHECK_SIZE_AND_OFFSET(ipc_perm, key); |
1427 |
-@@ -1186,7 +1191,7 @@ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr); |
1428 |
- CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_data); |
1429 |
- #endif |
1430 |
- |
1431 |
--#if SANITIZER_LINUX |
1432 |
-+#if SANITIZER_LINUX && !SANITIZER_NONGNU |
1433 |
- COMPILER_CHECK(sizeof(__sanitizer_mallinfo) == sizeof(struct mallinfo)); |
1434 |
- #endif |
1435 |
- |
1436 |
-@@ -1236,7 +1241,7 @@ COMPILER_CHECK(__sanitizer_XDR_DECODE == XDR_DECODE); |
1437 |
- COMPILER_CHECK(__sanitizer_XDR_FREE == XDR_FREE); |
1438 |
- #endif |
1439 |
- |
1440 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1441 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1442 |
- COMPILER_CHECK(sizeof(__sanitizer_FILE) <= sizeof(FILE)); |
1443 |
- CHECK_SIZE_AND_OFFSET(FILE, _flags); |
1444 |
- CHECK_SIZE_AND_OFFSET(FILE, _IO_read_ptr); |
1445 |
-@@ -1255,7 +1260,7 @@ CHECK_SIZE_AND_OFFSET(FILE, _chain); |
1446 |
- CHECK_SIZE_AND_OFFSET(FILE, _fileno); |
1447 |
- #endif |
1448 |
- |
1449 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1450 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1451 |
- COMPILER_CHECK(sizeof(__sanitizer__obstack_chunk) <= sizeof(_obstack_chunk)); |
1452 |
- CHECK_SIZE_AND_OFFSET(_obstack_chunk, limit); |
1453 |
- CHECK_SIZE_AND_OFFSET(_obstack_chunk, prev); |
1454 |
-diff --git a/lib/tsan/rtl/tsan_platform_linux.cc b/lib/tsan/rtl/tsan_platform_linux.cc |
1455 |
-index ead1e57..2c020e3 100644 |
1456 |
---- a/lib/tsan/rtl/tsan_platform_linux.cc |
1457 |
-+++ b/lib/tsan/rtl/tsan_platform_linux.cc |
1458 |
-@@ -284,7 +284,7 @@ void InitializePlatform() { |
1459 |
- // This is required to properly "close" the fds, because we do not see internal |
1460 |
- // closes within glibc. The code is a pure hack. |
1461 |
- int ExtractResolvFDs(void *state, int *fds, int nfd) { |
1462 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1463 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1464 |
- int cnt = 0; |
1465 |
- struct __res_state *statp = (struct __res_state*)state; |
1466 |
- for (int i = 0; i < MAXNS && cnt < nfd; i++) { |
1467 |
--- |
1468 |
-2.14.1 |
1469 |
- |
1470 |
|
1471 |
diff --git a/sys-libs/compiler-rt-sanitizers/files/compiler-rt-sanitizers-6.0.0-musl-patches.patch b/sys-libs/compiler-rt-sanitizers/files/compiler-rt-sanitizers-6.0.0-musl-patches.patch |
1472 |
deleted file mode 100644 |
1473 |
index 034fc4a..0000000 |
1474 |
--- a/sys-libs/compiler-rt-sanitizers/files/compiler-rt-sanitizers-6.0.0-musl-patches.patch |
1475 |
+++ /dev/null |
1476 |
@@ -1,306 +0,0 @@ |
1477 |
-diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc |
1478 |
-index 625f32d..73cf77a 100644 |
1479 |
---- a/lib/asan/asan_linux.cc |
1480 |
-+++ b/lib/asan/asan_linux.cc |
1481 |
-@@ -46,7 +46,7 @@ |
1482 |
- #include <link.h> |
1483 |
- #endif |
1484 |
- |
1485 |
--#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS |
1486 |
-+#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS || SANITIZER_NONGNU |
1487 |
- #include <ucontext.h> |
1488 |
- extern "C" void* _DYNAMIC; |
1489 |
- #elif SANITIZER_NETBSD |
1490 |
-@@ -139,7 +139,7 @@ void AsanApplyToGlobals(globals_op_fptr op, const void *needle) { |
1491 |
- UNIMPLEMENTED(); |
1492 |
- } |
1493 |
- |
1494 |
--#if SANITIZER_ANDROID |
1495 |
-+#if SANITIZER_ANDROID || SANITIZER_NONGNU |
1496 |
- // FIXME: should we do anything for Android? |
1497 |
- void AsanCheckDynamicRTPrereqs() {} |
1498 |
- void AsanCheckIncompatibleRT() {} |
1499 |
-diff --git a/lib/interception/interception_linux.cc b/lib/interception/interception_linux.cc |
1500 |
-index c991550..918b635 100644 |
1501 |
---- a/lib/interception/interception_linux.cc |
1502 |
-+++ b/lib/interception/interception_linux.cc |
1503 |
-@@ -43,7 +43,7 @@ bool GetRealFunctionAddress(const char *func_name, uptr *func_addr, |
1504 |
- } |
1505 |
- |
1506 |
- // Android and Solaris do not have dlvsym |
1507 |
--#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS |
1508 |
-+#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && defined(__GLIBC__) |
1509 |
- void *GetFuncAddrVer(const char *func_name, const char *ver) { |
1510 |
- return dlvsym(RTLD_NEXT, func_name, ver); |
1511 |
- } |
1512 |
-diff --git a/lib/msan/msan_interceptors.cc b/lib/msan/msan_interceptors.cc |
1513 |
-index a7fe09b..6a04515 100644 |
1514 |
---- a/lib/msan/msan_interceptors.cc |
1515 |
-+++ b/lib/msan/msan_interceptors.cc |
1516 |
-@@ -1438,6 +1438,7 @@ static int msan_dl_iterate_phdr_cb(__sanitizer_dl_phdr_info *info, SIZE_T size, |
1517 |
- return cbdata->callback(info, size, cbdata->data); |
1518 |
- } |
1519 |
- |
1520 |
-+/* does not compile with musl |
1521 |
- INTERCEPTOR(void *, shmat, int shmid, const void *shmaddr, int shmflg) { |
1522 |
- ENSURE_MSAN_INITED(); |
1523 |
- void *p = REAL(shmat)(shmid, shmaddr, shmflg); |
1524 |
-@@ -1450,6 +1451,7 @@ INTERCEPTOR(void *, shmat, int shmid, const void *shmaddr, int shmflg) { |
1525 |
- } |
1526 |
- return p; |
1527 |
- } |
1528 |
-+*/ |
1529 |
- |
1530 |
- INTERCEPTOR(int, dl_iterate_phdr, dl_iterate_phdr_cb callback, void *data) { |
1531 |
- void *ctx; |
1532 |
-@@ -1668,7 +1670,7 @@ void InitializeInterceptors() { |
1533 |
- INTERCEPT_FUNCTION(pthread_join); |
1534 |
- INTERCEPT_FUNCTION(tzset); |
1535 |
- INTERCEPT_FUNCTION(__cxa_atexit); |
1536 |
-- INTERCEPT_FUNCTION(shmat); |
1537 |
-+ // INTERCEPT_FUNCTION(shmat); // does not compile with musl |
1538 |
- INTERCEPT_FUNCTION(fork); |
1539 |
- INTERCEPT_FUNCTION(openpty); |
1540 |
- INTERCEPT_FUNCTION(forkpty); |
1541 |
-diff --git a/lib/msan/msan_linux.cc b/lib/msan/msan_linux.cc |
1542 |
-index 4e6321f..e437fa6 100644 |
1543 |
---- a/lib/msan/msan_linux.cc |
1544 |
-+++ b/lib/msan/msan_linux.cc |
1545 |
-@@ -13,7 +13,7 @@ |
1546 |
- //===----------------------------------------------------------------------===// |
1547 |
- |
1548 |
- #include "sanitizer_common/sanitizer_platform.h" |
1549 |
--#if SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD |
1550 |
-+#if SANITIZER_FREEBSD || SANITIZER_LINUX && !SANITIZER_NONGNU || SANITIZER_NETBSD |
1551 |
- |
1552 |
- #include "msan.h" |
1553 |
- #include "msan_thread.h" |
1554 |
-diff --git a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc |
1555 |
-index 24e7548..20259b1 100644 |
1556 |
---- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc |
1557 |
-+++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc |
1558 |
-@@ -102,7 +102,7 @@ static void ioctl_table_fill() { |
1559 |
- _(SIOCGETVIFCNT, WRITE, struct_sioc_vif_req_sz); |
1560 |
- #endif |
1561 |
- |
1562 |
--#if SANITIZER_LINUX |
1563 |
-+#if SANITIZER_LINUX && !SANITIZER_NONGNU |
1564 |
- // Conflicting request ids. |
1565 |
- // _(CDROMAUDIOBUFSIZ, NONE, 0); |
1566 |
- // _(SNDCTL_TMR_CONTINUE, NONE, 0); |
1567 |
-@@ -363,7 +363,7 @@ static void ioctl_table_fill() { |
1568 |
- _(VT_WAITACTIVE, NONE, 0); |
1569 |
- #endif |
1570 |
- |
1571 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1572 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1573 |
- // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE |
1574 |
- _(CYGETDEFTHRESH, WRITE, sizeof(int)); |
1575 |
- _(CYGETDEFTIMEOUT, WRITE, sizeof(int)); |
1576 |
-diff --git a/lib/sanitizer_common/sanitizer_common_syscalls.inc b/lib/sanitizer_common/sanitizer_common_syscalls.inc |
1577 |
-index 469c8eb..24f8786 100644 |
1578 |
---- a/lib/sanitizer_common/sanitizer_common_syscalls.inc |
1579 |
-+++ b/lib/sanitizer_common/sanitizer_common_syscalls.inc |
1580 |
-@@ -2038,7 +2038,7 @@ POST_SYSCALL(setrlimit)(long res, long resource, void *rlim) { |
1581 |
- } |
1582 |
- } |
1583 |
- |
1584 |
--#if !SANITIZER_ANDROID |
1585 |
-+#if !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1586 |
- PRE_SYSCALL(prlimit64)(long pid, long resource, const void *new_rlim, |
1587 |
- void *old_rlim) { |
1588 |
- if (new_rlim) PRE_READ(new_rlim, struct_rlimit64_sz); |
1589 |
-diff --git a/lib/sanitizer_common/sanitizer_platform.h b/lib/sanitizer_common/sanitizer_platform.h |
1590 |
-index 334903c..5a8d1ea 100644 |
1591 |
---- a/lib/sanitizer_common/sanitizer_platform.h |
1592 |
-+++ b/lib/sanitizer_common/sanitizer_platform.h |
1593 |
-@@ -25,6 +25,12 @@ |
1594 |
- # define SANITIZER_LINUX 0 |
1595 |
- #endif |
1596 |
- |
1597 |
-+#if defined(__linux__) && !defined(__GLIBC__) |
1598 |
-+# define SANITIZER_NONGNU 1 |
1599 |
-+#else |
1600 |
-+# define SANITIZER_NONGNU 0 |
1601 |
-+#endif |
1602 |
-+ |
1603 |
- #if defined(__FreeBSD__) |
1604 |
- # define SANITIZER_FREEBSD 1 |
1605 |
- #else |
1606 |
-diff --git a/lib/sanitizer_common/sanitizer_platform_interceptors.h b/lib/sanitizer_common/sanitizer_platform_interceptors.h |
1607 |
-index b99ac44..d90e713 100644 |
1608 |
---- a/lib/sanitizer_common/sanitizer_platform_interceptors.h |
1609 |
-+++ b/lib/sanitizer_common/sanitizer_platform_interceptors.h |
1610 |
-@@ -38,7 +38,7 @@ |
1611 |
- # include "sanitizer_platform_limits_solaris.h" |
1612 |
- #endif |
1613 |
- |
1614 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1615 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1616 |
- # define SI_LINUX_NOT_ANDROID 1 |
1617 |
- #else |
1618 |
- # define SI_LINUX_NOT_ANDROID 0 |
1619 |
-diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc |
1620 |
-index f12e820..b98c57d 100644 |
1621 |
---- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc |
1622 |
-+++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc |
1623 |
-@@ -138,12 +138,14 @@ typedef struct user_fpregs elf_fpregset_t; |
1624 |
- |
1625 |
- #if SANITIZER_LINUX && !SANITIZER_ANDROID |
1626 |
- #include <glob.h> |
1627 |
--#include <obstack.h> |
1628 |
-+#if !SANITIZER_NONGNU |
1629 |
-+# include <obstack.h> |
1630 |
-+#endif |
1631 |
- #include <mqueue.h> |
1632 |
--#include <net/if_ppp.h> |
1633 |
--#include <netax25/ax25.h> |
1634 |
--#include <netipx/ipx.h> |
1635 |
--#include <netrom/netrom.h> |
1636 |
-+#include <linux/if_ppp.h> |
1637 |
-+#include <linux/ax25.h> |
1638 |
-+#include <linux/ipx.h> |
1639 |
-+#include <linux/netrom.h> |
1640 |
- #if HAVE_RPC_XDR_H |
1641 |
- # include <rpc/xdr.h> |
1642 |
- #elif HAVE_TIRPC_RPC_XDR_H |
1643 |
-@@ -159,7 +161,7 @@ typedef struct user_fpregs elf_fpregset_t; |
1644 |
- # include <sys/procfs.h> |
1645 |
- #endif |
1646 |
- #include <sys/user.h> |
1647 |
--#include <sys/ustat.h> |
1648 |
-+/* #include <sys/ustat.h> // is in glibc, but not in musl */ |
1649 |
- #include <linux/cyclades.h> |
1650 |
- #include <linux/if_eql.h> |
1651 |
- #include <linux/if_plip.h> |
1652 |
-@@ -252,7 +254,7 @@ namespace __sanitizer { |
1653 |
- unsigned struct_itimerspec_sz = sizeof(struct itimerspec); |
1654 |
- #endif // SANITIZER_LINUX || SANITIZER_FREEBSD |
1655 |
- |
1656 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1657 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1658 |
- unsigned struct_ustat_sz = sizeof(struct ustat); |
1659 |
- unsigned struct_rlimit64_sz = sizeof(struct rlimit64); |
1660 |
- unsigned struct_statvfs64_sz = sizeof(struct statvfs64); |
1661 |
-@@ -275,9 +277,9 @@ namespace __sanitizer { |
1662 |
- #endif |
1663 |
- |
1664 |
- |
1665 |
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID |
1666 |
-+#if (SANITIZER_LINUX && !SANITIZER_NONGNU || SANITIZER_FREEBSD) && !SANITIZER_ANDROID |
1667 |
- unsigned struct_shminfo_sz = sizeof(struct shminfo); |
1668 |
-- unsigned struct_shm_info_sz = sizeof(struct shm_info); |
1669 |
-+ unsigned struct_shm_info_sz = sizeof(nstruct shm_info); |
1670 |
- int shmctl_ipc_stat = (int)IPC_STAT; |
1671 |
- int shmctl_ipc_info = (int)IPC_INFO; |
1672 |
- int shmctl_shm_info = (int)SHM_INFO; |
1673 |
-@@ -311,7 +313,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(ElfW(Phdr)); |
1674 |
- unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); |
1675 |
- #endif |
1676 |
- |
1677 |
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID |
1678 |
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1679 |
- int glob_nomatch = GLOB_NOMATCH; |
1680 |
- int glob_altdirfunc = GLOB_ALTDIRFUNC; |
1681 |
- #endif |
1682 |
-@@ -405,7 +407,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); |
1683 |
- unsigned struct_termios_sz = sizeof(struct termios); |
1684 |
- unsigned struct_winsize_sz = sizeof(struct winsize); |
1685 |
- |
1686 |
--#if SANITIZER_LINUX |
1687 |
-+#if SANITIZER_LINUX && !SANITIZER_NONGNU |
1688 |
- unsigned struct_arpreq_sz = sizeof(struct arpreq); |
1689 |
- unsigned struct_cdrom_msf_sz = sizeof(struct cdrom_msf); |
1690 |
- unsigned struct_cdrom_multisession_sz = sizeof(struct cdrom_multisession); |
1691 |
-@@ -455,7 +457,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); |
1692 |
- unsigned struct_vt_mode_sz = sizeof(struct vt_mode); |
1693 |
- #endif // SANITIZER_LINUX || SANITIZER_FREEBSD |
1694 |
- |
1695 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1696 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1697 |
- unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct); |
1698 |
- unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor); |
1699 |
- #if EV_VERSION > (0x010000) |
1700 |
-@@ -823,7 +825,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); |
1701 |
- unsigned IOCTL_VT_WAITACTIVE = VT_WAITACTIVE; |
1702 |
- #endif // SANITIZER_LINUX || SANITIZER_FREEBSD |
1703 |
- |
1704 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1705 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1706 |
- unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH; |
1707 |
- unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT; |
1708 |
- unsigned IOCTL_CYGETMON = CYGETMON; |
1709 |
-@@ -978,7 +980,7 @@ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phdr); |
1710 |
- CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phnum); |
1711 |
- #endif // SANITIZER_LINUX || SANITIZER_FREEBSD |
1712 |
- |
1713 |
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID |
1714 |
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1715 |
- CHECK_TYPE_SIZE(glob_t); |
1716 |
- CHECK_SIZE_AND_OFFSET(glob_t, gl_pathc); |
1717 |
- CHECK_SIZE_AND_OFFSET(glob_t, gl_pathv); |
1718 |
-@@ -1012,6 +1014,7 @@ CHECK_TYPE_SIZE(iovec); |
1719 |
- CHECK_SIZE_AND_OFFSET(iovec, iov_base); |
1720 |
- CHECK_SIZE_AND_OFFSET(iovec, iov_len); |
1721 |
- |
1722 |
-+#if !SANITIZER_NONGNU |
1723 |
- CHECK_TYPE_SIZE(msghdr); |
1724 |
- CHECK_SIZE_AND_OFFSET(msghdr, msg_name); |
1725 |
- CHECK_SIZE_AND_OFFSET(msghdr, msg_namelen); |
1726 |
-@@ -1025,6 +1028,7 @@ CHECK_TYPE_SIZE(cmsghdr); |
1727 |
- CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_len); |
1728 |
- CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_level); |
1729 |
- CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type); |
1730 |
-+#endif |
1731 |
- |
1732 |
- COMPILER_CHECK(sizeof(__sanitizer_dirent) <= sizeof(dirent)); |
1733 |
- CHECK_SIZE_AND_OFFSET(dirent, d_ino); |
1734 |
-@@ -1127,7 +1131,7 @@ CHECK_SIZE_AND_OFFSET(mntent, mnt_passno); |
1735 |
- |
1736 |
- CHECK_TYPE_SIZE(ether_addr); |
1737 |
- |
1738 |
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID |
1739 |
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1740 |
- CHECK_TYPE_SIZE(ipc_perm); |
1741 |
- # if SANITIZER_FREEBSD |
1742 |
- CHECK_SIZE_AND_OFFSET(ipc_perm, key); |
1743 |
-@@ -1188,7 +1192,7 @@ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr); |
1744 |
- CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_data); |
1745 |
- #endif |
1746 |
- |
1747 |
--#if SANITIZER_LINUX |
1748 |
-+#if SANITIZER_LINUX && !SANITIZER_NONGNU |
1749 |
- COMPILER_CHECK(sizeof(__sanitizer_mallinfo) == sizeof(struct mallinfo)); |
1750 |
- #endif |
1751 |
- |
1752 |
-@@ -1238,7 +1242,7 @@ COMPILER_CHECK(__sanitizer_XDR_DECODE == XDR_DECODE); |
1753 |
- COMPILER_CHECK(__sanitizer_XDR_FREE == XDR_FREE); |
1754 |
- #endif |
1755 |
- |
1756 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1757 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1758 |
- COMPILER_CHECK(sizeof(__sanitizer_FILE) <= sizeof(FILE)); |
1759 |
- CHECK_SIZE_AND_OFFSET(FILE, _flags); |
1760 |
- CHECK_SIZE_AND_OFFSET(FILE, _IO_read_ptr); |
1761 |
-@@ -1257,7 +1261,7 @@ CHECK_SIZE_AND_OFFSET(FILE, _chain); |
1762 |
- CHECK_SIZE_AND_OFFSET(FILE, _fileno); |
1763 |
- #endif |
1764 |
- |
1765 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1766 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1767 |
- COMPILER_CHECK(sizeof(__sanitizer__obstack_chunk) <= sizeof(_obstack_chunk)); |
1768 |
- CHECK_SIZE_AND_OFFSET(_obstack_chunk, limit); |
1769 |
- CHECK_SIZE_AND_OFFSET(_obstack_chunk, prev); |
1770 |
-diff --git a/lib/tsan/rtl/tsan_platform_linux.cc b/lib/tsan/rtl/tsan_platform_linux.cc |
1771 |
-index e14d5f5..389a3bc 100644 |
1772 |
---- a/lib/tsan/rtl/tsan_platform_linux.cc |
1773 |
-+++ b/lib/tsan/rtl/tsan_platform_linux.cc |
1774 |
-@@ -285,7 +285,7 @@ void InitializePlatform() { |
1775 |
- // This is required to properly "close" the fds, because we do not see internal |
1776 |
- // closes within glibc. The code is a pure hack. |
1777 |
- int ExtractResolvFDs(void *state, int *fds, int nfd) { |
1778 |
--#if SANITIZER_LINUX && !SANITIZER_ANDROID |
1779 |
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU |
1780 |
- int cnt = 0; |
1781 |
- struct __res_state *statp = (struct __res_state*)state; |
1782 |
- for (int i = 0; i < MAXNS && cnt < nfd; i++) { |