1 |
commit: aae758c9fbe865136945a5cbfab71ec332f9ab48 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Nov 2 19:55:16 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Nov 3 14:49:56 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aae758c9 |
7 |
|
8 |
sys-libs/compiler-rt-sanitizers: Bump to 15.0.4 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
sys-libs/compiler-rt-sanitizers/Manifest | 3 + |
13 |
.../compiler-rt-sanitizers-15.0.4.ebuild | 219 +++++++++++++++++++++ |
14 |
2 files changed, 222 insertions(+) |
15 |
|
16 |
diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest |
17 |
index 76db93e396c0..e58954cd2d28 100644 |
18 |
--- a/sys-libs/compiler-rt-sanitizers/Manifest |
19 |
+++ b/sys-libs/compiler-rt-sanitizers/Manifest |
20 |
@@ -1,6 +1,7 @@ |
21 |
DIST llvm-gentoo-patchset-13.0.1.tar.xz 6288 BLAKE2B 899222b962486e924e4f8a2b574d285531a3f87af9385ff68c81db92aa224a0cde6d4ee049b5405056bedb4b232b50e1d5840024071a4a215f6311853304c92d SHA512 b2805337f1deca626768a44c5e7ac9ed16e0c31bead1647d44a493a8123c1b8e8f1c8ceee3536bcc6fa87fdd3fcec408229f701adf30eff07e7ef9889b847b01 |
22 |
DIST llvm-gentoo-patchset-14.0.6-r3.tar.xz 16904 BLAKE2B ebf67455071d6d3744cfc0491b8a33c4c63bfdbcf668565fa0718f6cdb01bced53be9d1cdf6774f6cd8427c07c0ede69503d74cf3574642a6967b38730248ebb SHA512 adc5a3212657d1defa7b720d1a7e9e91586439a34964d44b6897d21be3d208bd15c04bf20502dd7125ef8c368defaeea146eb844ca321be56eebcee52be606a9 |
23 |
DIST llvm-gentoo-patchset-15.0.3.tar.xz 17480 BLAKE2B d540b044ad0a0505ebf69f732c71fbce281cfc13ee599ba1289238b673a4ba9a4196e80d63fec99db82e55bf6f036fbb9ca0ba489169c2a732f0d1aa2e96ae5a SHA512 f877d5be3e38d64cccc2c8a47287562a42d07f84c7d1b466ae2161aed3f2797bebedaf1118623ae3ded2b47d6abc0ca29ba7a387c07b6097389e715a50cc3816 |
24 |
+DIST llvm-gentoo-patchset-15.0.4.tar.xz 16972 BLAKE2B 39cf8a7112d05e50bab8fd54b7559b5bbb4698d9c1adf97f9b4ef93b37d1c342a1e6fd0e85633369f049c9cbf930b50debb2e476c9a348c53943378a0f77d892 SHA512 a99a31dd6db384a3a896d101e148acb028c837bbc9c4b0239606fd6ef0f365312721eb6b209747024c264c2a9dcf81ee7f1cd1a9f372a7ac741a2456d8356e62 |
25 |
DIST llvm-gentoo-patchset-16.0.0_pre20221023.tar.xz 5876 BLAKE2B 496f2db3dd9b4c8d3a87bb098f0c995124c594a24095abc351ba3f13652ff2ee7a988dfb49652ab7780a5107f16509f56531375ab46f330797b0df562b6541d8 SHA512 518aca413537ce2e1aee8252692bc008e520c94fccc6c1b4a106decd4042cf21bbae95e3520a0c76cb7be81ad7a6a705734117ecaa254725dbc1f597f8ec6172 |
26 |
DIST llvm-gentoo-patchset-9999-1.tar.xz 4032 BLAKE2B b9413484dafed8ae0c68c2c164b45fd07bb8d5d0898f03abe118fd2120ffcb1fb6c949de9649a97c2e8105f24b9d131a725c67c0a502ca4d4d192c1a0d65f49d SHA512 e64449eeaf756c5bd945109937b84ba4bd8a015222bd792d39cf3947871e87571a4ca57814790e51544cb05ad4c2d1f044e818e4caaac7c2e2a02cb1aa290fcc |
27 |
DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13 |
28 |
@@ -8,5 +9,7 @@ DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf |
29 |
DIST llvm-project-14f996dca8a2b5b17d6917528bfd9ee71ba6192a.tar.gz 169054148 BLAKE2B a23af6658a6ea8a7cb4272faef151937da229e39383ec068d7ef81e72a25d2a46dc2a86255a7f1148b7385b339d1c17e62f627df834d8eccc39be8921575f88d SHA512 e719d296016e7af718d022424c337a5df8d7124fdb49b9f219ab2a5dc592e6a59f6c09064775ea9349bcf4eed9d72214abb648de649ab872174c35635c945c04 |
30 |
DIST llvm-project-15.0.3.src.tar.xz 112069972 BLAKE2B 3d29bab890467ba87fedcc4e76522f444e63e3dfbe546793f8e67821bcd403bad460ea176254c9e0b72d60ea56b8480e498a7f610477c1108732d178804c26cd SHA512 d378d417f01c56534f301cfe6cb4958d811c04ae22acaacc917e7e5f0380859d40ce19dffb265d046b70fff95dbc2e759f492e4d5af0ade52f21ebaa8da65856 |
31 |
DIST llvm-project-15.0.3.src.tar.xz.sig 438 BLAKE2B e7e0614e144eb878f694c12e97cf42ff8476e47cb55e8f259eb2ec52e303463ad753771271512e89baf0137c1382b11cfa028c85324174ebcd054a124000f537 SHA512 41229bebdb0c2df9a5e3a4d6f02d39fac7dc91f21895a659523beab4fa3ef99ff06eff5e4386221369b6e2b6f8fe974d67b7d8496d5911ce484d09ae0db8b916 |
32 |
+DIST llvm-project-15.0.4.src.tar.xz 110936424 BLAKE2B a02b76ad161e352b4d3d84baffdada9c6a0e704de7a2c4017df4d4d05a9e9d02113791cd7d91c3edfa1f5bcb7ab95e1772d60f7061514928c6828600f41a8322 SHA512 9d5b664dd77c08130601636f9d6c006b257f369470ce823aa56d06698a9f0edfec42f2c90da934b9ad52c4d7960d9a024ea46dc9640275be6d191b1ba9869459 |
33 |
+DIST llvm-project-15.0.4.src.tar.xz.sig 566 BLAKE2B f1a7be65fcce932dc125ae2b498f68a14e68dad0d7a1e031343c52c5dafb7b123e346f3efa50a7693584361abf01efe9401b1b5781dee6b92dc1045e538e9b7b SHA512 35899ffbd13fc44cade54246a423450571cb4b62b8d706864daa3eef2377c48e24ef3113218e39e29de995b7f7fa307f9187552766576c9050fd924beb517f6e |
34 |
DIST llvm-project-b34ea582774c057d9bf5591174d683fd3d8aa02b.tar.gz 169735900 BLAKE2B d3a82a07f855b038071fc8eb3f41a88b4c220a577219985ecddeb9a535ea8b159dbad575699997d90a49db74c074b5f4354ad707e91d6934daaa7319e0d8ee9b SHA512 3f5525c7d893bdac701cff4cf82dafc31608920d788d9b7401654f320b2432528cf4ae8ef013182807b3dc0c5b758c71f1efeedb672dd47fdb8aa6f434dfb583 |
35 |
DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f |
36 |
|
37 |
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-15.0.4.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-15.0.4.ebuild |
38 |
new file mode 100644 |
39 |
index 000000000000..a890877df54a |
40 |
--- /dev/null |
41 |
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-15.0.4.ebuild |
42 |
@@ -0,0 +1,219 @@ |
43 |
+# Copyright 1999-2022 Gentoo Authors |
44 |
+# Distributed under the terms of the GNU General Public License v2 |
45 |
+ |
46 |
+EAPI=8 |
47 |
+ |
48 |
+PYTHON_COMPAT=( python3_{8..11} ) |
49 |
+inherit check-reqs cmake flag-o-matic llvm llvm.org python-any-r1 |
50 |
+ |
51 |
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" |
52 |
+HOMEPAGE="https://llvm.org/" |
53 |
+ |
54 |
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" |
55 |
+SLOT="${LLVM_VERSION}" |
56 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos" |
57 |
+IUSE="+abi_x86_32 abi_x86_64 +clang debug test" |
58 |
+# base targets |
59 |
+IUSE+=" +libfuzzer +memprof +orc +profile +xray" |
60 |
+# sanitizer targets, keep in sync with config-ix.cmake |
61 |
+# NB: ubsan, scudo deliberately match two entries |
62 |
+SANITIZER_FLAGS=( |
63 |
+ asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo |
64 |
+ shadowcallstack gwp-asan |
65 |
+) |
66 |
+IUSE+=" ${SANITIZER_FLAGS[@]/#/+}" |
67 |
+REQUIRED_USE=" |
68 |
+ || ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray ) |
69 |
+ test? ( |
70 |
+ cfi? ( ubsan ) |
71 |
+ gwp-asan? ( scudo ) |
72 |
+ ) |
73 |
+" |
74 |
+RESTRICT=" |
75 |
+ !clang? ( test ) |
76 |
+ !test? ( test ) |
77 |
+" |
78 |
+ |
79 |
+DEPEND=" |
80 |
+ sys-devel/llvm:${LLVM_MAJOR} |
81 |
+ virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?] |
82 |
+" |
83 |
+BDEPEND=" |
84 |
+ >=dev-util/cmake-3.16 |
85 |
+ clang? ( sys-devel/clang ) |
86 |
+ elibc_glibc? ( net-libs/libtirpc ) |
87 |
+ test? ( |
88 |
+ !!<sys-apps/sandbox-2.13 |
89 |
+ $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]") |
90 |
+ =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR} |
91 |
+ sys-libs/compiler-rt:${LLVM_VERSION} |
92 |
+ ) |
93 |
+ !test? ( |
94 |
+ ${PYTHON_DEPS} |
95 |
+ ) |
96 |
+" |
97 |
+ |
98 |
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake ) |
99 |
+LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest ) |
100 |
+LLVM_PATCHSET=${PV/_/-} |
101 |
+llvm.org_set_globals |
102 |
+ |
103 |
+python_check_deps() { |
104 |
+ use test || return 0 |
105 |
+ python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]" |
106 |
+} |
107 |
+ |
108 |
+check_space() { |
109 |
+ if use test; then |
110 |
+ local CHECKREQS_DISK_BUILD=11G |
111 |
+ check-reqs_pkg_pretend |
112 |
+ fi |
113 |
+} |
114 |
+ |
115 |
+pkg_pretend() { |
116 |
+ check_space |
117 |
+} |
118 |
+ |
119 |
+pkg_setup() { |
120 |
+ check_space |
121 |
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup |
122 |
+ python-any-r1_pkg_setup |
123 |
+} |
124 |
+ |
125 |
+src_prepare() { |
126 |
+ sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die |
127 |
+ |
128 |
+ local flag |
129 |
+ for flag in "${SANITIZER_FLAGS[@]}"; do |
130 |
+ if ! use "${flag}"; then |
131 |
+ local cmake_flag=${flag/-/_} |
132 |
+ sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \ |
133 |
+ cmake/config-ix.cmake || die |
134 |
+ fi |
135 |
+ done |
136 |
+ |
137 |
+ # TODO: fix these tests to be skipped upstream |
138 |
+ if use asan && ! use profile; then |
139 |
+ rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die |
140 |
+ fi |
141 |
+ if use ubsan && ! use cfi; then |
142 |
+ > test/cfi/CMakeLists.txt || die |
143 |
+ fi |
144 |
+ |
145 |
+ llvm.org_src_prepare |
146 |
+} |
147 |
+ |
148 |
+src_configure() { |
149 |
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 |
150 |
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" |
151 |
+ |
152 |
+ # pre-set since we need to pass it to cmake |
153 |
+ BUILD_DIR=${WORKDIR}/compiler-rt_build |
154 |
+ |
155 |
+ if use clang; then |
156 |
+ local -x CC=${CHOST}-clang |
157 |
+ local -x CXX=${CHOST}-clang++ |
158 |
+ strip-unsupported-flags |
159 |
+ fi |
160 |
+ |
161 |
+ local flag want_sanitizer=OFF |
162 |
+ for flag in "${SANITIZER_FLAGS[@]}"; do |
163 |
+ if use "${flag}"; then |
164 |
+ want_sanitizer=ON |
165 |
+ break |
166 |
+ fi |
167 |
+ done |
168 |
+ |
169 |
+ local mycmakeargs=( |
170 |
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_VERSION}" |
171 |
+ # use a build dir structure consistent with install |
172 |
+ # this makes it possible to easily deploy test-friendly clang |
173 |
+ -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_VERSION}" |
174 |
+ |
175 |
+ -DCOMPILER_RT_INCLUDE_TESTS=$(usex test) |
176 |
+ # builtins & crt installed by sys-libs/compiler-rt |
177 |
+ -DCOMPILER_RT_BUILD_BUILTINS=OFF |
178 |
+ -DCOMPILER_RT_BUILD_CRT=OFF |
179 |
+ -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer) |
180 |
+ -DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof) |
181 |
+ -DCOMPILER_RT_BUILD_ORC=$(usex orc) |
182 |
+ -DCOMPILER_RT_BUILD_PROFILE=$(usex profile) |
183 |
+ -DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}" |
184 |
+ -DCOMPILER_RT_BUILD_XRAY=$(usex xray) |
185 |
+ |
186 |
+ -DPython3_EXECUTABLE="${PYTHON}" |
187 |
+ ) |
188 |
+ |
189 |
+ if use amd64; then |
190 |
+ mycmakeargs+=( |
191 |
+ -DCAN_TARGET_i386=$(usex abi_x86_32) |
192 |
+ -DCAN_TARGET_x86_64=$(usex abi_x86_64) |
193 |
+ ) |
194 |
+ fi |
195 |
+ |
196 |
+ if use test; then |
197 |
+ mycmakeargs+=( |
198 |
+ -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" |
199 |
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" |
200 |
+ -DLLVM_LIT_ARGS="$(get_lit_flags)" |
201 |
+ |
202 |
+ # they are created during src_test() |
203 |
+ -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang" |
204 |
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++" |
205 |
+ ) |
206 |
+ |
207 |
+ # same flags are passed for build & tests, so we need to strip |
208 |
+ # them down to a subset supported by clang |
209 |
+ CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \ |
210 |
+ CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \ |
211 |
+ strip-unsupported-flags |
212 |
+ fi |
213 |
+ |
214 |
+ if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then |
215 |
+ mycmakeargs+=( |
216 |
+ # setting -isysroot is disabled with compiler-rt-prefix-paths.patch |
217 |
+ # this allows adding arm64 support using SDK in EPREFIX |
218 |
+ -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk" |
219 |
+ # Set version based on the SDK in EPREFIX |
220 |
+ # This disables i386 for SDK >= 10.15 |
221 |
+ # Will error if has_use tsan and SDK < 10.12 |
222 |
+ -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')" |
223 |
+ # Use our libtool instead of looking it up with xcrun |
224 |
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool" |
225 |
+ ) |
226 |
+ fi |
227 |
+ |
228 |
+ cmake_src_configure |
229 |
+ |
230 |
+ if use test; then |
231 |
+ local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_VERSION}/lib/* ) |
232 |
+ [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}" |
233 |
+ [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}" |
234 |
+ |
235 |
+ # copy clang over since resource_dir is located relatively to binary |
236 |
+ # therefore, we can put our new libraries in it |
237 |
+ mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_VERSION}/include} || die |
238 |
+ cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \ |
239 |
+ "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die |
240 |
+ cp "${EPREFIX}"/usr/lib/clang/${LLVM_VERSION}/include/*.h \ |
241 |
+ "${BUILD_DIR}"/lib/clang/${LLVM_VERSION}/include/ || die |
242 |
+ cp "${sys_dir}"/*builtins*.a \ |
243 |
+ "${BUILD_DIR}/lib/clang/${LLVM_VERSION}/lib/${sys_dir##*/}/" || die |
244 |
+ # we also need LLVMgold.so for gold-based tests |
245 |
+ if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then |
246 |
+ ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \ |
247 |
+ "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die |
248 |
+ fi |
249 |
+ fi |
250 |
+} |
251 |
+ |
252 |
+src_test() { |
253 |
+ # respect TMPDIR! |
254 |
+ local -x LIT_PRESERVES_TMP=1 |
255 |
+ # disable sandbox to have it stop clobbering LD_PRELOAD |
256 |
+ local -x SANDBOX_ON=0 |
257 |
+ # wipe LD_PRELOAD to make ASAN happy |
258 |
+ local -x LD_PRELOAD= |
259 |
+ |
260 |
+ cmake_build check-all |
261 |
+} |