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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4B5D0138334 for ; Wed, 6 Nov 2019 22:44:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7AB25E090F; Wed, 6 Nov 2019 22:44:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5A59AE090F for ; Wed, 6 Nov 2019 22:44:44 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2C0CA34C9D9 for ; Wed, 6 Nov 2019 22:44:43 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0E25289F for ; Wed, 6 Nov 2019 22:44:41 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1573080274.8f02136721af40dd89a09101504750fb28f8142e.slyfox@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: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: 8f02136721af40dd89a09101504750fb28f8142e X-VCS-Branch: master Date: Wed, 6 Nov 2019 22:44:41 +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: 8fa15382-c17c-46b9-8d30-460270cee4b1 X-Archives-Hash: bc47fbdb8c6060f9b487001dfca9aade commit: 8f02136721af40dd89a09101504750fb28f8142e Author: Sergei Trofimovich gentoo org> AuthorDate: Wed Nov 6 22:40:18 2019 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Wed Nov 6 22:44:34 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f021367 eclass/tests/toolchain-funcs.sh add test for 'tc-cpp-is-true()' With patch from bug #698912 reverted we observe failures as: * Testing tc-cpp-is-true (gcc, defined) ... [ ok ] * Testing tc-cpp-is-true (gcc, not defined) ... [ ok ] * Testing tc-cpp-is-true (gcc, defined on -ggdb3) ... [ !! ] * Testing tc-cpp-is-true (clang, defined) ... [ !! ] * Testing tc-cpp-is-true (clang, not defined) ... [ ok ] * Testing tc-cpp-is-true (clang, defined on -ggdb3) ... [ !! ] Closes: https://bugs.gentoo.org/698912 Signed-off-by: Sergei Trofimovich gentoo.org> eclass/tests/toolchain-funcs.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/eclass/tests/toolchain-funcs.sh b/eclass/tests/toolchain-funcs.sh index bcf57f78201..79ba6fa407b 100755 --- a/eclass/tests/toolchain-funcs.sh +++ b/eclass/tests/toolchain-funcs.sh @@ -172,4 +172,28 @@ if type -P pathcc &>/dev/null; then tend $? fi +for compiler in gcc clang; do + if type -P ${compielr} &>/dev/null; then + tbegin "tc-cpp-is-true ($compiler, defined)" + ( + export CC=${compiler} + tc-cpp-is-true "defined(SOME_DEFINED_SYMBOL)" -DSOME_DEFINED_SYMBOL + ) + tend $? + tbegin "tc-cpp-is-true ($compiler, not defined)" + ( + export CC=${compiler} + ! tc-cpp-is-true "defined(SOME_UNDEFINED_SYMBOL)" + ) + tend $? + + tbegin "tc-cpp-is-true ($compiler, defined on -ggdb3)" + ( + export CC=${compiler} + tc-cpp-is-true "defined(SOME_DEFINED_SYMBOL)" -DSOME_DEFINED_SYMBOL -ggdb3 + ) + tend $? + fi +done + texit