Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5165904pxv; Tue, 20 Jul 2021 21:55:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzL2otJfYORvADdGKX8b7yOOeuSvFOGZuLuclTOIb/FRh5lKJsM2wESnUaPuNYefrbNxA8l X-Received: by 2002:a17:906:2813:: with SMTP id r19mr36055793ejc.150.1626843326580; Tue, 20 Jul 2021 21:55:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626843326; cv=none; d=google.com; s=arc-20160816; b=j9OewNJ2R07GEpJDGGf5PHgbYvM0AIJ1QlOb+un4W79b6EqOLZNO8eE9kZ/Xb0CDka bLB56n25gOAEdqyiPgoS3ss6OLgMH6SkiD1wJLuI7IwVrO19pSH2oIzMd1KAB7aucnZK 9eanNxTOoJUdzHVyrSOyZXx0KYUcgBQvfNIOzKHM7DykuvmF3gCLN1C+b1voSc+vmYjv TZozWQJFg/WyUc0agHl7OTeISd1GL2cXEF7Ab1ump4iVy975uns5R4ZAi268Ed2JH/A9 LWGcAfYSq8sLY8z0/00uSP+OYuU+WZUc0Igq/EusY3E12q9D457XNXxtzjpSRo5rxUW5 laMw== 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=SCwobZ2ergcsP/KBco/dD0SaEMf5ddis2wZxVwFwdGI=; b=lF+Ce2rQpQYo0uoKq2DHAvJJuXPaJ5EaZTZJv0Fk5NnnwTfBu7nKD8wjQOp/WkSpN3 dLEHjacScVFtoYDoJYFvZifZV43/2hDStnTbPmWYlomd0k82H+a/mbFea83jdyxeC/Cj cpyXLzZksI1dBifPRierKKu4YhWsmEOkW50H7w4PFwPj1lsfD6mWYlEXdBILbLT6Nfsb Ra6STTo/aDSz/+AcylGB/vWX/qpBfjr2eW2MI5kjfP3pdOYbR5R7OLnvI36JEpOIqC/5 JZiYqE4Hvak8D8TbGnS2jqsdB4tJPu2HnTEBkknwKPltbsQ2hi9/faj/aPM9/yJ1Wmgf u+WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="te/y9365"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a25si8983382ejc.304.2021.07.20.21.55.03; Tue, 20 Jul 2021 21:55:26 -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=@infradead.org header.s=casper.20170209 header.b="te/y9365"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232321AbhGUENC (ORCPT + 99 others); Wed, 21 Jul 2021 00:13:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231849AbhGUEMh (ORCPT ); Wed, 21 Jul 2021 00:12:37 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43E9DC061574; Tue, 20 Jul 2021 21:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=SCwobZ2ergcsP/KBco/dD0SaEMf5ddis2wZxVwFwdGI=; b=te/y9365s06WaIS3mt4ElzUv+J S2UFUTT/lrPVCOxnrj3MvKsXeePPPdbccDq08r7qe9OWPsaaPtLbKmGXWWzo3jJsSSJA5DnAc3B7q rIV0MRhU5+YUR1+PZtzJfqCU7d3fsKXmp+mBqKKNJe0kd0eT0CZlG6cNe9tVVoHI6R+La+ydqr8IP mTOAubjo2r5lWOl3P2p84Dbr7OJubAyHVHu2tVQfm4EX5jpWVrDrFLOcUb6wmV93e9et6lECN5dAT qMsk8eCGDErlWIsy1dZ8YigRyFVikL4KPnGo2lliQCmVwXcROJIrGc9hJfr4+0R+jLwYevTrrxtMe kDzeBSTA==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m64Dq-008no6-Fc; Wed, 21 Jul 2021 04:52:45 +0000 Date: Wed, 21 Jul 2021 05:52:42 +0100 From: Christoph Hellwig To: Linus Torvalds Cc: Nick Desaulniers , Masahiro Yamada , Miguel Ojeda , Fangrui Song , Michal Marek , Arnd Bergmann , Linux Kernel Mailing List , Linux Kbuild mailing list , clang-built-linux , Geert Uytterhoeven , Christoph Hellwig , Nathan Chancellor Subject: Re: [PATCH v2 2/2] Makefile: infer CROSS_COMPILE from SRCARCH for LLVM=1 LLVM_IAS=1 Message-ID: References: <20210708232522.3118208-1-ndesaulniers@google.com> <20210708232522.3118208-3-ndesaulniers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 20, 2021 at 02:54:35PM -0700, Linus Torvalds wrote: > But there are other things that stick around. In particular, I have > considered simply using git config variables for that. > > Something like this in the main Makefile: > > ARCH=$(shell git config build.arch) > CC=$(shell git config --default=gcc build.cc) > > would actually be optimal for what _I_ do. Then for my clang build tree, I'd do > > git config build.cc clang > > and it would stick in that tree. If you don't set the option, it would use gcc. > > Maybe that would be an acceptable model these days? We've used git > long enough that non-git worries aren't a big deal any more, and I > guess people could use the old-fashioned I still this only papers around the fact that the architecture is fundamentally part of the kernel config and should come from .config, and the toolchain probably as well. I for one do have a few different tree for different projects, but need to try cross compiles in each of them. And unfortunately sometimes with clang (nothing against clang itself [1], just that having to deal with multiple toolchains is a pain) [1] well, except for the sometimes idiotic diagnostics..