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