[RFC][PATCH 1/2] Create initial kernel ABI header infrastructure
Sam Ravnborg
sam at ravnborg.org
Sun Mar 26 22:05:37 CEST 2006
On Sun, Mar 26, 2006 at 06:54:16AM -0500, Kyle Moffett wrote:
> Create initial kernel ABI header infrastructure
>
>
> diff --git a/Makefile b/Makefile
> index af6210d..8e9045a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -787,13 +787,15 @@ ifneq ($(KBUILD_SRC),)
> /bin/false; \
> fi;
> $(Q)if [ ! -d include2 ]; then mkdir -p include2; fi;
> + $(Q)if [ ! -d include2/kabi ]; then mkdir -p include2/kabi; fi;
> $(Q)ln -fsn $(srctree)/include/asm-$(ARCH) include2/asm
> + $(Q)ln -fsn $(srctree)/include/kabi/arch-$(ARCH) include2/kabi/arch
No - we do not want another symlink.
Create something like:
include/i386/kabi-asm/ <= i386 specific files
include/kabi/ <= general files
Then we can do:
LINUXINCLUDE += -Iinclude/kabi-$(ARCH)
And the following would work like expected:
#include <kabi/foo.h>
#include <kabi-asm/foo.h>
But this leaves all existing users in the dark cold.
So a more involved approach could be to tkae the opposite approach.
To dedicate an area for kernel only header files and make sure this
directory is searched _before_ include/
We could do something like
kinclude/linux/ <= generic kernel include headers
kinclude/$(arch)/asm/ <= arch specific include headers
Then adding to the top-level Makefile:
LINUXINCLUDE := -Ikinclude -Ikinclude/$(ARCH)
LINUXINCLUDE += ...
would actually cut it.
Then we would not hurt existing users since they continue to use
include/linux/* + include/asm/*
And we could migrate one by one to the kernel clean part.
In other words - a solution that keeps backwards compatibility.
A solution that distingush hard between what is the ABI and
what is kernel stuff.
And a namespace that is not in use today.
And we have so many users of include/linux today. They do not need
a _kabi_ prefix so let it go.
Sam
More information about the llh-discuss
mailing list