Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp910991ybl; Fri, 30 Aug 2019 08:55:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxd7EjTNOlDxiaKHu8bvojsoHgFuhcOyp0wX2QDbuIw+AgKN+kQNzj/WoyBWx6bA5/5EQp0 X-Received: by 2002:a17:902:8649:: with SMTP id y9mr15319912plt.252.1567180549464; Fri, 30 Aug 2019 08:55:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567180549; cv=none; d=google.com; s=arc-20160816; b=ViGV0beZ0Ve8LwqjKH7B5WdH8KUIRDnyV7M8Yzz9ckalgksYLyDiWOWUHNPUDa+K0v LaqDBu1vvWPNS4DNR+P7NwvZAFkDK0Lc+c2lFnaIwfBLBayH/VaO6stw2JwJrl8l7qBX 88jT4qHfYi5KC3fBH7i33I0nIeOyyu4CmEb9D1Cayr9PITibj/M8uPJ0b1Jwzo7lpmWn KxtsUjr2uhohjVF/1VRteubYSdHOAiXUiEX1ro7WIS7RsZu3ln37UlAieQxpN1iuK5rZ v5vmCMbWzUA/B42ibP8IfuUqAjL8bBZvGu+p1QTz55NNYjth1GV8qbhbTsgLosFE1ZsQ k1GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=zHweZvPv+qS/uw/ey2KytzqYKe6e+8sBiSgp7HEOu4A=; b=VZW57uo+HE9fVn1hO27SaW0SqJ5vpJl28RW0/AffX8KsZ29K6Ygitvbzb1Y05cVbbA oSZKM1gABwR8vasiA74r7BNsA1+J8yILDP5ZXPLG6kdQ8Li8EYW6oBJAOL6Fy8IwYqad 7UNZ4JWlQHHIUMwP1bPgcx4F7WpBkgtYq34XHzgvtgvzDYX8YvNPxiYnbzVYyzsXQnsp OYTBG+CdL2rmTHgsV2PIfB4qbZLT+hbORpEEmrJhFT8sMzaQ5MGTPgxnJ3Af49qflfTu 9aCoViCInNqmk1lsqJD5/1wo7wabOPCBW8vik3b6d6Hp39Msn2GxV6ELszujJPg1a2P5 TLkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=iq6TkDDs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a4si4191660pfb.10.2019.08.30.08.55.34; Fri, 30 Aug 2019 08:55:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=iq6TkDDs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728307AbfH3PxZ (ORCPT + 99 others); Fri, 30 Aug 2019 11:53:25 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:43008 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727135AbfH3PxY (ORCPT ); Fri, 30 Aug 2019 11:53:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=zHweZvPv+qS/uw/ey2KytzqYKe6e+8sBiSgp7HEOu4A=; b=iq6TkDDssGGAfJpgik5ak2P6z k+EkNHyvUt5DYa6Mo/5qad5Y3LOTnrz+66CiqqQ0TzL71W+6ucF/ugiriFY1UtRSvtjc0yCoTPkMO MmWNDG83+xz3bqQ3N/LGn0Sr5FMx/T25D438R8GoSVQXSh0TsNZH91b1cJOs7LDjJXJha67qbRtb1 4f9tK+z04lGEcyydrCw4/iB/wgv3vc4Dw35csJ2w5SClP0RZW68nJPIVZOhNUK9fbdzTmfIoLuCy7 iLirIk7a044snRG40OuwH4IyqdkFukC1AicEsU7MBRZ6GnlBHnzNFRY705Nfq/sh9XYxmWSl7WUPi p2pSIggiQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1i3jDG-0007w4-FQ; Fri, 30 Aug 2019 15:53:22 +0000 Date: Fri, 30 Aug 2019 08:53:22 -0700 From: Christoph Hellwig To: Masahiro Yamada Cc: Christoph Hellwig , linux-riscv@lists.infradead.org, Palmer Dabbelt , Linux Kernel Mailing List , Albert Ou , Paul Walmsley Subject: Re: [PATCH] riscv: add arch/riscv/Kbuild Message-ID: <20190830155322.GA30046@infradead.org> References: <20190821092658.32764-1-yamada.masahiro@socionext.com> <20190826113526.GA23425@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 27, 2019 at 02:14:59PM +0900, Masahiro Yamada wrote: > There is a small documentation about "Makefile" vs "Kbuild" > in Documentation/kbuild/modules.rst section 3.2 I know that part. > > It is talking about external modules, but the benefit applies > to arch/$(SRCARCH)/Kbuild as well. I fail to fully understand this part, though. > arch/$(SRCARCH)/Makefile is included by the top Makefile > to specify arch-specific compiler flags, etc. > > On the other hand, arch/$(SRCARCH)/Kbuild, if exists, is included > when Kbuild actually descends into arch/$(SRCARCH)/. > > This allows you to hierarchize the sub-directories to visit > instead of specifying everything in flat in arch/$(SRCARCH)/Makefile. Yes, but what is the plan in the long run? arch/$(ARCH)/Makefile is still a weird hodge-podge of overriding global variables and misc Makefile targets, it now just has a tiny little work. Is there any actual benefit from using Kbuild for the build process? Can we eventually move the setting of variables in the Makefile into another special purpose file? Is the support for actually compiling kernel source files from the arch/$(ARCH) Makefile eventually going away?