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 36CA8158086 for ; Wed, 15 Dec 2021 21:37:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E025A2BC041; Wed, 15 Dec 2021 21:37:00 +0000 (UTC) Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) (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 A7C2AE07AE for ; Wed, 15 Dec 2021 21:36:58 +0000 (UTC) Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id C58B5240028 for ; Wed, 15 Dec 2021 22:36:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1639604216; bh=89V8WcB5htGu1wxi24RhbjmBGu4wFGWHNZ30LFBNLxs=; h=From:To:Subject:Date:From; b=YMOhLAOl8jIORbFVjd7ZaKEhan2Ih6tKf2aQctHDPrksAozpys6O/EJK7m4B5IuNC WZHX7dunruwstfIGY6dJYTHTpCpEV4UfpiOmpX3bPHdyrwCjXWuWI1ix8zkLr+LuRJ Prwww66eT7LBisW4E4YWoGD2+A5FI5DnVccMFiDhIwLfQmZrcMXXq+0e+R2AcsbOGq sbgmvxSGVwKytMSQrlGl++rRKOOA4g5XLSB/X5dv2XEJLUK4SF3zW0h/PZ2VPhLBtu B/pwqSHb4M9/gLuGpotRzGf3gxEium6+0MQNSnz77ciQa1DGHtmi4ry9sWojOQcdfd oeqeaMQG7fy5w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4JDpVH5M3Lz9rxM for ; Wed, 15 Dec 2021 22:36:55 +0100 (CET) From: James Beddek To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH v2] kernel-2.eclass: Respect portage CC & AR variables Date: Wed, 15 Dec 2021 21:36:52 +0000 Message-ID: <5775736.lOV4Wx5bFT@desktop> In-Reply-To: <20211215145826.761816-1-adrian.ratiu@collabora.com> References: <20211215145826.761816-1-adrian.ratiu@collabora.com> 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: multipart/signed; boundary="nextPart4700488.31r3eYUQgx"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-Archives-Salt: cedcffb8-da83-4dfb-85bb-b2922b33fd7f X-Archives-Hash: 8efeea8b8f9f641d353d4a1787d71609 --nextPart4700488.31r3eYUQgx Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii"; protected-headers="v1" From: James Beddek To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH v2] kernel-2.eclass: Respect portage CC & AR variables Date: Thu, 16 Dec 2021 10:36:44 +1300 Message-ID: <5775736.lOV4Wx5bFT@desktop> In-Reply-To: <20211215145826.761816-1-adrian.ratiu@collabora.com> References: <20211215145826.761816-1-adrian.ratiu@collabora.com> On Thursday, 16 December 2021 3:58:26 AM NZDT Adrian Ratiu wrote: > Starting with kernel>=v5.7 the build system can override the > tools vars by setting LLVM=1 [1], but older kernels still use > the default GNU tools, so to be able to use a full LLVM/Clang > build, CC should be set together with AR to the portage set > values. > > Doing this avoids situations like building the kernel with > clang (using the set HOSTCC) but using gcc/gnu-ar for headers. > > [1] a0d1c951ef08 kbuild: support LLVM=1 to switch the default tools to > Clang/LLVM > > Co-authored-by: Manoj Gupta > Signed-off-by: Adrian Ratiu > --- > eclass/kernel-2.eclass | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass > index adc1425bc2e..caeec86ff59 100644 > --- a/eclass/kernel-2.eclass > +++ b/eclass/kernel-2.eclass > @@ -692,7 +692,7 @@ env_setup_xmakeopts() { > elif type -p ${CHOST}-ar >/dev/null; then > xmakeopts="${xmakeopts} CROSS_COMPILE=${CHOST}-" > fi > - xmakeopts="${xmakeopts} HOSTCC=$(tc-getBUILD_CC)" > + xmakeopts="${xmakeopts} HOSTCC=$(tc-getBUILD_CC) CC=$(tc-getCC) > AR=$(tc-getAR)" export xmakeopts > } What's the reason for not using $LLVM here? To preserve building with clang for kernels < 5.7 ? I might be missing the point, but wouldn't something along the lines of "LLVM=$(! [[ $(tc-getCC) =~ clang ]]; echo $?)" work to preserve the correct compiler tools? Cheers --nextPart4700488.31r3eYUQgx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE6TiHvKPfjLbCYrJRC091Pag9upAFAmG6X+wACgkQC091Pag9 upCQXg//R/+WDd6mhjOW+KJVuP/L4JOEUt2qmxbW5kAL8+mOjCPJwBMYJjOietWY a4hKWNIAf031N+ybmG+rwtT9Bfgsa5AK4hQxbg25IJbWzkKtMY/Bx+fVKr5JV9KH AUdSOfU7rZDHlIzK+mlrjMNDr8851Em+VafpRRw4zrwZ841aLkJ8dqso6PuYfsda vE/n7su6XfcXcR7ItmGPinjM17RJUZwu2ODLdGNuLKNYxIHt+qHJZnq1YrtkZ40U c7UZCIZtQU/Exc8A3KVon5t+kfBEr9DSvx8wMsv8t+mSK9XsEs6RogQgkUnape4n kCf//q3vT4XspXLwi/k++J10LfFCt0v/VIfzCakd25evspNQmwfJfqOjN8BIUhPT em5NQ8wTHbvmf8DPyXo7ZoGL6JR5Mt14BwzEn0GNozW/4HiBYTsXwe1cK7dMzYdC GV6gEqz6J9gqJxMptpRIGYQsIsrRuvZnsTltd4A1AkIlxE7B+YTQIUo+MFE3OnpM k5jS9VqDh5zYHur1ldNLClLq7V4gUefFw2RS0472zK+a/vS2kIo1OVEZkB7d83w3 CA2xYv3atSPUjhaIfONNxffB4QnjsM9XOFl/PyZcPLJxdCz18OGm+yOwzsQREE6V kqhcn03pec6Aua5Bi6O+FGcr4cLnr5PumIZDqsCBa8H+OAeoBOY= =7u0j -----END PGP SIGNATURE----- --nextPart4700488.31r3eYUQgx--