qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-1.5 0/2]
@ 2013-05-11 19:46 Stefan Weil
  2013-05-11 19:46 ` [Qemu-devel] [PATCH for-1.5 1/2] w32: Fix configure test for -march=i486 Stefan Weil
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Stefan Weil @ 2013-05-11 19:46 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

These patches are needed to fix the currently broken build with MinGW.

Patch 1 fixes a problem reported on qemu-devel.
Patch 2 fixes a problem which is reported by our buildbots.

[PATCH for-1.5 1/2] w32: Fix configure test for -march=i486
[PATCH for-1.5 2/2] w32: Include stdio.h to get the declaration of ssize_t

Both patches should be used for QEMU 1.5.

Regards,

Stefan W.

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

* [Qemu-devel] [PATCH for-1.5 1/2] w32: Fix configure test for -march=i486
  2013-05-11 19:46 [Qemu-devel] [PATCH for-1.5 0/2] Stefan Weil
@ 2013-05-11 19:46 ` Stefan Weil
  2013-05-14 18:20   ` Stefan Weil
  2013-05-11 19:46 ` [Qemu-devel] [PATCH for-1.5 2/2] w32: Include stdio.h to get the declaration of ssize_t Stefan Weil
  2013-05-16 12:50 ` [Qemu-devel] [PATCH for-1.5 0/2] Anthony Liguori
  2 siblings, 1 reply; 5+ messages in thread
From: Stefan Weil @ 2013-05-11 19:46 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel

The latest version of MinGW needs a test for __sync_val_compare_and_swap
to fix a missing symbol linker error.

Reported-by: Igor Mitsyanko <i.mitsyanko@gmail.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 configure |    1 +
 1 file changed, 1 insertion(+)

diff --git a/configure b/configure
index 9439f1c..3a75f66 100755
--- a/configure
+++ b/configure
@@ -1341,6 +1341,7 @@ static int sfaa(int *ptr)
 int main(void)
 {
   int val = 42;
+  val = __sync_val_compare_and_swap(&val, 0, 1);
   sfaa(&val);
   return val;
 }
-- 
1.7.10.4

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

* [Qemu-devel] [PATCH for-1.5 2/2] w32: Include stdio.h to get the declaration of ssize_t
  2013-05-11 19:46 [Qemu-devel] [PATCH for-1.5 0/2] Stefan Weil
  2013-05-11 19:46 ` [Qemu-devel] [PATCH for-1.5 1/2] w32: Fix configure test for -march=i486 Stefan Weil
@ 2013-05-11 19:46 ` Stefan Weil
  2013-05-16 12:50 ` [Qemu-devel] [PATCH for-1.5 0/2] Anthony Liguori
  2 siblings, 0 replies; 5+ messages in thread
From: Stefan Weil @ 2013-05-11 19:46 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel

Latest native MinGW and also the Debian squeeze cross version declare
ssize_t in sys/types.h which is not included by osdep.h. This results
in a compiler error for several files:

  CC    util/hbitmap.o
In file included from C:/qemu/util/hbitmap.c:15:0:
C:/qemu/include/qemu/osdep.h:175:1: error: unknown type name 'ssize_t'
C:/qemu/include/qemu/osdep.h:176:1: error: unknown type name 'ssize_t'
make: *** [util/hbitmap.o] Error 1

Including stdio.h is a trick which gets the necessary declaration in a
portable way. It also includes stdarg.h, so that include statement can
be safely removed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 include/qemu/osdep.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 42545bc..822512f 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -2,9 +2,9 @@
 #define QEMU_OSDEP_H
 
 #include "config-host.h"
-#include <stdarg.h>
 #include <stddef.h>
 #include <stdbool.h>
+#include <stdio.h>
 #ifdef __OpenBSD__
 #include <sys/types.h>
 #include <sys/signal.h>
-- 
1.7.10.4

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

* Re: [Qemu-devel] [PATCH for-1.5 1/2] w32: Fix configure test for -march=i486
  2013-05-11 19:46 ` [Qemu-devel] [PATCH for-1.5 1/2] w32: Fix configure test for -march=i486 Stefan Weil
@ 2013-05-14 18:20   ` Stefan Weil
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Weil @ 2013-05-14 18:20 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Blue Swirl, Paolo Bonzini, qemu-devel

Am 11.05.2013 21:46, schrieb Stefan Weil:
> The latest version of MinGW needs a test for __sync_val_compare_and_swap
> to fix a missing symbol linker error.
>
> Reported-by: Igor Mitsyanko <i.mitsyanko@gmail.com>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  configure |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/configure b/configure
> index 9439f1c..3a75f66 100755
> --- a/configure
> +++ b/configure
> @@ -1341,6 +1341,7 @@ static int sfaa(int *ptr)
>  int main(void)
>  {
>    int val = 42;
> +  val = __sync_val_compare_and_swap(&val, 0, 1);
>    sfaa(&val);
>    return val;
>  }


Ping. The above patch 1 is still needed for latest QEMU.

Patch 2 is no longer needed.

Regards,
Stefan Weil

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

* Re: [Qemu-devel] [PATCH for-1.5 0/2]
  2013-05-11 19:46 [Qemu-devel] [PATCH for-1.5 0/2] Stefan Weil
  2013-05-11 19:46 ` [Qemu-devel] [PATCH for-1.5 1/2] w32: Fix configure test for -march=i486 Stefan Weil
  2013-05-11 19:46 ` [Qemu-devel] [PATCH for-1.5 2/2] w32: Include stdio.h to get the declaration of ssize_t Stefan Weil
@ 2013-05-16 12:50 ` Anthony Liguori
  2 siblings, 0 replies; 5+ messages in thread
From: Anthony Liguori @ 2013-05-16 12:50 UTC (permalink / raw)
  To: Stefan Weil, Anthony Liguori; +Cc: qemu-devel

Applied.  Thanks.

Regards,

Anthony Liguori

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

end of thread, other threads:[~2013-05-16 12:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-11 19:46 [Qemu-devel] [PATCH for-1.5 0/2] Stefan Weil
2013-05-11 19:46 ` [Qemu-devel] [PATCH for-1.5 1/2] w32: Fix configure test for -march=i486 Stefan Weil
2013-05-14 18:20   ` Stefan Weil
2013-05-11 19:46 ` [Qemu-devel] [PATCH for-1.5 2/2] w32: Include stdio.h to get the declaration of ssize_t Stefan Weil
2013-05-16 12:50 ` [Qemu-devel] [PATCH for-1.5 0/2] Anthony Liguori

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).