Skip to contentSkip to conversation

Fix broken --kerneldir

PATCH New Prerna Saxena 1 participant 1 message Jul 1, 2010 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix broken --kerneldir

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

---
 Makefile.target |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
Makefile.target +5 -2
index d58b201..b433112 100644
@@ -29,12 +29,15 @@ QEMU_PROG=qemu-system-$(TARGET_ARCH2)$(EXESUF)
 endif
 endif
 
+# Set up host kernel include paths specified by --kerneldir
+ifdef CONFIG_KVM
+QEMU_CFLAGS+=$(KVM_CFLAGS)
+endif
+
 PROGS=$(QEMU_PROG)
 
 LIBS+=-lm
 
-kvm.o kvm-all.o vhost.o vhost_net.o: QEMU_CFLAGS+=$(KVM_CFLAGS)
-
 config-target.h: config-target.h-timestamp
 config-target.h-timestamp: config-target.mak
 
Signature · 10 lines
1.6.2.5



-- 
Prerna Saxena

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