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 80665159C9B for ; Mon, 5 Aug 2024 14:08:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B67D4E2AB9; Mon, 5 Aug 2024 14:08:25 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 7B887E2AB6 for ; Mon, 5 Aug 2024 14:08:25 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH 2/2] eclass/tests/toolchain-funcs.sh: Cover tc-is-lto Date: Mon, 5 Aug 2024 16:08:18 +0200 Message-ID: <20240805140818.1007067-2-mgorny@gentoo.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805140818.1007067-1-mgorny@gentoo.org> References: <20240805140818.1007067-1-mgorny@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: 4183eeef-b997-44bd-9eaa-e70cadb95ffc X-Archives-Hash: 0e22b38c79a0f3de86fc36f170822fc9 Signed-off-by: Michał Górny --- 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