From: Randy Dunlap <randy.dunlap@oracle.com>
To: "FN" <zzzz444@ml1.net>
Cc: "Oleg Verych" <olecom@flower.upol.cz>, linux-kernel@vger.kernel.org
Subject: Re: module builds need improvement / top Makefile not good enough
Date: Mon, 5 Mar 2007 08:47:27 -0800 [thread overview]
Message-ID: <20070305084727.102b51f5.randy.dunlap@oracle.com> (raw)
In-Reply-To: <1173102794.12256.1177759349@webmail.messagingengine.com>
On Mon, 05 Mar 2007 05:53:14 -0800 FN wrote:
> That's not for you to decide.
> Just pass down all variables that may be relevant to my module builds
> and let me take it from there, for example
> chdir $(M)
> $(MYMAKE) CC="..." LD="..." AR="..." CFLAGS="..." MODFLAGS="..."
> INCL="..."
> WHATHAVE_YOU="whatever" modules
>
> Currently I face the following situation -- I try to build 2 drivers
> from the same Makefile
> -----------
> CWD := $(shell pwd)
> obj-m := driver1.o driver2.o
> driver1-y := d1/d2/d3/f1.o d1/d2/f2.o
> driver2-y := d1/d5/file1.o d1/d6/file2.o
> # ill conceived kbuild framework doesn't allow me to reduce granularity
> # of EXTRA_FLAGS
> $(addprefix $(CWD)/,d1/d2/d3/f1.o d1/d5/file1.o: EXTRA_CFLAGS :=
> -DMASK=0x123
> $(addprefix $(CWD)/,d1/d2/f2.o d1/d6/file2.o) : EXTRA_CFLAGS :=
> -DMASK=0x456
> # fine grained scope for EXTRA_CFLAGS (supported by gnu make) doesn't
> work
> ----------
> There are 2 problems here
> 1) kbuild is forcing me to declare EXTRA_CFLAGS in global scope and
> I can't build my drivers properly because the MASKs are incompatible.
> 2) assuming that modules are buildable, if I do "make clean" there is
> leftover
> junk in all of these places d1/d2/d3 d1/d5 d1/d2 d1/d6.
> There is a danger associated with that junk (or state), dependency
> generation
> may be broken which it provably is in some cases (remember -Iinc_dir1
> -Iinc_dir2
> vs. -Iinc_dir2 -Iinc_dir1 example I gave earlier) and I can't rely on
> it.
> So then I need to be able to clean all, but the "clean:" target can't
> clean
> inexpensively in multiple directorie, i.e. must do recursive
> traversal to clean.
>
> No, you can't send me off to some little kbuild mailing list.
> I've raised concerns that probably affects hundreds of module builders.
> kbuild works well only in the simplest of build scenarios but doesn't
> scale and that's a deficiency that should be urgently addressed.
> The leadership of the linux kernel is going to have to make
> a decision and possibly hire a competent contractor to fix these
> problems.
> Are you guys perfectionists or what?
Not at all.
I think you'll need to convince/show us that there is a real
problem that cannot be solved by current Kbuild.
E.g., instead of building 2 drivers from the same Makefile
where you cannot reduce granularity of EXTRA_FLAGS, can it be done
with 2 makefiles? and if not, why not?
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
next prev parent reply other threads:[~2007-03-05 16:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-02 17:14 FN
2007-03-02 17:26 ` Jeremy Fitzhardinge
2007-03-02 18:50 ` Sam Ravnborg
2007-03-04 21:47 ` Oleg Verych
2007-03-05 13:53 ` FN
2007-03-05 16:07 ` Jan Engelhardt
2007-03-05 16:47 ` Randy Dunlap [this message]
2007-03-05 17:03 ` Stuart MacDonald
2007-03-05 19:08 ` Sam Ravnborg
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=20070305084727.102b51f5.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=olecom@flower.upol.cz \
--cc=zzzz444@ml1.net \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome