qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH 4/4] configure: ignore preexisting QEMU_*FLAGS envvars
Date: Mon, 8 Nov 2021 10:17:02 +0100	[thread overview]
Message-ID: <6bfad248-7a61-f8c5-0bb7-f2cede1646f4@redhat.com> (raw)
In-Reply-To: <20211108084323.541961-5-pbonzini@redhat.com>

On 08/11/2021 09.43, Paolo Bonzini wrote:
> User flags should be passed via CFLAGS/CXXFLAGS/LDFLAGS,
> or --extra-cflags/extra-cxxflags/--extra-ldflags on the
> command line.
> 
> QEMU_CFLAGS, QEMU_CXXFLAGS and QEMU_LDFLAGS are reserved
> for flags detected by configure, so do not add to them
> and clear them at the beginning of the script.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   configure | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/configure b/configure
> index 1ea26c67e5..2048a52b20 100755
> --- a/configure
> +++ b/configure
> @@ -158,7 +158,7 @@ update_cxxflags() {
>       # Set QEMU_CXXFLAGS from QEMU_CFLAGS by filtering out those
>       # options which some versions of GCC's C++ compiler complain about
>       # because they only make sense for C programs.
> -    QEMU_CXXFLAGS="$QEMU_CXXFLAGS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS"
> +    QEMU_CXXFLAGS="-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS"
>       CONFIGURE_CXXFLAGS=$(echo "$CONFIGURE_CFLAGS" | sed s/-std=gnu11/-std=gnu++11/)
>       for arg in $QEMU_CFLAGS; do
>           case $arg in
> @@ -465,11 +465,13 @@ sdl2_config="${SDL2_CONFIG-${cross_prefix}sdl2-config}"
>   # left shift of signed integers is well defined and has the expected
>   # 2s-complement style results. (Both clang and gcc agree that it
>   # provides these semantics.)
> -QEMU_CFLAGS="-fno-strict-aliasing -fno-common -fwrapv $QEMU_CFLAGS"
> +QEMU_CFLAGS="-fno-strict-aliasing -fno-common -fwrapv"
>   QEMU_CFLAGS="-Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS"
>   QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
>   QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
>   
> +QEMU_LDFLAGS=
> +
>   # Flags that are needed during configure but later taken care of by Meson
>   CONFIGURE_CFLAGS="-std=gnu11 -Wall"
>   CONFIGURE_LDFLAGS=
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>



  reply	other threads:[~2021-11-08  9:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-08  8:43 [PATCH 0/4] configure: propagate --extra-cflags and --extra-ldflags to meson compile tests Paolo Bonzini
2021-11-08  8:43 ` [PATCH 1/4] configure: simplify calls to meson_quote Paolo Bonzini
2021-11-08  9:02   ` Thomas Huth
2021-11-08  8:43 ` [PATCH 2/4] configure: preserve CFLAGS, CXXFLAGS and LDFLAGS in config.status Paolo Bonzini
2021-11-08  9:04   ` Thomas Huth
2021-11-08  8:43 ` [PATCH 3/4] configure: propagate --extra-cflags and --extra-ldflags to meson compile tests Paolo Bonzini
2021-11-08  9:11   ` Thomas Huth
2021-11-08 11:07     ` Paolo Bonzini
2021-11-08  8:43 ` [PATCH 4/4] configure: ignore preexisting QEMU_*FLAGS envvars Paolo Bonzini
2021-11-08  9:17   ` Thomas Huth [this message]
2021-11-08  9:17   ` Philippe Mathieu-Daudé
2021-11-08 10:45     ` 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=6bfad248-7a61-f8c5-0bb7-f2cede1646f4@redhat.com \
    --to=thuth@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 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).