1 |
commit: 1d810d1844a9c93c64436064d21b9c2469028140 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Mar 20 13:08:48 2023 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Mar 20 13:10:43 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d810d18 |
7 |
|
8 |
sys-libs/libomp: Remove old |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
sys-libs/libomp/Manifest | 5 - |
13 |
sys-libs/libomp/libomp-16.0.0_rc3.ebuild | 149 ----------------------- |
14 |
sys-libs/libomp/libomp-16.0.0_rc4.ebuild | 149 ----------------------- |
15 |
sys-libs/libomp/libomp-17.0.0_pre20230304.ebuild | 149 ----------------------- |
16 |
4 files changed, 452 deletions(-) |
17 |
|
18 |
diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest |
19 |
index c725a958e889..82554e5cb4e7 100644 |
20 |
--- a/sys-libs/libomp/Manifest |
21 |
+++ b/sys-libs/libomp/Manifest |
22 |
@@ -6,9 +6,4 @@ DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78 |
23 |
DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2 |
24 |
DIST llvm-project-16.0.0.src.tar.xz 117933476 BLAKE2B fa09cd8f647ce0daf5a7eae9ac03b99594a9b3193b12065f43f9a6731875243f2f5b354136bcadcb31622b246054e94f880eec3dab0bcd6ae89973fa9dca845c SHA512 3f040abc1b03205693824aeff2ee6efb0cff25fe04bd5265141c093f294655a1f3fcda73cab9c57cbed7523c8f186a7e2484afce0792c55e90e3fb80450fabb7 |
25 |
DIST llvm-project-16.0.0.src.tar.xz.sig 566 BLAKE2B daba130aa5662fbf7cc2e7aa8fa6b64f9cb355a72330f7a01a21b86389c6f2f85ae93de19ff08ba3f1cfe2834d9a2b7648bdf659caba3afdb2a0d13984774a54 SHA512 38e2449dce20cfbf813d1a9a68b36807722ac8ebb5ee07360fa215b2de8534d2329d3e41cfc3ed33e59e36714b94a6683a6d8077950bcf0037973492e0820fb3 |
26 |
-DIST llvm-project-16.0.0rc3.src.tar.xz 117914548 BLAKE2B 18ffa35eb73c7cc4626d7b6b7b30aade7171ee2e17fb8d72e79a67185e809f611fefa4cfef17e5cd16822a5a70de2222534dc9f146fc53987eb49ff6a9d98c18 SHA512 d14e5e5ec984a0dc0292a2d27440398b3e32f120c1579517054dcb1a05dbc4ac5f1c6d078a3d6ef8597a71af6f22863868680a972a571839dcd573418b4a4697 |
27 |
-DIST llvm-project-16.0.0rc3.src.tar.xz.sig 566 BLAKE2B 43683d2d7b266a847516f71412bf6236a355462430330fc0da1d624fb8dfbc98bfc982d367baee74d5b4964a9e82e7a4a6ea84bdcff3996d246932f516cced1a SHA512 61adc4dc3eb5a4c11a7f96f9267ff37895e5845a08d48a609a03a2696c1b6bca5af5861a6f28de936c48e6d621bf282170589187f2cb593a912b9078300cf47c |
28 |
-DIST llvm-project-16.0.0rc4.src.tar.xz 117930024 BLAKE2B 55cf032ad3ba52d2af0942fe1c627319ae95b466122d04b24a917c33e29139fae546d92c375715600190c02426b798803ead0ab7a97d86960cf98fca80e8815c SHA512 8d628205c5b93fe6683b67b97b5c7f98bae945bd87cccebcdac00ddd4362108bd171f077a5196242be0fb909c795592b34bfa1c96c50a744fb68f287fd9781cc |
29 |
-DIST llvm-project-16.0.0rc4.src.tar.xz.sig 566 BLAKE2B bfcf39070f32e16cfeae699d95d06f184b1331c3af403340c31cc5a973a3bb1faec0b6342445176cebed5819ddf68e4abfdaa8542ec425b1c822fc8c03c03349 SHA512 2af72e3d771e2361873007a944dcccfe81fbdbc3025a2101e03cbc15f1a173d39ceb94c4ae8966b1d7564bf004ee9a5ffa032e2334c0cf7154aea1090d04b00f |
30 |
-DIST llvm-project-2708869801ae00f4681f6b2d9d69b25b3fce26b6.tar.gz 180523586 BLAKE2B cf918d1e23f922d201a44531c9765b7d8ec2b3b8499ea7954845abcd5fa2687e85b3a34819a583c4f4a6d6e1baa49dbac0b4450cd6b9b322b0f13c88cd7da93c SHA512 18cb00e93d819993a925ae0467d382bc952d82c1eb92dbbb5bb3cdf87043269948670713734ddc3ea4ec50544e54dd11b6747496f7eaa02479374ab9ad075aa5 |
31 |
DIST llvm-project-4bf004e07e2b9d6e04e3f33e1b02628c679de664.tar.gz 180304467 BLAKE2B 6750855453b575eb8fcc861d5b24b144497bba62df9b9292ac586cf340e04b2b58290fe9df6d89142f29b56aa37ddeb3bd11cc3337e4dc985a4487954d1e2ffa SHA512 d8a87064ba0f92967df019e9345222b87cda81852a9599902cedc4a49ec7d9e2175c972b7fa6d19920489c1d309822f9c31c23bdce0376a8d40c71d57bcd5068 |
32 |
|
33 |
diff --git a/sys-libs/libomp/libomp-16.0.0_rc3.ebuild b/sys-libs/libomp/libomp-16.0.0_rc3.ebuild |
34 |
deleted file mode 100644 |
35 |
index 731fcbdf9f10..000000000000 |
36 |
--- a/sys-libs/libomp/libomp-16.0.0_rc3.ebuild |
37 |
+++ /dev/null |
38 |
@@ -1,149 +0,0 @@ |
39 |
-# Copyright 1999-2023 Gentoo Authors |
40 |
-# Distributed under the terms of the GNU General Public License v2 |
41 |
- |
42 |
-EAPI=8 |
43 |
- |
44 |
-PYTHON_COMPAT=( python3_{9..11} ) |
45 |
-inherit flag-o-matic cmake-multilib linux-info llvm llvm.org |
46 |
-inherit python-single-r1 toolchain-funcs |
47 |
- |
48 |
-DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" |
49 |
-HOMEPAGE="https://openmp.llvm.org" |
50 |
- |
51 |
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" |
52 |
-SLOT="0/${LLVM_SOABI}" |
53 |
-KEYWORDS="~loong" |
54 |
-IUSE=" |
55 |
- debug gdb-plugin hwloc offload ompt test |
56 |
- llvm_targets_AMDGPU llvm_targets_NVPTX |
57 |
-" |
58 |
-REQUIRED_USE=" |
59 |
- gdb-plugin? ( ${PYTHON_REQUIRED_USE} ) |
60 |
-" |
61 |
-RESTRICT="!test? ( test )" |
62 |
- |
63 |
-RDEPEND=" |
64 |
- gdb-plugin? ( ${PYTHON_DEPS} ) |
65 |
- hwloc? ( >=sys-apps/hwloc-2.5:0=[${MULTILIB_USEDEP}] ) |
66 |
- offload? ( |
67 |
- dev-libs/libffi:=[${MULTILIB_USEDEP}] |
68 |
- ~sys-devel/llvm-${PV}[${MULTILIB_USEDEP}] |
69 |
- llvm_targets_AMDGPU? ( dev-libs/rocr-runtime:= ) |
70 |
- ) |
71 |
-" |
72 |
-# tests: |
73 |
-# - dev-python/lit provides the test runner |
74 |
-# - sys-devel/llvm provide test utils (e.g. FileCheck) |
75 |
-# - sys-devel/clang provides the compiler to run tests |
76 |
-DEPEND=" |
77 |
- ${RDEPEND} |
78 |
-" |
79 |
-BDEPEND=" |
80 |
- dev-lang/perl |
81 |
- offload? ( |
82 |
- llvm_targets_AMDGPU? ( sys-devel/clang ) |
83 |
- llvm_targets_NVPTX? ( sys-devel/clang ) |
84 |
- virtual/pkgconfig |
85 |
- ) |
86 |
- test? ( |
87 |
- ${PYTHON_DEPS} |
88 |
- $(python_gen_cond_dep ' |
89 |
- dev-python/lit[${PYTHON_USEDEP}] |
90 |
- ') |
91 |
- sys-devel/clang |
92 |
- ) |
93 |
-" |
94 |
- |
95 |
-LLVM_COMPONENTS=( openmp cmake llvm/include ) |
96 |
-llvm.org_set_globals |
97 |
- |
98 |
-kernel_pds_check() { |
99 |
- if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then |
100 |
- local CONFIG_CHECK="~!SCHED_PDS" |
101 |
- local ERROR_SCHED_PDS="\ |
102 |
-PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11 |
103 |
-< 4.14-pf9) do not implement sched_yield() call which may result in horrible |
104 |
-performance problems with libomp. If you are using one of the specified |
105 |
-kernel versions, you may want to disable the PDS scheduler." |
106 |
- |
107 |
- check_extra_config |
108 |
- fi |
109 |
-} |
110 |
- |
111 |
-pkg_pretend() { |
112 |
- kernel_pds_check |
113 |
-} |
114 |
- |
115 |
-pkg_setup() { |
116 |
- use offload && LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup |
117 |
- if use gdb-plugin || use test; then |
118 |
- python-single-r1_pkg_setup |
119 |
- fi |
120 |
-} |
121 |
- |
122 |
-multilib_src_configure() { |
123 |
- # LTO causes issues in other packages building, #870127 |
124 |
- filter-lto |
125 |
- |
126 |
- # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 |
127 |
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" |
128 |
- |
129 |
- local build_omptarget=OFF |
130 |
- # upstream disallows building libomptarget when sizeof(void*) != 8 |
131 |
- if use offload && |
132 |
- "$(tc-getCC)" ${CFLAGS} ${CPPFLAGS} -c -x c - -o /dev/null \ |
133 |
- <<-EOF &>/dev/null |
134 |
- int test[sizeof(void *) == 8 ? 1 : -1]; |
135 |
- EOF |
136 |
- then |
137 |
- build_omptarget=ON |
138 |
- fi |
139 |
- |
140 |
- local libdir="$(get_libdir)" |
141 |
- local mycmakeargs=( |
142 |
- -DOPENMP_LIBDIR_SUFFIX="${libdir#lib}" |
143 |
- |
144 |
- -DLIBOMP_USE_HWLOC=$(usex hwloc) |
145 |
- -DLIBOMP_OMPD_GDB_SUPPORT=$(multilib_native_usex gdb-plugin) |
146 |
- -DLIBOMP_OMPT_SUPPORT=$(usex ompt) |
147 |
- |
148 |
- -DOPENMP_ENABLE_LIBOMPTARGET=${build_omptarget} |
149 |
- |
150 |
- # do not install libgomp.so & libiomp5.so aliases |
151 |
- -DLIBOMP_INSTALL_ALIASES=OFF |
152 |
- # disable unnecessary hack copying stuff back to srcdir |
153 |
- -DLIBOMP_COPY_EXPORTS=OFF |
154 |
- ) |
155 |
- |
156 |
- if [[ ${build_omptarget} == ON ]]; then |
157 |
- if has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then |
158 |
- mycmakeargs+=( |
159 |
- -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=$(usex llvm_targets_AMDGPU) |
160 |
- -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=$(usex llvm_targets_NVPTX) |
161 |
- ) |
162 |
- else |
163 |
- mycmakeargs+=( |
164 |
- -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=OFF |
165 |
- -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=OFF |
166 |
- ) |
167 |
- fi |
168 |
- fi |
169 |
- |
170 |
- use test && mycmakeargs+=( |
171 |
- # this project does not use standard LLVM cmake macros |
172 |
- -DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit" |
173 |
- -DOPENMP_LIT_ARGS="$(get_lit_flags)" |
174 |
- |
175 |
- -DOPENMP_TEST_C_COMPILER="$(type -P "${CHOST}-clang")" |
176 |
- -DOPENMP_TEST_CXX_COMPILER="$(type -P "${CHOST}-clang++")" |
177 |
- ) |
178 |
- addpredict /dev/nvidiactl |
179 |
- cmake_src_configure |
180 |
-} |
181 |
- |
182 |
-multilib_src_test() { |
183 |
- # respect TMPDIR! |
184 |
- local -x LIT_PRESERVES_TMP=1 |
185 |
- |
186 |
- cmake_build check-libomp |
187 |
-} |
188 |
|
189 |
diff --git a/sys-libs/libomp/libomp-16.0.0_rc4.ebuild b/sys-libs/libomp/libomp-16.0.0_rc4.ebuild |
190 |
deleted file mode 100644 |
191 |
index 731fcbdf9f10..000000000000 |
192 |
--- a/sys-libs/libomp/libomp-16.0.0_rc4.ebuild |
193 |
+++ /dev/null |
194 |
@@ -1,149 +0,0 @@ |
195 |
-# Copyright 1999-2023 Gentoo Authors |
196 |
-# Distributed under the terms of the GNU General Public License v2 |
197 |
- |
198 |
-EAPI=8 |
199 |
- |
200 |
-PYTHON_COMPAT=( python3_{9..11} ) |
201 |
-inherit flag-o-matic cmake-multilib linux-info llvm llvm.org |
202 |
-inherit python-single-r1 toolchain-funcs |
203 |
- |
204 |
-DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" |
205 |
-HOMEPAGE="https://openmp.llvm.org" |
206 |
- |
207 |
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" |
208 |
-SLOT="0/${LLVM_SOABI}" |
209 |
-KEYWORDS="~loong" |
210 |
-IUSE=" |
211 |
- debug gdb-plugin hwloc offload ompt test |
212 |
- llvm_targets_AMDGPU llvm_targets_NVPTX |
213 |
-" |
214 |
-REQUIRED_USE=" |
215 |
- gdb-plugin? ( ${PYTHON_REQUIRED_USE} ) |
216 |
-" |
217 |
-RESTRICT="!test? ( test )" |
218 |
- |
219 |
-RDEPEND=" |
220 |
- gdb-plugin? ( ${PYTHON_DEPS} ) |
221 |
- hwloc? ( >=sys-apps/hwloc-2.5:0=[${MULTILIB_USEDEP}] ) |
222 |
- offload? ( |
223 |
- dev-libs/libffi:=[${MULTILIB_USEDEP}] |
224 |
- ~sys-devel/llvm-${PV}[${MULTILIB_USEDEP}] |
225 |
- llvm_targets_AMDGPU? ( dev-libs/rocr-runtime:= ) |
226 |
- ) |
227 |
-" |
228 |
-# tests: |
229 |
-# - dev-python/lit provides the test runner |
230 |
-# - sys-devel/llvm provide test utils (e.g. FileCheck) |
231 |
-# - sys-devel/clang provides the compiler to run tests |
232 |
-DEPEND=" |
233 |
- ${RDEPEND} |
234 |
-" |
235 |
-BDEPEND=" |
236 |
- dev-lang/perl |
237 |
- offload? ( |
238 |
- llvm_targets_AMDGPU? ( sys-devel/clang ) |
239 |
- llvm_targets_NVPTX? ( sys-devel/clang ) |
240 |
- virtual/pkgconfig |
241 |
- ) |
242 |
- test? ( |
243 |
- ${PYTHON_DEPS} |
244 |
- $(python_gen_cond_dep ' |
245 |
- dev-python/lit[${PYTHON_USEDEP}] |
246 |
- ') |
247 |
- sys-devel/clang |
248 |
- ) |
249 |
-" |
250 |
- |
251 |
-LLVM_COMPONENTS=( openmp cmake llvm/include ) |
252 |
-llvm.org_set_globals |
253 |
- |
254 |
-kernel_pds_check() { |
255 |
- if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then |
256 |
- local CONFIG_CHECK="~!SCHED_PDS" |
257 |
- local ERROR_SCHED_PDS="\ |
258 |
-PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11 |
259 |
-< 4.14-pf9) do not implement sched_yield() call which may result in horrible |
260 |
-performance problems with libomp. If you are using one of the specified |
261 |
-kernel versions, you may want to disable the PDS scheduler." |
262 |
- |
263 |
- check_extra_config |
264 |
- fi |
265 |
-} |
266 |
- |
267 |
-pkg_pretend() { |
268 |
- kernel_pds_check |
269 |
-} |
270 |
- |
271 |
-pkg_setup() { |
272 |
- use offload && LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup |
273 |
- if use gdb-plugin || use test; then |
274 |
- python-single-r1_pkg_setup |
275 |
- fi |
276 |
-} |
277 |
- |
278 |
-multilib_src_configure() { |
279 |
- # LTO causes issues in other packages building, #870127 |
280 |
- filter-lto |
281 |
- |
282 |
- # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 |
283 |
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" |
284 |
- |
285 |
- local build_omptarget=OFF |
286 |
- # upstream disallows building libomptarget when sizeof(void*) != 8 |
287 |
- if use offload && |
288 |
- "$(tc-getCC)" ${CFLAGS} ${CPPFLAGS} -c -x c - -o /dev/null \ |
289 |
- <<-EOF &>/dev/null |
290 |
- int test[sizeof(void *) == 8 ? 1 : -1]; |
291 |
- EOF |
292 |
- then |
293 |
- build_omptarget=ON |
294 |
- fi |
295 |
- |
296 |
- local libdir="$(get_libdir)" |
297 |
- local mycmakeargs=( |
298 |
- -DOPENMP_LIBDIR_SUFFIX="${libdir#lib}" |
299 |
- |
300 |
- -DLIBOMP_USE_HWLOC=$(usex hwloc) |
301 |
- -DLIBOMP_OMPD_GDB_SUPPORT=$(multilib_native_usex gdb-plugin) |
302 |
- -DLIBOMP_OMPT_SUPPORT=$(usex ompt) |
303 |
- |
304 |
- -DOPENMP_ENABLE_LIBOMPTARGET=${build_omptarget} |
305 |
- |
306 |
- # do not install libgomp.so & libiomp5.so aliases |
307 |
- -DLIBOMP_INSTALL_ALIASES=OFF |
308 |
- # disable unnecessary hack copying stuff back to srcdir |
309 |
- -DLIBOMP_COPY_EXPORTS=OFF |
310 |
- ) |
311 |
- |
312 |
- if [[ ${build_omptarget} == ON ]]; then |
313 |
- if has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then |
314 |
- mycmakeargs+=( |
315 |
- -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=$(usex llvm_targets_AMDGPU) |
316 |
- -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=$(usex llvm_targets_NVPTX) |
317 |
- ) |
318 |
- else |
319 |
- mycmakeargs+=( |
320 |
- -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=OFF |
321 |
- -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=OFF |
322 |
- ) |
323 |
- fi |
324 |
- fi |
325 |
- |
326 |
- use test && mycmakeargs+=( |
327 |
- # this project does not use standard LLVM cmake macros |
328 |
- -DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit" |
329 |
- -DOPENMP_LIT_ARGS="$(get_lit_flags)" |
330 |
- |
331 |
- -DOPENMP_TEST_C_COMPILER="$(type -P "${CHOST}-clang")" |
332 |
- -DOPENMP_TEST_CXX_COMPILER="$(type -P "${CHOST}-clang++")" |
333 |
- ) |
334 |
- addpredict /dev/nvidiactl |
335 |
- cmake_src_configure |
336 |
-} |
337 |
- |
338 |
-multilib_src_test() { |
339 |
- # respect TMPDIR! |
340 |
- local -x LIT_PRESERVES_TMP=1 |
341 |
- |
342 |
- cmake_build check-libomp |
343 |
-} |
344 |
|
345 |
diff --git a/sys-libs/libomp/libomp-17.0.0_pre20230304.ebuild b/sys-libs/libomp/libomp-17.0.0_pre20230304.ebuild |
346 |
deleted file mode 100644 |
347 |
index 57c4ff3a33d0..000000000000 |
348 |
--- a/sys-libs/libomp/libomp-17.0.0_pre20230304.ebuild |
349 |
+++ /dev/null |
350 |
@@ -1,149 +0,0 @@ |
351 |
-# Copyright 1999-2023 Gentoo Authors |
352 |
-# Distributed under the terms of the GNU General Public License v2 |
353 |
- |
354 |
-EAPI=8 |
355 |
- |
356 |
-PYTHON_COMPAT=( python3_{9..11} ) |
357 |
-inherit flag-o-matic cmake-multilib linux-info llvm llvm.org |
358 |
-inherit python-single-r1 toolchain-funcs |
359 |
- |
360 |
-DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" |
361 |
-HOMEPAGE="https://openmp.llvm.org" |
362 |
- |
363 |
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" |
364 |
-SLOT="0/${LLVM_SOABI}" |
365 |
-KEYWORDS="" |
366 |
-IUSE=" |
367 |
- debug gdb-plugin hwloc offload ompt test |
368 |
- llvm_targets_AMDGPU llvm_targets_NVPTX |
369 |
-" |
370 |
-REQUIRED_USE=" |
371 |
- gdb-plugin? ( ${PYTHON_REQUIRED_USE} ) |
372 |
-" |
373 |
-RESTRICT="!test? ( test )" |
374 |
- |
375 |
-RDEPEND=" |
376 |
- gdb-plugin? ( ${PYTHON_DEPS} ) |
377 |
- hwloc? ( >=sys-apps/hwloc-2.5:0=[${MULTILIB_USEDEP}] ) |
378 |
- offload? ( |
379 |
- dev-libs/libffi:=[${MULTILIB_USEDEP}] |
380 |
- ~sys-devel/llvm-${PV}[${MULTILIB_USEDEP}] |
381 |
- llvm_targets_AMDGPU? ( dev-libs/rocr-runtime:= ) |
382 |
- ) |
383 |
-" |
384 |
-# tests: |
385 |
-# - dev-python/lit provides the test runner |
386 |
-# - sys-devel/llvm provide test utils (e.g. FileCheck) |
387 |
-# - sys-devel/clang provides the compiler to run tests |
388 |
-DEPEND=" |
389 |
- ${RDEPEND} |
390 |
-" |
391 |
-BDEPEND=" |
392 |
- dev-lang/perl |
393 |
- offload? ( |
394 |
- llvm_targets_AMDGPU? ( sys-devel/clang ) |
395 |
- llvm_targets_NVPTX? ( sys-devel/clang ) |
396 |
- virtual/pkgconfig |
397 |
- ) |
398 |
- test? ( |
399 |
- ${PYTHON_DEPS} |
400 |
- $(python_gen_cond_dep ' |
401 |
- dev-python/lit[${PYTHON_USEDEP}] |
402 |
- ') |
403 |
- sys-devel/clang |
404 |
- ) |
405 |
-" |
406 |
- |
407 |
-LLVM_COMPONENTS=( openmp cmake llvm/include ) |
408 |
-llvm.org_set_globals |
409 |
- |
410 |
-kernel_pds_check() { |
411 |
- if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then |
412 |
- local CONFIG_CHECK="~!SCHED_PDS" |
413 |
- local ERROR_SCHED_PDS="\ |
414 |
-PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11 |
415 |
-< 4.14-pf9) do not implement sched_yield() call which may result in horrible |
416 |
-performance problems with libomp. If you are using one of the specified |
417 |
-kernel versions, you may want to disable the PDS scheduler." |
418 |
- |
419 |
- check_extra_config |
420 |
- fi |
421 |
-} |
422 |
- |
423 |
-pkg_pretend() { |
424 |
- kernel_pds_check |
425 |
-} |
426 |
- |
427 |
-pkg_setup() { |
428 |
- use offload && LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup |
429 |
- if use gdb-plugin || use test; then |
430 |
- python-single-r1_pkg_setup |
431 |
- fi |
432 |
-} |
433 |
- |
434 |
-multilib_src_configure() { |
435 |
- # LTO causes issues in other packages building, #870127 |
436 |
- filter-lto |
437 |
- |
438 |
- # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 |
439 |
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" |
440 |
- |
441 |
- local build_omptarget=OFF |
442 |
- # upstream disallows building libomptarget when sizeof(void*) != 8 |
443 |
- if use offload && |
444 |
- "$(tc-getCC)" ${CFLAGS} ${CPPFLAGS} -c -x c - -o /dev/null \ |
445 |
- <<-EOF &>/dev/null |
446 |
- int test[sizeof(void *) == 8 ? 1 : -1]; |
447 |
- EOF |
448 |
- then |
449 |
- build_omptarget=ON |
450 |
- fi |
451 |
- |
452 |
- local libdir="$(get_libdir)" |
453 |
- local mycmakeargs=( |
454 |
- -DOPENMP_LIBDIR_SUFFIX="${libdir#lib}" |
455 |
- |
456 |
- -DLIBOMP_USE_HWLOC=$(usex hwloc) |
457 |
- -DLIBOMP_OMPD_GDB_SUPPORT=$(multilib_native_usex gdb-plugin) |
458 |
- -DLIBOMP_OMPT_SUPPORT=$(usex ompt) |
459 |
- |
460 |
- -DOPENMP_ENABLE_LIBOMPTARGET=${build_omptarget} |
461 |
- |
462 |
- # do not install libgomp.so & libiomp5.so aliases |
463 |
- -DLIBOMP_INSTALL_ALIASES=OFF |
464 |
- # disable unnecessary hack copying stuff back to srcdir |
465 |
- -DLIBOMP_COPY_EXPORTS=OFF |
466 |
- ) |
467 |
- |
468 |
- if [[ ${build_omptarget} == ON ]]; then |
469 |
- if has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then |
470 |
- mycmakeargs+=( |
471 |
- -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=$(usex llvm_targets_AMDGPU) |
472 |
- -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=$(usex llvm_targets_NVPTX) |
473 |
- ) |
474 |
- else |
475 |
- mycmakeargs+=( |
476 |
- -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=OFF |
477 |
- -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=OFF |
478 |
- ) |
479 |
- fi |
480 |
- fi |
481 |
- |
482 |
- use test && mycmakeargs+=( |
483 |
- # this project does not use standard LLVM cmake macros |
484 |
- -DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit" |
485 |
- -DOPENMP_LIT_ARGS="$(get_lit_flags)" |
486 |
- |
487 |
- -DOPENMP_TEST_C_COMPILER="$(type -P "${CHOST}-clang")" |
488 |
- -DOPENMP_TEST_CXX_COMPILER="$(type -P "${CHOST}-clang++")" |
489 |
- ) |
490 |
- addpredict /dev/nvidiactl |
491 |
- cmake_src_configure |
492 |
-} |
493 |
- |
494 |
-multilib_src_test() { |
495 |
- # respect TMPDIR! |
496 |
- local -x LIT_PRESERVES_TMP=1 |
497 |
- |
498 |
- cmake_build check-libomp |
499 |
-} |