Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp321789ybe; Mon, 2 Sep 2019 02:06:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqz07BBEIn+gymtQP3tRo3NEC/G75dH5Msu0sbz7PtLBDgW5+x3+7mzjrn0yKtTDJXyoakq1 X-Received: by 2002:aa7:9508:: with SMTP id b8mr16770582pfp.36.1567415195251; Mon, 02 Sep 2019 02:06:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567415195; cv=none; d=google.com; s=arc-20160816; b=hMwC+sKrUEW4s7+1TwhX9lL9mDvkhiuoIf2qUUycteP6QUeM3w5wRQFRmpePR//3PB Hgs2fjS7e01XRUz5h/85Pob5rs5WN9mmT+uRNISf/TIIhzaiVrmHy7VnykyjQOHe0gk7 fet6jb/IHrdDxBlNJ+YQx1VLuOIDtYHkuEqvauEdrapD1TjucoQ5O6r542MDXBFGQOOv mjLBHenxCd6vdOnHffbsz7GqB3te3PZe/rpWU/gARe/ds3QxqEqKHHcmUHa+Xrmi5uHY YDAl7G3nr7eWWWoeH9WBNKGYNBulc6E26ez+qnOUF063rANRFAH06f7M4UJrGUoGXE1l j+YA== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ZgtVeGGG3KMC+Cmb89T82xo3W2wtcYXnu9G9kMNBb/4=; b=J914i8dNanuJdLcM5lJ3tdLBClQ1QbEoyj4q23/fRQZlV7p/j48qiXXC0newB12+OJ QJebHWwFGCQXY2aDsjrv7R8Z30JvnehB/usJ42ZdHjM6f/i4rJ61a9jsfI34ji4Fnsgr 3Mhik1Z5GEUmRFHo4/iEFjt3tzq0phH1srCyejbmbkuhIGcbYkqbp7uLynZUXq4S3f6K skOAikAk7UATxMqNMSIsK2QnmcCNFbQKASmkFQCc1teeMKjw1tVCor5Z2FVrwt63trMp 3DluHZuzpiQRGS0VxuCD47iDXFjuaau9Pj7TRM4THrraTDR4tLwwKr6YzsECmjY3QcSL bK2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="g3j/hn9O"; 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 37si11445478pgz.39.2019.09.02.02.06.19; Mon, 02 Sep 2019 02:06:35 -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="g3j/hn9O"; 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 S1729805AbfIBHm6 (ORCPT + 99 others); Mon, 2 Sep 2019 03:42:58 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:44186 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726540AbfIBHm5 (ORCPT ); Mon, 2 Sep 2019 03:42:57 -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-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To: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=ZgtVeGGG3KMC+Cmb89T82xo3W2wtcYXnu9G9kMNBb/4=; b=g3j/hn9O8UxmWCki1gGN6vETlC HmR+NiNJ728ZVhf/gAKaFAqVRXvCkfYOnEAg9ALZq9gA7xtzAbjcLTu5fH9tHiJ5KKVCL4hvwaSlz voFEn+gP5K4TLlru2/6wc7RJW4Vy3S+/CHmlGEFto87+t2Ey25fEQo65gfXyPIbDtJvtYBaKWbJ+H WwuYoZRNRzY5zFQrrcHwdsVfy6m0+xwm8fPOhqgR1qwwgQAteHy+v6OqZ8jSe5MZAh/W6R+6fY+bN 1a/zAWezcQY9MLxnRdKyyWLe/1X+EX7dGeNHv9SgfJN/qoWbTYMmvVxhWqqtT+5Y0RM4E88plJdLd 5VXswXAw==; Received: from hch by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1i4gzI-0002Eb-6W; Mon, 02 Sep 2019 07:42:56 +0000 Date: Mon, 2 Sep 2019 00:42:56 -0700 From: Christoph Hellwig To: Masahiro Yamada Cc: Christoph Hellwig , Albert Ou , Palmer Dabbelt , Linux Kernel Mailing List , Paul Walmsley , linux-riscv@lists.infradead.org Subject: Re: [PATCH] riscv: add arch/riscv/Kbuild Message-ID: <20190902074256.GA754@infradead.org> References: <20190821092658.32764-1-yamada.masahiro@socionext.com> <20190826113526.GA23425@infradead.org> <20190830155322.GA30046@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 Sat, Aug 31, 2019 at 10:04:53PM +0900, Masahiro Yamada wrote: > Kbuild support two file names, "Makefile" and "Kbuild" > for describing obj-y, obj-m, etc. > Similarly, arch/$(SRCARCH)/Makefile is very special > in that it is included from the top-level Makefile, > and specify arch-specific compiler flags etc. > > We can use arch/$(SRCARCH)/Kbuild > to specify obj-y, obj-m. > The top-level Makefile does not need to know > the directory structure under arch/$(SRCARCH)/. > > This is logical separation. But only if we document this specific split and eventually stop allowing to build objects from arch/$(SRCARCH)/Makefile. And in my perfect world we'd eventually phase out the magic arch/$(SRCARCH)/Makefile entireŀy. In addition to the normal Kbuild file we'd then have say (names entirely made up and probably not the best idea) arch/$(SRCARCH)/flags.mk to set the various compiler flags and co arch/$(SRCARCH)/targets.mk for extra arch-specific targets