summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-07-29 09:46:16 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-07-29 09:46:16 -0500
commit64de0e46c06eeb2edb21a936aa4e4b60ca2e5a25 (patch)
treed748f40749b7a21d77b1d4d1a23871ce3fa1ce8c /configure
parent23487df884048ed801095e9525baf1bb94e8b4b0 (diff)
parentec67464c4f137f58c040d1d351f540268e883b85 (diff)
downloadqemu-64de0e46c06eeb2edb21a936aa4e4b60ca2e5a25.tar.gz
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure23
1 files changed, 23 insertions, 0 deletions
diff --git a/configure b/configure
index 0477991e3a..77194cf9a7 100755
--- a/configure
+++ b/configure
@@ -2518,6 +2518,29 @@ if test "$trace_backend" = "dtrace"; then
fi
##########################################
+# __sync_fetch_and_and requires at least -march=i486. Many toolchains
+# use i686 as default anyway, but for those that don't, an explicit
+# specification is necessary
+if test $vhost_net = "yes" && test $cpu = "i386"; then
+ cat > $TMPC << EOF
+int sfaa(unsigned *ptr)
+{
+ return __sync_fetch_and_and(ptr, 0);
+}
+
+int main(int argc, char **argv)
+{
+ int val = 42;
+ sfaa(&val);
+ return val;
+}
+EOF
+ if ! compile_prog "" "" ; then
+ CFLAGS+="-march=i486"
+ fi
+fi
+
+##########################################
# End of CC checks
# After here, no more $cc or $ld runs