From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 2/2] eclass/tests/toolchain-funcs.sh: Cover tc-is-lto
Date: Mon, 5 Aug 2024 16:08:18 +0200 [thread overview]
Message-ID: <20240805140818.1007067-2-mgorny@gentoo.org> (raw)
In-Reply-To: <20240805140818.1007067-1-mgorny@gentoo.org>
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-is-lto
+ [[ $? -eq 0 ]]
+ tend $?
fi
texit
--
2.45.2
prev parent reply other threads:[~2024-08-05 14:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-05 14:08 [gentoo-dev] [PATCH 1/2] toolchain-funcs.eclass: Fix tc-is-lto not to leave stray files in T Michał Górny
2024-08-05 14:08 ` Michał Górny [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240805140818.1007067-2-mgorny@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox