* [Qemu-devel] [PATCH v2] configure: remove duplicate test
@ 2013-04-09 13:17 Paolo Bonzini
2013-04-09 17:22 ` Peter Maydell
0 siblings, 1 reply; 3+ messages in thread
From: Paolo Bonzini @ 2013-04-09 13:17 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell
We already had a test to add -march=i486 when needed. Make the
existing test independent of vhost-net, so that it is also used
under Win32. Also move the test earlier to avoid mucking with
QEMU_CFLAGS too late in the configure process.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
v1->v2: move test early
configure | 56 ++++++++++++++++++++++++++------------------------------
1 file changed, 26 insertions(+), 30 deletions(-)
diff --git a/configure b/configure
index b12d9ac..b2e0804 100755
--- a/configure
+++ b/configure
@@ -571,11 +571,6 @@ 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; }
@@ -1308,9 +1303,33 @@ EOF
fi
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 "$cpu" = "i386"; then
+ cat > $TMPC << EOF
+static int sfaa(int *ptr)
+{
+ return __sync_fetch_and_and(ptr, 0);
+}
+
+int main(void)
+{
+ int val = 42;
+ sfaa(&val);
+ return val;
+}
+EOF
+ if ! compile_prog "" "" ; then
+ QEMU_CFLAGS="-march=i486 $QEMU_CFLAGS"
+ fi
+fi
+
+#########################################
# Solaris specific configure tool chain decisions
-#
+
if test "$solaris" = "yes" ; then
if has $install; then
:
@@ -3047,29 +3066,6 @@ 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
-static int sfaa(int *ptr)
-{
- return __sync_fetch_and_and(ptr, 0);
-}
-
-int main(void)
-{
- int val = 42;
- sfaa(&val);
- return val;
-}
-EOF
- if ! compile_prog "" "" ; then
- QEMU_CFLAGS="-march=i486 $QEMU_CFLAGS"
- fi
-fi
-
-##########################################
# check and set a backend for coroutine
# We prefer ucontext, but it's not always possible. The fallback
--
1.8.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH v2] configure: remove duplicate test
2013-04-09 13:17 [Qemu-devel] [PATCH v2] configure: remove duplicate test Paolo Bonzini
@ 2013-04-09 17:22 ` Peter Maydell
2013-04-10 7:59 ` Paolo Bonzini
0 siblings, 1 reply; 3+ messages in thread
From: Peter Maydell @ 2013-04-09 17:22 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
On 9 April 2013 14:17, Paolo Bonzini <pbonzini@redhat.com> wrote:
> We already had a test to add -march=i486 when needed. Make the
> existing test independent of vhost-net, so that it is also used
> under Win32. Also move the test earlier to avoid mucking with
> QEMU_CFLAGS too late in the configure process.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Do we care about passing this flag through to submodules?
If so we probably need to do something with EXTRA_CFLAGS
(cf Peter Crosthwaite's DTC submodule patches).
If not, this looks OK.
thanks
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH v2] configure: remove duplicate test
2013-04-09 17:22 ` Peter Maydell
@ 2013-04-10 7:59 ` Paolo Bonzini
0 siblings, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2013-04-10 7:59 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel
Il 09/04/2013 19:22, Peter Maydell ha scritto:
> On 9 April 2013 14:17, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> We already had a test to add -march=i486 when needed. Make the
>> existing test independent of vhost-net, so that it is also used
>> under Win32. Also move the test earlier to avoid mucking with
>> QEMU_CFLAGS too late in the configure process.
>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>
> Do we care about passing this flag through to submodules?
I don't think so, submodules would have their own configure tests.
Paolo
> If so we probably need to do something with EXTRA_CFLAGS
> (cf Peter Crosthwaite's DTC submodule patches).
>
> If not, this looks OK.
>
> thanks
> -- PMM
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-04-10 8:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-09 13:17 [Qemu-devel] [PATCH v2] configure: remove duplicate test Paolo Bonzini
2013-04-09 17:22 ` Peter Maydell
2013-04-10 7:59 ` Paolo Bonzini
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).