diff options
author | Repository QA checks <repo-qa-checks@gentoo.org> | 2016-10-22 10:17:47 +0000 |
---|---|---|
committer | Repository QA checks <repo-qa-checks@gentoo.org> | 2016-10-22 10:17:47 +0000 |
commit | bdb2f00bb57380186bab49fbe5d2f9c388dd69e3 (patch) | |
tree | d9add76e359e436e8f0f0196db103c7b35b02128 /eclass | |
parent | 2016-10-22 09:24:09 UTC (diff) | |
parent | media-sound/qmidiarp: 0.6.3 version bump, fix configure w/ Qt 5.7 (diff) | |
download | gentoo-bdb2f00bb57380186bab49fbe5d2f9c388dd69e3.tar.gz gentoo-bdb2f00bb57380186bab49fbe5d2f9c388dd69e3.tar.bz2 gentoo-bdb2f00bb57380186bab49fbe5d2f9c388dd69e3.zip |
Merge updates from master
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain-funcs.eclass | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 5bac36b6737c..63f0d6b20912 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -421,6 +421,27 @@ tc-has-openmp() { return ${ret} } +# @FUNCTION: tc-check-openmp +# @DESCRIPTION: +# Test for OpenMP support with the current compiler and error out with +# a clear error message, telling the user how to rectify the missing +# OpenMP support that has been requested by the ebuild. Using this function +# to test for OpenMP support should be preferred over tc-has-openmp and +# printing a custom message, as it presents a uniform interface to the user. +tc-check-openmp() { + if ! tc-has-openmp; then + eerror "Your current compiler does not support OpenMP!" + + if tc-is-gcc; then + eerror "Enable OpenMP support by building sys-devel/gcc with USE=\"openmp\"." + elif tc-is-clang; then + eerror "OpenMP support in sys-devel/clang is provided by sys-libs/libomp." + fi + + die "Active compiler does not have required support for OpenMP" + fi +} + # @FUNCTION: tc-has-tls # @USAGE: [-s|-c|-l] [toolchain prefix] # @DESCRIPTION: |