All of lore.kernel.org
 help / color / mirror / Atom feed
* Why build empty object files in drivers/media?
@ 2005-07-22  3:06 Chuck Ebbert
  2005-07-22 19:46 ` Sam Ravnborg
  0 siblings, 1 reply; 6+ messages in thread
From: Chuck Ebbert @ 2005-07-22  3:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Johannes Stezenbach, Adrian Bunk


I have this in my .config file for 2.6.13-rc3:


#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set

#
# Digital Video Broadcasting Devices
#
# CONFIG_DVB is not set


And yet these completely empty files are being built:


$ find drivers/media -name built-in.o | xargs ls -go
-rw-rw-r--  1 305 Jul 16 00:20 drivers/media/built-in.o
-rw-rw-r--  1   8 Jul 16 00:20 drivers/media/common/built-in.o
-rw-rw-r--  1   8 Jul 16 00:20 drivers/media/dvb/b2c2/built-in.o
-rw-rw-r--  1   8 Jul 16 00:20 drivers/media/dvb/bt8xx/built-in.o
-rw-rw-r--  1 305 Jul 16 00:20 drivers/media/dvb/built-in.o
-rw-rw-r--  1   8 Jul 16 00:20 drivers/media/dvb/cinergyT2/built-in.o
-rw-rw-r--  1   8 Jul 16 00:20 drivers/media/dvb/dvb-core/built-in.o
-rw-rw-r--  1   8 Jul 16 00:20 drivers/media/dvb/dvb-usb/built-in.o
-rw-rw-r--  1   8 Jul 16 00:20 drivers/media/dvb/frontends/built-in.o
-rw-rw-r--  1   8 Jul 16 00:20 drivers/media/dvb/pluto2/built-in.o
-rw-rw-r--  1   8 Jul 16 00:20 drivers/media/dvb/ttpci/built-in.o
-rw-rw-r--  1   8 Jul 16 00:20 drivers/media/dvb/ttusb-budget/built-in.o
-rw-rw-r--  1   8 Jul 16 00:20 drivers/media/dvb/ttusb-dec/built-in.o
-rw-rw-r--  1   8 Jul 16 00:20 drivers/media/radio/built-in.o
-rw-rw-r--  1   8 Jul 16 00:20 drivers/media/video/built-in.o

$ size drivers/media/built-in.o
   text    data     bss     dec     hex filename
      0       0       0       0       0 drivers/media/built-in.o


__
Chuck

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Why build empty object files in drivers/media?
  2005-07-22  3:06 Why build empty object files in drivers/media? Chuck Ebbert
@ 2005-07-22 19:46 ` Sam Ravnborg
  2005-07-22 21:18   ` Olaf Dietsche
  2005-07-24  6:10   ` Keith Owens
  0 siblings, 2 replies; 6+ messages in thread
From: Sam Ravnborg @ 2005-07-22 19:46 UTC (permalink / raw)
  To: Chuck Ebbert; +Cc: linux-kernel, Johannes Stezenbach, Adrian Bunk

On Thu, Jul 21, 2005 at 11:06:21PM -0400, Chuck Ebbert wrote:
> 
> I have this in my .config file for 2.6.13-rc3:
> 
> 
> #
> # Multimedia devices
> #
> # CONFIG_VIDEO_DEV is not set
> 
> #
> # Digital Video Broadcasting Devices
> #
> # CONFIG_DVB is not set
> 
> 
> And yet these completely empty files are being built:
> 
> ...
kbuild is told to visit these directories - and then it build an empty
.o file to make linking step possible.
The only solution is to tell kbuild not to visit these directories
unless they are in real use.
Following untested patch should do the trick. But the media people must
check if before being applied since I have only taken a brief look at
the Kconfig and Makefile files.

	Sam

diff --git a/drivers/media/Makefile b/drivers/media/Makefile
--- a/drivers/media/Makefile
+++ b/drivers/media/Makefile
@@ -2,4 +2,7 @@
 # Makefile for the kernel multimedia device drivers.
 #
 
-obj-y        := video/ radio/ dvb/ common/
+obj-y                   := common/
+obj-$(CONFIG_VIDEO_DEV) := video/
+obj-$(CONFIG_VIDEO_DEV) := radio/
+obj-$(CONFIG_DVB)       := dvb/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Why build empty object files in drivers/media?
  2005-07-22 19:46 ` Sam Ravnborg
@ 2005-07-22 21:18   ` Olaf Dietsche
  2005-07-23  0:09     ` Sam Ravnborg
  2005-07-24  6:10   ` Keith Owens
  1 sibling, 1 reply; 6+ messages in thread
From: Olaf Dietsche @ 2005-07-22 21:18 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Chuck Ebbert, linux-kernel, Johannes Stezenbach, Adrian Bunk

Sam Ravnborg <sam@ravnborg.org> writes:

> +obj-$(CONFIG_VIDEO_DEV) := video/
> +obj-$(CONFIG_VIDEO_DEV) := radio/

  s/VIDEO/RADIO/

Regards, Olaf.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Why build empty object files in drivers/media?
  2005-07-22 21:18   ` Olaf Dietsche
@ 2005-07-23  0:09     ` Sam Ravnborg
  0 siblings, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2005-07-23  0:09 UTC (permalink / raw)
  To: Olaf Dietsche
  Cc: Chuck Ebbert, linux-kernel, Johannes Stezenbach, Adrian Bunk

On Fri, Jul 22, 2005 at 11:18:13PM +0200, Olaf Dietsche wrote:
> Sam Ravnborg <sam@ravnborg.org> writes:
> 
> > +obj-$(CONFIG_VIDEO_DEV) := video/
> > +obj-$(CONFIG_VIDEO_DEV) := radio/
> 
>   s/VIDEO/RADIO/

If you look at drivers/media/radio/Kconfig you will see that the above
is coorect. Thre is no CONFIG_RADIO_DEV.

	Sam

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Why build empty object files in drivers/media?
  2005-07-22 19:46 ` Sam Ravnborg
  2005-07-22 21:18   ` Olaf Dietsche
@ 2005-07-24  6:10   ` Keith Owens
       [not found]     ` <20050724085845.GA8018@mars.ravnborg.org>
  1 sibling, 1 reply; 6+ messages in thread
From: Keith Owens @ 2005-07-24  6:10 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Chuck Ebbert, linux-kernel, Johannes Stezenbach, Adrian Bunk

On Fri, 22 Jul 2005 19:46:00 +0000, 
Sam Ravnborg <sam@ravnborg.org> wrote:
>On Thu, Jul 21, 2005 at 11:06:21PM -0400, Chuck Ebbert wrote:
>> 
>> I have this in my .config file for 2.6.13-rc3:
>> 
>> 
>> #
>> # Multimedia devices
>> #
>> # CONFIG_VIDEO_DEV is not set
>> 
>> #
>> # Digital Video Broadcasting Devices
>> #
>> # CONFIG_DVB is not set
>> 
>> 
>> And yet these completely empty files are being built:
>> 
>> ...
>kbuild is told to visit these directories - and then it build an empty
>.o file to make linking step possible.
>The only solution is to tell kbuild not to visit these directories
>unless they are in real use.
>Following untested patch should do the trick. But the media people must
>check if before being applied since I have only taken a brief look at
>the Kconfig and Makefile files.
>
>	Sam
>
>diff --git a/drivers/media/Makefile b/drivers/media/Makefile
>--- a/drivers/media/Makefile
>+++ b/drivers/media/Makefile
>@@ -2,4 +2,7 @@
> # Makefile for the kernel multimedia device drivers.
> #
> 
>-obj-y        := video/ radio/ dvb/ common/
>+obj-y                   := common/
>+obj-$(CONFIG_VIDEO_DEV) := video/
>+obj-$(CONFIG_VIDEO_DEV) := radio/
>+obj-$(CONFIG_DVB)       := dvb/

That should be +=, not :=

+obj-$(CONFIG_VIDEO_DEV) += video/
+obj-$(CONFIG_VIDEO_DEV) += radio/
+obj-$(CONFIG_DVB)       += dvb/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Why build empty object files in drivers/media?
       [not found]     ` <20050724085845.GA8018@mars.ravnborg.org>
@ 2005-07-24 17:29       ` Johannes Stezenbach
  0 siblings, 0 replies; 6+ messages in thread
From: Johannes Stezenbach @ 2005-07-24 17:29 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Keith Owens, Chuck Ebbert, linux-kernel, Adrian Bunk

On Sun, Jul 24, 2005 at 08:58:45AM +0000, Sam Ravnborg wrote:
> On Sun, Jul 24, 2005 at 04:10:13PM +1000, Keith Owens wrote:
> > >
> > >diff --git a/drivers/media/Makefile b/drivers/media/Makefile
> > >--- a/drivers/media/Makefile
> > >+++ b/drivers/media/Makefile
> > >@@ -2,4 +2,7 @@
> > > # Makefile for the kernel multimedia device drivers.
> > > #
> > > 
> > >-obj-y        := video/ radio/ dvb/ common/
> > >+obj-y                   := common/
> > >+obj-$(CONFIG_VIDEO_DEV) := video/
> > >+obj-$(CONFIG_VIDEO_DEV) := radio/
> > >+obj-$(CONFIG_DVB)       := dvb/
> > 
> > That should be +=, not :=
> > 
> > +obj-$(CONFIG_VIDEO_DEV) += video/
> > +obj-$(CONFIG_VIDEO_DEV) += radio/
> > +obj-$(CONFIG_DVB)       += dvb/
> 
> Correct - thanks!

OK, I'll pick this up and put it in CVS.

Thanks,
Johannes

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-07-24 17:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-22  3:06 Why build empty object files in drivers/media? Chuck Ebbert
2005-07-22 19:46 ` Sam Ravnborg
2005-07-22 21:18   ` Olaf Dietsche
2005-07-23  0:09     ` Sam Ravnborg
2005-07-24  6:10   ` Keith Owens
     [not found]     ` <20050724085845.GA8018@mars.ravnborg.org>
2005-07-24 17:29       ` Johannes Stezenbach

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.