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