]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Fix KVM problem on SuSe 2.6.37 kernel
authorPrasad Joshi <prasadjoshi124@gmail.com>
Mon, 4 Apr 2011 15:03:21 +0000 (16:03 +0100)
committerPekka Enberg <penberg@kernel.org>
Mon, 4 Apr 2011 15:10:34 +0000 (18:10 +0300)
Got following errors while compiling the native kvm tool on my supervisor's
machine.

oswaldo@sir61a:~/linux-kvm/tools/kvm> make
In file included from /usr/include/asm/types.h:4,
                 from /usr/include/asm/kvm.h:9,
                 from ../../include/linux/kvm.h:13,
                 from include/kvm/kvm.h:6,
                 from mmio.c:1:
../../include/asm-generic/int-ll64.h:11:29: error: asm/bitsperlong.h: No such file or directory
In file included from /usr/include/asm/types.h:4,
                 from /usr/include/asm/kvm.h:9,
                 from ../../include/linux/kvm.h:13,
                 from include/kvm/kvm.h:6,
                 from main.c:1:
[snip]

../../include/asm-generic/int-ll64.h:11:29: error: asm/bitsperlong.h: No such file or directory
make: *** No rule to make target `8250-serial.d', needed by `kvm'.  Stop.

Following patch adds architecture specific include path to resolve this error.

Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/Makefile

index 11306813b6d7d6030d31360aaaab5896cd19e7da..ac2342fea625715bf8dee3ffd7a1d49380e44755 100644 (file)
@@ -33,18 +33,26 @@ OBJS        += bios/bios.o
 
 LIBS   += -lrt
 
+# Additional ARCH settings for x86
+ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
+                  -e s/arm.*/arm/ -e s/sa110/arm/ \
+                  -e s/s390x/s390/ -e s/parisc64/parisc/ \
+                  -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
+                  -e s/sh[234].*/sh/ )
+
 uname_M      := $(shell uname -m | sed -e s/i.86/i386/)
 ifeq ($(uname_M),i386)
        DEFINES      += -DCONFIG_X86_32
 endif
 ifeq ($(uname_M),x86_64)
+       ARCH         := x86
        DEFINES      += -DCONFIG_X86_64
 endif
 
 DEFINES        += -D_FILE_OFFSET_BITS=64
 DEFINES        += -D_GNU_SOURCE
 
-CFLAGS += $(CPPFLAGS) $(DEFINES) -Iinclude -I../../include -Os -g
+CFLAGS += $(CPPFLAGS) $(DEFINES) -Iinclude -I../../include -I../../arch/$(ARCH)/include/  -Os -g
 
 WARNINGS += -Werror
 WARNINGS += -Wall