2.5.22 broke modversions

Mikael Pettersson (mikpe@csd.uu.se)
Mon, 17 Jun 2002 14:32:52 +0200 (MET DST)


Something in the 2.5.22 Makefile/Rule.make changes broke
modversions on my P4 box. For some reason, a number of
exporting objects, including arch/i386/kernel/i386_ksyms,
weren't given -D__GENKSYMS__ at genksym-time, with the
effect that the resulting .ver files became empty, and the
kernel exported the symbols with unexpanded _R__ver_ suffixes.

Modversions worked in 2.5.21. I didn't see anything obvious
in patch-2.5.22 what could explain this, but I did notice a
tendency of touching files as a means of maintaining dependencies.
This may not actually work, unless you have a slow CPU or a
file system with millisecond or better st_mtime resolution --
most only maintain whole-second resolution st_mtimes.
(My modversions fix in the 2.4.0-test series, which moved the
modversions.h creation/update to a separate rule after make dep,
was due to this very problem.)

For now, I'm using the workaround below.

/Mikael

--- linux-2.5.22/Rules.make.~1~ Mon Jun 17 10:15:13 2002
+++ linux-2.5.22/Rules.make Mon Jun 17 13:45:27 2002
@@ -147,7 +147,7 @@
quiet_cmd_cc_ver_c = MKVER include/linux/modules/$(RELDIR)/$*.ver
define cmd_cc_ver_c
mkdir -p $(dir $@); \
- $(CPP) $(c_flags) $< | $(GENKSYMS) $(genksyms_smp_prefix) \
+ $(CPP) $(c_flags) -D__GENKSYMS__ $< | $(GENKSYMS) $(genksyms_smp_prefix) \
-k $(VERSION).$(PATCHLEVEL).$(SUBLEVEL) > $@.tmp; \
if [ ! -r $@ ] || cmp -s $@ $@.tmp; then \
touch $(TOPDIR)/include/linux/modversions.h; \
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/