From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Hudec Subject: Re: buffer cache Date: Sun, 14 Sep 2003 13:19:00 +0200 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20030914111859.GH31719@vagabond> References: <20030913102721.GB31719@vagabond> <20030913172836.GE31719@vagabond> <1063531965.11431.28.camel@imladris.demon.co.uk> <20030914100351.GG31719@vagabond> <1063535842.11431.44.camel@imladris.demon.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from cimice4.lam.cz ([212.71.168.94]:60130 "EHLO vagabond.light.src") by vger.kernel.org with ESMTP id S262375AbTINLTw (ORCPT ); Sun, 14 Sep 2003 07:19:52 -0400 To: David Woodhouse Content-Disposition: inline In-Reply-To: <1063535842.11431.44.camel@imladris.demon.co.uk> List-Id: linux-fsdevel.vger.kernel.org On Sun, Sep 14, 2003 at 11:37:22 +0100, David Woodhouse wrote: > Please don't drop me from the recipients when replying; it's very rude. > > On Sun, 2003-09-14 at 12:03 +0200, Jan Hudec wrote: > > > Probably as a result of hacking up his own broken makefiles instead of > > > make -C $KERNELDIR SUBDIRS=`pwd` modules > > > > Well, I wrote a module to compile off-tree. The correct command to link > > a module is: > > ld -r -o .o > > No, that's not always correct. It's completely wrong for 2.6, of course > -- and even for 2.4, if building modules for a 64-bit kernel, you may > find your userspace is 32-bit by default and you need something like > -melf64_sparc on the linker command line. The kernel makefiles get this > right. Use them. > > The kernel is also free to screw with its own internal ABI all it likes > -- with cflags affecting global register usage, etc. You must do as it > does in the kernel you happen to be building -- which basically means Which I basicaly do becasue I ask kernel to give me the flags it uses. > you must use the kernel build system. That's what the script target is for. > The correct way to build modules out of the kernel tree is to use the > kernel makefiles and override SUBDIRS to point at your own directory; > it's been that way since 2.0 if not earlier. Well... I can't imagine compiling a project with various objects spead all over the place (I have a driver, that has various pieces common with various other programs) using the kernel build system. So it reduces back to geting right flags from it. ------------------------------------------------------------------------------- Jan 'Bulb' Hudec