From: Igor Mitsyanko <i.mitsyanko@gmail.com>
To: Stefan Weil <sw@weilnetz.de>
Cc: Blue Swirl <blauwirbel@gmail.com>,
Peter Maydell <peter.maydell@linaro.org>,
aliguori@us.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] w32: Fix build with older gcc (unresolved symbol)
Date: Sat, 11 May 2013 00:14:00 +0400 [thread overview]
Message-ID: <518D5508.8000308@gmail.com> (raw)
In-Reply-To: <1364577620-32630-1-git-send-email-sw@weilnetz.de>
On 29.03.2013 21:20, Stefan Weil wrote:
> 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>
> ---
>
> Maybe this modification is also needed for native gcc-4.4 and older
> on Linux i386. If yes, we can move the new script code out of the
> MinGW conditional code.
>
> Newer versions of gcc obviously use -march=i686 by default and
> don't need the patch, but it also won't do any harm for those
> versions.
>
> Stefan
>
mingw is built with --build=mingw32 and looks like it defaults to
-march=i386 (I have gcc version 4.7.2).
Default build on windows is broken without this patch, it should be
applied to 1.5 probably.
Tested-by: Igor Mitsyanko <i.mitsyanko@gmail.com>
>
> configure | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/configure b/configure
> index f2af714..70c2219 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; }
>
next prev parent reply other threads:[~2013-05-10 20:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-29 17:20 [Qemu-devel] [PATCH] w32: Fix build with older gcc (unresolved symbol) Stefan Weil
2013-03-29 17:58 ` Peter Maydell
2013-03-30 13:44 ` Blue Swirl
2013-03-30 13:50 ` Peter Maydell
2013-03-30 18:54 ` Blue Swirl
2013-05-10 20:14 ` Igor Mitsyanko [this message]
2013-05-11 6:41 ` Stefan Weil
2013-05-11 9:01 ` Igor Mitsyanko
2013-05-11 19:51 ` Stefan Weil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=518D5508.8000308@gmail.com \
--to=i.mitsyanko@gmail.com \
--cc=aliguori@us.ibm.com \
--cc=blauwirbel@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.