commit:     6b4c6da6ce3123ba26ff0c42d8ae0fdacebfda9b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  5 16:32:24 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Dec  5 16:34:43 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b4c6da6

sys-devel/llvm: Set libomp as default OpenMP provider in -9999, #562990

Use libomp as default OpenMP provider rather than libgomp because the
support for the latter is unable to find omp.h without explicit -I, and
provides syntax checking only.

Bug: https://bugs.gentoo.org/show_bug.cgi?id=562990

 sys-devel/llvm/llvm-9999.ebuild | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sys-devel/llvm/llvm-9999.ebuild b/sys-devel/llvm/llvm-9999.ebuild
index e65e573..2f8afe7 100644
--- a/sys-devel/llvm/llvm-9999.ebuild
+++ b/sys-devel/llvm/llvm-9999.ebuild
@@ -254,6 +254,9 @@ multilib_src_configure() {
        if use clang; then
                mycmakeargs+=(
                        -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml)
+                       # libgomp support fails to find headers without 
explicit -I
+                       # furthermore, it provides only syntax checking
+                       -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp
                )
        fi
 
@@ -481,8 +484,7 @@ multilib_src_install_all() {
 }
 
 pkg_postinst() {
-       if use clang; then
-               elog "To enable OpenMP support in clang, install 
sys-libs/libomp"
-               elog "and use the '-fopenmp=libomp' command line option"
+       if use clang && ! has_version 'sys-libs/libomp'; then
+               elog "To enable OpenMP support in clang, install 
sys-libs/libomp."
        fi
 }

Reply via email to