diff options
Diffstat (limited to 'sys-libs/libomp/libomp-9999.ebuild')
-rw-r--r-- | sys-libs/libomp/libomp-9999.ebuild | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/sys-libs/libomp/libomp-9999.ebuild b/sys-libs/libomp/libomp-9999.ebuild index d215cbe36384..75dd8476fff5 100644 --- a/sys-libs/libomp/libomp-9999.ebuild +++ b/sys-libs/libomp/libomp-9999.ebuild @@ -23,7 +23,7 @@ EGIT_REPO_URI="https://git.llvm.org/git/openmp.git 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 )" @@ -50,22 +50,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, no fixed release yet) 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 } |