All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6] Autoconf: add variable for pass arbitrary options to qemu upstream
@ 2014-05-06 14:30 Fabio Fantoni
  2014-05-08  9:53 ` Ian Campbell
  0 siblings, 1 reply; 7+ messages in thread
From: Fabio Fantoni @ 2014-05-06 14:30 UTC (permalink / raw)
  To: xen-devel; +Cc: Fabio Fantoni, Ian.Jackson, Ian.Campbell, Stefano.Stabellini

Added configure options for pass arbitrary build options to qemu
upstream.

Usage example:
./configure QEMUU_EXTRA_ARGS="--enable-spice --enable-usb-redir"

Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>

---

Changes in v6:
- redid the patch similar to v1 adding variable for pass arbitrary
  options to qemu upstream instead specific spice and usbredir ones

Changes in v5:
- improved README changes
- changed qemuu_add_par variable to qemuu_extra_args
- fixed some indentation errors
- changed 2 additions that was bash-only
- run autoconf to update configure file

Changes in v4:
- removed upstream qemu debug option already included by default if
  tools debug is enabled.
- refresh for latest xen unstable git
---
 config/Tools.mk.in |    1 +
 tools/Makefile     |    1 +
 tools/configure    |    5 +++++
 tools/configure.ac |    1 +
 4 files changed, 8 insertions(+)

diff --git a/config/Tools.mk.in b/config/Tools.mk.in
index 18f3b8a..0693c03 100644
--- a/config/Tools.mk.in
+++ b/config/Tools.mk.in
@@ -55,6 +55,7 @@ CONFIG_QEMU_TRAD    := @qemu_traditional@
 CONFIG_QEMU_XEN     := @qemu_xen@
 CONFIG_BLKTAP1      := @blktap1@
 CONFIG_VTPM         := @vtpm@
+CONFIG_QEMUU_EXTRA_ARGS:= @QEMUU_EXTRA_ARGS@
 
 #System options
 ZLIB                := @zlib@
diff --git a/tools/Makefile b/tools/Makefile
index 3675515..992fe3e 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -203,6 +203,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
 		--disable-docs \
 		--disable-guest-agent \
 		--python=$(PYTHON) \
+		$(CONFIG_QEMUU_EXTRA_ARGS) \
 		$(IOEMU_CONFIGURE_CROSS); \
 	$(MAKE) all
 
diff --git a/tools/configure b/tools/configure
index e1eeff4..a641efa 100755
--- a/tools/configure
+++ b/tools/configure
@@ -667,6 +667,7 @@ INSTALL_DATA
 INSTALL_SCRIPT
 INSTALL_PROGRAM
 SET_MAKE
+QEMUU_EXTRA_ARGS
 IASL
 BCC
 LD86
@@ -792,6 +793,7 @@ AS86
 LD86
 BCC
 IASL
+QEMUU_EXTRA_ARGS
 CPP
 PKG_CONFIG
 PKG_CONFIG_PATH
@@ -1467,6 +1469,8 @@ Some influential environment variables:
   LD86        Path to ld86 tool
   BCC         Path to bcc tool
   IASL        Path to iasl tool
+  QEMUU_EXTRA_ARGS
+              List of upstream qemu additionals build paramters
   CPP         C preprocessor
   PKG_CONFIG  path to pkg-config utility
   PKG_CONFIG_PATH
@@ -3861,6 +3865,7 @@ LDFLAGS="$PREPEND_LDFLAGS $LDFLAGS $APPEND_LDFLAGS"
 
 
 
+
 # Checks for programs.
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
diff --git a/tools/configure.ac b/tools/configure.ac
index 00fb47b..16ca790 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -141,6 +141,7 @@ AC_ARG_VAR([AS86], [Path to as86 tool])
 AC_ARG_VAR([LD86], [Path to ld86 tool])
 AC_ARG_VAR([BCC], [Path to bcc tool])
 AC_ARG_VAR([IASL], [Path to iasl tool])
+AC_ARG_VAR([QEMUU_EXTRA_ARGS], [List of upstream qemu additionals build paramters])
 
 # Checks for programs.
 AC_PROG_CC
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v6] Autoconf: add variable for pass arbitrary options to qemu upstream
  2014-05-06 14:30 [PATCH v6] Autoconf: add variable for pass arbitrary options to qemu upstream Fabio Fantoni
@ 2014-05-08  9:53 ` Ian Campbell
  2014-05-08 11:00   ` Fabio Fantoni
  0 siblings, 1 reply; 7+ messages in thread
From: Ian Campbell @ 2014-05-08  9:53 UTC (permalink / raw)
  To: Fabio Fantoni; +Cc: xen-devel, Ian.Jackson, Stefano.Stabellini

On Tue, 2014-05-06 at 16:30 +0200, Fabio Fantoni wrote:
> Added configure options for pass arbitrary build options to qemu
> upstream.
> 
> Usage example:
> ./configure QEMUU_EXTRA_ARGS="--enable-spice --enable-usb-redir"

Isn't
        ./configure --with-extra-qemuu-configure-args="--enable-sss"
more conventional for this sort of thing?

> diff --git a/config/Tools.mk.in b/config/Tools.mk.in
> index 18f3b8a..0693c03 100644
> --- a/config/Tools.mk.in
> +++ b/config/Tools.mk.in
> @@ -55,6 +55,7 @@ CONFIG_QEMU_TRAD    := @qemu_traditional@
>  CONFIG_QEMU_XEN     := @qemu_xen@
>  CONFIG_BLKTAP1      := @blktap1@
>  CONFIG_VTPM         := @vtpm@
> +CONFIG_QEMUU_EXTRA_ARGS:= @QEMUU_EXTRA_ARGS@

Please insert the word "CONFIGURE" somewhere so we know what the args
are for.

> diff --git a/tools/configure.ac b/tools/configure.ac
> index 00fb47b..16ca790 100644
> --- a/tools/configure.ac
> +++ b/tools/configure.ac
> @@ -141,6 +141,7 @@ AC_ARG_VAR([AS86], [Path to as86 tool])
>  AC_ARG_VAR([LD86], [Path to ld86 tool])
>  AC_ARG_VAR([BCC], [Path to bcc tool])
>  AC_ARG_VAR([IASL], [Path to iasl tool])
> +AC_ARG_VAR([QEMUU_EXTRA_ARGS], [List of upstream qemu additionals build paramters])

"List of additional configure options for upstream qemu"

>  
>  # Checks for programs.
>  AC_PROG_CC

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v6] Autoconf: add variable for pass arbitrary options to qemu upstream
  2014-05-08  9:53 ` Ian Campbell
@ 2014-05-08 11:00   ` Fabio Fantoni
  2014-05-08 11:43     ` Ian Campbell
  0 siblings, 1 reply; 7+ messages in thread
From: Fabio Fantoni @ 2014-05-08 11:00 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel, Ian.Jackson, Stefano.Stabellini

Il 08/05/2014 11:53, Ian Campbell ha scritto:
> On Tue, 2014-05-06 at 16:30 +0200, Fabio Fantoni wrote:
>> Added configure options for pass arbitrary build options to qemu
>> upstream.
>>
>> Usage example:
>> ./configure QEMUU_EXTRA_ARGS="--enable-spice --enable-usb-redir"
> Isn't
>          ./configure --with-extra-qemuu-configure-args="--enable-sss"
> more conventional for this sort of thing?

I don't know, tell me what is best.
I must change using AC_ARG_WITH (similar for example to system-seabios 
part) instead of AC_ARG_VAR?

>
>> diff --git a/config/Tools.mk.in b/config/Tools.mk.in
>> index 18f3b8a..0693c03 100644
>> --- a/config/Tools.mk.in
>> +++ b/config/Tools.mk.in
>> @@ -55,6 +55,7 @@ CONFIG_QEMU_TRAD    := @qemu_traditional@
>>   CONFIG_QEMU_XEN     := @qemu_xen@
>>   CONFIG_BLKTAP1      := @blktap1@
>>   CONFIG_VTPM         := @vtpm@
>> +CONFIG_QEMUU_EXTRA_ARGS:= @QEMUU_EXTRA_ARGS@
> Please insert the word "CONFIGURE" somewhere so we know what the args
> are for.

Change it to "+CONFIG_QEMUU_EXTRA_ARGS:= @EXTRA_QEMUU_CONFIGURE_ARGS@ " can be good or I must change also other parts?


>
>> diff --git a/tools/configure.ac b/tools/configure.ac
>> index 00fb47b..16ca790 100644
>> --- a/tools/configure.ac
>> +++ b/tools/configure.ac
>> @@ -141,6 +141,7 @@ AC_ARG_VAR([AS86], [Path to as86 tool])
>>   AC_ARG_VAR([LD86], [Path to ld86 tool])
>>   AC_ARG_VAR([BCC], [Path to bcc tool])
>>   AC_ARG_VAR([IASL], [Path to iasl tool])
>> +AC_ARG_VAR([QEMUU_EXTRA_ARGS], [List of upstream qemu additionals build paramters])
> "List of additional configure options for upstream qemu"

I'll change it following your advice.

>
>>   
>>   # Checks for programs.
>>   AC_PROG_CC
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v6] Autoconf: add variable for pass arbitrary options to qemu upstream
  2014-05-08 11:00   ` Fabio Fantoni
@ 2014-05-08 11:43     ` Ian Campbell
  2014-05-08 16:53       ` Don Slutz
  0 siblings, 1 reply; 7+ messages in thread
From: Ian Campbell @ 2014-05-08 11:43 UTC (permalink / raw)
  To: Fabio Fantoni; +Cc: xen-devel, Ian.Jackson, Roger Pau Monne, Stefano.Stabellini

On Thu, 2014-05-08 at 13:00 +0200, Fabio Fantoni wrote:
> Il 08/05/2014 11:53, Ian Campbell ha scritto:
> > On Tue, 2014-05-06 at 16:30 +0200, Fabio Fantoni wrote:
> >> Added configure options for pass arbitrary build options to qemu
> >> upstream.
> >>
> >> Usage example:
> >> ./configure QEMUU_EXTRA_ARGS="--enable-spice --enable-usb-redir"
> > Isn't
> >          ./configure --with-extra-qemuu-configure-args="--enable-sss"
> > more conventional for this sort of thing?
> 
> I don't know, tell me what is best.

I was asking for input, using an argument seems more normal to me, but I
don't know.

> I must change using AC_ARG_WITH (similar for example to system-seabios 
> part) instead of AC_ARG_VAR?

I haven't looked but that sounds plausible.

> >> diff --git a/config/Tools.mk.in b/config/Tools.mk.in
> >> index 18f3b8a..0693c03 100644
> >> --- a/config/Tools.mk.in
> >> +++ b/config/Tools.mk.in
> >> @@ -55,6 +55,7 @@ CONFIG_QEMU_TRAD    := @qemu_traditional@
> >>   CONFIG_QEMU_XEN     := @qemu_xen@
> >>   CONFIG_BLKTAP1      := @blktap1@
> >>   CONFIG_VTPM         := @vtpm@
> >> +CONFIG_QEMUU_EXTRA_ARGS:= @QEMUU_EXTRA_ARGS@
> > Please insert the word "CONFIGURE" somewhere so we know what the args
> > are for.
> 
> Change it to "+CONFIG_QEMUU_EXTRA_ARGS:= @EXTRA_QEMUU_CONFIGURE_ARGS@
> " can be good or I must change also other parts?

Apart from the code which defines @EXTRA_QEMUU_CONFIGURE_ARGS@ that
would do, I think.

Ian.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v6] Autoconf: add variable for pass arbitrary options to qemu upstream
  2014-05-08 11:43     ` Ian Campbell
@ 2014-05-08 16:53       ` Don Slutz
  2014-05-09  8:28         ` Ian Campbell
  0 siblings, 1 reply; 7+ messages in thread
From: Don Slutz @ 2014-05-08 16:53 UTC (permalink / raw)
  To: Ian Campbell, Fabio Fantoni
  Cc: xen-devel, Ian.Jackson, Stefano.Stabellini, Roger Pau Monne

On 05/08/14 07:43, Ian Campbell wrote:
> On Thu, 2014-05-08 at 13:00 +0200, Fabio Fantoni wrote:
>> Il 08/05/2014 11:53, Ian Campbell ha scritto:
>>> On Tue, 2014-05-06 at 16:30 +0200, Fabio Fantoni wrote:
>>>> Added configure options for pass arbitrary build options to qemu
>>>> upstream.
>>>>
>>>> Usage example:
>>>> ./configure QEMUU_EXTRA_ARGS="--enable-spice --enable-usb-redir"
>>> Isn't
>>>           ./configure --with-extra-qemuu-configure-args="--enable-sss"
>>> more conventional for this sort of thing?
>> I don't know, tell me what is best.

Sorry I missed early versions of this.  There is no reason
that I know of to involve configure in this.  The following
works just fine (Just the makefile change and a changed
commit message):



 From 847b9dee4dea17c86f6ec402e5fcff7d515d1767 Mon Sep 17 00:00:00 2001
From: Fabio Fantoni <fabio.fantoni@m2r.biz>
Date: Tue, 6 May 2014 16:30:50 +0200
Subject: [PATCH] tools: Pass arbitrary build options to qemu upstream.

Usage examples:

   CONFIG_QEMUU_EXTRA_ARGS="--enable-spice --enable-usb-redir" make tools

or

   make tools CONFIG_QEMUU_EXTRA_ARGS="--enable-spice --enable-usb-redir"

or

   echo CONFIG_QEMUU_EXTRA_ARGS="--enable-spice --enable-usb-redir" >>.config
   make tools

or

   export CONFIG_QEMUU_EXTRA_ARGS="--enable-spice --enable-usb-redir"
   make tools

Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
---
  tools/Makefile | 1 +
  1 file changed, 1 insertion(+)

diff --git a/tools/Makefile b/tools/Makefile
index 3675515..992fe3e 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -203,6 +203,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
                 --disable-docs \
                 --disable-guest-agent \
                 --python=$(PYTHON) \
+               $(CONFIG_QEMUU_EXTRA_ARGS) \
                 $(IOEMU_CONFIGURE_CROSS); \
         $(MAKE) all

-- 
1.8.2.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v6] Autoconf: add variable for pass arbitrary options to qemu upstream
  2014-05-08 16:53       ` Don Slutz
@ 2014-05-09  8:28         ` Ian Campbell
  2014-05-09  8:32           ` Fabio Fantoni
  0 siblings, 1 reply; 7+ messages in thread
From: Ian Campbell @ 2014-05-09  8:28 UTC (permalink / raw)
  To: Don Slutz
  Cc: Fabio Fantoni, Ian.Jackson, xen-devel, Stefano.Stabellini,
	Roger Pau Monne

On Thu, 2014-05-08 at 12:53 -0400, Don Slutz wrote:
> On 05/08/14 07:43, Ian Campbell wrote:
> > On Thu, 2014-05-08 at 13:00 +0200, Fabio Fantoni wrote:
> >> Il 08/05/2014 11:53, Ian Campbell ha scritto:
> >>> On Tue, 2014-05-06 at 16:30 +0200, Fabio Fantoni wrote:
> >>>> Added configure options for pass arbitrary build options to qemu
> >>>> upstream.
> >>>>
> >>>> Usage example:
> >>>> ./configure QEMUU_EXTRA_ARGS="--enable-spice --enable-usb-redir"
> >>> Isn't
> >>>           ./configure --with-extra-qemuu-configure-args="--enable-sss"
> >>> more conventional for this sort of thing?
> >> I don't know, tell me what is best.
> 
> Sorry I missed early versions of this.  There is no reason
> that I know of to involve configure in this.

As a developer at least I typically run configure once (or infrequently)
and then run make a lot. Having to remember to put stuff on the make
command line defeats that. In some ways this is part of the reason for
using autoconf.

I don't think splitting things between .config and autoconf is a
particularly brilliant way to do things, at least for tools related
stuff.

>   The following
> works just fine (Just the makefile change and a changed
> commit message):
> 
> 
> 
>  From 847b9dee4dea17c86f6ec402e5fcff7d515d1767 Mon Sep 17 00:00:00 2001
> From: Fabio Fantoni <fabio.fantoni@m2r.biz>
> Date: Tue, 6 May 2014 16:30:50 +0200
> Subject: [PATCH] tools: Pass arbitrary build options to qemu upstream.
> 
> Usage examples:
> 
>    CONFIG_QEMUU_EXTRA_ARGS="--enable-spice --enable-usb-redir" make tools
> 
> or
> 
>    make tools CONFIG_QEMUU_EXTRA_ARGS="--enable-spice --enable-usb-redir"
> 
> or
> 
>    echo CONFIG_QEMUU_EXTRA_ARGS="--enable-spice --enable-usb-redir" >>.config
>    make tools
> 
> or
> 
>    export CONFIG_QEMUU_EXTRA_ARGS="--enable-spice --enable-usb-redir"
>    make tools
> 
> Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
> ---
>   tools/Makefile | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/tools/Makefile b/tools/Makefile
> index 3675515..992fe3e 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -203,6 +203,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
>                  --disable-docs \
>                  --disable-guest-agent \
>                  --python=$(PYTHON) \
> +               $(CONFIG_QEMUU_EXTRA_ARGS) \
>                  $(IOEMU_CONFIGURE_CROSS); \
>          $(MAKE) all
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v6] Autoconf: add variable for pass arbitrary options to qemu upstream
  2014-05-09  8:28         ` Ian Campbell
@ 2014-05-09  8:32           ` Fabio Fantoni
  0 siblings, 0 replies; 7+ messages in thread
From: Fabio Fantoni @ 2014-05-09  8:32 UTC (permalink / raw)
  To: Ian Campbell, Don Slutz
  Cc: xen-devel, Ian.Jackson, Stefano.Stabellini, Roger Pau Monne

Il 09/05/2014 10:28, Ian Campbell ha scritto:
> On Thu, 2014-05-08 at 12:53 -0400, Don Slutz wrote:
>> On 05/08/14 07:43, Ian Campbell wrote:
>>> On Thu, 2014-05-08 at 13:00 +0200, Fabio Fantoni wrote:
>>>> Il 08/05/2014 11:53, Ian Campbell ha scritto:
>>>>> On Tue, 2014-05-06 at 16:30 +0200, Fabio Fantoni wrote:
>>>>>> Added configure options for pass arbitrary build options to qemu
>>>>>> upstream.
>>>>>>
>>>>>> Usage example:
>>>>>> ./configure QEMUU_EXTRA_ARGS="--enable-spice --enable-usb-redir"
>>>>> Isn't
>>>>>            ./configure --with-extra-qemuu-configure-args="--enable-sss"
>>>>> more conventional for this sort of thing?
>>>> I don't know, tell me what is best.
>> Sorry I missed early versions of this.  There is no reason
>> that I know of to involve configure in this.
> As a developer at least I typically run configure once (or infrequently)
> and then run make a lot. Having to remember to put stuff on the make
> command line defeats that. In some ways this is part of the reason for
> using autoconf.
>
> I don't think splitting things between .config and autoconf is a
> particularly brilliant way to do things, at least for tools related
> stuff.

I also think that is better add it on configure, probably today I'll do, 
test and post the v7 following your previous advices.

>
>>    The following
>> works just fine (Just the makefile change and a changed
>> commit message):
>>
>>
>>
>>   From 847b9dee4dea17c86f6ec402e5fcff7d515d1767 Mon Sep 17 00:00:00 2001
>> From: Fabio Fantoni <fabio.fantoni@m2r.biz>
>> Date: Tue, 6 May 2014 16:30:50 +0200
>> Subject: [PATCH] tools: Pass arbitrary build options to qemu upstream.
>>
>> Usage examples:
>>
>>     CONFIG_QEMUU_EXTRA_ARGS="--enable-spice --enable-usb-redir" make tools
>>
>> or
>>
>>     make tools CONFIG_QEMUU_EXTRA_ARGS="--enable-spice --enable-usb-redir"
>>
>> or
>>
>>     echo CONFIG_QEMUU_EXTRA_ARGS="--enable-spice --enable-usb-redir" >>.config
>>     make tools
>>
>> or
>>
>>     export CONFIG_QEMUU_EXTRA_ARGS="--enable-spice --enable-usb-redir"
>>     make tools
>>
>> Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
>> ---
>>    tools/Makefile | 1 +
>>    1 file changed, 1 insertion(+)
>>
>> diff --git a/tools/Makefile b/tools/Makefile
>> index 3675515..992fe3e 100644
>> --- a/tools/Makefile
>> +++ b/tools/Makefile
>> @@ -203,6 +203,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
>>                   --disable-docs \
>>                   --disable-guest-agent \
>>                   --python=$(PYTHON) \
>> +               $(CONFIG_QEMUU_EXTRA_ARGS) \
>>                   $(IOEMU_CONFIGURE_CROSS); \
>>           $(MAKE) all
>>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-05-09  8:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-06 14:30 [PATCH v6] Autoconf: add variable for pass arbitrary options to qemu upstream Fabio Fantoni
2014-05-08  9:53 ` Ian Campbell
2014-05-08 11:00   ` Fabio Fantoni
2014-05-08 11:43     ` Ian Campbell
2014-05-08 16:53       ` Don Slutz
2014-05-09  8:28         ` Ian Campbell
2014-05-09  8:32           ` Fabio Fantoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.