summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-01-30 20:29:00 +0100
committerMichał Górny <mgorny@gentoo.org>2018-01-30 20:31:21 +0100
commit0d9c0f4a785d5021d3c01307388d0ecbf0f63cd4 (patch)
tree475bc0f6d4d18b3da6fa5171d7e499a28cd5c0eb /sys-libs/libomp/libomp-6.0.9999.ebuild
parentsys-apps/portage: Require USE=ssl on app-crypt/gnupg (diff)
downloadgentoo-0d9c0f4a785d5021d3c01307388d0ecbf0f63cd4.tar.gz
gentoo-0d9c0f4a785d5021d3c01307388d0ecbf0f63cd4.tar.bz2
gentoo-0d9c0f4a785d5021d3c01307388d0ecbf0f63cd4.zip
sys-libs/libomp: Perform PDS checks only for relevant kernel versions
Update the PDS check logic to apply only when running the Linux kernel, versions between 4.13 and 4.15. That covers the range of -pf kernels that have the broken PDS version, and I think we can reasonably assume users will not be updating the patch along with the kernel. Also, perform the check only once in pkg_pretend. There is really no point in repeating it as packages do not alter kernel configuration. Closes: https://bugs.gentoo.org/638410
Diffstat (limited to 'sys-libs/libomp/libomp-6.0.9999.ebuild')
-rw-r--r--sys-libs/libomp/libomp-6.0.9999.ebuild24
1 files changed, 15 insertions, 9 deletions
diff --git a/sys-libs/libomp/libomp-6.0.9999.ebuild b/sys-libs/libomp/libomp-6.0.9999.ebuild
index 30de17ed6c22..01d1bd791b82 100644
--- a/sys-libs/libomp/libomp-6.0.9999.ebuild
+++ b/sys-libs/libomp/libomp-6.0.9999.ebuild
@@ -24,7 +24,7 @@ EGIT_BRANCH="release_60"
LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant"
SLOT="0"
KEYWORDS=""
-IUSE="cuda hwloc offload ompt test"
+IUSE="cuda hwloc kernel_linux offload ompt test"
# CUDA works only with the x86_64 ABI
REQUIRED_USE="offload? ( cuda? ( abi_x86_64 ) )"
RESTRICT="!test? ( test )"
@@ -51,22 +51,28 @@ DEPEND="${RDEPEND}
# least intrusive of all
CMAKE_BUILD_TYPE=RelWithDebInfo
-CONFIG_CHECK="~!SCHED_PDS"
-ERROR_SCHED_PDS="PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels
->= 4.13-pf11 < 4.14-pf9) do not implement sched_yield() call which
-may result in horrible performance problems with libomp. If you are using one
-of the specified kernel versions, you may want to disable the PDS scheduler."
-
python_check_deps() {
has_version "dev-python/lit[${PYTHON_USEDEP}]"
}
+kernel_pds_check() {
+ if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then
+ local CONFIG_CHECK="~!SCHED_PDS"
+ local ERROR_SCHED_PDS="\
+PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11
+< 4.14-pf9) do not implement sched_yield() call which may result in horrible
+performance problems with libomp. If you are using one of the specified
+kernel versions, you may want to disable the PDS scheduler."
+
+ check_extra_config
+ fi
+}
+
pkg_pretend() {
- linux-info_pkg_setup
+ kernel_pds_check
}
pkg_setup() {
- linux-info_pkg_setup
use test && python-any-r1_pkg_setup
}