From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6A290159C9B for ; Tue, 6 Aug 2024 08:47:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 25FCC2BC01C; Tue, 6 Aug 2024 08:47:18 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 06A462BC01C for ; Tue, 6 Aug 2024 08:47:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EE9D3342FB0 for ; Tue, 6 Aug 2024 08:47:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 43D1F1EB6 for ; Tue, 6 Aug 2024 08:47:15 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1722932933.f14c9139aac5679ad4827e4b69d8bc6a5e3042cc.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/tests/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/tests/toolchain-funcs.sh X-VCS-Directories: eclass/tests/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: f14c9139aac5679ad4827e4b69d8bc6a5e3042cc X-VCS-Branch: master Date: Tue, 6 Aug 2024 08:47:15 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c8eb1309-a66d-47bf-8d6b-913a9c661bff X-Archives-Hash: 357394ccb7a584c7cfc5a884d40011aa commit: f14c9139aac5679ad4827e4b69d8bc6a5e3042cc Author: Michał Górny gentoo org> AuthorDate: Mon Aug 5 14:06:43 2024 +0000 Commit: Michał Górny gentoo org> CommitDate: Tue Aug 6 08:28:53 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f14c9139 eclass/tests/toolchain-funcs.sh: Cover tc-is-lto Signed-off-by: Michał Górny gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/37976 Signed-off-by: Michał Górny 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