Re: State of the new config & build system

Peter Samuelson
2002-01-01T08:56:08Z

[Mike Touloumtzis]
> Why not use '$(GCC) -c -Wp,-MD,foo.d foo.c' to generate the
> dependencies as a side effect of the regular compile step?

As Keith said, kbuild 2.5 *does* use 'gcc -MD' - although the *current*
system does not.

Linus has said that he doesn't like -MD, and he has a point: it only
extracts dependencies for your *current* compile, which means they have
to be rebuilt if you change CONFIG options. However, those CONFIG
options would cause rebuilding of the file *anyway*, and -MD is almost
free since the preprocessor already has to read the files in question,
so I'm not convinced that it's a big deal.

> The "build whole clean tree" case is a common one even among kernel
> developers, e.g. for compile-testing patches before resending them.

One of the main points of kbuild 2.5 is that, unlike the current
system, it tracks dependencies perfectly. Thus you should almost never
have to run 'make clean' before test compiling something - unless you
need to see non-fatal compile warnings.

It may take some time to get used to the soon-to-be new reality of "ok,
so I just applied eight kernel patches from three different places but
I know I don't need to bother with 'make clean' because the dependency
system is just *that good*."

Peter