Re: [RFC/PATCH] improve interaction with ccache

Keith Owens (kaos@ocs.com.au)
Mon, 20 May 2002 11:14:08 +1000


On Sun, 19 May 2002 19:11:41 -0500 (CDT),
Kai Germaschewski <kai-germaschewski@uiowa.edu> wrote:
>As various people pointed out, ccache is a great win for people compiling
>a lot of kernels. (For info on ccache, see ccache.samba.org)
>
>Unfortunately, when a kernel tree is moved around / cloned / symlinked,
>the compiler cache doesn't have many hits, since some header files use
>BUG(), which in turn uses __FILE__, which currently includes the absolute
>path to the header file.
>
>The appended patch solves this problem by including the headers a relative
>path which will not change when the tree is moved.

You are fixing the symptom, not the cause. The symptom is too many
compiles, people are using ccache to attempt to fix the symptom. The
cause is a kernel build system that forces people to make clean or
mrproper between builds instead of reusing existing objects.

Fix the cause, not the symptom.

You will find that relative include paths completely stuff up
builds with separate source and object trees. It will also mess up
people who compile add on code outside the kernel tree, CURDIR is not
related to TOPDIR.

All of these problems are fixed in kbuild 2.5, correctly.

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