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: Fri, 09 Feb 2018 16:00:27
Message-Id: 1518192007.35006a7ce88aef37cb47f45f0b00282cdb590e73.mgorny@gentoo
1 commit: 35006a7ce88aef37cb47f45f0b00282cdb590e73
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 9 10:14:31 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 9 16:00:07 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35006a7c
7
8 sys-libs/libomp: Bump to 6.0.0rc2
9
10 sys-libs/libomp/Manifest | 1 +
11 sys-libs/libomp/libomp-6.0.0_rc2.ebuild | 115 ++++++++++++++++++++++++++++++++
12 2 files changed, 116 insertions(+)
13
14 diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest
15 index f960bf6e456..5f54ce97f71 100644
16 --- a/sys-libs/libomp/Manifest
17 +++ b/sys-libs/libomp/Manifest
18 @@ -4,3 +4,4 @@ DIST openmp-3.9.0.src.tar.xz 2257596 BLAKE2B fae0e3e36afcd1a223030f09209865ce706
19 DIST openmp-3.9.1.src.tar.xz 2031588 BLAKE2B feafb94a832ec48a67d6e00720724dcecb533a4a09e0d69462af33e13454b20393aa21fabb062c362824cdfbee712db1030732271e4cd49085fa69cff9800835 SHA512 80924a6f9765f634d24d7b0aa036d92c912dbd8e067487a14bdd03b4c587fdfc92e83eb29926bfa637ef45be3f133a924f77ab12099ea3706c18e9c42774708b
20 DIST openmp-4.0.1.src.tar.xz 2275240 BLAKE2B e63cf670c4cd2678afc4d7b96be85c3d157bf91a69510f980d9a0a07f61b449b22ff28d63753f32e63afedb4a7077c662a633f689a660b5047a83bcf1fb7f009 SHA512 0b737dde832c5907a0cac41fe1d594b61e85dd405eee42b39f09233db62b44543204ccc775e52e2981f9c9f0683b234526e288a3a7a04f712280fb3a575abcaf
21 DIST openmp-5.0.1.src.tar.xz 2075472 BLAKE2B a4da4726a17dc0fd083e11fe1bebf446978137aa4453000e8fea950021fff091a818246f0817dd60ce67353d3f7d75ab8fec2b9e955389d9c94e195945efda50 SHA512 4493b918fd83ef26e2b3f3429d1b00d722328e4c9697ac7625a390834f6e88ada8e5b02ce0ecb4771129207b1b81a9d171f4599ab9388762a3c6db0afc499ff4
22 +DIST openmp-6.0.0rc2.src.tar.xz 2272464 BLAKE2B c6b53553392a0d6fc485e3ff728fae4312e07b2d478ac3b1d53166c0c9cbb3e917b5d6b52e32862cd1cac1ebad7827df59f6c05c34855fa623cbe7a9c21d593e SHA512 58a7adb66dd54e32ce232e70085b0fb96ec5dbd7b518b63634569b10c43ebf0881958ace3499975e1224dd4c094dd9c5697481a7a3a949c731418a6b1f96ebbc
23
24 diff --git a/sys-libs/libomp/libomp-6.0.0_rc2.ebuild b/sys-libs/libomp/libomp-6.0.0_rc2.ebuild
25 new file mode 100644
26 index 00000000000..98935fa8fbc
27 --- /dev/null
28 +++ b/sys-libs/libomp/libomp-6.0.0_rc2.ebuild
29 @@ -0,0 +1,115 @@
30 +# Copyright 1999-2018 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=6
34 +
35 +: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
36 +# (needed due to CMAKE_BUILD_TYPE != Gentoo)
37 +CMAKE_MIN_VERSION=3.7.0-r1
38 +PYTHON_COMPAT=( python2_7 )
39 +
40 +inherit cmake-multilib linux-info python-any-r1
41 +
42 +DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
43 +HOMEPAGE="https://openmp.llvm.org"
44 +SRC_URI="http://prereleases.llvm.org/${PV/_//}/openmp-${PV/_/}.src.tar.xz"
45 +
46 +# Additional licenses:
47 +# - MIT-licensed Intel code,
48 +# - LLVM Software Grant from Intel.
49 +
50 +LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant"
51 +SLOT="0"
52 +KEYWORDS=""
53 +IUSE="cuda hwloc kernel_linux offload ompt test"
54 +# CUDA works only with the x86_64 ABI
55 +REQUIRED_USE="offload? ( cuda? ( abi_x86_64 ) )"
56 +RESTRICT="!test? ( test )"
57 +
58 +RDEPEND="
59 + hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )
60 + offload? (
61 + virtual/libelf:=[${MULTILIB_USEDEP}]
62 + virtual/libffi:=[${MULTILIB_USEDEP}]
63 + cuda? ( dev-util/nvidia-cuda-sdk:= )
64 + )"
65 +# tests:
66 +# - dev-python/lit provides the test runner
67 +# - sys-devel/llvm provide test utils (e.g. FileCheck)
68 +# - sys-devel/clang provides the compiler to run tests
69 +DEPEND="${RDEPEND}
70 + dev-lang/perl
71 + offload? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
72 + test? (
73 + $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
74 + >=sys-devel/clang-6
75 + )"
76 +
77 +S=${WORKDIR}/openmp-${PV/_/}.src
78 +
79 +# least intrusive of all
80 +CMAKE_BUILD_TYPE=RelWithDebInfo
81 +
82 +python_check_deps() {
83 + has_version "dev-python/lit[${PYTHON_USEDEP}]"
84 +}
85 +
86 +kernel_pds_check() {
87 + if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then
88 + local CONFIG_CHECK="~!SCHED_PDS"
89 + local ERROR_SCHED_PDS="\
90 +PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11
91 +< 4.14-pf9) do not implement sched_yield() call which may result in horrible
92 +performance problems with libomp. If you are using one of the specified
93 +kernel versions, you may want to disable the PDS scheduler."
94 +
95 + check_extra_config
96 + fi
97 +}
98 +
99 +pkg_pretend() {
100 + kernel_pds_check
101 +}
102 +
103 +pkg_setup() {
104 + use test && python-any-r1_pkg_setup
105 +}
106 +
107 +multilib_src_configure() {
108 + local libdir="$(get_libdir)"
109 + local mycmakeargs=(
110 + -DOPENMP_LIBDIR_SUFFIX="${libdir#lib}"
111 +
112 + -DLIBOMP_USE_HWLOC=$(usex hwloc)
113 + -DLIBOMP_OMPT_SUPPORT=$(usex ompt)
114 +
115 + -DOPENMP_ENABLE_LIBOMPTARGET=$(usex offload)
116 +
117 + # do not install libgomp.so & libiomp5.so aliases
118 + -DLIBOMP_INSTALL_ALIASES=OFF
119 + # disable unnecessary hack copying stuff back to srcdir
120 + -DLIBOMP_COPY_EXPORTS=OFF
121 + )
122 + use offload && mycmakeargs+=(
123 + # this is non-fatal and libomp checks for CUDA conditionally
124 + # to ABI, so we can just ignore passing the wrong value
125 + # on non-amd64 ABIs
126 + -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=$(usex !cuda)
127 + )
128 + use test && mycmakeargs+=(
129 + # this project does not use standard LLVM cmake macros
130 + -DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit"
131 + -DOPENMP_LIT_ARGS="-vv"
132 +
133 + -DOPENMP_TEST_C_COMPILER="$(type -P "${CHOST}-clang")"
134 + -DOPENMP_TEST_CXX_COMPILER="$(type -P "${CHOST}-clang++")"
135 + )
136 + cmake-utils_src_configure
137 +}
138 +
139 +multilib_src_test() {
140 + # respect TMPDIR!
141 + local -x LIT_PRESERVES_TMP=1
142 +
143 + cmake-utils_src_make check-libomp
144 +}