aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-04-12 12:09:43 +0300
committerAvi Kivity <avi@redhat.com>2009-04-12 12:09:43 +0300
commit3db688f592088569e0dc2fef1e66a96772053d35 (patch)
tree269bd5f27f2f663355de19030a839d5f343b16f1
parent2e06fd685a4775fa9115200ee5892bc451ab2643 (diff)
kvm: external module: link include/asm at ./configure timekvm-85rc5
otherwise, if make starts building libkvm before the external module, it will fail due to the missing link. Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r--kvm/kernel/Makefile9
-rwxr-xr-xkvm/kernel/configure7
2 files changed, 9 insertions, 7 deletions
diff --git a/kvm/kernel/Makefile b/kvm/kernel/Makefile
index 5dbb8f0d1..143472232 100644
--- a/kvm/kernel/Makefile
+++ b/kvm/kernel/Makefile
@@ -38,7 +38,7 @@ ifeq ($(EXT_CONFIG_KVM_TRACE),y)
module_defines += -DEXT_CONFIG_KVM_TRACE=y
endif
-all:: header-link prerequisite
+all:: prerequisite
# include header priority 1) $LINUX 2) $KERNELDIR 3) include-compat
$(MAKE) -C $(KERNELDIR) M=`pwd` \
LINUXINCLUDE="-I`pwd`/include -Iinclude \
@@ -48,12 +48,7 @@ all:: header-link prerequisite
-include `pwd`/$(ARCH_DIR)/external-module-compat.h $(module_defines)"
"$$@"
-sync: header-sync source-sync header-link
-
-header-link:
- rm -f include/asm include-compat/asm
- ln -sf asm-$(ARCH_DIR) include/asm
- ln -sf asm-$(ARCH_DIR) include-compat/asm
+sync: header-sync source-sync
T = $(subst -sync,,$@)-tmp
diff --git a/kvm/kernel/configure b/kvm/kernel/configure
index 7a222e4d8..3e5633822 100755
--- a/kvm/kernel/configure
+++ b/kvm/kernel/configure
@@ -67,9 +67,12 @@ while [[ "$1" = -* ]]; do
esac
done
+karch="$arch"
+
case $arch in
i?86*|x86_64*)
arch=${arch/#i?86/i386}
+ karch="x86"
;;
esac
@@ -99,6 +102,10 @@ if [ -n "$no_uname" -a "$want_module" ]; then
fi
fi
+rm -f include/asm include-compat/asm
+ln -sf asm-"$karch" include/asm
+ln -sf asm-"$karch" include-compat/asm
+
cat <<EOF > config.mak
ARCH=$arch
PROCESSOR=$processor