1 |
commit: de0ea1f1898758a2e5f9973d3c248b800675360c |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 29 21:20:05 2016 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 29 21:40:04 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de0ea1f1 |
7 |
|
8 |
sys-libs/libomp: Add hwloc support |
9 |
|
10 |
sys-libs/libomp/libomp-9999.ebuild | 7 +++++-- |
11 |
sys-libs/libomp/metadata.xml | 3 +++ |
12 |
2 files changed, 8 insertions(+), 2 deletions(-) |
13 |
|
14 |
diff --git a/sys-libs/libomp/libomp-9999.ebuild b/sys-libs/libomp/libomp-9999.ebuild |
15 |
index 2496f20..c64f840 100644 |
16 |
--- a/sys-libs/libomp/libomp-9999.ebuild |
17 |
+++ b/sys-libs/libomp/libomp-9999.ebuild |
18 |
@@ -18,13 +18,15 @@ EGIT_REPO_URI="http://llvm.org/git/openmp.git |
19 |
LICENSE="UoI-NCSA" |
20 |
SLOT="0" |
21 |
KEYWORDS="" |
22 |
-IUSE="test" |
23 |
+IUSE="hwloc test" |
24 |
|
25 |
+RDEPEND="hwloc? ( sys-apps/hwloc:0= )" |
26 |
# tests: |
27 |
# - dev-python/lit provides the test runner |
28 |
# - sys-devel/llvm provide test utils (e.g. FileCheck) |
29 |
# - sys-devel/clang provides the compiler to run tests |
30 |
-DEPEND="dev-lang/perl |
31 |
+DEPEND="${RDEPEND} |
32 |
+ dev-lang/perl |
33 |
test? ( |
34 |
$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') |
35 |
sys-devel/llvm |
36 |
@@ -43,6 +45,7 @@ multilib_src_configure() { |
37 |
local libdir="$(get_libdir)" |
38 |
local mycmakeargs=( |
39 |
-DLIBOMP_LIBDIR_SUFFIX="${libdir#lib}" |
40 |
+ -DLIBOMP_USE_HWLOC=$(usex hwloc) |
41 |
# do not install libgomp.so & libiomp5.so aliases |
42 |
-DLIBOMP_INSTALL_ALIASES=OFF |
43 |
# disable unnecessary hack copying stuff back to srcdir |
44 |
|
45 |
diff --git a/sys-libs/libomp/metadata.xml b/sys-libs/libomp/metadata.xml |
46 |
index 7e5a689..a6f393e 100644 |
47 |
--- a/sys-libs/libomp/metadata.xml |
48 |
+++ b/sys-libs/libomp/metadata.xml |
49 |
@@ -8,5 +8,8 @@ |
50 |
<maintainer type="project"> |
51 |
<email>llvm@g.o</email> |
52 |
</maintainer> |
53 |
+ <use> |
54 |
+ <flag name='hwloc'>Enable CPU affinity support via hwloc</flag> |
55 |
+ </use> |
56 |
<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> |
57 |
</pkgmetadata> |