summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-09-29 23:20:05 +0200
committerMichał Górny <mgorny@gentoo.org>2016-09-29 23:40:04 +0200
commitde0ea1f1898758a2e5f9973d3c248b800675360c (patch)
tree800a2d1aaea69b4a08a3c99062d30d18b5f2d1a0 /sys-libs/libomp
parentnet-nds/openldap: Add slot operator on Perl dependency where possible, bug 59... (diff)
downloadgentoo-de0ea1f1898758a2e5f9973d3c248b800675360c.tar.gz
gentoo-de0ea1f1898758a2e5f9973d3c248b800675360c.tar.bz2
gentoo-de0ea1f1898758a2e5f9973d3c248b800675360c.zip
sys-libs/libomp: Add hwloc support
Diffstat (limited to 'sys-libs/libomp')
-rw-r--r--sys-libs/libomp/libomp-9999.ebuild7
-rw-r--r--sys-libs/libomp/metadata.xml3
2 files changed, 8 insertions, 2 deletions
diff --git a/sys-libs/libomp/libomp-9999.ebuild b/sys-libs/libomp/libomp-9999.ebuild
index 2496f2083f43..c64f8401c8e5 100644
--- a/sys-libs/libomp/libomp-9999.ebuild
+++ b/sys-libs/libomp/libomp-9999.ebuild
@@ -18,13 +18,15 @@ EGIT_REPO_URI="http://llvm.org/git/openmp.git
LICENSE="UoI-NCSA"
SLOT="0"
KEYWORDS=""
-IUSE="test"
+IUSE="hwloc test"
+RDEPEND="hwloc? ( sys-apps/hwloc:0= )"
# tests:
# - dev-python/lit provides the test runner
# - sys-devel/llvm provide test utils (e.g. FileCheck)
# - sys-devel/clang provides the compiler to run tests
-DEPEND="dev-lang/perl
+DEPEND="${RDEPEND}
+ dev-lang/perl
test? (
$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
sys-devel/llvm
@@ -43,6 +45,7 @@ multilib_src_configure() {
local libdir="$(get_libdir)"
local mycmakeargs=(
-DLIBOMP_LIBDIR_SUFFIX="${libdir#lib}"
+ -DLIBOMP_USE_HWLOC=$(usex hwloc)
# do not install libgomp.so & libiomp5.so aliases
-DLIBOMP_INSTALL_ALIASES=OFF
# disable unnecessary hack copying stuff back to srcdir
diff --git a/sys-libs/libomp/metadata.xml b/sys-libs/libomp/metadata.xml
index 7e5a689ec28a..a6f393e8425a 100644
--- a/sys-libs/libomp/metadata.xml
+++ b/sys-libs/libomp/metadata.xml
@@ -8,5 +8,8 @@
<maintainer type="project">
<email>llvm@gentoo.org</email>
</maintainer>
+ <use>
+ <flag name='hwloc'>Enable CPU affinity support via hwloc</flag>
+ </use>
<longdescription>The OpenMP subproject of LLVM is intended to contain all of the components required to build an executing OpenMP program that are outside the compiler itself.</longdescription>
</pkgmetadata>