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: Tue, 28 Aug 2018 16:00:54
Message-Id: 1535472037.25de53791565e42794bb54873f1189a36f8149e3.mgorny@gentoo
1 commit: 25de53791565e42794bb54873f1189a36f8149e3
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 28 15:41:01 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 28 16:00:37 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25de5379
7
8 sys-libs/libomp: Bump to 7.0.0rc2
9
10 sys-libs/libomp/Manifest | 1 +
11 sys-libs/libomp/libomp-7.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 9478d4c8538..af084703501 100644
16 --- a/sys-libs/libomp/Manifest
17 +++ b/sys-libs/libomp/Manifest
18 @@ -1,3 +1,4 @@
19 DIST openmp-4.0.1.src.tar.xz 2275240 BLAKE2B e63cf670c4cd2678afc4d7b96be85c3d157bf91a69510f980d9a0a07f61b449b22ff28d63753f32e63afedb4a7077c662a633f689a660b5047a83bcf1fb7f009 SHA512 0b737dde832c5907a0cac41fe1d594b61e85dd405eee42b39f09233db62b44543204ccc775e52e2981f9c9f0683b234526e288a3a7a04f712280fb3a575abcaf
20 DIST openmp-5.0.2.src.tar.xz 2081560 BLAKE2B fbe41c6aaf4c8e961253609a598bec531ab4685cd8c307ab2528b9d7553eaa38122ee02a2c4d481454f9233c062b3a24bb174a182702a183907a3d15a10a9655 SHA512 511895ca6049c17de81ad86c39dcb940a7c1a793005e16d33e58d72ad47f62b8cb61003c234a7544a88e79f25d2c86e9df834f90d37ccbd4b47f71c369e90437
21 DIST openmp-6.0.1.src.tar.xz 2048320 BLAKE2B 08b3a7051c985903f78331f55a1c6e928399b87c862c43c991e9bf78b66b6e412fc96f202b82c051176dbbe02422f8ceb7414f44ea8f3522f418e515c0f70c62 SHA512 abb956583e5d11d0c6f6d97183c081d658616a74933be884a591eaa3d8c4bb04f08f02016d2c86d7384c7ff1aa44fb949b0d967fc0ff50e3132aaba412e9add8
22 +DIST openmp-7.0.0rc2.src.tar.xz 910464 BLAKE2B a37364d52c7ac4b149e210cfd81e2a65a6513d152ab9ca99d2e9afc6c3e2ce8d65266c7977aa3b3edbf04110d7a77083b8bcd7129ccf0bd386fa20c8556525c7 SHA512 627057e451bd9d1c079d31616d13d09488a55912ee4d3b1ea1e3d5131111d8d7a723490525dfb8e1286371634fd37f4265d1e17d02d6d147a276d30fc37cbf03
23
24 diff --git a/sys-libs/libomp/libomp-7.0.0_rc2.ebuild b/sys-libs/libomp/libomp-7.0.0_rc2.ebuild
25 new file mode 100644
26 index 00000000000..ab4a7aff968
27 --- /dev/null
28 +++ b/sys-libs/libomp/libomp-7.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 multiprocessing python-any-r1
41 +
42 +DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
43 +HOMEPAGE="https://openmp.llvm.org"
44 +SRC_URI="https://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;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
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 +}