Skip to contentSkip to conversation

2.5.15 laziness in export-objs

DISCUSSION Keith Owens 3 participants 4 messages May 10, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

2.5.15 has four Makefiles where all objects are marked as exporting symbols. This is lazy coding and causes spurious rebuilds. Please specify only those objects that really export symbols.

Also the export list is independent of whether an object is selected or not. That is, export-objs is unconditional.

fs/nls/Makefile:export-objs = $(obj-y)
arch/i386/pci/Makefile:export-objs += $(obj-y)
drivers/base/Makefile:export-objs := $(obj-y)
drivers/pci/Makefile:export-objs := $(obj-y)

cd directory
echo $(fgrep -l EXPORT_SYMBOL *.c | tr '\n' ' ' | sed -e '{s/^/export-objs := /; s/\.c/.o/g; }') will get the correct list. arch/i386/pci/Makefile exports nothing at all.

#1 lore raw
Quoted 6 lines · Keith Owens

2.5.15 has four Makefiles where all objects are marked as exporting symbols. This is lazy coding and causes spurious rebuilds. Please specify only those objects that really export symbols.

Also the export list is independent of whether an object is selected or not. That is, export-objs is unconditional.

Does this patch fix up arch/i386/pci/Makefile and drivers/pci/Makefile properly?

thanks,

greg k-h

arch/i386/pci/Makefile +0 -2
diff -Nru a/arch/i386/pci/Makefile b/arch/i386/pci/Makefile
@@ -24,6 +24,4 @@
 obj-y		+= irq.o common.o
 endif		# CONFIG_VISWS
 
-export-objs     +=      $(obj-y)
-
 include $(TOPDIR)/Rules.make
drivers/pci/Makefile +2 -1
diff -Nru a/drivers/pci/Makefile b/drivers/pci/Makefile
@@ -37,7 +37,8 @@
 obj-y += syscall.o
 endif
 
-export-objs := $(obj-y)
+export-objs	:= access.o hotplug.o pci.o pci-driver.o \
+		pool.o probe.o proc.o search.o
 
 include $(TOPDIR)/Rules.make
 
#2 lore raw
Quoted 2 lines · Greg KH

Does this patch fix up arch/i386/pci/Makefile and drivers/pci/Makefile properly?

Looks good.

#3 lore raw
In reply to Keith Owens
Quoted 11 lines · Keith Owens

2.5.15 has four Makefiles where all objects are marked as exporting symbols. This is lazy coding and causes spurious rebuilds. Please specify only those objects that really export symbols.

Also the export list is independent of whether an object is selected or not. That is, export-objs is unconditional.

fs/nls/Makefile:export-objs = $(obj-y)
arch/i386/pci/Makefile:export-objs += $(obj-y)
drivers/base/Makefile:export-objs := $(obj-y)
drivers/pci/Makefile:export-objs := $(obj-y)

Here is the patch for drivers/base.

-pat

===== drivers/base/Makefile 1.3 vs edited =====

drivers/base/Makefile +1 -1
@@ -2,6 +2,6 @@
 
 obj-y		:= core.o sys.o interface.o fs.o power.o
 
-export-objs	:= $(obj-y)
+export-objs	:= core.o fs.o power.o sys.o
 
 include $(TOPDIR)/Rules.make