passthrough for configure options to qemu
RFC 1/1 passthrough for configure options to qemu
The following patch Implement a configure passthrough for qemu and migrate all current qemu specific configuration flags (enable-alsa, disable-vnc-tls and disable-gcc-check) to use it.
It leaves a description of the current flags (as used in kvm's configure) as a reference but I'm not sure if that is the right approach since the wording with the corresponding qemu flags is different and the list is obviously never going to be all inclusive.
--- configure | 26 +++++++------------------- 1 files changed, 7 insertions(+), 19 deletions(-)
configure +7 -19
@@ -6,9 +6,7 @@ want_module=1 qemu_cc= qemu_cflags= qemu_ldflags= -enable_alsa= -disable_vnc_tls= -disable_gcc_check= +qemu_conf= cross_prefix= arch=`uname -m` target_exec=
@@ -26,8 +24,10 @@ usage() { --qemu-cc=CC specify compiler for qemu (must be gcc-3.x) --qemu-cflags=CFLAGS CFLAGS to add to qemu configuration --qemu-ldflags=LDFLAGS LDFLAGS to add to qemu configuration - --enable-alsa enable alsa support for qemu - --disable-vnc-tls disable vnc tls support for qemu + + Any additional option is given to qemu's configure verbatim, including: + --enable-alsa enable alsa support + --disable-vnc-tls disable vnc tls support --disable-gcc-check don't insist on gcc-3.x CAUTION: this will break running without kvm EOF
@@ -60,15 +60,6 @@ while [[ "$1" = -* ]]; do --qemu-ldflags) qemu_ldflags="$arg" ;; - --enable-alsa) - enable_alsa=1 - ;; - --disable-vnc-tls) - disable_vnc_tls=1 - ;; - --disable-gcc-check) - disable_gcc_check=1 - ;; --arch) arch="$arg" ;;
@@ -79,7 +70,7 @@ while [[ "$1" = -* ]]; do usage ;; *) - usage + qemu_conf="$qemu_conf $opt" ;; esac done
@@ -111,13 +102,10 @@ fi --disable-kqemu --extra-cflags="-I $PWD/../user $qemu_cflags" \ --extra-ldflags="-L $PWD/../user $qemu_ldflags" \ --enable-kvm --kernel-path="$libkvm_kerneldir" \ - ${enable_alsa:+"--enable-alsa"} \ - ${disable_vnc_tls:+"--disable-vnc-tls"} \ - ${disable_gcc_check:+"--disable-gcc-check"} \ --prefix="$prefix" \ ${qemu_cc:+"--cc=$qemu_cc"} \ ${cross_prefix:+"--cross-prefix=$cross_prefix"} \ - ${cross_prefix:+"--cpu=$arch"} + ${cross_prefix:+"--cpu=$arch"} $qemu_conf )
Signature · 8 lines
1.5.2.5 ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
Quoted 11 lines · Carlo Marcelo Arenas Belon
The following patch Implement a configure passthrough for qemu and migrate all current qemu specific configuration flags (enable-alsa, disable-vnc-tls and disable-gcc-check) to use it.
It leaves a description of the current flags (as used in kvm's configure) as a reference but I'm not sure if that is the right approach since the wording with the corresponding qemu flags is different and the list is obviously never going to be all inclusive.
configure +0
-0@@ -26,8 +24,10 @@ usage() { --qemu-cc=CC specify compiler for qemu (must be gcc-3.x) --qemu-cflags=CFLAGS CFLAGS to add to qemu configuration
configure usage() { · line 33
Quoted 10 lines
configure +4
-2--qemu-ldflags=LDFLAGS LDFLAGS to add to qemu configuration - --enable-alsa enable alsa support for qemu - --disable-vnc-tls disable vnc tls support for qemu + + Any additional option is given to qemu's configure verbatim, including: + --enable-alsa enable alsa support + --disable-vnc-tls disable vnc tls support --disable-gcc-check don't insist on gcc-3.x CAUTION: this will break running without kvm
Why not call qemu's ./configure to get the help text?
Quoted 4 lines
configure +0
-0@@ -111,13 +102,10 @@ fi --disable-kqemu --extra-cflags="-I $PWD/../user $qemu_cflags" \ --extra-ldflags="-L $PWD/../user $qemu_ldflags" \ --enable-kvm --kernel-path="$libkvm_kerneldir" \
configure fi · line 110
Quoted 10 lines
configure +1
-4- ${enable_alsa:+"--enable-alsa"} \ - ${disable_vnc_tls:+"--disable-vnc-tls"} \ - ${disable_gcc_check:+"--disable-gcc-check"} \ --prefix="$prefix" \ ${qemu_cc:+"--cc=$qemu_cc"} \ ${cross_prefix:+"--cross-prefix=$cross_prefix"} \ - ${cross_prefix:+"--cpu=$arch"} + ${cross_prefix:+"--cpu=$arch"} $qemu_conf )
Is it possible in case of a failure due to an unrecognized option to call out usage() instead of qemu's?
Signature · 8 lines
error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
Quoted 2 lines · Avi Kivity
Why not call qemu's ./configure to get the help text?
can be done, I discarded it originally though as it seems pretty hacky as it needs the list to be reformatted and filtered further as not all options are relevant and some conflict with the ones that the final configure call for qemu is going to use, requiring assumptions about qemu which seem to defeat the principle of separation that a passthrough provides.
if it wouldn't be that we rely in the --disable-gcc-check description to warn users that having kvm crash is expected if not using kvm, I'd say is probably better to remove all qemu options from kvm's configure usage() at all
Quoted 8 lines
Quoted 8 lines
configure +0
-3@@ -111,13 +102,10 @@ fi --disable-kqemu --extra-cflags="-I $PWD/../user $qemu_cflags" \ --extra-ldflags="-L $PWD/../user $qemu_ldflags" \ --enable-kvm --kernel-path="$libkvm_kerneldir" \ - ${enable_alsa:+"--enable-alsa"} \ - ${disable_vnc_tls:+"--disable-vnc-tls"} \ - ${disable_gcc_check:+"--disable-gcc-check"} \ --prefix="$prefix" \
Quoted 8 lines
configure fi · line 109
Quoted 5 lines
configure +1
-1${qemu_cc:+"--cc=$qemu_cc"} \ ${cross_prefix:+"--cross-prefix=$cross_prefix"} \ - ${cross_prefix:+"--cpu=$arch"} + ${cross_prefix:+"--cpu=$arch"} $qemu_conf )Is it possible in case of a failure due to an unrecognized option to call out
usage()instead of qemu's?
not sure what you mean, but qemu's configure ignores any unrecognized options so it won't fail.
Carlo
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
Quoted 11 lines · Carlo Marcelo Arenas Belon
Quoted 2 lines · Avi Kivity
Why not call qemu's ./configure to get the help text?
can be done, I discarded it originally though as it seems pretty hacky as it needs the list to be reformatted and filtered further as not all options are relevant and some conflict with the ones that the final configure call for qemu is going to use, requiring assumptions about qemu which seem to defeat the principle of separation that a passthrough provides.
Quoted 5 lines
if it wouldn't be that we rely in the --disable-gcc-check description to warn users that having kvm crash is expected if not using kvm, I'd say is probably better to remove all qemu options from kvm's configure
usage()at all
We can add a note at the end. It doesn't have to be the ultimate in typography, just usable.
Quoted 18 lines
Quoted 8 lines
Quoted 8 lines
configure +0
-3@@ -111,13 +102,10 @@ fi --disable-kqemu --extra-cflags="-I $PWD/../user $qemu_cflags" \ --extra-ldflags="-L $PWD/../user $qemu_ldflags" \ --enable-kvm --kernel-path="$libkvm_kerneldir" \ - ${enable_alsa:+"--enable-alsa"} \ - ${disable_vnc_tls:+"--disable-vnc-tls"} \ - ${disable_gcc_check:+"--disable-gcc-check"} \ --prefix="$prefix" \Quoted 9 lines
configure fi · line 110
Quoted 6 lines
configure +1
-1${qemu_cc:+"--cc=$qemu_cc"} \ ${cross_prefix:+"--cross-prefix=$cross_prefix"} \ - ${cross_prefix:+"--cpu=$arch"} + ${cross_prefix:+"--cpu=$arch"} $qemu_conf )Is it possible in case of a failure due to an unrecognized option to call out
usage()instead of qemu's?
Quoted 3 lines
not sure what you mean, but qemu's configure ignores any unrecognized options so it won't fail.
That's a bug. I'm sure qemu-devel would appreciate a patch.
Signature · 8 lines
Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
Quoted 11 lines · Avi Kivity
Quoted 8 lines · Carlo Marcelo Arenas Belon
Quoted 3 lines · Avi Kivity
Quoted 1 line
Is it possible in case of a failure due to an unrecognized option to call out
usage()instead of qemu's?not sure what you mean, but qemu's configure ignores any unrecognized options so it won't fail.
That's a bug. I'm sure qemu-devel would appreciate a patch.
I think that was a feature instead, considering that there is almost no implementation for reinforcing the defaults and so --disable-alsa (as an example) will fail as an unknown option.
nevertheless will try to upstream the changes required
Carlo
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/