summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-10-11 09:18:50 +0200
committerMichał Górny <mgorny@gentoo.org>2022-10-11 09:18:59 +0200
commit2d1c17885f08913368cdaf8f252ef8c66b3d2830 (patch)
tree33376d81b1727f32ae22815e41b081257eebf4df /sys-libs/libomp
parentsys-devel/clang: Remove obsolete LLVM_CMAKE_PATH (diff)
downloadgentoo-2d1c17885f08913368cdaf8f252ef8c66b3d2830.tar.gz
gentoo-2d1c17885f08913368cdaf8f252ef8c66b3d2830.tar.bz2
gentoo-2d1c17885f08913368cdaf8f252ef8c66b3d2830.zip
sys-libs/libomp: Add a flag to control the gdb-plugin
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-libs/libomp')
-rw-r--r--sys-libs/libomp/libomp-16.0.0.9999.ebuild24
-rw-r--r--sys-libs/libomp/libomp-16.0.0_pre20221010.ebuild24
-rw-r--r--sys-libs/libomp/metadata.xml1
3 files changed, 29 insertions, 20 deletions
diff --git a/sys-libs/libomp/libomp-16.0.0.9999.ebuild b/sys-libs/libomp/libomp-16.0.0.9999.ebuild
index dca2bf97647b..bc1e59029b71 100644
--- a/sys-libs/libomp/libomp-16.0.0.9999.ebuild
+++ b/sys-libs/libomp/libomp-16.0.0.9999.ebuild
@@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{8..11} )
-inherit flag-o-matic cmake-multilib linux-info llvm llvm.org python-any-r1
+inherit flag-o-matic cmake-multilib linux-info llvm llvm.org python-single-r1
DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
HOMEPAGE="https://openmp.llvm.org"
@@ -13,12 +13,16 @@ LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="0/${LLVM_SOABI}"
KEYWORDS=""
IUSE="
- debug hwloc offload ompt test
+ debug gdb-plugin hwloc offload ompt test
llvm_targets_AMDGPU llvm_targets_NVPTX
"
+REQUIRED_USE="
+ gdb-plugin? ( ${PYTHON_REQUIRED_USE} )
+"
RESTRICT="!test? ( test )"
RDEPEND="
+ gdb-plugin? ( ${PYTHON_DEPS} )
hwloc? ( >=sys-apps/hwloc-2.5:0=[${MULTILIB_USEDEP}] )
offload? (
virtual/libelf:=[${MULTILIB_USEDEP}]
@@ -41,7 +45,10 @@ BDEPEND="
virtual/pkgconfig
)
test? (
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-python/lit[${PYTHON_USEDEP}]
+ ')
sys-devel/clang
)
"
@@ -49,10 +56,6 @@ BDEPEND="
LLVM_COMPONENTS=( openmp cmake llvm/include )
llvm.org_set_globals
-python_check_deps() {
- python_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"
@@ -72,7 +75,9 @@ pkg_pretend() {
pkg_setup() {
use offload && LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
- use test && python-any-r1_pkg_setup
+ if use gdb-plugin || use test; then
+ python-single-r1_pkg_setup
+ fi
}
multilib_src_configure() {
@@ -87,6 +92,7 @@ multilib_src_configure() {
-DOPENMP_LIBDIR_SUFFIX="${libdir#lib}"
-DLIBOMP_USE_HWLOC=$(usex hwloc)
+ -DLIBOMP_OMPD_GDB_SUPPORT=$(multilib_native_usex gdb-plugin)
-DLIBOMP_OMPT_SUPPORT=$(usex ompt)
-DOPENMP_ENABLE_LIBOMPTARGET=$(usex offload)
@@ -95,8 +101,6 @@ multilib_src_configure() {
-DLIBOMP_INSTALL_ALIASES=OFF
# disable unnecessary hack copying stuff back to srcdir
-DLIBOMP_COPY_EXPORTS=OFF
- # disable until upstream fixes it to use positive logic
- -DDISABLE_OMPD_GDB_PLUGIN=ON
)
if use offload; then
diff --git a/sys-libs/libomp/libomp-16.0.0_pre20221010.ebuild b/sys-libs/libomp/libomp-16.0.0_pre20221010.ebuild
index dca2bf97647b..bc1e59029b71 100644
--- a/sys-libs/libomp/libomp-16.0.0_pre20221010.ebuild
+++ b/sys-libs/libomp/libomp-16.0.0_pre20221010.ebuild
@@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{8..11} )
-inherit flag-o-matic cmake-multilib linux-info llvm llvm.org python-any-r1
+inherit flag-o-matic cmake-multilib linux-info llvm llvm.org python-single-r1
DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
HOMEPAGE="https://openmp.llvm.org"
@@ -13,12 +13,16 @@ LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="0/${LLVM_SOABI}"
KEYWORDS=""
IUSE="
- debug hwloc offload ompt test
+ debug gdb-plugin hwloc offload ompt test
llvm_targets_AMDGPU llvm_targets_NVPTX
"
+REQUIRED_USE="
+ gdb-plugin? ( ${PYTHON_REQUIRED_USE} )
+"
RESTRICT="!test? ( test )"
RDEPEND="
+ gdb-plugin? ( ${PYTHON_DEPS} )
hwloc? ( >=sys-apps/hwloc-2.5:0=[${MULTILIB_USEDEP}] )
offload? (
virtual/libelf:=[${MULTILIB_USEDEP}]
@@ -41,7 +45,10 @@ BDEPEND="
virtual/pkgconfig
)
test? (
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-python/lit[${PYTHON_USEDEP}]
+ ')
sys-devel/clang
)
"
@@ -49,10 +56,6 @@ BDEPEND="
LLVM_COMPONENTS=( openmp cmake llvm/include )
llvm.org_set_globals
-python_check_deps() {
- python_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"
@@ -72,7 +75,9 @@ pkg_pretend() {
pkg_setup() {
use offload && LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
- use test && python-any-r1_pkg_setup
+ if use gdb-plugin || use test; then
+ python-single-r1_pkg_setup
+ fi
}
multilib_src_configure() {
@@ -87,6 +92,7 @@ multilib_src_configure() {
-DOPENMP_LIBDIR_SUFFIX="${libdir#lib}"
-DLIBOMP_USE_HWLOC=$(usex hwloc)
+ -DLIBOMP_OMPD_GDB_SUPPORT=$(multilib_native_usex gdb-plugin)
-DLIBOMP_OMPT_SUPPORT=$(usex ompt)
-DOPENMP_ENABLE_LIBOMPTARGET=$(usex offload)
@@ -95,8 +101,6 @@ multilib_src_configure() {
-DLIBOMP_INSTALL_ALIASES=OFF
# disable unnecessary hack copying stuff back to srcdir
-DLIBOMP_COPY_EXPORTS=OFF
- # disable until upstream fixes it to use positive logic
- -DDISABLE_OMPD_GDB_PLUGIN=ON
)
if use offload; then
diff --git a/sys-libs/libomp/metadata.xml b/sys-libs/libomp/metadata.xml
index 63801061d848..ec501a894a66 100644
--- a/sys-libs/libomp/metadata.xml
+++ b/sys-libs/libomp/metadata.xml
@@ -10,6 +10,7 @@
</maintainer>
<use>
<flag name="cuda">Build CUDA offloading plugin (only with USE=offload)</flag>
+ <flag name="gdb-plugin">Build OMPD GDB plugin</flag>
<flag name="hwloc">Enable CPU affinity support via hwloc</flag>
<flag name="offload">Support offloading OpenMP using libomptarget</flag>
<flag name="ompt">Enable OpenMP Tools Interface support</flag>