[klibc] version compatibility between linux and klibc

Sam Ravnborg sam at ravnborg.org
Tue Jul 6 14:39:53 PDT 2010


On Tue, Jul 06, 2010 at 09:14:45PM +0200, maximilian attems wrote:
> On Tue, Jul 06, 2010 at 08:32:04PM +0200, Sam Ravnborg wrote:
> > On Tue, Jul 06, 2010 at 05:38:35PM +0200, maximilian attems wrote:
> > > 
> > > I'd more guess that you are doing something wrong here, see the output
> > > of "make help" on how to easily compile against linux-2.6.
> > 
> > That says:
> > Build options:
> > KLIBCKERNELSRC - Path to a configured linux-2.6 tree
> > KLIBCKERNELOBJ - Path to kernel output dir (defaults to KLIBCKERNELSRC)
> > make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build
> > 
> > Sample invocation:
> > make  KLIBCKERNELSRC=`pwd`/../linux-2.6
> > 
> > Which is misleading.
> > "configured linux-2.6 tree" is not enough. USer needs to know that
> > headers had to be exported.
> > 
> > And:
> > 
> >     make  KLIBCKERNELSRC=`pwd`/../linux-2.6
> > 
> > Does not do it as we should point to the exported headers.
> > At least this was how I could built klibc without any symlinks or copying files.
> 
> it does work. you need to have a built tree, afaik
> ~/src/linux-2.6$ make defconfig && make
> 
> is enough to have a base to build klibc against.
> 
> It is the way that I develop, build and test klibc.

I am using an i386 box here and with this box the build fails
if I follow the above scheme.
I tracked it down to a wrong include path.

Following patch fixes the build for me on my i386 box.

It looks obviously correct.
x86_64 also has an ASMARCH assignmnet but it looks unused.

@Phil - does this fix your build issue too?

	Sam

diff --git a/usr/klibc/arch/i386/MCONFIG b/usr/klibc/arch/i386/MCONFIG
index ef112a4..f4cb914 100644
--- a/usr/klibc/arch/i386/MCONFIG
+++ b/usr/klibc/arch/i386/MCONFIG
@@ -31,3 +31,7 @@ KLIBCBITSIZE  = 32
 # calls, and work on the memory models for this architecture
 # 96 MB - normal binaries start at 128 MB
 KLIBCSHAREDFLAGS	= -Ttext 0x06000200
+
+# Asm includes for i386 are in the merged x86 tree
+KLIBCARCHINCFLAGS = -I$(KLIBCKERNELOBJ)/arch/x86/include
+



More information about the klibc mailing list