Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libomp/
Date: Thu, 30 Jan 2020 20:51:41
Message-Id: 1580417487.e358e1174b0a551e6c056903f3291de30e7bfa2e.mgorny@gentoo
1 commit: e358e1174b0a551e6c056903f3291de30e7bfa2e
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 30 20:42:49 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 30 20:51:27 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e358e117
7
8 sys-libs/libomp: Bump to 10.0.0_rc1
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 sys-libs/libomp/Manifest | 1 +
13 sys-libs/libomp/libomp-10.0.0_rc1.ebuild | 106 +++++++++++++++++++++++++++++++
14 2 files changed, 107 insertions(+)
15
16 diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest
17 index e62395bae5e..37761657e3d 100644
18 --- a/sys-libs/libomp/Manifest
19 +++ b/sys-libs/libomp/Manifest
20 @@ -1,3 +1,4 @@
21 +DIST llvmorg-10.0.0-rc1.tar.gz 120755822 BLAKE2B a729d37d96ba498cb865c6f708734dccb796b2caabb69167b9aa3b0e12c788f2a5980a048b99d5603da3d26af909fb31f406b4f4743cabae56c45f829a7bf695 SHA512 27137fc700971147c00ded6787eaae9f0bcf98c938fe227a5a559b38d983736f3d086f4ff6772d802c5f48a7d97a97c293261e4af88fcb5a720693b9cb5a4f02
22 DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59
23 DIST openmp-7.1.0.src.tar.xz 909320 BLAKE2B 7a5fd4374992b7c440ff27917c0af6a2ec64aaeb2fda645f75b5affd4981e3ceef7f15cba61c37934c5b35be543af315cc4bff2937545fbf5eaa6593f1aa8b83 SHA512 57f18beede401c1c39766e13a03b52083a0f7b437758069f66b73d6d1388dc51e48c34b0a7ecd3552244fd35e2db57388642588febef413c161f5c5411ab1e5d
24 DIST openmp-8.0.1.src.tar.xz 933320 BLAKE2B 02a7bf70cd3a217845ef1c5a35e0d7dbfbb39069a9029d462c797b5ddf2240fd627dee55856146ca4bb81622a41f31ecd11e0ed66baf3b7d99447087271991b0 SHA512 9ded785c8129e7b3a70b54f07c4dde529456edcc94904ad77fc578cf7f096cfa3ff2279959d7f7f1db51571e11c53375f33b597c7f36ce6dc6b512c44ced8026
25
26 diff --git a/sys-libs/libomp/libomp-10.0.0_rc1.ebuild b/sys-libs/libomp/libomp-10.0.0_rc1.ebuild
27 new file mode 100644
28 index 00000000000..763579d7251
29 --- /dev/null
30 +++ b/sys-libs/libomp/libomp-10.0.0_rc1.ebuild
31 @@ -0,0 +1,106 @@
32 +# Copyright 1999-2020 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +PYTHON_COMPAT=( python{2_7,3_{6,7}} )
38 +inherit cmake-multilib linux-info llvm.org multiprocessing python-any-r1
39 +
40 +DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
41 +HOMEPAGE="https://openmp.llvm.org"
42 +LLVM_COMPONENTS=( openmp )
43 +llvm.org_set_globals
44 +
45 +LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
46 +SLOT="0"
47 +KEYWORDS=""
48 +IUSE="cuda hwloc kernel_linux offload ompt test"
49 +# CUDA works only with the x86_64 ABI
50 +REQUIRED_USE="offload? ( cuda? ( abi_x86_64 ) )"
51 +RESTRICT="!test? ( test )"
52 +
53 +RDEPEND="
54 + hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )
55 + offload? (
56 + virtual/libelf:=[${MULTILIB_USEDEP}]
57 + virtual/libffi:=[${MULTILIB_USEDEP}]
58 + cuda? ( dev-util/nvidia-cuda-toolkit:= )
59 + )"
60 +# tests:
61 +# - dev-python/lit provides the test runner
62 +# - sys-devel/llvm provide test utils (e.g. FileCheck)
63 +# - sys-devel/clang provides the compiler to run tests
64 +DEPEND="${RDEPEND}"
65 +BDEPEND="dev-lang/perl
66 + offload? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
67 + test? (
68 + $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
69 + >=sys-devel/clang-6
70 + )"
71 +
72 +# least intrusive of all
73 +CMAKE_BUILD_TYPE=RelWithDebInfo
74 +
75 +python_check_deps() {
76 + has_version "dev-python/lit[${PYTHON_USEDEP}]"
77 +}
78 +
79 +kernel_pds_check() {
80 + if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then
81 + local CONFIG_CHECK="~!SCHED_PDS"
82 + local ERROR_SCHED_PDS="\
83 +PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11
84 +< 4.14-pf9) do not implement sched_yield() call which may result in horrible
85 +performance problems with libomp. If you are using one of the specified
86 +kernel versions, you may want to disable the PDS scheduler."
87 +
88 + check_extra_config
89 + fi
90 +}
91 +
92 +pkg_pretend() {
93 + kernel_pds_check
94 +}
95 +
96 +pkg_setup() {
97 + use test && python-any-r1_pkg_setup
98 +}
99 +
100 +multilib_src_configure() {
101 + local libdir="$(get_libdir)"
102 + local mycmakeargs=(
103 + -DOPENMP_LIBDIR_SUFFIX="${libdir#lib}"
104 +
105 + -DLIBOMP_USE_HWLOC=$(usex hwloc)
106 + -DLIBOMP_OMPT_SUPPORT=$(usex ompt)
107 +
108 + -DOPENMP_ENABLE_LIBOMPTARGET=$(usex offload)
109 +
110 + # do not install libgomp.so & libiomp5.so aliases
111 + -DLIBOMP_INSTALL_ALIASES=OFF
112 + # disable unnecessary hack copying stuff back to srcdir
113 + -DLIBOMP_COPY_EXPORTS=OFF
114 + )
115 + use offload && mycmakeargs+=(
116 + # this is non-fatal and libomp checks for CUDA conditionally
117 + # to ABI, so we can just ignore passing the wrong value
118 + # on non-amd64 ABIs
119 + -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=$(usex !cuda)
120 + )
121 + use test && mycmakeargs+=(
122 + # this project does not use standard LLVM cmake macros
123 + -DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit"
124 + -DOPENMP_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
125 +
126 + -DOPENMP_TEST_C_COMPILER="$(type -P "${CHOST}-clang")"
127 + -DOPENMP_TEST_CXX_COMPILER="$(type -P "${CHOST}-clang++")"
128 + )
129 + cmake-utils_src_configure
130 +}
131 +
132 +multilib_src_test() {
133 + # respect TMPDIR!
134 + local -x LIT_PRESERVES_TMP=1
135 +
136 + cmake-utils_src_make check-libomp
137 +}