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 942ED138334 for ; Wed, 6 Nov 2019 22:46:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E276AE0919; Wed, 6 Nov 2019 22:46:27 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 9A56BE090E for ; Wed, 6 Nov 2019 22:46:27 +0000 (UTC) Received: from sf (tunnel547699-pt.tunnel.tserv1.lon2.ipv6.he.net [IPv6:2001:470:1f1c:3e6::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: slyfox) by smtp.gentoo.org (Postfix) with ESMTPSA id 45ABA34C993; Wed, 6 Nov 2019 22:46:26 +0000 (UTC) Date: Wed, 6 Nov 2019 22:46:22 +0000 From: Sergei Trofimovich To: Mattias Nissler Cc: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Re: [PATCH] Fix tc-cpp-is-true to work with clang Message-ID: <20191106224622.739f2a9f@sf> In-Reply-To: <20191104201811.5a629cdd@sf> References: <20191104101120.230510-1-mnissler@chromium.org> <20191104201811.5a629cdd@sf> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) 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=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 88f8b334-e546-4932-847c-051c5d91060f X-Archives-Hash: 00a1d3325116c06fde7fdaac1fad995b On Mon, 4 Nov 2019 20:18:11 +0000 Sergei Trofimovich wrote: > On Mon, 4 Nov 2019 10:11:20 +0000 > Mattias Nissler wrote: > > > Clang's preprocessor likes to output a leading newline, which makes > > the comparison always fail. GCC generates additional output with certain > > flags (e.g. -ggdb3) as well. Hence, switch the test to trigger a > > preprocessor error when the condition is not true and examine the exit > > code. > > > > Bug: https://bugs.gentoo.org/698912 > > > > Signed-off-by: Mattias Nissler > > --- > > eclass/toolchain-funcs.eclass | 15 +++++++-------- > > 1 file changed, 7 insertions(+), 8 deletions(-) > > Looks good! I'll pull it in to ::gentoo in a few days. Pushed to ::gentoo as: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ef6b33339da7bb04afd77e1bc5db011b02d658a Also while at it added basic regression test: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f02136721af40dd89a09101504750fb28f8142e -- Sergei