Re: Linus's include file strategy redux

From: Matt D. Robinson (yakker@alacritech.com)
Date: Fri Dec 15 2000 - 14:35:32 EST


Werner Almesberger wrote:
>
> Alexander Viro wrote:
> > In the situation above they should have -I<wherever_the_tree_lives>/include
> > in CFLAGS. Always had to. No links, no pain in ass, no interference with
> > userland compiles.
>
> As long as there's a standard location for "<wherever_the_tree_lives>",
> this is fine. In most cases, the tree one expects to find is "roughly
> the kernel we're running". Actually, maybe a script to provide the
> path would be even better (*). Such a script could also complain if
> there's an obvious problem.

I personally think the definition of an environment variable to point to
a header file location is the right way to go. Same with tools -- that
way I can say build with $(TOOLDIR), which pulls whatever tools that
tree uses, and use $(INCDIR) as my kernel include files.

Then you can build using whatever header files you want to use, using
whatever compilers/linkers/whatever you want to. So:

TOOLDIR=/src/gcctree
INCDIR=/src/2.2.18

or:

TOOLDIR=/src/egcstree
INCDIR=/src/2.4.0-test12-custom

Then a 'make' from my $(TOPDIR) builds everything with the tools in
$(TOOLDIR) and uses -I$(INCDIR) for header files. It's a beautiful
thing.

--Matt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Dec 15 2000 - 21:00:33 EST