[uClibc] uClibc vs. linux-2.6.0-test7 separate object tree

dododge at smart.net dododge at smart.net
Tue Oct 14 01:41:26 UTC 2003


About a month ago linux-2.6.0 added the ability to compile with an
"O=" option, to store all of the object/generated files in a build tree
distinct from the source tree. This is similar to the --srcdir option
sometimes used with GNU configure scripts. See the "BUILD directory"
section of the kernel's README for details.

Advantages include the ability to build from read-only source media,
compile multiple configs or architectures from one source tree, etc.
I used this to build 2.6.0-test7 a few days ago and I don't plan on
going back to the old way :-)

The problem: it breaks just about anything that reads headers
from a configured kernel source tree. The reason this breaks is
because there's no longer any single include path that gets you all
of them. There seems to be three places you have to look:

  KERNEL-BUILD-TREE/include       generated headers such as autoconf.h
  KERNEL-BUILD-TREE/include2      asm symlink to source headers
  KERNEL-SOURCE-TREE/include      static source headers

Any suggestions about the best way to handle this when building
uClibc, since it has a single KERNEL_SOURCE setting that isn't
going to be able to find everything it needs?

For the time being I just avoid the problem by configuring
the kernel source tree itself, generating headers and symlinks in
the source tree, etc, then doing an mrproper after uClibc has been
built. Ugly, but works.



More information about the uClibc mailing list