* Patch to allow KVM to build without gcc 3.x
@ 2006-12-18 19:22 James Jacobsson
[not found] ` <fe247b50612181122scd1b87bk79b6f4c6e3f49cf7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: James Jacobsson @ 2006-12-18 19:22 UTC (permalink / raw)
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
[-- Attachment #1: Type: text/plain, Size: 275 bytes --]
Attached is a patch to allow KVM to build without gcc 3.x (by skipping
building QEmu).
The only changes are to the top-level configure script and Makefile.
To build without QEmu, there is a new argument to configure, --no-qemu
This patch applies to KVM release 7.
/James
[-- Attachment #2: kvm-noqemu.diff --]
[-- Type: application/octet-stream, Size: 2630 bytes --]
Only in kvm-7-new: config.mak
diff -u kvm-7/configure kvm-7-new/configure
--- kvm-7/configure 2006-12-12 11:24:55.000000000 +0100
+++ kvm-7-new/configure 2006-12-18 20:03:53.000000000 +0100
@@ -3,6 +3,7 @@
prefix=/usr/local
kerneldir=/lib/modules/$(uname -r)/build
want_module=1
+want_qemu=1
qemu_cc=$(ls /usr/bin/gcc3* /usr/bin/gcc-3* 2>/dev/null | tail -n1)
usage() {
@@ -14,6 +15,7 @@
--prefix=PREFIX where to install things ($prefix)
--with-patched-kernel don't use external module
--kerneldir=DIR kernel build directory ($kerneldir)
+ --no-qemu do not configure or build qemu
--qemu-cc="$qemu_cc" compiler for qemu (needs gcc3.x) ($qemu_cc)
EOF
exit 1
@@ -27,6 +29,9 @@
opt="${opt%%=*}"
fi
case "$opt" in
+ --no-qemu)
+ want_qemu=0
+ ;;
--prefix)
prefix="$arg"
;;
@@ -48,9 +53,11 @@
esac
done
-if [[ -z "$qemu_cc" ]]; then
+if (( want_qemu )); then
+ if [[ -z "$qemu_cc" ]]; then
echo "$0: cannot locate gcc 3.x. please install it or specify with --qemu-cc"
exit 1
+ fi
fi
libkvm_kerneldir="$kerneldir"
@@ -67,13 +74,15 @@
}
(cd user; ./configure --prefix="$prefix" --kerneldir="$libkvm_kerneldir")
-(cd qemu; ./configure --target-list=$(target_cpu)-softmmu --cc="$qemu_cc" \
+if (( want_qemu )); then
+ (cd qemu; ./configure --target-list=$(target_cpu)-softmmu --cc="$qemu_cc" \
--disable-kqemu --extra-cflags="-I $PWD/../user" \
--extra-ldflags="-L $PWD/../user" \
--enable-kvm --kernel-path="$libkvm_kerneldir" \
--enable-alsa \
--prefix="$prefix"
-)
+ )
+fi
@@ -81,5 +90,6 @@
PREFIX=$prefix
KERNELDIR=$(readlink -f $kerneldir)
WANT_MODULE=$want_module
+WANT_QEMU=$want_qemu
EOF
Common subdirectories: kvm-7/kernel and kvm-7-new/kernel
diff -u kvm-7/Makefile kvm-7-new/Makefile
--- kvm-7/Makefile 2006-11-28 16:43:58.000000000 +0100
+++ kvm-7-new/Makefile 2006-12-18 20:07:18.000000000 +0100
@@ -7,14 +7,26 @@
.PHONY: kernel user qemu clean
-all: $(if $(WANT_MODULE), kernel) user qemu
+all: $(if $(WANT_MODULE), kernel) user $(if $(WANT_QEMU), qemu)
kcmd = $(if $(WANT_MODULE),,@\#)
-qemu kernel user:
+user:
$(MAKE) -C $@
+kernel:
+ $(MAKE) -C $@
+
+#qemu kernel user:
+# $(MAKE) -C $@
+
+ifeq ($(WANT_QEMU),1)
qemu: user
+ $(MAKE) -C $@
+else
+qemu:
+ @echo "QEMU build skipped as we were configured without QEMU support"
+endif
bindir = /usr/bin
bin = $(bindir)/kvm
Common subdirectories: kvm-7/qemu and kvm-7-new/qemu
Common subdirectories: kvm-7/scripts and kvm-7-new/scripts
Common subdirectories: kvm-7/user and kvm-7-new/user
[-- Attachment #3: Type: text/plain, Size: 347 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #4: Type: text/plain, Size: 186 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Patch to allow KVM to build without gcc 3.x
[not found] ` <fe247b50612181122scd1b87bk79b6f4c6e3f49cf7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2006-12-19 10:14 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2006-12-19 10:14 UTC (permalink / raw)
To: James Jacobsson; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
James Jacobsson wrote:
> Attached is a patch to allow KVM to build without gcc 3.x (by skipping
> building QEmu).
>
> The only changes are to the top-level configure script and Makefile.
>
> To build without QEmu, there is a new argument to configure, --no-qemu
>
> This patch applies to KVM release 7.
>
How about a "--build=kernel,libkvm,qemu" option, where you can omit the
packages you don't want.
--build would default to all packages, or "libkvm,qemu" if
--with-patched-kernel is given.
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-12-19 10:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-18 19:22 Patch to allow KVM to build without gcc 3.x James Jacobsson
[not found] ` <fe247b50612181122scd1b87bk79b6f4c6e3f49cf7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2006-12-19 10:14 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox