1 |
commit: 59128e1cbbe40a9d9ca966b308a785ff5ee035de |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Feb 9 10:03:54 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Feb 9 16:00:03 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59128e1c |
7 |
|
8 |
sys-libs/compiler-rt-sanitizers: Bump to 6.0.0rc2 |
9 |
|
10 |
sys-libs/compiler-rt-sanitizers/Manifest | 2 + |
11 |
.../compiler-rt-sanitizers-6.0.0_rc2.ebuild | 156 +++++++++++++++++++++ |
12 |
2 files changed, 158 insertions(+) |
13 |
|
14 |
diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest |
15 |
index cb8ead5dcaf..0990ba2ce84 100644 |
16 |
--- a/sys-libs/compiler-rt-sanitizers/Manifest |
17 |
+++ b/sys-libs/compiler-rt-sanitizers/Manifest |
18 |
@@ -1,5 +1,7 @@ |
19 |
DIST compiler-rt-4.0.1.src.tar.xz 1434100 BLAKE2B ca6bf78fc07f387b7244a52ef648b06a5685effb46a66b241a9ee847ecafb17d02602f49b0dbe473d47202586874a043a6d75141400062f526d2f808da323e1e SHA512 cfeb625884b273f7c0e6767b81a8d3e5f24e0b96a510d5764d9d47a0e215fc841b4cb9d1843c8fb428cd21def720cfbfe8d3593ff5bb390548ebc8c32a902649 |
20 |
DIST compiler-rt-5.0.1.src.tar.xz 1498220 BLAKE2B 61503df8a4075c2fe1e42d480753b861321b5de127e340f48d648fc38d81c7967cead17e136beaa5235cc92540f158915fccec77cf39aa7c336d106c9d265222 SHA512 61e23775db78bdeed3003a509b45ae609287db31302fed186f3210d481ecf062d1828571e63482215ab00ff732df8f3fa6c77334dfb677e4b76eb555d476b8c4 |
21 |
+DIST compiler-rt-6.0.0rc2.src.tar.xz 1635928 BLAKE2B 6d60e40e61f4d3496d259dff9471bbe41656a1ced8aa1eff3d2443ddd17ffb1a13c54e1dc632d326f8185cc0ace8af72eaaeed3c7e5b1e86411240349b2858ca SHA512 3c279f2c5fdad6ed3a2c49809eb2879cb6615d27920046f4d9bb1cc4d66da949b3b90f26dc8208dbea5602cb5f85e1a4d1e72daca7b7dfa4d405aed4743c7604 |
22 |
DIST compiler-rt-sanitizers-4.0.1-patchset.tar.xz 2384 BLAKE2B 6f9eee711c83570767f0bb634d0f91c18ee7f2af93a478938b8d5b6ce6f2c2fbaadb7bd5c7ee94a14dc1834359a046187db6bc7005b7c2efa539325dc0701ad9 SHA512 72d7357b4c27bbf8fa8b34803ddea905a9f1054e8fc7bf99a4ead9dc00408989ea2709f04be9cf45a27eeb4b9386c89feeb25b53a84f3cac9739196b89813887 |
23 |
DIST llvm-4.0.1.src.tar.xz 21065652 BLAKE2B 6327eed2d1feb108440f22d2581d1ff86c10a10c29793538d8d899c7e2dc83d3f7b147d3fd4bcce2bd2bf57c071b08c624aeafe40a3e7a3914506e7751727e6c SHA512 16adc39b34ddb628f81b171119a8e2a0e9138b25011e803ef0b688e2fbea116fc4953d3a1b61b90a98a75e33619f81566b7cb06a9a2ea4d04ac5e0eb303a2d1d |
24 |
DIST llvm-5.0.1.src.tar.xz 23428720 BLAKE2B 3db4d33df21018d17eef0042c0d8d82a8412bd5daa99cfb5405a6ec83c5774178fa76b220e8731c2a9a64dabf898aa90fe29c685327bd63a4f078e8e94a9a77e SHA512 bee1d45fca15ce725b1f2b1339b13eb6f750a3a321cfd099075477ec25835a8ca55b5366172c4aad46592dfd8afe372349ecf264f581463d017f9cee2d63c1cb |
25 |
+DIST llvm-6.0.0rc2.src.tar.xz 25288140 BLAKE2B 095f054ce2ccb1eee3def2b8c6cecc610c4392283062338aa20d2de33c951484a2dc6774db2727e19e879307cfc95dda2730185cde8e52f4f45851d8dd809b3e SHA512 3cb3521ba8d90bf2a90c49d753ab5e92f1e0ccfc86946f3767c06d0f276e2c4cf8ff2f984680835efbaa4dae1cd2d3a074468e547785e05a67ea55311b94a0e9 |
26 |
|
27 |
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.0_rc2.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.0_rc2.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..19492d445c2 |
30 |
--- /dev/null |
31 |
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.0_rc2.ebuild |
32 |
@@ -0,0 +1,156 @@ |
33 |
+# Copyright 1999-2018 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=6 |
37 |
+ |
38 |
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
39 |
+# (needed due to CMAKE_BUILD_TYPE != Gentoo) |
40 |
+CMAKE_MIN_VERSION=3.7.0-r1 |
41 |
+PYTHON_COMPAT=( python2_7 ) |
42 |
+ |
43 |
+inherit check-reqs cmake-utils flag-o-matic llvm python-any-r1 |
44 |
+ |
45 |
+MY_P=compiler-rt-${PV/_/}.src |
46 |
+LLVM_P=llvm-${PV/_/}.src |
47 |
+ |
48 |
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" |
49 |
+HOMEPAGE="https://llvm.org/" |
50 |
+SRC_URI="http://prereleases.llvm.org/${PV/_//}/${MY_P}.tar.xz |
51 |
+ test? ( http://prereleases.llvm.org/${PV/_//}/${LLVM_P}.tar.xz )" |
52 |
+ |
53 |
+LICENSE="|| ( UoI-NCSA MIT )" |
54 |
+SLOT="${PV%_*}" |
55 |
+KEYWORDS="" |
56 |
+IUSE="+clang test" |
57 |
+RESTRICT="!test? ( test ) !clang? ( test )" |
58 |
+ |
59 |
+LLVM_SLOT=${SLOT%%.*} |
60 |
+# llvm-6 for new lit options |
61 |
+DEPEND=" |
62 |
+ >=sys-devel/llvm-6 |
63 |
+ clang? ( sys-devel/clang ) |
64 |
+ test? ( |
65 |
+ app-portage/unsandbox |
66 |
+ $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") |
67 |
+ =sys-devel/clang-${PV%_*}*:${LLVM_SLOT} |
68 |
+ sys-libs/compiler-rt:${SLOT} ) |
69 |
+ ${PYTHON_DEPS}" |
70 |
+ |
71 |
+S=${WORKDIR}/${MY_P} |
72 |
+ |
73 |
+# least intrusive of all |
74 |
+CMAKE_BUILD_TYPE=RelWithDebInfo |
75 |
+ |
76 |
+check_space() { |
77 |
+ if use test; then |
78 |
+ local CHECKREQS_DISK_BUILD=11G |
79 |
+ check-reqs_pkg_pretend |
80 |
+ fi |
81 |
+} |
82 |
+ |
83 |
+pkg_pretend() { |
84 |
+ check_space |
85 |
+} |
86 |
+ |
87 |
+pkg_setup() { |
88 |
+ check_space |
89 |
+ llvm_pkg_setup |
90 |
+ python-any-r1_pkg_setup |
91 |
+} |
92 |
+ |
93 |
+src_unpack() { |
94 |
+ einfo "Unpacking ${MY_P}.tar.xz ..." |
95 |
+ tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die |
96 |
+ |
97 |
+ if use test; then |
98 |
+ einfo "Unpacking parts of ${LLVM_P}.tar.xz ..." |
99 |
+ tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \ |
100 |
+ "${LLVM_P}"/utils/{lit,unittest} || die |
101 |
+ mv "${LLVM_P}" llvm || die |
102 |
+ fi |
103 |
+} |
104 |
+ |
105 |
+src_configure() { |
106 |
+ # pre-set since we need to pass it to cmake |
107 |
+ BUILD_DIR=${WORKDIR}/${P}_build |
108 |
+ |
109 |
+ if use clang; then |
110 |
+ local -x CC=${CHOST}-clang |
111 |
+ local -x CXX=${CHOST}-clang++ |
112 |
+ strip-unsupported-flags |
113 |
+ fi |
114 |
+ |
115 |
+ local mycmakeargs=( |
116 |
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" |
117 |
+ # use a build dir structure consistent with install |
118 |
+ # this makes it possible to easily deploy test-friendly clang |
119 |
+ -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}" |
120 |
+ |
121 |
+ -DCOMPILER_RT_INCLUDE_TESTS=$(usex test) |
122 |
+ # built-ins installed by sys-libs/compiler-rt |
123 |
+ -DCOMPILER_RT_BUILD_BUILTINS=OFF |
124 |
+ -DCOMPILER_RT_BUILD_LIBFUZZER=ON |
125 |
+ -DCOMPILER_RT_BUILD_PROFILE=ON |
126 |
+ -DCOMPILER_RT_BUILD_SANITIZERS=ON |
127 |
+ -DCOMPILER_RT_BUILD_XRAY=ON |
128 |
+ ) |
129 |
+ if use test; then |
130 |
+ cat > "${T}"/unsandbox-lit.py <<-EOF || die |
131 |
+ import os, sys |
132 |
+ os.execlp("unsandbox", sys.argv[0], "lit", *sys.argv[1:]) |
133 |
+ EOF |
134 |
+ |
135 |
+ mycmakeargs+=( |
136 |
+ -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" |
137 |
+ -DLLVM_EXTERNAL_LIT="${T}/unsandbox-lit.py" |
138 |
+ -DLLVM_LIT_ARGS="-vv" |
139 |
+ |
140 |
+ # they are created during src_test() |
141 |
+ -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_SLOT}/bin/clang" |
142 |
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_SLOT}/bin/clang++" |
143 |
+ ) |
144 |
+ |
145 |
+ # same flags are passed for build & tests, so we need to strip |
146 |
+ # them down to a subset supported by clang |
147 |
+ CC=${EPREFIX}/usr/lib/llvm/${LLVM_SLOT}/bin/clang \ |
148 |
+ CXX=${EPREFIX}/usr/lib/llvm/${LLVM_SLOT}/bin/clang++ \ |
149 |
+ strip-unsupported-flags |
150 |
+ fi |
151 |
+ |
152 |
+ if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then |
153 |
+ mycmakeargs+=( |
154 |
+ # disable use of SDK for the system itself |
155 |
+ -DDARWIN_macosx_CACHED_SYSROOT=/ |
156 |
+ ) |
157 |
+ fi |
158 |
+ |
159 |
+ cmake-utils_src_configure |
160 |
+ |
161 |
+ if use test; then |
162 |
+ local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* ) |
163 |
+ [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}" |
164 |
+ [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}" |
165 |
+ |
166 |
+ # copy clang over since resource_dir is located relatively to binary |
167 |
+ # therefore, we can put our new libraries in it |
168 |
+ mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die |
169 |
+ cp "${EPREFIX}"/usr/lib/llvm/${LLVM_SLOT}/bin/clang{,++} \ |
170 |
+ "${BUILD_DIR}"/lib/llvm/${LLVM_SLOT}/bin/ || die |
171 |
+ cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \ |
172 |
+ "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die |
173 |
+ cp "${sys_dir}"/*builtins*.a \ |
174 |
+ "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die |
175 |
+ # we also need LLVMgold.so for gold-based tests |
176 |
+ if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_SLOT}/$(get_libdir)/LLVMgold.so ]]; then |
177 |
+ ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_SLOT}/$(get_libdir)/LLVMgold.so \ |
178 |
+ "${BUILD_DIR}"/lib/llvm/${LLVM_SLOT}/$(get_libdir)/ || die |
179 |
+ fi |
180 |
+ fi |
181 |
+} |
182 |
+ |
183 |
+src_test() { |
184 |
+ # respect TMPDIR! |
185 |
+ local -x LIT_PRESERVES_TMP=1 |
186 |
+ |
187 |
+ cmake-utils_src_make check-all |
188 |
+} |