Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp980865pxb; Wed, 3 Mar 2021 23:22:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJyvyXZM3D4vf4AcnFduj19M+y3X1eMam16XAqh2f0j+gz53DWEskAlOKjH6IpzRHbuKoGlr X-Received: by 2002:a50:fc94:: with SMTP id f20mr2866305edq.370.1614842553485; Wed, 03 Mar 2021 23:22:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614842553; cv=none; d=google.com; s=arc-20160816; b=iMCSJplQ+t0cbvr96rN7ey8UBfbXYbULL6NZVAwOh56xhi5jzx/InewhAeZh9ow87i qHrgmc+3FMb4vfDsKQ6hWtiQGGkPPjrca74yGXeiZ5ioECvmhsLiPftzFy2NTkO7m9Ys OM0h+nnInVSzDWtcL1M42nLRJDd4i00biuo8vd7eDDcwWxOZS60lP7+aDo9FlysxqvYV /fwTzGaCdn4EryR7Rms9MmtRFg4AL8CcRRhR+qBuYMx0GT2ofV1GhPvSJ7/tmv1lU7ui KS1Jsekw9LIhH6vjeaPRIuHWvFOuuMKne99zFAbRwetpg6PBv7tBwGyCEE7LM7IQungo 3CtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yBWlyOTxkLscrR3m1Z6J6l3UwydAT2XmPo8P60eOyX0=; b=qfpbyDFLrXzLMG5G5je4JDINbKAf2G+G9B7yzz4SxZphnzUobjcu6RTBtHaoIVKZD2 kHr45Snr3dfHTMqT7HSPKv8rJbpFXQsV2b89Pr0Hzfu5v9e83+93aMhiIE5KSQ2ECeJu KwwD/e23Lo20heSA5k08npLAgqtEKcmKAYxW5z7ObwWrlDp8tKR3ybZ4LMpXx+zXFDgS sS7E39QyJ8Ronn7eWZCeR18T2hptbNGL1SgOHURo35ckud5LE39WUPy3sJcJ8kCFOj2Q xM+CwqqjPSw47UgGrbuqb9LzuyBBCn6s3yFYAyM2UWSLRGhkiQi2ytV+830/9jDLpT8A pF6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=g9Ff7jDy; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cf5si2947028ejb.346.2021.03.03.23.22.10; Wed, 03 Mar 2021 23:22:33 -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=@google.com header.s=20161025 header.b=g9Ff7jDy; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2360679AbhCBWXY (ORCPT + 99 others); Tue, 2 Mar 2021 17:23:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241926AbhCBVop (ORCPT ); Tue, 2 Mar 2021 16:44:45 -0500 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60352C061794 for ; Tue, 2 Mar 2021 13:44:03 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id z7so12801615plk.7 for ; Tue, 02 Mar 2021 13:44:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=yBWlyOTxkLscrR3m1Z6J6l3UwydAT2XmPo8P60eOyX0=; b=g9Ff7jDymn73MxgXyc7f9m21euaT/GK2ezot9t/yKfbr/p99hl8xwCQQWdMautPQh6 thFItBZYQPg0egj7rxmqsxsIU0xyPfZxpZ7t4WX0yS7QA2WvfMD0Hed0SKFZs3alM+Yi x0mi3marhN7HeuxEqL0rZW0Rli+ioIOkY9QI7UFSRb18ZvsLnR6P2nNLuHCbVpMqDn1g uiITAF40YreF5UgK3mfFi3wt9utsFYGuP78nqXKoTmzjpXrjoAec/6ud3NhPrnQr6H8j yFVhOFhI+c6Tot9J6z6ebztmzuIGIvkJlUjLTwJkSQAYZlEhrG1KY0snhfEgujV5LYpS rgrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=yBWlyOTxkLscrR3m1Z6J6l3UwydAT2XmPo8P60eOyX0=; b=U0c6HeDFZ6tlF0vqq3InY7swIOpqdlbjspjDLt+SGz720SrUYE36DQL8cDBchor7Ir PfzBRekncZnt+CKRBuFCTMRX0QUSCZQ3uQkTAVIPRwjeBa1ck9oXAF4KO0wtEl5iJPlD PQCFxrWZPknIrK868EIsPNKLQkp9w6jOVl08WS7ETo/trXKL2zG1i9PxDe5iw2QXfS2b AdFpNZNbaSpS7futG/N2bDKxnC1FjvUnDCEss8MtTGR69gBjsWmWJSiiS36QzUOjLCrH S3WBtCUeNMa6pDwM2IJj29uSx89qnheplnW38jOqi6nrvqE00XD74kc1qhLmpXvGqQpF K2WQ== X-Gm-Message-State: AOAM533XelivMH5Gd2RSZuDjVnmZD0gJv9B/uxCANtrWHQH8tXHVQ7F8 SpwqgvVYoxuhXbEM4BNO6RD/wg== X-Received: by 2002:a17:902:70c7:b029:e3:71cf:33d2 with SMTP id l7-20020a17090270c7b02900e371cf33d2mr22366413plt.21.1614721442771; Tue, 02 Mar 2021 13:44:02 -0800 (PST) Received: from google.com ([2620:15c:2ce:0:fce5:88bc:1857:36b4]) by smtp.gmail.com with ESMTPSA id q23sm9712431pgj.66.2021.03.02.13.44.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Mar 2021 13:44:02 -0800 (PST) Date: Tue, 2 Mar 2021 13:43:58 -0800 From: Fangrui Song To: Nathan Chancellor Cc: Masahiro Yamada , Michal Marek , Nick Desaulniers , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH 1/2] Makefile: Remove '--gcc-toolchain' flag Message-ID: <20210302214358.qr6enl6majzplhij@google.com> References: <20210302210646.3044738-1-nathan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20210302210646.3044738-1-nathan@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reviewed-by: Fangrui Song Thanks for the clean-up! --gcc-toolchain= is an obsscure way searching for GCC installation prefixes (--prefix). The logic is complex and different for different distributions/architectures. If we specify --prefix= (-B) explicitly, --gcc-toolchain is not needed. On 2021-03-02, Nathan Chancellor wrote: >This is not necessary anymore now that we specify '--prefix=', which >tells clang exactly where to find the GNU cross tools. 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. > >Signed-off-by: Nathan Chancellor >--- > Makefile | 4 ---- > 1 file changed, 4 deletions(-) > >diff --git a/Makefile b/Makefile >index f9b54da2fca0..c20f0ad8be73 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: 7a7fd0de4a9804299793e564a555a49c1fc924cb >-- >2.31.0.rc0.75.gec125d1bc1 > >-- >You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. >To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. >To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20210302210646.3044738-1-nathan%40kernel.org.