Revision 09dada40

b/configure
574 574
  QEMU_CFLAGS="-DWIN32_LEAN_AND_MEAN -DWINVER=0x501 $QEMU_CFLAGS"
575 575
  # enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later)
576 576
  QEMU_CFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $QEMU_CFLAGS"
577
  if test "$cpu" = "i386"; then
578
    # We need something better than i386 for __sync_val_compare_and_swap
579
    # and can expect that QEMU will only run on i686 or later.
580
    QEMU_CFLAGS="-march=i686 $QEMU_CFLAGS"
581
  fi
582 577
  LIBS="-lwinmm -lws2_32 -liphlpapi $LIBS"
583 578
cat > $TMPC << EOF
584 579
int main(void) { return 0; }
......
1326 1321
  fi
1327 1322
fi
1328 1323

  
1329
#
1324
##########################################
1325
# __sync_fetch_and_and requires at least -march=i486. Many toolchains
1326
# use i686 as default anyway, but for those that don't, an explicit
1327
# specification is necessary
1328

  
1329
if test "$cpu" = "i386"; then
1330
  cat > $TMPC << EOF
1331
static int sfaa(int *ptr)
1332
{
1333
  return __sync_fetch_and_and(ptr, 0);
1334
}
1335

  
1336
int main(void)
1337
{
1338
  int val = 42;
1339
  sfaa(&val);
1340
  return val;
1341
}
1342
EOF
1343
  if ! compile_prog "" "" ; then
1344
    QEMU_CFLAGS="-march=i486 $QEMU_CFLAGS"
1345
  fi
1346
fi
1347

  
1348
#########################################
1330 1349
# Solaris specific configure tool chain decisions
1331
#
1350

  
1332 1351
if test "$solaris" = "yes" ; then
1333 1352
  if has $install; then
1334 1353
    :
......
3169 3188
fi
3170 3189

  
3171 3190
##########################################
3172
# __sync_fetch_and_and requires at least -march=i486. Many toolchains
3173
# use i686 as default anyway, but for those that don't, an explicit
3174
# specification is necessary
3175
if test "$vhost_net" = "yes" && test "$cpu" = "i386"; then
3176
  cat > $TMPC << EOF
3177
static int sfaa(int *ptr)
3178
{
3179
  return __sync_fetch_and_and(ptr, 0);
3180
}
3181

  
3182
int main(void)
3183
{
3184
  int val = 42;
3185
  sfaa(&val);
3186
  return val;
3187
}
3188
EOF
3189
  if ! compile_prog "" "" ; then
3190
    QEMU_CFLAGS="-march=i486 $QEMU_CFLAGS"
3191
  fi
3192
fi
3193

  
3194
##########################################
3195 3191
# check and set a backend for coroutine
3196 3192

  
3197 3193
# We prefer ucontext, but it's not always possible. The fallback

Also available in: Unified diff