• [gentoo-dev] [PATCH 2/2] eclass/tests/toolchain-funcs.sh: Cover tc-is-l

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Mon Aug 5 16:10:01 2024
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/tests/toolchain-funcs.sh | 20 ++++++++++++++++++++
    1 file changed, 20 insertions(+)

    diff --git a/eclass/tests/toolchain-funcs.sh b/eclass/tests/toolchain-funcs.sh index ee10ddf50c1e..6bfb00ff6bcb 100755
    --- a/eclass/tests/toolchain-funcs.sh
    +++ b/eclass/tests/toolchain-funcs.sh
    @@ -210,6 +210,16 @@ if type -P gcc &>/dev/null; then
    tbegin "tc-get-c-rtlib (gcc)"
    [[ $(CC=gcc tc-get-c-rtlib) == libgcc ]]
    tend $?
    +
    + tbegin "tc-is-lto (gcc, -fno-lto)"
    + CC=gcc CFLAGS=-fno-lto tc-is-lto
    + [[ $? -eq 1 ]]
    + tend $?
    +
    + tbegin "tc-is-lto (gcc, -flto)"
    + CC=gcc CFLAGS=-flto tc-is-lto
    + [[ $? -eq 0 ]]
    + tend $?
    fi

    if type -P clang &>/dev/null; then
    @@ -232,6 +242,16 @@ if type -P clang &>/dev/null; then
    [[ $(CC=clang CFLAGS="--rtlib=${rtlib}" tc-get-c-rtlib) == ${rtlib} ]]
    tend $?
    done
    +
    + tbegin "tc-is-lto (clang, -fno-lto)"
    + CC=clang CFLAGS=-fno-lto tc-is-lto
    + [[ $? -eq 1 ]]
    + tend $?
    +
    + tbegin "tc-is-lto (clang, -flto)"
    + CC=clang CFLAGS=-flto tc-i