Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp140176pxb; Thu, 17 Feb 2022 00:14:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/mcmdFtmg8Rf+qpO5U4dIKGqYgEd1cAX8L5MsiZYjgAOxe8hoyApDTse1VvBENsEaJyAq X-Received: by 2002:a17:906:6716:b0:6cc:7d95:90af with SMTP id a22-20020a170906671600b006cc7d9590afmr1415134ejp.442.1645085650683; Thu, 17 Feb 2022 00:14:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645085650; cv=none; d=google.com; s=arc-20160816; b=sx5+jJ81d+gCGqtL3Rv4MmEXb8O7oZPSc3n6jaNFl46okVdTxEC9w+/kvWqn72Depe yvNjpyfl+iKCY0cw7MUnnsHLL+Lx7V++P4nqpqNug48HPO29aTujkj7sst+uzeNns7GR FJzuIDRJlrq/5y/aO6o3UWIxi051+rgTIs/4KTnVal9BinCXf0a+BmDCkppA1hLggadi opuTnQT7JtJIHCA7/NXCjPIOphHndt+/65A+ptfJKfagroR23RjgDk0UGiOiBEEDOE5Y xxGC3IbB7YDB1GrnjWX1/k4ASIoDUZwapWWLggfrHzD261z6pPVaGQ4h9WrfGvVvP+Dh 4WTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=dHSDuHhCV5MPIyvH+442FdrOsA6pt2ZtTJgpa2G35I0=; b=IskrBObWxo312hlymzo28Zc9+TSZ4LtU0DkteCX4XcBHFXWc+xcN0XINcUv5gIaDxO OrBcjwtiO34DLaLz73YD03MdhDHtX37P2cF3PT/UB3cRtjgQE47F0C/JI93dJupaVoND 3Jx+/AtqgqxxHGRDjBdvGSQxUJRk9giCVR3GP2KqbwwYbGtKoaUGjirKQY2GeoWo2jw+ pJW9VrWI6v1Aw4QCt0+UQ+6DzbHT+Z5yaJHhyifshoa35TqPD5dqMW+tLIAyiX0eHD76 WB34Axku4EXiibYghkzAsxht5OXRDwYEUkKL4jLzrcquNT/wUqycyZXgpK9cFCE4UY+l 4YKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=C0wxkxG9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e2si1605929ejs.401.2022.02.17.00.13.43; Thu, 17 Feb 2022 00:14:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=C0wxkxG9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232870AbiBQDhM (ORCPT + 99 others); Wed, 16 Feb 2022 22:37:12 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231186AbiBQDhL (ORCPT ); Wed, 16 Feb 2022 22:37:11 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 672E51A4D53 for ; Wed, 16 Feb 2022 19:36:58 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: aratiu) with ESMTPSA id 7900E1F44EB6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1645069016; bh=iDLSpiQBEjHsZP331/5Du7RK3TpSCutWYVzHueSHCrM=; h=From:To:Cc:Subject:Date:From; b=C0wxkxG9k+G183vEGi0sDeMFPDJQiD8moZTKmWP3q81QWY2eQOE7s+3IKRXfGynKC +GO2uiWQlhcNGxt1AblhO3E2tpW9ijdwL1uIpSc1RHgNFVIdQDFR1y3m0FwwMGBzoo lapw6OHOMy5C+D0LhyHJN11gF9LGnKhbb0mtRLWh0pMUblN3qWmoOQKT1fC7KWn1dw LIqQuuv8dsi1INZ6hGj3jVWy+hyc7wL4mWhdNagBYd7rd8HfHr7Z49EtjCcNzAstx9 KJ9ClT0Y73NY4QGf56CO8szDJwRxy8HXIXk6NjhA+nFvyYDvT9AGYQ7v7OQevE2At+ S5yzioJgz3/bw== From: Adrian Ratiu To: llvm@lists.linux.dev Cc: linux-kernel@vger.kernel.org, Nick Desaulniers , Nathan Chancellor , Manoj Gupta Subject: [PATCH] tools: fix unavoidable GCC call in Clang builds Date: Thu, 17 Feb 2022 05:36:48 +0200 Message-Id: <20220217033648.1453303-1-adrian.ratiu@collabora.com> X-Mailer: git-send-email 2.35.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In ChromeOS and Gentoo we catch any unwanted mixed Clang/LLVM and GCC/binutils usage via toolchain wrappers which fail builds. This has revealed that GCC is called unconditionally in Clang configured builds to populate GCC_TOOLCHAIN_DIR. Allow overriding the variable to avoid the GCC call - in our case we can set GCC_TOOLCHAIN_DIR directly in the ebuild recipe. Suggested-by: Manoj Gupta Signed-off-by: Adrian Ratiu --- tools/scripts/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include index 79d102304470..98c098c064dd 100644 --- a/tools/scripts/Makefile.include +++ b/tools/scripts/Makefile.include @@ -90,7 +90,7 @@ EXTRA_WARNINGS += -Wstrict-aliasing=3 else ifneq ($(CROSS_COMPILE),) CLANG_CROSS_FLAGS := --target=$(notdir $(CROSS_COMPILE:%-=%)) -GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)gcc 2>/dev/null)) +GCC_TOOLCHAIN_DIR ?= $(dir $(shell which $(CROSS_COMPILE)gcc 2>/dev/null)) ifneq ($(GCC_TOOLCHAIN_DIR),) CLANG_CROSS_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE)) CLANG_CROSS_FLAGS += --sysroot=$(shell $(CROSS_COMPILE)gcc -print-sysroot) -- 2.35.0