qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] configure: fix minor issues in Xen checks
@ 2012-08-02 17:30 Peter Maydell
  2012-08-02 17:30 ` [Qemu-devel] [PATCH 1/2] configure: Don't run Xen compile checks in subshells Peter Maydell
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Peter Maydell @ 2012-08-02 17:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl, Stefano Stabellini, patches

These patches fix some minor issues in the Xen checks:
 * the use of subshells meant that the (not yet committed) "bail out
   on -Werror failure" check in do_cc didn't actually cause the
   configure run to stop
 * the 4.1 probe code had a set-but-unused-variable warning

Blue: with these two I'm able to do a successful configure
on Debian testing even with the 11/11 'make errors cause
configure failures' patch.

Peter Maydell (2):
  configure: Don't run Xen compile checks in subshells
  configure: Fix set-but-not-used warning in Xen 4.1 probe

 configure |   33 ++++++++++++++++-----------------
 1 file changed, 16 insertions(+), 17 deletions(-)

-- 
1.7.9.5

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

* [Qemu-devel] [PATCH 1/2] configure: Don't run Xen compile checks in subshells
  2012-08-02 17:30 [Qemu-devel] [PATCH 0/2] configure: fix minor issues in Xen checks Peter Maydell
@ 2012-08-02 17:30 ` Peter Maydell
  2012-08-04 16:13   ` Blue Swirl
  2012-08-02 17:30 ` [Qemu-devel] [PATCH 2/2] configure: Fix set-but-not-used warning in Xen 4.1 probe Peter Maydell
  2012-08-03 10:39 ` [Qemu-devel] [PATCH 0/2] configure: fix minor issues in Xen checks Stefano Stabellini
  2 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2012-08-02 17:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl, Stefano Stabellini, patches

The Xen compile checks are currently run inside subshells. This
is unnecessary and has the effect that if do_cc() exits with
an error message then this only causes the subshell to exit,
not the whole of configure, which is confusing. Remove the
subshells, changing:
  if ( cat ; compile_prog ) ; then ...
to
  if cat && compile_prog ; then ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 configure |   30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/configure b/configure
index 027a718..c47e440 100755
--- a/configure
+++ b/configure
@@ -1397,8 +1397,8 @@ EOF
     xen=no
 
   # Xen unstable
-  elif (
-      cat > $TMPC <<EOF
+  elif 
+      cat > $TMPC <<EOF &&
 #include <xenctrl.h>
 #include <xenstore.h>
 #include <stdint.h>
@@ -1418,12 +1418,12 @@ int main(void) {
 }
 EOF
       compile_prog "" "$xen_libs"
-    ) ; then
+    then
     xen_ctrl_version=420
     xen=yes
 
-  elif (
-      cat > $TMPC <<EOF
+  elif 
+      cat > $TMPC <<EOF &&
 #include <xenctrl.h>
 #include <xs.h>
 #include <stdint.h>
@@ -1442,13 +1442,13 @@ int main(void) {
 }
 EOF
       compile_prog "" "$xen_libs"
-    ) ; then
+    then
     xen_ctrl_version=410
     xen=yes
 
   # Xen 4.0.0
-  elif (
-      cat > $TMPC <<EOF
+  elif
+      cat > $TMPC <<EOF &&
 #include <xenctrl.h>
 #include <xs.h>
 #include <stdint.h>
@@ -1469,13 +1469,13 @@ int main(void) {
 }
 EOF
       compile_prog "" "$xen_libs"
-    ) ; then
+    then
     xen_ctrl_version=400
     xen=yes
 
   # Xen 3.4.0
-  elif (
-      cat > $TMPC <<EOF
+  elif
+      cat > $TMPC <<EOF &&
 #include <xenctrl.h>
 #include <xs.h>
 int main(void) {
@@ -1491,13 +1491,13 @@ int main(void) {
 }
 EOF
       compile_prog "" "$xen_libs"
-    ) ; then
+    then
     xen_ctrl_version=340
     xen=yes
 
   # Xen 3.3.0
-  elif (
-      cat > $TMPC <<EOF
+  elif
+      cat > $TMPC <<EOF &&
 #include <xenctrl.h>
 #include <xs.h>
 int main(void) {
@@ -1509,7 +1509,7 @@ int main(void) {
 }
 EOF
       compile_prog "" "$xen_libs"
-    ) ; then
+    then
     xen_ctrl_version=330
     xen=yes
 
-- 
1.7.9.5

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

* [Qemu-devel] [PATCH 2/2] configure: Fix set-but-not-used warning in Xen 4.1 probe
  2012-08-02 17:30 [Qemu-devel] [PATCH 0/2] configure: fix minor issues in Xen checks Peter Maydell
  2012-08-02 17:30 ` [Qemu-devel] [PATCH 1/2] configure: Don't run Xen compile checks in subshells Peter Maydell
@ 2012-08-02 17:30 ` Peter Maydell
  2012-08-03 10:39 ` [Qemu-devel] [PATCH 0/2] configure: fix minor issues in Xen checks Stefano Stabellini
  2 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2012-08-02 17:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl, Stefano Stabellini, patches

The Xen 4.1 probe never uses the return value from xc_interface_open(),
so was provoking a compiler warning on newer gcc. Fix by not bothering
to put the return value anywhere.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 configure |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/configure b/configure
index c47e440..fe65ab1 100755
--- a/configure
+++ b/configure
@@ -1432,9 +1432,8 @@ EOF
 # error HVM_MAX_VCPUS not defined
 #endif
 int main(void) {
-  xc_interface *xc;
   xs_daemon_open();
-  xc = xc_interface_open(0, 0, 0);
+  xc_interface_open(0, 0, 0);
   xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
   xc_gnttab_open(NULL, 0);
   xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
-- 
1.7.9.5

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

* Re: [Qemu-devel] [PATCH 0/2] configure: fix minor issues in Xen checks
  2012-08-02 17:30 [Qemu-devel] [PATCH 0/2] configure: fix minor issues in Xen checks Peter Maydell
  2012-08-02 17:30 ` [Qemu-devel] [PATCH 1/2] configure: Don't run Xen compile checks in subshells Peter Maydell
  2012-08-02 17:30 ` [Qemu-devel] [PATCH 2/2] configure: Fix set-but-not-used warning in Xen 4.1 probe Peter Maydell
@ 2012-08-03 10:39 ` Stefano Stabellini
  2 siblings, 0 replies; 5+ messages in thread
From: Stefano Stabellini @ 2012-08-03 10:39 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Blue Swirl, Stefano Stabellini, qemu-devel@nongnu.org,
	patches@linaro.org

On Thu, 2 Aug 2012, Peter Maydell wrote:
> These patches fix some minor issues in the Xen checks:
>  * the use of subshells meant that the (not yet committed) "bail out
>    on -Werror failure" check in do_cc didn't actually cause the
>    configure run to stop
>  * the 4.1 probe code had a set-but-unused-variable warning
> 
> Blue: with these two I'm able to do a successful configure
> on Debian testing even with the 11/11 'make errors cause
> configure failures' patch.
> 
> Peter Maydell (2):
>   configure: Don't run Xen compile checks in subshells
>   configure: Fix set-but-not-used warning in Xen 4.1 probe
> 
>  configure |   33 ++++++++++++++++-----------------
>  1 file changed, 16 insertions(+), 17 deletions(-)

They are both fine by me.

Tested-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

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

* Re: [Qemu-devel] [PATCH 1/2] configure: Don't run Xen compile checks in subshells
  2012-08-02 17:30 ` [Qemu-devel] [PATCH 1/2] configure: Don't run Xen compile checks in subshells Peter Maydell
@ 2012-08-04 16:13   ` Blue Swirl
  0 siblings, 0 replies; 5+ messages in thread
From: Blue Swirl @ 2012-08-04 16:13 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Stefano Stabellini, qemu-devel, patches

Thanks, applied both.

On Thu, Aug 2, 2012 at 5:30 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> The Xen compile checks are currently run inside subshells. This
> is unnecessary and has the effect that if do_cc() exits with
> an error message then this only causes the subshell to exit,
> not the whole of configure, which is confusing. Remove the
> subshells, changing:
>   if ( cat ; compile_prog ) ; then ...
> to
>   if cat && compile_prog ; then ...
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  configure |   30 +++++++++++++++---------------
>  1 file changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/configure b/configure
> index 027a718..c47e440 100755
> --- a/configure
> +++ b/configure
> @@ -1397,8 +1397,8 @@ EOF
>      xen=no
>
>    # Xen unstable
> -  elif (
> -      cat > $TMPC <<EOF
> +  elif
> +      cat > $TMPC <<EOF &&
>  #include <xenctrl.h>
>  #include <xenstore.h>
>  #include <stdint.h>
> @@ -1418,12 +1418,12 @@ int main(void) {
>  }
>  EOF
>        compile_prog "" "$xen_libs"
> -    ) ; then
> +    then
>      xen_ctrl_version=420
>      xen=yes
>
> -  elif (
> -      cat > $TMPC <<EOF
> +  elif
> +      cat > $TMPC <<EOF &&
>  #include <xenctrl.h>
>  #include <xs.h>
>  #include <stdint.h>
> @@ -1442,13 +1442,13 @@ int main(void) {
>  }
>  EOF
>        compile_prog "" "$xen_libs"
> -    ) ; then
> +    then
>      xen_ctrl_version=410
>      xen=yes
>
>    # Xen 4.0.0
> -  elif (
> -      cat > $TMPC <<EOF
> +  elif
> +      cat > $TMPC <<EOF &&
>  #include <xenctrl.h>
>  #include <xs.h>
>  #include <stdint.h>
> @@ -1469,13 +1469,13 @@ int main(void) {
>  }
>  EOF
>        compile_prog "" "$xen_libs"
> -    ) ; then
> +    then
>      xen_ctrl_version=400
>      xen=yes
>
>    # Xen 3.4.0
> -  elif (
> -      cat > $TMPC <<EOF
> +  elif
> +      cat > $TMPC <<EOF &&
>  #include <xenctrl.h>
>  #include <xs.h>
>  int main(void) {
> @@ -1491,13 +1491,13 @@ int main(void) {
>  }
>  EOF
>        compile_prog "" "$xen_libs"
> -    ) ; then
> +    then
>      xen_ctrl_version=340
>      xen=yes
>
>    # Xen 3.3.0
> -  elif (
> -      cat > $TMPC <<EOF
> +  elif
> +      cat > $TMPC <<EOF &&
>  #include <xenctrl.h>
>  #include <xs.h>
>  int main(void) {
> @@ -1509,7 +1509,7 @@ int main(void) {
>  }
>  EOF
>        compile_prog "" "$xen_libs"
> -    ) ; then
> +    then
>      xen_ctrl_version=330
>      xen=yes
>
> --
> 1.7.9.5
>

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

end of thread, other threads:[~2012-08-04 16:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-02 17:30 [Qemu-devel] [PATCH 0/2] configure: fix minor issues in Xen checks Peter Maydell
2012-08-02 17:30 ` [Qemu-devel] [PATCH 1/2] configure: Don't run Xen compile checks in subshells Peter Maydell
2012-08-04 16:13   ` Blue Swirl
2012-08-02 17:30 ` [Qemu-devel] [PATCH 2/2] configure: Fix set-but-not-used warning in Xen 4.1 probe Peter Maydell
2012-08-03 10:39 ` [Qemu-devel] [PATCH 0/2] configure: fix minor issues in Xen checks Stefano Stabellini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).