• [gentoo-dev] [PATCH 2/2] toolchain-funcs.eclass: document proper tc-che

    From David Seifert@21:1/5 to All on Sun May 15 23:40:01 2022
    Signed-off-by: David Seifert <soap@gentoo.org>
    ---
    eclass/toolchain-funcs.eclass | 13 +++++++++++++
    1 file changed, 13 insertions(+)

    diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 9ad5e224b03..54d4b0912a6 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 "You