linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Albert Ou <aou@eecs.berkeley.edu>,
	Palmer Dabbelt <palmer@sifive.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	linux-riscv@lists.infradead.org
Subject: Re: [PATCH] riscv: add arch/riscv/Kbuild
Date: Tue, 3 Sep 2019 23:31:18 +0900	[thread overview]
Message-ID: <CAK7LNASMx7XBDUALd+UOj1jw=0kU-XoJBExCpSvKyQwV37mz7A@mail.gmail.com> (raw)
In-Reply-To: <20190902074256.GA754@infradead.org>

On Mon, Sep 2, 2019 at 4:42 PM Christoph Hellwig <hch@infradead.org> wrote:
>
> 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.
>
> <snipping the basic explanation, which is documented pretty well,
> I I think I full understand>
>
> > 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.

I like this idea, but it would change the link order (i.e. probe order)

For example, I want move all drivers-y in arch/x86/Makefile
to arch/x86/Kbuild.

I do not know how much we care about the probe order.


>  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

I am not sure whether this split is a good idea.
What is the problem with having the single arch-Makefile?


-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2019-09-03 14:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-21  9:26 Masahiro Yamada
2019-08-26 11:35 ` Christoph Hellwig
2019-08-27  5:14   ` Masahiro Yamada
2019-08-30 15:53     ` Christoph Hellwig
2019-08-31 13:04       ` Masahiro Yamada
2019-09-02  7:42         ` Christoph Hellwig
2019-09-03 14:31           ` Masahiro Yamada [this message]
2019-08-31  0:51 ` Paul Walmsley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK7LNASMx7XBDUALd+UOj1jw=0kU-XoJBExCpSvKyQwV37mz7A@mail.gmail.com' \
    --to=yamada.masahiro@socionext.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@sifive.com \
    --cc=paul.walmsley@sifive.com \
    --subject='Re: [PATCH] riscv: add arch/riscv/Kbuild' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).