• Re: [gentoo-dev] [PATCH 1/3] toolchain-funcs.eclass: add tc-getHIPCXX f

    From Sam James@21:1/5 to Sv. Lockal on Sat Jul 5 09:20:01 2025
    "Sv. Lockal" <lockalsash@gmail.com> writes:

    This allows to find compiler for HIP language files.
    Environment variable HIPCXX is used by CMake[1].
    In recent releases of CMake, it strictly requires clang++, not hipcc.
    When not defined, CMake uses multiple methods to find HIP compiler,
    hipconfig is one of them[2].


    Thanks, I merged the series as part of your PR (https://github.com/gentoo/gentoo/pull/42691).

    [1] https://cmake.org/cmake/help/latest/envvar/HIPCXX.html
    [2] https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/CMakeDetermineHIPCompiler.cmake

    Bug: https://bugs.gentoo.org/957893
    Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
    ---
    eclass/toolchain-funcs.eclass | 4 ++++
    1 file changed, 4 insertions(+)

    diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index baf032bbd4ec..1f3f958badee 100644
    --- a/eclass/toolchain-funcs.eclass
    +++ b/eclass/toolchain-funcs.eclass
    @@ -73,6 +73,10 @@ tc-getCPP() { tc-getPROG CPP "${CC:-gcc} -E" "$@"; }
    # @USAGE: [toolchain prefix]
    # @RETURN: name of the C++ compiler
    tc-getCXX() { tc-getPROG CXX g++ "$@"; }
    +# @FUNCTION: tc-getHIPCXX
    +# @USAGE: [toolchain prefix]
    +# @RETURN: name of the HIP compiler
    +tc-getHIPCXX() { tc-getPROG HIPCXX "$(hipconfig
    --hipclangpath)/clang++" "$@"; }
    # @FUNCTION: tc-getLD
    # @USAGE: [toolchain prefix]
    # @RETURN: name of the linker

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)