lkml.org 
[lkml]   [2008]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: diet-kconfig: a script to trim unneeded kconfigs
At Mon, 22 Sep 2008 11:41:36 -0400 (EDT),
Steven Rostedt wrote:
>
>
>
> On Mon, 22 Sep 2008, Giacomo A. Catenazzi wrote:
> > Takashi Iwai wrote:
> > > At Fri, 19 Sep 2008 16:55:51 -0700,
> > > Chris Li wrote:
> > >
> > > > I avoid arch/ and firmware/ because it is nasty. I figure module in
> > > > arch/ is small enough I don't mind building it. And the firmware
> > > > directory,
> > > > if I don't build the module loads it. Those firmware will automatically
> > > > skipped
> > > > any way.
> > >
> > > Agreed.
> > >
> > > > The little tricky part is some thing like this:
> > > > ========================
> > > > ifeq ($(CONFIG_BLK_DEV_CMD640), m)
> > > > obj-m += cmd640.o
> > > > endif
> > > > ========================
> > > > Internally it get convert it into:
> > > > "obj-$(CONFIG_BLK_DEV_CMD640) += cmd640.o"
> >
> > Are you sure?
> > I.e. if you set CONFIG_BLK_DEV_CMD640=y, you see that
> > the two constructs gives different results.
> >
> > If the makefile author did such complex construct, I
> > really think there is a reason ;-)
> >
>
> Yes indeed, we should find out what the author meant.
>
> ifeq ($(CONFIG_BLK_DEV_CMD640), m)
> obj-m += cmd640.o
> endif
>
> and
>
> obj-$(CONFIG_BLK_DEV_CMD640) += cmd640.o
>
> mean two different things.
>
> The former means to compile the cmd640 only if it is set to a module.
> The later means to compile the cmd640 if it is either a module or built
> into the core kernel code.

FYI, in this particular case, cmd640.o is linked in the upper Makefile
for CONFIG_BLK_DEV_CMD640=y.

> The author needs to make this change or explain why it is like this.

Right. My guess is the link order, but still there must be a better
way to fix.


thanks,

Takashi


\
 
 \ /
  Last update: 2008-09-22 17:53    [W:0.077 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site