Hi,
I spent last few hours by patching 2.5.54-bk-something back and
forward to shrink Juriaans patch which reinstates 2.5.50 fbdev. Sometime
during this course something happened, and I ended up with incorrect
build: some code was thinking that "struct vc_data" contains
"vc_font" element, and some parts believed that there is no such element,
and structure is 24 bytes smaller (shifting vc_origin somewhere, causing
crash during bootup) :-( (there was such element, then there was not,
and then element arrived back during evening)
After I removed drivers/char/*.o and all .o from drivers/video subtree
and rerun "make", problem disappeared. During patching I never used -T/-Z
option to patch to set dates/times on files and I also did not use -j option
to make.
So I'd like to ask whether current kernel build system is supposed
to track changes in include files automagically, or whether I'm supposed
to run 'make dep' from time to time?
When I tried to recreate problem (by doing "touch
include/linux/console_struct.h"), all objects which use this file were
correctly rebuilt.
Thanks,
Petr Vandrovec
[email protected]
On Thu, Jan 09, 2003 at 11:33:32PM +0100, Petr Vandrovec wrote:
> So I'd like to ask whether current kernel build system is supposed
> to track changes in include files automagically, or whether I'm supposed
> to run 'make dep' from time to time?
Hi Petr,
First of all:
1) kbuild track changes in referenced include files
2) kbuild track changes in relevant CONFIG options
2) is done using the executable split-include.
When run split-include creates a tree of files in:
include/config/*
CONFIG_SND_PCM_OSS creates a file named include/config/snd/pcm, with the
name oss.h. oss.h contains
#define CONFIG_SND_PCM_OSS 1
split-include uses this to determine if the config option in question
has changed such that only files containing changes are touched.
split-include is run when include/linux/autoconf.h has changed.
And autoconf.h has .config as the prerequisite, so each time the
configuration has changed autoconf.h is generated, and all relevant
files in include/config/* is updated.
1) When a .c/.S file is compiled the option
-Wp,-MD,arch/i386/kernel/.mpparse.o.d
is used to generate a file containing dependencies as gcc sees it.
Now the binary fixdep is used to generate dependencies including references
to all include/config/* files corresponding to all cONfig options used
in a given file.
Try to view a .*.o.cmd file in kernel/ ar similar.
Until now I'm only aware of one set of problems that kbuild does not
handle correct. That is when the timestamp of the files goes backward.
This happens at least in the following situations:
1) A file is saved, and mv is used to restore the original
2) CVS is configured to preserve original timestamp when files are 'dumped'
3) NFS mounted filesystems where the clock is wrong. Timezone
inconsistency for eaxmple.
I assume you were hit by some flavour of 1) ???
kbuild-2.5 by Keith Ownes included timestamp checks, so that would have
catched the three cases described above.
I do not see any clean way to introduce this in existing kbuild,
and neither do i see a big need for it.
Anyway this belongs to the make problem domain - not kbuild core.
Sam