qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Liviu Ionescu <ilg@livius.net>
Cc: QEMU Developers <Qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] MinGW build
Date: Wed, 26 Nov 2014 20:13:04 +0000	[thread overview]
Message-ID: <CAFEAcA8cNDCyv1EqvhKAxaG=7E4Ou=eSL6=aY+eu2tz87m61cQ@mail.gmail.com> (raw)
In-Reply-To: <93259ECD-066A-413E-B647-2BB240DBF7EC@livius.net>

On 26 November 2014 at 19:55, Liviu Ionescu <ilg@livius.net> wrote:
> since I had some troubles to build QEMU on Windows, I compiled a page with some instructions:
>
>         http://gnuarmeclipse.livius.net/wiki/How_to_build_QEMU#Windows
>
> the purpose was to generate a standalone executable, that requires no libraries.
>
>
> although the procedure is fully functional, I had to apply a small patch, basically:
>
> #ifdef __MINGW32__
>     #if !defined(ffs)
>     #define ffs __builtin_ffs
>     #endif
> #endif
>
> in several files.

Hmm. We have a workaround already for a similar thing in
include/sysemu/os-win32.h,
but that works by declaring a prototype rather than using a #define, and it's
guarded by defined(_WIN64). I wonder if some of those workarounds in that file
need to be guarded by more specific checks than just _WIN64...

Do you have any experience with mingw-w64? When I was doing Windows
(cross-compiled) builds mingw-w64 seemed to be more actively maintained
(even for 32 bit windows targets) than the original mingw project,
and I think there was at least one issue where the fix was basically
"don't try to use mingw, it's just too old, use mingw-w64 instead".

In any case, thanks very much for writing up the instructions -- we do
get people wanting to know how to build on Windows from time to time,
so it will be useful to be able to point them at instructions.

You might consider tweaking the instructions to recommend building in
a subdirectory (ie 'mkdir -p build/windows; cd build/windows;
../../configure; make'). This is good if you're going to be building
more than one configuration, and it also makes it easy to blow away
an old build by removing the whole build tree (distclean is not always
100% reliable especially if you track head-of-git often).

-- PMM

  reply	other threads:[~2014-11-26 20:13 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26 19:55 [Qemu-devel] MinGW build Liviu Ionescu
2014-11-26 20:13 ` Peter Maydell [this message]
2014-11-26 20:19   ` Stefan Weil
2014-11-26 21:44   ` Liviu Ionescu
2014-11-27 16:43   ` Liviu Ionescu
2014-11-27 19:34     ` Peter Maydell
2014-11-27 19:57       ` Liviu Ionescu
2014-11-27 20:09         ` Stefan Weil
2014-11-27 20:14           ` Liviu Ionescu
2014-11-27 20:18           ` Peter Maydell
2014-11-27 20:27             ` Liviu Ionescu
2014-11-27 22:04               ` Peter Maydell
2014-11-28  0:30                 ` Liviu Ionescu
2014-11-28  7:14             ` Stefan Weil
2014-11-28  8:41               ` Peter Maydell
2015-11-27 18:49               ` Peter Maydell
2015-11-27 19:16                 ` Stefan Weil
2015-11-27 21:05                   ` Peter Maydell
2015-11-29 12:03                     ` Juan Quintela
2015-12-03 11:58                       ` Peter Maydell
2015-12-03 14:15                         ` Peter Maydell
2015-12-03 14:30                           ` Juan Quintela
2015-11-30 13:24                 ` Juan Quintela
2015-11-30 13:29                   ` Stefan Weil
2014-11-27 20:52           ` Liviu Ionescu
2014-11-27 21:14             ` Stefan Weil
2014-11-27 21:38               ` Liviu Ionescu
2014-11-28  6:20                 ` Stefan Weil
2014-11-28  6:23                   ` Liviu Ionescu
2014-11-28  7:03                     ` Stefan Weil
2014-12-01 10:30                       ` Liviu Ionescu
2014-12-01 18:42                         ` Stefan Weil
2014-12-02 18:28                           ` Liviu Ionescu

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='CAFEAcA8cNDCyv1EqvhKAxaG=7E4Ou=eSL6=aY+eu2tz87m61cQ@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=Qemu-devel@nongnu.org \
    --cc=ilg@livius.net \
    /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 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).