your change to prevent needless re-building of vmlinux.o

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jan Beulich
Date: Friday, May 16, 2008 - 9:08 am

Sam,

while also looking into this issue (found time only now) I realized this is
already worked around in .26-rc2. However, it would seem to me that
suppressing the dependency on init/built-in.o altogether is likely to
cause problems in the future. Going through the version generating
logic again I realized that since vmlinux.o is always built before the first
of the (perhaps multiple, due to kallsyms) final linking stages, it ought
to be possible to simply move the version generation into the vmlinux.o
rule. And indeed, this

define rule_vmlinux-modpost
	:
	+$(call cmd,vmlinux_version)
	+$(call cmd,vmlinux-modpost)
	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $@
	$(Q)echo 'cmd_$@ := $(cmd_vmlinux-modpost)' > $(dot-target).cmd
endef

with the two other invocations of vmlinux_version removed, seems to
do what is wanted.

What do you think? Am I overlooking some aspect here?

Btw., another slight anomaly I noticed is that modpost on the modules
is always performed (even when nothing changed in the tree), while
on vmlinux.o it is only performed when something caused a re-link. Is
that intentional, or just a to-be-tolerated side effect?

Thanks, Jan

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
your change to prevent needless re-building of vmlinux.o, Jan Beulich, (Fri May 16, 9:08 am)