All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Paolo Bonzini <pbonzini@redhat.com>, Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, Alexander Voropay <alexander.voropay@gmail.com>
Subject: Re: [Qemu-devel] qemu-1.6.0 under Cygwin64 ./configure failed
Date: Wed, 25 Sep 2013 22:21:51 +0200	[thread overview]
Message-ID: <524345DF.6040402@weilnetz.de> (raw)
In-Reply-To: <5241B263.8060105@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2767 bytes --]

Am 24.09.2013 17:40, schrieb Paolo Bonzini:
> Il 24/09/2013 16:41, Eric Blake ha scritto:
> > -mno-cygwin is an obsolete command line option, formerly used for
> > cross-compiling from cygwin to mingw.  It is NOT used when building
> > for cygwin, and these days, building for mingw should use a proper
> > cross compiler (available from cygwin.com) rather than the
> > -mno-cygwin crutch. To me, this means that there is some cruft in
> > the configure file, and that no one has ever really tried to port
> > qemu to cygwin yet.
>
> Yes, QEMU probably was never ported to Cygwin and there is obsolete
> cruft to add -mno-cygwin.
>
> Something like this is needed even if you use the cygwin-to-mingw
> cross compiler:
>
> diff --git a/configure b/configure
> index 8f27ab3..bab3aa3 100755
> --- a/configure
> +++ b/configure
> @@ -344,6 +344,8 @@ elif check_define __sun__ ; then
>    targetos='SunOS'
>  elif check_define __HAIKU__ ; then
>    targetos='Haiku'
> +elif check_define __MINGW32__ ; then
> +  targetos='MINGW32'
>  else
>    targetos=`uname -s`
>  fi
>
> Stefan, can you look at it?
>
> Paolo


I'm afraid that you are right: QEMU was never ported to Cygwin.

Earlier versions of QEMU could be built in a Cygwin environment using
the MinGW compiler which is included in Cygwin. It needed -mno-cygwin.

With current QEMU, only MinGW and MinGW-w64 are supported.
MinGW-w64 is needed for 64-bit builds of QEMU, but also recommended
for 32-bit builds because its include files are better.

It's possible to run cross builds with MinGW and MinGW-w64 on all
major Linux distributions (that's my standard configuration).

Of course it would also be possible to add Cygwin support.
There are two variants:

1. Cygwin environment using included MinGWcompiler.

I expect only few modifications needed for QEMU, but a lot of work
is needed to install the build environment with all libraries needed.
The final result should be identical to the one which we get with a
MinGW environment.

2. Cygwin environment using the Cygwin compiler with the Linux
/POSIXlook and feel.

Here I expect lots of code changes, mainly to activate POSIX code for
a Windows build. The resulting binary will be slower than the native
Windows application from MinGW / MinGW-w64 because of the emulation
layer.

Both variants would have to support 32 and 64 bit builds.
Neither variant 1 nor variant 2 can be used on a Linux host.

Would there be an advantage when Cygwin were supported?

I think that other things are currently more important for
QEMU on Windows, especially support for faster execution
with HAXM or some other hypervisor.

Maybe we should modify configure to refuse builds in a Cygwin environment
and tell the user where more information is available.

Regards
Stefan


[-- Attachment #2: Type: text/html, Size: 3968 bytes --]

  reply	other threads:[~2013-09-25 20:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-24 13:56 [Qemu-devel] qemu-1.6.0 under Cygwin64 ./configure failed Alexander Voropay
2013-09-24 14:41 ` Eric Blake
2013-09-24 15:02   ` Alexander Voropay
2013-09-24 15:40   ` Paolo Bonzini
2013-09-25 20:21     ` Stefan Weil [this message]
2013-09-25  8:55 ` Alexander Voropay

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=524345DF.6040402@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=alexander.voropay@gmail.com \
    --cc=eblake@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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.