From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: thuth@redhat.com
Subject: Re: [PATCH 4/4] configure: ignore preexisting QEMU_*FLAGS envvars
Date: Mon, 8 Nov 2021 10:17:45 +0100 [thread overview]
Message-ID: <3d3762c0-425f-3a04-216f-4a0915cff29d@redhat.com> (raw)
In-Reply-To: <20211108084323.541961-5-pbonzini@redhat.com>
On 11/8/21 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
update_cxxflags() should keep previous QEMU_CXXFLAGS. But since
we call it only once, we don't use it to update. IMHO we should
inline this code where it is called, then overwriting QEMU_CXXFLAGS
makes sense.
next prev parent reply other threads:[~2021-11-08 9:20 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
2021-11-08 9:17 ` Philippe Mathieu-Daudé [this message]
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=3d3762c0-425f-3a04-216f-4a0915cff29d@redhat.com \
--to=philmd@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/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).