All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Joshua Watt <jpewhacker@gmail.com>, qemu-devel@nongnu.org
Cc: Stefan Weil <sw@weilnetz.de>,
	Yonggang Luo <luoyonggang@gmail.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] configure: Add flags for MinGW32 standalone build
Date: Fri, 8 Jan 2021 08:25:01 +0100	[thread overview]
Message-ID: <8ea87ea1-093d-81b0-13d6-60caa9fcdad4@redhat.com> (raw)
In-Reply-To: <20210107213856.34170-1-JPEWhacker@gmail.com>

On 07/01/2021 22.38, Joshua Watt wrote:
> There are two cases that need to be accounted for when compiling QEMU
> for MinGW32:
>   1) A standalone distribution, where QEMU is self contained and
>      extracted by the user, such as a user would download from the QEMU
>      website. In this case, all of the QEMU files should be rooted in
>      $prefix to ensure they can be easily packaged together for
>      distribution
>   2) QEMU integrated into a distribution image/sysroot/SDK and
>      distributed with other programs. In this case, the provided
>      arguments for bindir/datadir/etc. should be respected as they for a
>      Linux build.
> 
> Add a configure time flags --enable-standalone-mingw and
> --disable-standalone-mingw that allows the user to control this
> behavior. The flag defaults to "enabled" if unspecified to retain the
> existing build behavior
> 
> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> ---
>   configure | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 5860bdb77b..5c83edb502 100755
> --- a/configure
> +++ b/configure
> @@ -358,6 +358,7 @@ strip_opt="yes"
>   tcg_interpreter="no"
>   bigendian="no"
>   mingw32="no"
> +mingw32_standalone="yes"
>   gcov="no"
>   EXESUF="$default_feature"
>   HOST_DSOSUF=".so"
> @@ -1558,6 +1559,10 @@ for opt do
>     ;;
>     --disable-fuse-lseek) fuse_lseek="disabled"
>     ;;
> +  --enable-standalone-mingw) mingw32_standalone="yes"
> +  ;;
> +  --disable-standalone-mingw) mingw32_standalone="no"
> +  ;;
>     *)
>         echo "ERROR: unknown option $opt"
>         echo "Try '$0 --help' for more information"
> @@ -1570,7 +1575,7 @@ libdir="${libdir:-$prefix/lib}"
>   libexecdir="${libexecdir:-$prefix/libexec}"
>   includedir="${includedir:-$prefix/include}"
>   
> -if test "$mingw32" = "yes" ; then
> +if test "$mingw32" = "yes" && test "$mingw32_standalone" = "yes"; then
>       mandir="$prefix"
>       datadir="$prefix"
>       docdir="$prefix"
> @@ -1897,6 +1902,7 @@ disabled with --disable-FEATURE, default is enabled if available
>     libdaxctl       libdaxctl support
>     fuse            FUSE block device export
>     fuse-lseek      SEEK_HOLE/SEEK_DATA support for FUSE exports
> +  standalone-mingw  Build for standalone distribution on MinGW
>   
>   NOTE: The object files are built at the place where configure is launched
>   EOF

I think this should maybe be done independently from MinGW, so that it could 
be used on other systems, too. Thus maybe rather name the switch 
"--enable-standalone-distribution" or "--enable-standalone-installation" or 
something like this? On MinGW, the value of the switch could then default to 
"yes" while on other systems it would be "no" by default.

  Thomas



  reply	other threads:[~2021-01-08  7:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-07 21:38 [PATCH] configure: Add flags for MinGW32 standalone build Joshua Watt
2021-01-08  7:25 ` Thomas Huth [this message]
2021-01-08 18:30   ` Joshua Watt
2021-01-11  7:04     ` Thomas Huth
2021-01-11  7:29       ` Stefan Weil
2021-01-11  7:44         ` Paolo Bonzini
2021-01-11 16:01           ` Joshua Watt
2021-01-11 17:34             ` Paolo Bonzini
2021-01-12 21:02 ` [PATCH v2] configure: MinGW respect --bindir argument Joshua Watt
2021-01-13  5:33   ` Thomas Huth
2021-01-13 10:01   ` Paolo Bonzini

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=8ea87ea1-093d-81b0-13d6-60caa9fcdad4@redhat.com \
    --to=thuth@redhat.com \
    --cc=jpewhacker@gmail.com \
    --cc=luoyonggang@gmail.com \
    --cc=pbonzini@redhat.com \
    --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.