Re: kbuild variable $(src) broken in 2.6.23-rc3?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 28, 2008 at 09:09:07PM +0200, Sam Ravnborg wrote:
> On Wed, May 21, 2008 at 09:48:08PM +0200, Andrea Arcangeli wrote:
> > On Wed, May 21, 2008 at 09:04:53PM +0200, Sam Ravnborg wrote:
> > > Andrea Arcangeli <andrea@xxxxxxxxxxxx> reported a similar issue.
> > > I have not gotten around to look at it yet.
> > > I minimal Makefile that exhibits the problem
> > > would be helpfull!
> > 
> > I don't have the minimal but I can easily provide you a way to
> > reproduce:
> > 
> > git clone git://git.kernel.org/pub/scm/virt/kvm/kvm-userspace.git
> > cd kvm-userspace
> > patch -p1 -R <../belowinlinedworkaround
> > ./configure --kerneldir=/usr/src/anykernel
> > cd kernel
> > make
> > 
> > The below has the benefit of making more robust and higher prio the
> > inclusion of external-module-compat so it may not to be backed out
> > after this 2.6.26-rc regression is fixed.
> > 
> > The problem is that the $(src) in the EXTRA_CFLAGS below is expanded
> > to "".
> 
> I have now tried to reproduce this bug with no luck.
> - I tried to clone the git tree and follow your instructions.
>   But it failed to build due to some files missing in the
>   kernel directory so I gace up on that.
> - Then I tried to create a few Makefiles for an external
>   module. I used a copy of the ext-2 filesystem and modifided
>   the Makefile like below:
> #
> # Makefile for the linux ext2-filesystem routines.
> #
> 
> obj-m += ext2.o
> 
> ext2-y := balloc.o dir.o file.o fsync.o ialloc.o inode.o \
>           ioctl.o namei.o super.o symlink.o
> 
> EXTRA_CFLAGS := -I$(src)
> 
> 
> Manually inspecting the command lines to gcc told me that $(src) was
> properly expanded.
> 
> So something more subtle is going on.
> 
> Can I ask you to in an empty directory to create
> a Makefile like this:
> obj-m := foo.o
> ccflags-y := -I$(src)

[Forgot the rest of the instructions...]
touch foo.c

and then run:
make -C path/to/kernelsrc/ M=`pwd` V=1

Inspect the gcc commandlien to see if the last -I
contains the expected value (which is `pwd`)

	Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux