1 |
commit: 94ba29d473cb90da3805581093356203d859e20f |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 20 08:52:47 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 20 12:49:59 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94ba29d4 |
7 |
|
8 |
sys-libs/compiler-rt-sanitizers: Bump to 8.0.1 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
sys-libs/compiler-rt-sanitizers/Manifest | 2 + |
13 |
.../compiler-rt-sanitizers-8.0.1.ebuild | 171 +++++++++++++++++++++ |
14 |
2 files changed, 173 insertions(+) |
15 |
|
16 |
diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest |
17 |
index 305db448e32..9c5bf9c0bd5 100644 |
18 |
--- a/sys-libs/compiler-rt-sanitizers/Manifest |
19 |
+++ b/sys-libs/compiler-rt-sanitizers/Manifest |
20 |
@@ -2,8 +2,10 @@ DIST compiler-rt-5.0.2.src.tar.xz 1543256 BLAKE2B 09fa84b8f3e9b8627a14387bc6eaa3 |
21 |
DIST compiler-rt-6.0.1.src.tar.xz 1686820 BLAKE2B 59fa3f6e478bd4d6dfa056c85dcdc4349cbce7cea7fc56519feddc9d66c88c9ca48bad7967432ceb81d754213577f12707035afd827cf630a58627575b73b798 SHA512 69850c1ad92c66977fa217cbfb42a6a3f502fbe3d1a08daa7fc4cfeb617a7736d231f8ad8d93b10b1ae29bd753315d2a2d70f9ff1f4d18a9a7cc81758d91f963 |
22 |
DIST compiler-rt-7.1.0.src.tar.xz 1864248 BLAKE2B 42ab86416f7f85c5833cf85dbfb66b18a5d5cf53fa0560ad43b2ef39f5a2cd7ec1dbe4192cc8dac9b3f658b828c8306f26745c4d0e8f846d9f550ac22717eb33 SHA512 54d3ad80936f011dbf2ecebba3f1b7d4a156044b178228411ba855be5ec48eb646155b74dea1a96674adab6f93803456ae1435395e3240a4423a3f65f4566b55 |
23 |
DIST compiler-rt-8.0.0.src.tar.xz 1903020 BLAKE2B dc42c4772132fee5e225bb94805cd6917214c1d830b8ba4f1c774e6e1726ec7846432d1d6881085676b6d094ec04060ec2a95749eb7d93be79268ee7de1bd828 SHA512 fe9f69fe2269fa3d560ae97fdacd462f855fb0b7a5f647f5b8595206ff7febca6496725adc953de411a827c761e2b3ca11a2149f25707d6c62af0722b68ba913 |
24 |
+DIST compiler-rt-8.0.1.src.tar.xz 1954204 BLAKE2B cbba1d5fb37385116920da39dea26739d09e3f11c392503f8bc45293f1ef00c97f6a9fbd3ba67094d7f1e532410d0eca461943dadfdb10646110470a8e3b5f1f SHA512 12bf1bdabe25c0c3a84cc73a718fe154573dd729ec3ff5e099bd5f74c6bec9c80521b87ded646d3b20dfdb9aa51dea0234281418c7eb81805e1dd5d3107d3d8e |
25 |
DIST compiler-rt-sanitizers-6.0.1-patchset.tar.xz 8820 BLAKE2B d53ca357e060d058c7f20c51e74684f4c032fdf3ccec4c9f227dc7a5757206f331b9eda25a72c5c66faf4c44b2cc63eb439bd21bdd55d37a93918ab428fd7cd4 SHA512 782a34c56134bd061da30c1f598ddb9e90cb34a4e4ef058fa9634f6da372fd8693ff5e6cf98b59700942273240f83052b89ee2736b22f4e19bc8b519fbec8cad |
26 |
DIST llvm-5.0.2.src.tar.xz 23451868 BLAKE2B b7082be2e4ad557b29b9f6869811f262adcf5c73d552faf91b339bede75cf5eab58afefa12fa779a38be71fe2b8f4ea297c3213ee4e8370cc01972c59249d91c SHA512 3588be5ed969c3f7f6f16f56a12a6af2814d3d3c960d4a36ffebb0446cc75f19220bccee7fc605f9b01f5d5c188a905a046193cc12dec42dd5922048b5c27fe1 |
27 |
DIST llvm-6.0.1.src.tar.xz 25306628 BLAKE2B 60232d4d22f8096b565cc8d81fea0639f24f14e8fc4f66ade69fa15479181f07f655f26dff3fa24bf105762b495da316c5c9352db234bd0af6b9c3fff6d4d881 SHA512 cbbb00eb99cfeb4aff623ee1a5ba075e7b5a76fc00c5f9f539ff28c108598f5708a0369d5bd92683def5a20c2fe60cab7827b42d628dbfcc79b57e0e91b84dd9 |
28 |
DIST llvm-7.1.0.src.tar.xz 28313784 BLAKE2B b78d9a7fc5ef6e352e77d339e5c4eef5ccedf67c05e7abd949e72619aa8a5ed65e7e5e2008354be8e7916d75581719b99f34227838fcc86c5d0080913c2fb22c SHA512 a7dbd5693d1f2dae6b6e52893a100f9349cbfcfb25c5fdcad46364acbff0dbd3573f8fbc026c68eb9fd56335198aa94b866cc3dd7ea0cbd2cbfb5f8fe3444a7a |
29 |
DIST llvm-8.0.0.src.tar.xz 30503732 BLAKE2B d89bdeb0ec7d885e49cfe5ae025da84f00502d409710c0807a3cdd58dbd47c50cf6a635593569483150f7f2ecb0de0310bd6785cb7625219bf9f6224a0d68e1c SHA512 1602343b451b964f5d8c2d6b0654d89384c80d45883498c5f0e2f4196168dd4a1ed2a4dadb752076020243df42ffe46cb31d82ffc145d8e5874163cbb9686a1f |
30 |
+DIST llvm-8.0.1.src.tar.xz 30477608 BLAKE2B 4319c837b36111401e3b0f9659b8d875c89463bcc7816df1aefe1e3ff989860bbaa92504718f8e15416cfd9f3491c13777cd5cb661877b237b342b0e515b93f5 SHA512 82e120be5cabdfd5111aebbea68a663fe229c8861d73802d6ab09a3bf48f60de333e07e61f8fb61beaa14ac2bea24fcd74fa6f761acaf62469f536b79fcb1e16 |
31 |
|
32 |
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-8.0.1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-8.0.1.ebuild |
33 |
new file mode 100644 |
34 |
index 00000000000..e293bbe65f6 |
35 |
--- /dev/null |
36 |
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-8.0.1.ebuild |
37 |
@@ -0,0 +1,171 @@ |
38 |
+# Copyright 1999-2019 Gentoo Authors |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI=6 |
42 |
+ |
43 |
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
44 |
+# (needed due to CMAKE_BUILD_TYPE != Gentoo) |
45 |
+CMAKE_MIN_VERSION=3.7.0-r1 |
46 |
+PYTHON_COMPAT=( python2_7 ) |
47 |
+ |
48 |
+inherit check-reqs cmake-utils flag-o-matic llvm \ |
49 |
+ multiprocessing python-any-r1 |
50 |
+ |
51 |
+MY_P=compiler-rt-${PV/_/}.src |
52 |
+LLVM_P=llvm-${PV/_/}.src |
53 |
+ |
54 |
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" |
55 |
+HOMEPAGE="https://llvm.org/" |
56 |
+SRC_URI="https://github.com/llvm/llvm-project/releases/download/llvmorg-${PV}/${MY_P}.tar.xz |
57 |
+ test? ( https://github.com/llvm/llvm-project/releases/download/llvmorg-${PV}/${LLVM_P}.tar.xz )" |
58 |
+ |
59 |
+LICENSE="|| ( UoI-NCSA MIT )" |
60 |
+SLOT="${PV%_*}" |
61 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" |
62 |
+IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc" |
63 |
+# FIXME: libfuzzer does not enable all its necessary dependencies |
64 |
+REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )" |
65 |
+RESTRICT="!test? ( test ) !clang? ( test )" |
66 |
+ |
67 |
+CLANG_SLOT=${SLOT%%.*} |
68 |
+# llvm-6 for new lit options |
69 |
+DEPEND=" |
70 |
+ >=sys-devel/llvm-6 |
71 |
+ clang? ( sys-devel/clang ) |
72 |
+ elibc_glibc? ( net-libs/libtirpc ) |
73 |
+ test? ( |
74 |
+ !<sys-apps/sandbox-2.13 |
75 |
+ $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]") |
76 |
+ =sys-devel/clang-${PV%_*}*:${CLANG_SLOT} |
77 |
+ sys-libs/compiler-rt:${SLOT} ) |
78 |
+ ${PYTHON_DEPS}" |
79 |
+ |
80 |
+S=${WORKDIR}/${MY_P} |
81 |
+ |
82 |
+# least intrusive of all |
83 |
+CMAKE_BUILD_TYPE=RelWithDebInfo |
84 |
+ |
85 |
+check_space() { |
86 |
+ if use test; then |
87 |
+ local CHECKREQS_DISK_BUILD=11G |
88 |
+ check-reqs_pkg_pretend |
89 |
+ fi |
90 |
+} |
91 |
+ |
92 |
+pkg_pretend() { |
93 |
+ check_space |
94 |
+} |
95 |
+ |
96 |
+pkg_setup() { |
97 |
+ check_space |
98 |
+ llvm_pkg_setup |
99 |
+ python-any-r1_pkg_setup |
100 |
+} |
101 |
+ |
102 |
+src_unpack() { |
103 |
+ einfo "Unpacking ${MY_P}.tar.xz ..." |
104 |
+ tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die |
105 |
+ |
106 |
+ if use test; then |
107 |
+ einfo "Unpacking parts of ${LLVM_P}.tar.xz ..." |
108 |
+ tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \ |
109 |
+ "${LLVM_P}"/utils/unittest || die |
110 |
+ mv "${LLVM_P}" llvm || die |
111 |
+ fi |
112 |
+} |
113 |
+ |
114 |
+src_prepare() { |
115 |
+ cmake-utils_src_prepare |
116 |
+ |
117 |
+ if use test; then |
118 |
+ # remove tests that are (still) broken by new glibc |
119 |
+ # https://bugs.llvm.org/show_bug.cgi?id=36065 |
120 |
+ if use elibc_glibc && has_version '>=sys-libs/glibc-2.25'; then |
121 |
+ rm test/lsan/TestCases/Linux/fork_and_leak.cc || die |
122 |
+ fi |
123 |
+ fi |
124 |
+} |
125 |
+ |
126 |
+src_configure() { |
127 |
+ # pre-set since we need to pass it to cmake |
128 |
+ BUILD_DIR=${WORKDIR}/${P}_build |
129 |
+ |
130 |
+ if use clang; then |
131 |
+ local -x CC=${CHOST}-clang |
132 |
+ local -x CXX=${CHOST}-clang++ |
133 |
+ strip-unsupported-flags |
134 |
+ fi |
135 |
+ |
136 |
+ local mycmakeargs=( |
137 |
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" |
138 |
+ # use a build dir structure consistent with install |
139 |
+ # this makes it possible to easily deploy test-friendly clang |
140 |
+ -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}" |
141 |
+ |
142 |
+ -DCOMPILER_RT_INCLUDE_TESTS=$(usex test) |
143 |
+ # built-ins installed by sys-libs/compiler-rt |
144 |
+ -DCOMPILER_RT_BUILD_BUILTINS=OFF |
145 |
+ -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer) |
146 |
+ -DCOMPILER_RT_BUILD_PROFILE=$(usex profile) |
147 |
+ -DCOMPILER_RT_BUILD_SANITIZERS=$(usex sanitize) |
148 |
+ -DCOMPILER_RT_BUILD_XRAY=$(usex xray) |
149 |
+ ) |
150 |
+ if use test; then |
151 |
+ mycmakeargs+=( |
152 |
+ -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" |
153 |
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" |
154 |
+ -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" |
155 |
+ |
156 |
+ # they are created during src_test() |
157 |
+ -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang" |
158 |
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++" |
159 |
+ ) |
160 |
+ |
161 |
+ # same flags are passed for build & tests, so we need to strip |
162 |
+ # them down to a subset supported by clang |
163 |
+ CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \ |
164 |
+ CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \ |
165 |
+ strip-unsupported-flags |
166 |
+ fi |
167 |
+ |
168 |
+ if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then |
169 |
+ mycmakeargs+=( |
170 |
+ # disable use of SDK for the system itself |
171 |
+ -DDARWIN_macosx_CACHED_SYSROOT=/ |
172 |
+ ) |
173 |
+ fi |
174 |
+ |
175 |
+ cmake-utils_src_configure |
176 |
+ |
177 |
+ if use test; then |
178 |
+ local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* ) |
179 |
+ [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}" |
180 |
+ [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}" |
181 |
+ |
182 |
+ # copy clang over since resource_dir is located relatively to binary |
183 |
+ # therefore, we can put our new libraries in it |
184 |
+ mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die |
185 |
+ cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \ |
186 |
+ "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die |
187 |
+ cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \ |
188 |
+ "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die |
189 |
+ cp "${sys_dir}"/*builtins*.a \ |
190 |
+ "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die |
191 |
+ # we also need LLVMgold.so for gold-based tests |
192 |
+ if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then |
193 |
+ ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \ |
194 |
+ "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die |
195 |
+ fi |
196 |
+ fi |
197 |
+} |
198 |
+ |
199 |
+src_test() { |
200 |
+ # respect TMPDIR! |
201 |
+ local -x LIT_PRESERVES_TMP=1 |
202 |
+ # disable sandbox to have it stop clobbering LD_PRELOAD |
203 |
+ local -x SANDBOX_ON=0 |
204 |
+ # wipe LD_PRELOAD to make ASAN happy |
205 |
+ local -x LD_PRELOAD= |
206 |
+ |
207 |
+ cmake-utils_src_make check-all |
208 |
+} |