Why build empty object files in drivers/media?
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
Quoted 15 lines · Chuck Ebbert
I have this in my .config file for 2.6.13-rc3:
#
# Multimedia devices
#
#CONFIG_VIDEO_DEVis not set#
# Digital Video Broadcasting Devices
#
#CONFIG_DVBis not set
Quoted 3 lines
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
drivers/media/Makefile +4 -1
@@ -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/
drivers/media/Makefile line 7
Quoted 2 lines · Sam Ravnborg
drivers/media/Makefile +2
-0+obj-$(CONFIG_VIDEO_DEV) := video/ +obj-$(CONFIG_VIDEO_DEV) := radio/
s/VIDEO/RADIO/
Regards, Olaf.
Quoted 6 lines · Olaf Dietsche
drivers/media/Makefile line 7
Quoted 2 lines · Sam Ravnborg
drivers/media/Makefile +2
-0+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
Quoted 33 lines · Sam Ravnborg
Quoted 15 lines · Chuck Ebbert
I have this in my .config file for 2.6.13-rc3:
#
# Multimedia devices
#
#CONFIG_VIDEO_DEVis not set#
# Digital Video Broadcasting Devices
#
#CONFIG_DVBis not setQuoted 3 lines
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 theKconfigandMakefilefiles.Sam
drivers/media/Makefile line 8
Quoted 8 lines
drivers/media/Makefile +4
-1@@ -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/
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 17 lines · Sam Ravnborg
Quoted 16 lines · Keith Owens
drivers/media/Makefile line 8
Quoted 13 lines
drivers/media/Makefile +4
-1@@ -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 :=
Quoted 5 lines
Review
Quoted 3 lines
(quoted diff) +3
-0+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