qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Makefile: Fix compilation for non-standard host


From: Prerna Saxena
Subject: Re: [Qemu-devel] [PATCH] Makefile: Fix compilation for non-standard host kernel path
Date: Wed, 07 Jul 2010 13:56:07 +0530
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc11 Thunderbird/3.0.4

On 07/07/2010 01:10 AM, Anthony Liguori wrote:
On 07/02/2010 06:15 AM, Prerna Saxena wrote:
Set up host kernel include paths specified by --kerneldir

When host kernel headers are placed in non-standard paths, the
KVM_CFLAGS are presently invoked only for a few .c files
(kvm*.c,vhost*.c) and not for other files like machine.c, cpus.c
..etc which also depend on linux/kvm.h

I think that's a bug. What's the dependency of machine.c and cpus.c?


Both machine.d and cpus.d depend on qemu/kvm.h, which in turn needs linux/kvm.h

I am running a custom-compiled kernel for which the headers are placed separately. I pass the kernel source directory to my configure script as follows :

address@hidden ~]$ configure --prefix=/home/bloat/qemu-git/qemu-bin --enable-kvm --target-list=i386-softmmu,x86_64-softmmu --enable-profiler --disable-docs --kerneldir=/home/bloat/kernels/linux-2.6.35-rc3
address@hidden ~]$ make -j2

This is one of the errors I get : (similar ones are flagged for machine.o and cpus.o)

CC    i386-softmmu/arch_init.o
In file included from /home/bloat/qemu-git/qemu/arch_init.c:38:
/home/bloat/qemu-git/qemu/kvm.h:22:23: error: linux/kvm.h: No such file or directory
make[1]: *** [arch_init.o] Error 1

This is because the location of kernel headers is not passed as a '-I' switch to gcc. IMO adding the KVM_CFLAGS to QEMU_CFLAGS would be required for such cases.

Regards,
--
Prerna Saxena

Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India



reply via email to

[Prev in Thread] Current Thread [Next in Thread]