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 8103D158086 for ; Mon, 29 Nov 2021 11:30:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 182762BC06B; Mon, 29 Nov 2021 11:30:16 +0000 (UTC) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4B40A2BC036 for ; Mon, 29 Nov 2021 11:30:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=collabora.com; s=mail; t=1638185413; bh=T/ktCaNgTVKL2b0vi4u7FZWWevMIHfyHMCH7LL+i+Vg=; h=From:To:Cc:Subject:Date:From; b=GFgArd9Htf9YYLdMTfT6cXb6aVBNynJFkUzFZyi9kWJsCF1P+VdUtGSfcVFwMALj3 95Cd+oZJnbmBvMvlIfflhD9LswOz46DKfro16dbpPdlRMk9AZQUOF7QF4QYapJm7B9 QsJOJ+VjLEPzN5pmRD1XPpxaqiZ5FTNy26a1/Dl8vMriId87LNWFQWn5GkCUJEiH3n 2CDPta3CtIlDKJc0fStqPIMctq1s4B+7e1lfBT1rxMZoUS05wM+CbAoyygXtMteuFb qn4HO5JBbIGzuReXp50EsCnVuPHzjeLWFfG0Rv1U4+qGQZ534LmLGMt2koCWO/h/v2 ky3SOMa+Ned0g== From: Adrian Ratiu To: gentoo-dev@lists.gentoo.org Cc: Manoj Gupta Subject: [gentoo-dev] [PATCH] kernel-2.eclass: Respect portage CC variable Date: Mon, 29 Nov 2021 13:30:06 +0200 Message-Id: <20211129113006.816430-1-adrian.ratiu@collabora.com> X-Mailer: git-send-email 2.34.0 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-Transfer-Encoding: 8bit X-Archives-Salt: a36ad0d7-63ad-4ed9-8537-bce567d4e181 X-Archives-Hash: bf8121597a625fc4768f02c7d6ec3e7b Starting with kernel >= v5.7 the build system can override this variable by passing LLVM=1 [1], but for older kernels or in cases where the LLVM toolchain is setup directly via portage, CC should be respected to avoid situations like building the kernel with clang but the headers with gcc. [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..9a7d96d26c7 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)" export xmakeopts } -- 2.34.0