diff options
author | 2022-05-15 19:10:57 +0200 | |
---|---|---|
committer | 2022-05-16 23:28:51 +0000 | |
commit | 571dd66bedd32f3f5fdf4a1609e2edfa3b76a0e9 (patch) | |
tree | 617c1270fa91c152461c62c5f5b0dd663bffc49e /eclass | |
parent | toolchain-funcs.eclass: deprecate tc-has-openmp (diff) | |
download | gentoo-571dd66bedd32f3f5fdf4a1609e2edfa3b76a0e9.tar.gz gentoo-571dd66bedd32f3f5fdf4a1609e2edfa3b76a0e9.tar.bz2 gentoo-571dd66bedd32f3f5fdf4a1609e2edfa3b76a0e9.zip |
toolchain-funcs.eclass: document proper tc-check-openmp use
Signed-off-by: David Seifert <soap@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/25498
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain-funcs.eclass | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 9ad5e224b03e..54d4b0912a6e 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -611,6 +611,19 @@ tc-has-openmp() { # 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. +# +# You should test for any necessary OpenMP support in pkg_pretend in order to +# warn the user of required toolchain changes. You must still check for OpenMP +# support at build-time, e.g. +# @CODE +# pkg_pretend() { +# [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +# } +# +# pkg_setup() { +# [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +# } +# @CODE tc-check-openmp() { if ! _tc-has-openmp; then eerror "Your current compiler does not support OpenMP!" |