Re: [patch] 2.4.11-pre4 remove spurious kernel recompiles

Andrea Arcangeli (andrea@suse.de)
Mon, 8 Oct 2001 02:05:44 +0200


On Mon, Oct 08, 2001 at 09:29:06AM +1000, Keith Owens wrote:
> On Sun, 7 Oct 2001 13:16:19 -0500 (CDT),
> Jeff Garzik <jgarzik@mandrakesoft.com> wrote:
> >On Sun, 7 Oct 2001, Andrea Arcangeli wrote:
> >
> >> On Sun, Oct 07, 2001 at 08:25:42PM +1000, Keith Owens wrote:
> >> > in the top level Makefile forces a recompile of the entire kernel, for
> >> > no good reason.
> >>
> >> this is a matter of taste but personally I believe that at least
> >> theorically recompiling the whole kernel if I add -g to CFLAGS, or if I
> >> change the EXTRAVERSION have lots of sense.
> >
> >Correct. I am amazed Keith missed this... changing data in Makefile
> >can certainly affect the entire kernel compile, so it makes sense to
> >recompile the entire kernel when it changes.
>
> I did not miss it. Changing cflags is detected by the
> .<object>.o.flags files.
>
> ifeq (-D__KERNEL__ -I/build/kaos/2.4.11-pre4/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i586,$(strip $(subst $(comma),:,$(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_vt.o))))
> FILES_FLAGS_UP_TO_DATE += vt.o
> endif

Ok, so the point of all those .flags is to catch per-object cflags changes.

> kbuild already detects changes to flags, down to the level of
> per-object flags, there is no need to detect changes to the top level
> Makefile. Especially when you can override flags and other fields on
> the make command line, that does not change Makefile but kbuild still
> detects the changes.

CFLAGS was only an example, think if I change CC or EXTRAVERSION, but, as
said in the earlier email, I doubt an EXTRAVERSION change would work
without a full distclean in between anyways.

Andrea
-
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/