[klibc] version compatibility between linux and klibc

Phil Howard kunnskaperen at gmail.com
Wed Jul 7 17:30:02 PDT 2010


On Tue, Jul 6, 2010 at 5:39 PM, Sam Ravnborg <sam at ravnborg.org> wrote:

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

I haven't been able to get back to doing this, yet.  I will try this and see
later tonight or tomorrow.

But in the mean time I tried x86_64 a couple days ago, since I had the
opportunity because of a test install of Slackware64-13.1.  All the original
effort that failed on x86_32 just worked fine on x86_64.  I don't know why
that is.  Suspecting the newer GCC in the newer Slackware, I tried it also
in Slackware-13.1 (the 32 bit one), and got the same failures as before.  So
there is definitely some ARCH difference (but I didn't get a chance to look
much into it).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.zytor.com/pipermail/klibc/attachments/20100707/a08b9216/attachment-0001.html>


More information about the klibc mailing list