[Qemu-devel] [PATCH for-1.5 0/2]
cover [Qemu-devel] [PATCH for-1.5 0/2]
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.
PATCH 1/2 w32: Fix configure test for -march=i486
The latest version of MinGW needs a test for __sync_val_compare_and_swap to fix a missing symbol linker error.
--- configure | 1 + 1 file changed, 1 insertion(+)
configure +1 -0
@@ -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; }
Signature · 1 line
1.7.10.4
Re: [Qemu-devel] [PATCH for-1.5 1/2] w32: Fix configure test for -march=i486
Am 11.05.2013 21:46, schrieb Stefan Weil:
Quoted 14 lines
The latest version of MinGW needs a test for
__sync_val_compare_and_swapto fix a missing symbol linker error.Reported-by Igor Mitsyanko <[email protected]>Signed-off-by Stefan Weil <[email protected]>--- configure | 1 + 1 file changed, 1 insertion(+)configure +0
-0
configure static int sfaa(int *ptr) · line 1347
Quoted 7 lines
configure +1
-0@@ -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
PATCH 2/2 w32: Include stdio.h to get the declaration of ssize_t
In reply to Stefan WeilLatest 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.
--- include/qemu/osdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/qemu/osdep.h +1 -1
@@ -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>
Signature · 1 line
1.7.10.4
Anthony Liguori
AppliedApplied. Thanks.
Regards,
Anthony Liguori