Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/compiler-rt-sanitizers/files/7.0.9999/, ...
Date: Sat, 20 Apr 2019 23:20:04
Message-Id: 1555704651.73fa10f6ea1f98fa52bb5cddbcb7d793d5fee1cb.mgorny@gentoo
1 commit: 73fa10f6ea1f98fa52bb5cddbcb7d793d5fee1cb
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 19 19:48:43 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 19 20:10:51 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73fa10f6
7
8 sys-libs/compiler-rt-sanitizers: Remove 7.0.9999
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 .../compiler-rt-sanitizers-7.0.1.ebuild | 4 +-
13 .../compiler-rt-sanitizers-7.0.9999.ebuild | 177 ---------------------
14 .../compiler-rt-sanitizers-7.1.0.ebuild | 4 +-
15 ...itizer_common-Fix-using-libtirpc-on-Linux.patch | 0
16 ...0002-test-Support-using-libtirpc-on-Linux.patch | 0
17 5 files changed, 4 insertions(+), 181 deletions(-)
18
19 diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.0.1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.0.1.ebuild
20 index de149ae7e0a..4365238f16c 100644
21 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.0.1.ebuild
22 +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.0.1.ebuild
23 @@ -78,8 +78,8 @@ src_prepare() {
24 cmake-utils_src_prepare
25
26 # apply the fixes for new glibc / split tirpc
27 - eapply "${FILESDIR}/7.0.9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch"
28 - eapply "${FILESDIR}/7.0.9999/0002-test-Support-using-libtirpc-on-Linux.patch"
29 + eapply "${FILESDIR}/7.1.0/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch"
30 + eapply "${FILESDIR}/7.1.0/0002-test-Support-using-libtirpc-on-Linux.patch"
31
32 if use test; then
33 # remove tests that are (still) broken by new glibc
34
35 diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.0.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.0.9999.ebuild
36 deleted file mode 100644
37 index b15b2a7a43a..00000000000
38 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.0.9999.ebuild
39 +++ /dev/null
40 @@ -1,177 +0,0 @@
41 -# Copyright 1999-2018 Gentoo Foundation
42 -# Distributed under the terms of the GNU General Public License v2
43 -
44 -EAPI=6
45 -
46 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
47 -# (needed due to CMAKE_BUILD_TYPE != Gentoo)
48 -CMAKE_MIN_VERSION=3.7.0-r1
49 -PYTHON_COMPAT=( python2_7 )
50 -
51 -inherit check-reqs cmake-utils flag-o-matic git-r3 llvm \
52 - multiprocessing python-any-r1
53 -
54 -DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
55 -HOMEPAGE="https://llvm.org/"
56 -SRC_URI=""
57 -EGIT_REPO_URI="https://git.llvm.org/git/compiler-rt.git
58 - https://github.com/llvm-mirror/compiler-rt.git"
59 -EGIT_BRANCH="release_70"
60 -
61 -LICENSE="|| ( UoI-NCSA MIT )"
62 -# Note: this needs to be updated to match version of clang-9999
63 -SLOT="7.0.1"
64 -KEYWORDS=""
65 -IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc"
66 -# FIXME: libfuzzer does not enable all its necessary dependencies
67 -REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )"
68 -RESTRICT="!test? ( test ) !clang? ( test )"
69 -
70 -CLANG_SLOT=${SLOT%%.*}
71 -# llvm-6 for new lit options
72 -DEPEND="
73 - >=sys-devel/llvm-6
74 - clang? ( sys-devel/clang )
75 - elibc_glibc? ( net-libs/libtirpc )
76 - test? (
77 - !<sys-apps/sandbox-2.13
78 - $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]")
79 - =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
80 - sys-libs/compiler-rt:${SLOT} )
81 - ${PYTHON_DEPS}"
82 -
83 -# least intrusive of all
84 -CMAKE_BUILD_TYPE=RelWithDebInfo
85 -
86 -check_space() {
87 - if use test; then
88 - local CHECKREQS_DISK_BUILD=11G
89 - check-reqs_pkg_pretend
90 - fi
91 -}
92 -
93 -pkg_pretend() {
94 - check_space
95 -}
96 -
97 -pkg_setup() {
98 - check_space
99 - llvm_pkg_setup
100 - python-any-r1_pkg_setup
101 -}
102 -
103 -src_unpack() {
104 - if use test; then
105 - # needed for patched gtest
106 - git-r3_fetch "https://git.llvm.org/git/llvm.git
107 - https://github.com/llvm-mirror/llvm.git"
108 - fi
109 - git-r3_fetch
110 -
111 - if use test; then
112 - git-r3_checkout https://llvm.org/git/llvm.git \
113 - "${WORKDIR}"/llvm '' utils/unittest
114 - fi
115 - git-r3_checkout
116 -}
117 -
118 -src_prepare() {
119 - cmake-utils_src_prepare
120 -
121 - # apply the fixes for new glibc / split tirpc
122 - eapply "${FILESDIR}/7.0.9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch"
123 - eapply "${FILESDIR}/7.0.9999/0002-test-Support-using-libtirpc-on-Linux.patch"
124 -
125 - if use test; then
126 - # remove tests that are (still) broken by new glibc
127 - # https://bugs.llvm.org/show_bug.cgi?id=36065
128 - if use elibc_glibc && has_version '>=sys-libs/glibc-2.25'; then
129 - rm test/lsan/TestCases/Linux/use_tls_dynamic.cc || die
130 - rm test/msan/dtls_test.c || die
131 - fi
132 - fi
133 -}
134 -
135 -src_configure() {
136 - # pre-set since we need to pass it to cmake
137 - BUILD_DIR=${WORKDIR}/${P}_build
138 -
139 - if use clang; then
140 - local -x CC=${CHOST}-clang
141 - local -x CXX=${CHOST}-clang++
142 - strip-unsupported-flags
143 - fi
144 -
145 - local mycmakeargs=(
146 - -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
147 - # use a build dir structure consistent with install
148 - # this makes it possible to easily deploy test-friendly clang
149 - -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}"
150 -
151 - -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
152 - # built-ins installed by sys-libs/compiler-rt
153 - -DCOMPILER_RT_BUILD_BUILTINS=OFF
154 - -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
155 - -DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
156 - -DCOMPILER_RT_BUILD_SANITIZERS=$(usex sanitize)
157 - -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
158 - )
159 - if use test; then
160 - mycmakeargs+=(
161 - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
162 - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
163 - -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
164 -
165 - # they are created during src_test()
166 - -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang"
167 - -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++"
168 - )
169 -
170 - # same flags are passed for build & tests, so we need to strip
171 - # them down to a subset supported by clang
172 - CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \
173 - CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \
174 - strip-unsupported-flags
175 - fi
176 -
177 - if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
178 - mycmakeargs+=(
179 - # disable use of SDK for the system itself
180 - -DDARWIN_macosx_CACHED_SYSROOT=/
181 - )
182 - fi
183 -
184 - cmake-utils_src_configure
185 -
186 - if use test; then
187 - local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* )
188 - [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
189 - [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
190 -
191 - # copy clang over since resource_dir is located relatively to binary
192 - # therefore, we can put our new libraries in it
193 - mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die
194 - cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \
195 - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die
196 - cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \
197 - "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die
198 - cp "${sys_dir}"/*builtins*.a \
199 - "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die
200 - # we also need LLVMgold.so for gold-based tests
201 - if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then
202 - ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \
203 - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die
204 - fi
205 - fi
206 -}
207 -
208 -src_test() {
209 - # respect TMPDIR!
210 - local -x LIT_PRESERVES_TMP=1
211 - # disable sandbox to have it stop clobbering LD_PRELOAD
212 - local -x SANDBOX_ON=0
213 - # wipe LD_PRELOAD to make ASAN happy
214 - local -x LD_PRELOAD=
215 -
216 - cmake-utils_src_make check-all
217 -}
218
219 diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.1.0.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.1.0.ebuild
220 index 7f5f41923f7..64095484294 100644
221 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.1.0.ebuild
222 +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.1.0.ebuild
223 @@ -78,8 +78,8 @@ src_prepare() {
224 cmake-utils_src_prepare
225
226 # apply the fixes for new glibc / split tirpc
227 - eapply "${FILESDIR}/7.0.9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch"
228 - eapply "${FILESDIR}/7.0.9999/0002-test-Support-using-libtirpc-on-Linux.patch"
229 + eapply "${FILESDIR}/7.1.0/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch"
230 + eapply "${FILESDIR}/7.1.0/0002-test-Support-using-libtirpc-on-Linux.patch"
231
232 if use test; then
233 # remove tests that are (still) broken by new glibc
234
235 diff --git a/sys-libs/compiler-rt-sanitizers/files/7.0.9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch b/sys-libs/compiler-rt-sanitizers/files/7.1.0/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch
236 similarity index 100%
237 rename from sys-libs/compiler-rt-sanitizers/files/7.0.9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch
238 rename to sys-libs/compiler-rt-sanitizers/files/7.1.0/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch
239
240 diff --git a/sys-libs/compiler-rt-sanitizers/files/7.0.9999/0002-test-Support-using-libtirpc-on-Linux.patch b/sys-libs/compiler-rt-sanitizers/files/7.1.0/0002-test-Support-using-libtirpc-on-Linux.patch
241 similarity index 100%
242 rename from sys-libs/compiler-rt-sanitizers/files/7.0.9999/0002-test-Support-using-libtirpc-on-Linux.patch
243 rename to sys-libs/compiler-rt-sanitizers/files/7.1.0/0002-test-Support-using-libtirpc-on-Linux.patch