From: Sam Ravnborg <sam@ravnborg.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: David Miller <davem@davemloft.net>,
mchehab@infradead.org, torvalds@linux-foundation.org,
akpm@linux-foundation.org, linux-dvb-maintainer@linuxtv.org,
video4linux-list@redhat.com, linux-kernel@vger.kernel.org,
sfr@canb.auug.org.au
Subject: Re: [patch, -git] drivers/media build fix for modular builds
Date: Wed, 30 Apr 2008 11:25:00 +0200 [thread overview]
Message-ID: <20080430092500.GA31644@uranus.ravnborg.org> (raw)
In-Reply-To: <20080430081345.GA16519@elte.hu>
On Wed, Apr 30, 2008 at 10:13:45AM +0200, Ingo Molnar wrote:
>
> * David Miller <davem@davemloft.net> wrote:
>
> > From: Ingo Molnar <mingo@elte.hu>
> > Date: Wed, 30 Apr 2008 09:48:07 +0200
> >
> > >
> > > fix allmodconfig build bug introduced in latest -git by commit
> > > 7c91f0624a9 ("V4L/DVB(7767): Move tuners to common/tuners"):
> > >
> > > LD kernel/built-in.o
> > > LD drivers/built-in.o
> > > ld: drivers/media/built-in.o: No such file: No such file or directory
> > >
> > > which happens if all media drivers are modular:
> >
> > I was seeing this too, as I think was Stephen Rothwell.
>
> i think any build which has the media drivers only as modules will
> trigger it, so it's rather widespread. My fix has held up fine for 10
> randconfigs so far so it should do the trick.
>
> i'm wondering though why similar problems are not more common. A quick
> look at drivers/Makefile suggests that there are many obj-y rules there
> for driver sub-trees that can be all-modular, not just video:
>
> obj-y += video/
> obj-y += char/
> obj-y += serial/
> obj-y += base/ block/ misc/ mfd/ net/ media/
> obj-y += macintosh/
> obj-y += ieee1394/
> obj-y += cdrom/
> obj-y += auxdisplay/
> obj-y += i2c/
> obj-y += lguest/
> obj-y += firmware/
>
> drivers/net/ obj-y is kept alive by the "obj-y wireless/" rule i think,
> but what makes other sub-trees link, like drivers/macintosh/ ?
drivers/media is special because it does not contain any files.
Kbuild will generate a built-in.o file only if there is
a chance for a .o file in the directory.
When all media is modules kbuild does not know enough
to say that a built-in.o is needed in drivers/media/
and the workaround to do a obj-y := common/
is the best way to do so.
We had a similar issue in driver/video once I think.
But here we solved it with the kconfig dependency.
If we only say obj-m += media/ then
kbuild will not try to link a built-in.o.
But if we say obj-y += media/ then kbuild will
expect to find a built-in.o in media/
Sam
next prev parent reply other threads:[~2008-04-30 9:24 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-29 21:50 [GIT PATCHES] V4L/DVB updates and fixes for 2.6.26 Mauro Carvalho Chehab
2008-04-29 21:59 ` Linus Torvalds
2008-04-29 23:49 ` [v4l-dvb-maintainer] " Michael Krufky
2008-04-30 0:00 ` Mauro Carvalho Chehab
2008-04-30 7:48 ` [patch, -git] drivers/media build fix for modular builds Ingo Molnar
2008-04-30 7:52 ` David Miller
2008-04-30 8:13 ` Ingo Molnar
2008-04-30 8:27 ` Mike Galbraith
2008-04-30 8:42 ` Mike Galbraith
2008-04-30 8:56 ` Mike Galbraith
2008-04-30 9:20 ` Mike Galbraith
2008-04-30 11:40 ` Andrew Morton
2008-04-30 13:03 ` Mike Galbraith
2008-04-30 14:39 ` [v4l-dvb-maintainer] " Michael Krufky
2008-04-30 15:29 ` Andrew Morton
2008-04-30 15:30 ` Mike Galbraith
2008-04-30 15:34 ` Andrew Morton
2008-04-30 15:39 ` Michael Krufky
2008-04-30 16:01 ` Mike Galbraith
2008-04-30 15:48 ` Mauro Carvalho Chehab
2008-04-30 15:25 ` Mauro Carvalho Chehab
2008-04-30 15:48 ` Mike Galbraith
2008-04-30 16:12 ` Mauro Carvalho Chehab
2008-04-30 16:31 ` Mike Galbraith
2008-04-30 21:35 ` Mauro Carvalho Chehab
2008-04-30 21:52 ` [v4l-dvb-maintainer] " Trent Piepho
2008-04-30 22:38 ` [v4l-dvb-maintainer] [patch, -git] drivers/media build fix fo r " mkrufky
2008-04-30 9:26 ` [patch, -git] drivers/media build fix for " Sam Ravnborg
2008-04-30 9:40 ` Mike Galbraith
2008-04-30 10:36 ` Ingo Molnar
2008-04-30 9:25 ` Sam Ravnborg [this message]
2008-04-30 9:37 ` Ingo Molnar
2008-04-30 9:55 ` Sam Ravnborg
2008-04-30 8:02 ` [v4l-dvb-maintainer] [GIT PATCHES] V4L/DVB updates and fixes for 2.6.26 Patrick Boettcher
2008-04-30 19:03 ` Mauro Carvalho Chehab
-- strict thread matches above, loose matches on Subject: below --
2008-05-07 3:49 [patch, -git] drivers/media build fix for modular builds Stephen Rothwell
2008-05-08 14:21 ` Thomas Backlund
2008-05-09 0:16 ` Gene Heskett
2008-05-09 0:18 ` David Miller
2008-05-09 5:57 ` Thomas Backlund
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=20080430092500.GA31644@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=linux-dvb-maintainer@linuxtv.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=mingo@elte.hu \
--cc=sfr@canb.auug.org.au \
--cc=torvalds@linux-foundation.org \
--cc=video4linux-list@redhat.com \
/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