diff options
author | Michał Górny <mgorny@gentoo.org> | 2018-01-30 20:29:00 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2018-01-30 20:31:21 +0100 |
commit | 0d9c0f4a785d5021d3c01307388d0ecbf0f63cd4 (patch) | |
tree | 475bc0f6d4d18b3da6fa5171d7e499a28cd5c0eb /sys-libs/libomp/libomp-4.0.1.ebuild | |
parent | sys-apps/portage: Require USE=ssl on app-crypt/gnupg (diff) | |
download | gentoo-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-4.0.1.ebuild')
-rw-r--r-- | sys-libs/libomp/libomp-4.0.1.ebuild | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/sys-libs/libomp/libomp-4.0.1.ebuild b/sys-libs/libomp/libomp-4.0.1.ebuild index 9e63a2165167..7b78f15ca8dd 100644 --- a/sys-libs/libomp/libomp-4.0.1.ebuild +++ b/sys-libs/libomp/libomp-4.0.1.ebuild @@ -21,7 +21,7 @@ SRC_URI="https://releases.llvm.org/${PV/_//}/openmp-${PV/_/}.src.tar.xz" LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" SLOT="0" KEYWORDS="amd64 ~arm64 x86" -IUSE="hwloc ompt test" +IUSE="hwloc kernel_linux ompt test" RESTRICT="!test? ( test )" RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )" @@ -42,22 +42,28 @@ S=${WORKDIR}/openmp-${PV/_/}.src # 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 } |