summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorStefan Weil2013-03-29 18:20:20 +0100
committerBlue Swirl2013-03-30 15:08:07 +0100
commit5e3a0f418c4d57399778cee0b55aebfb663b6425 (patch)
tree68b3e5f7e9e505976ccbd3e37f831083fd822e5f /configure
parenttarget-moxie: Fix pointer-to-integer conversion (MinGW-w64) (diff)
downloadqemu-5e3a0f418c4d57399778cee0b55aebfb663b6425.tar.gz
qemu-5e3a0f418c4d57399778cee0b55aebfb663b6425.tar.xz
qemu-5e3a0f418c4d57399778cee0b55aebfb663b6425.zip
w32: Fix build with older gcc (unresolved symbol)
The cross i586-mingw32msvc-gcc 4.4.4 from Debian Squeeze does not support __sync_val_compare_and_swap by default. Using -march=i686 fixes that and should also result in better code. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure5
1 files changed, 5 insertions, 0 deletions
diff --git a/configure b/configure
index f2af714928..70c2219dd6 100755
--- a/configure
+++ b/configure
@@ -562,6 +562,11 @@ if test "$mingw32" = "yes" ; then
QEMU_CFLAGS="-DWIN32_LEAN_AND_MEAN -DWINVER=0x501 $QEMU_CFLAGS"
# enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later)
QEMU_CFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $QEMU_CFLAGS"
+ if test "$cpu" = "i386"; then
+ # We need something better than i386 for __sync_val_compare_and_swap
+ # and can expect that QEMU will only run on i686 or later.
+ QEMU_CFLAGS="-march=i686 $QEMU_CFLAGS"
+ fi
LIBS="-lwinmm -lws2_32 -liphlpapi $LIBS"
cat > $TMPC << EOF
int main(void) { return 0; }