Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3433579pxf; Mon, 15 Mar 2021 09:25:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlo8FPs2Y/WjQnT12WV3J1XkHfKMIVkYcjhYTOpG+8vnv7StnFDaDoK4JVSSMvUK3qG12X X-Received: by 2002:a17:906:4e57:: with SMTP id g23mr24392819ejw.47.1615825522574; Mon, 15 Mar 2021 09:25:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615825522; cv=none; d=google.com; s=arc-20160816; b=TBvuXMzc+7J47RWw1BsAN+8ZWXWC2yEuYgwp8enuMv2ol9/wC92nWA7s1bAa1t10hq 6af70wj9W/ameBn+YSjcBy70rU7Uii/5NvE/veqlrwzhIJHefK47L1QYa694EBpOhF84 R93FarIOUATxbDjSki7aNPRg6cqpgTHBCXucdQuzaN1uFf7rJtJ+U/6+JChriTf4DIAk m42oyAh1DNmdXmNpiPE63f3NloIB/JYP3dGEIVU4LUTn+Uy6z2R5FJoHu05jLgrhrAjR 50vsiqYwVHqSJCrGJ+PgbvTFyXbuFnFmL5F4IC10Jk06rqPMHgCZlPEHwXAuibFZKbGM goug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=LD+AM6hgEBw4I3onUiko1OAZdxqmf7Chvn4W6NLeOeo=; b=Yf/Urw+1fkt1nhze5pZzBqEOgXBIY8XGl4jNKVEndF/UkbiCrIBU0CIeuzkWS/heqQ B4LRnjCf3XVUm6Nxt1K4nG193H+ZBX540wOVP2SxK9P5cvfcMUoCtzTVvuZyZ1tzi+DE UfrnrWPP+nNd6ut7hE72xRIJhv5AfTz7Z3bd3/8lvLE99ke5ysnhck7+BH1z2K85tq0d zgKg0iMDKlXoJWSBB5Wvy9bBbE5RancMWbmuqagwzbKkbrm88NzttUPdTVmnFenfP45e lyl3SjaCmrmc/EHA3H+IfjRJiXArG9WciDWYMfq4Q0b/USnwAw9fytBHDnx8FtPHhVS/ PEQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="zhoLwrN/"; 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 b3si10675397ejg.74.2021.03.15.09.24.58; Mon, 15 Mar 2021 09:25:22 -0700 (PDT) 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=@nifty.com header.s=dec2015msa header.b="zhoLwrN/"; 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 S231948AbhCOQXb (ORCPT + 99 others); Mon, 15 Mar 2021 12:23:31 -0400 Received: from conssluserg-01.nifty.com ([210.131.2.80]:33279 "EHLO conssluserg-01.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231962AbhCOQW6 (ORCPT ); Mon, 15 Mar 2021 12:22:58 -0400 Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) (authenticated) by conssluserg-01.nifty.com with ESMTP id 12FGMXOl021913; Tue, 16 Mar 2021 01:22:33 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com 12FGMXOl021913 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1615825353; bh=LD+AM6hgEBw4I3onUiko1OAZdxqmf7Chvn4W6NLeOeo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=zhoLwrN/0jIhVhOedIcv5B7oUqbyRfwg5WLmT3sXgNfk+WjwPni45vCR/Vf+vxDy3 q5QM/bfDlpxK3v5WyuiWNZFukEAwev6toOazwQVTscogRdCPW9n7wu6l91l/WNC9/f B7SPulTY19fvBrWoyhBEg7oR6FzzEWKqa9LjurWvG4x5Zz+qWdrj4mWl1HZ+En3+8x sVXvv5HFOcp/AYFugu92ltZD0dnNbc7ZfyyVtW8iVx1uj5WezzJBtC2KoRvGqwt83K fdIi6f42yjHa7o+JeCUm1vFCFRIN9Ewuv/+0AjfXehAdZ2/Anyy75NomGi5pi8vA3Z XaBufw7uBjyOg== X-Nifty-SrcIP: [209.85.210.175] Received: by mail-pf1-f175.google.com with SMTP id d21so857535pfn.1; Mon, 15 Mar 2021 09:22:33 -0700 (PDT) X-Gm-Message-State: AOAM530gI8kWN/jE3WdXj8BqMnfoghqbe2mWz1mG38ZcS20xQ8/5+6sd KV4j0bF7OxCMgxa1LQzRURnTFLmbFmvEr5x5UWk= X-Received: by 2002:a65:41c6:: with SMTP id b6mr303989pgq.7.1615825352706; Mon, 15 Mar 2021 09:22:32 -0700 (PDT) MIME-Version: 1.0 References: <20210302210646.3044738-1-nathan@kernel.org> <20210309205915.2340265-1-nathan@kernel.org> In-Reply-To: <20210309205915.2340265-1-nathan@kernel.org> From: Masahiro Yamada Date: Tue, 16 Mar 2021 01:21:55 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/2] Makefile: Remove '--gcc-toolchain' flag To: Nathan Chancellor Cc: Michal Marek , Nick Desaulniers , Linux Kbuild mailing list , Linux Kernel Mailing List , clang-built-linux , Sedat Dilek , Fangrui Song Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 10, 2021 at 5:59 AM Nathan Chancellor wrote: > > 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). Both applied to linux-kbuild. Thanks. > 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 > -- Best Regards Masahiro Yamada