Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2868694pxb; Tue, 9 Mar 2021 13:04:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJzToG8VPPmP0kiJlT14SpjepAJ5JHh0Euhgmz847buqS5r/r9mqmhtQWDsdMISeDCDnzKuE X-Received: by 2002:a05:6402:2058:: with SMTP id bc24mr6410854edb.243.1615323840704; Tue, 09 Mar 2021 13:04:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615323840; cv=none; d=google.com; s=arc-20160816; b=wXPU70JIcRodi9nnVdwZpXezo/cFGoV+jvvS8nKDQbX6M+yF9RWkkRM2XxM5Kdbbny 76Dm/dq15m4DxqSsLQ6Z0pyP8jBjWgorDSWnxP8o4vUfCSGPmFkKYmb38g7jb0yuuxUU f325EwKTNHAeGF8Ap/9ks9arXEi2opQfozQxM3zYVRr33TdKMsrJRKzq4Ecb7ioz3a3/ uBClod5x7q5sKd4Es4NfwILpuKvYvms96QM6Ao7enjIYexEO3I6AMv56wTb8XfUqf7iT AuhxPfD3JQuRDHSHHhsoQgQF1gApm2GK+DMLteFv2RZ6tr5kGgcZOetDLAPezSj2FlLt yCQg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SWUMWJnKfPX/MQHLJ3oymRnlAfaQRx4qKJGtile7FUA=; b=RJpN6A8zeH4bwnUHOP/9W6WY98xRxQVo95lZ/l11S/Z2lDc5BNGoJUCINbXFxygoXE S1Ho/rwPYU5hy4oR+3J5EfCMQaUaXZokR37GJul7TLL8KGnGxDVLWfHCop5u78UY5xz0 7gAc54gxIEiVgZlj9kaZ6Xg5DKR3VCcHFVG+D7TGr90buWhBk7Vp4y9SVUTjyKf5xSfq EARIaljmqniw9NMDNzdHsLAiL+RSkDVzKC+OdzRNN6YDpfvSORBuPKokKSndyOkLFgpX 3+RNaGn86+CL7/YdEgUQ8yHeUVo/0GIHYz0roW2pqC1OSNCIZ4nbGyzmm45wuvzccbpP 21ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nXv9MXb0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y18si9502798ejj.628.2021.03.09.13.03.35; Tue, 09 Mar 2021 13:04:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nXv9MXb0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232137AbhCIVA0 (ORCPT + 99 others); Tue, 9 Mar 2021 16:00:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:47250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231872AbhCIU7v (ORCPT ); Tue, 9 Mar 2021 15:59:51 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 23BB165243; Tue, 9 Mar 2021 20:59:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615323590; bh=xKnQy4lOzj4k8Ph2fNHWK9GUggtn0blvGQT07e7lvIA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nXv9MXb029siXwQLMe2V12871C4suockJUAGv/eXhEAWMj+msKfHzogm0ULDD5g8a P99tPVhQWnBHA3PtXSTGaHSmJtFKvp/h97ugEaWAIenX/VqKFlwAS9vXdiEDoc4fik kMwaycxfpgYa0ZxuBgBmuDeHzh8s2pY/3w0f4ZPuDiYADwXo4F4hFfHfpoZ3QVd9n4 uDvOIP6YqpEm4djUbLfO/ZG7TYzNgT77zNaoqbxfxx3/2AK1CfKWXqSwMYE5VvmKz5 lEkUO7crbbFBlfs93JyhzuccR9epGVWm81IICgloXg8KxD0M0ltKCmFWuaO0XaydyQ 6+df88xFd/d/w== From: Nathan Chancellor To: Masahiro Yamada , Michal Marek , Nick Desaulniers Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Sedat Dilek , Fangrui Song , Nathan Chancellor Subject: [PATCH v2 1/2] Makefile: Remove '--gcc-toolchain' flag Date: Tue, 9 Mar 2021 13:59:14 -0700 Message-Id: <20210309205915.2340265-1-nathan@kernel.org> X-Mailer: git-send-email 2.31.0.rc1 In-Reply-To: <20210302210646.3044738-1-nathan@kernel.org> References: <20210302210646.3044738-1-nathan@kernel.org> MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This flag was originally added to allow clang to find the GNU cross tools in commit 785f11aa595b ("kbuild: Add better clang cross build support"). This flag was not enough to find the tools at times so '--prefix' was added to the list in commit ef8c4ed9db80 ("kbuild: allow to use GCC toolchain not in Clang search path") and improved upon in commit ca9b31f6bb9c ("Makefile: Fix GCC_TOOLCHAIN_DIR prefix for Clang cross compilation"). Now that '--prefix' specifies a full path and prefix, '--gcc-toolchain' serves no purpose because the kernel builds with '-nostdinc' and '-nostdlib'. This has been verified with self compiled LLVM 10.0.1 and LLVM 13.0.0 as well as a distribution version of LLVM 11.1.0 without binutils in the LLVM toolchain locations. Link: https://reviews.llvm.org/D97902 Signed-off-by: Nathan Chancellor --- v1 -> v2: * Improve commit message (add history behind flag and link to Fangrui's documentation improvement). I did not carry tags forward so that people could re-review and test. Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Makefile b/Makefile index 31dcdb3d61fa..182e93d91198 100644 --- a/Makefile +++ b/Makefile @@ -568,10 +568,6 @@ ifneq ($(CROSS_COMPILE),) CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%)) GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit)) CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE)) -GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..) -endif -ifneq ($(GCC_TOOLCHAIN),) -CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN) endif ifneq ($(LLVM_IAS),1) CLANG_FLAGS += -no-integrated-as base-commit: a38fd8748464831584a19438cbb3082b5a2dab15 -- 2.31.0.rc1