From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [PATCH v2 0/4] configure: bugfixes and cleanups for CFLAGS
Date: Wed, 23 Sep 2020 05:26:13 -0400 [thread overview]
Message-ID: <20200923092617.1593722-1-pbonzini@redhat.com> (raw)
Meson is placing -pie after -shared rather than before, and this
causes linking to fail while building the ArchLinux package for
QEMU.
But why is -pie ending up in the flags? Because LDFLAGS is an
environment variable, and changes to environment variables propagate
when configure does
LDFLAGS="-pie $LDFLAGS"
This happens without having to export the env. var again.
The solution is to simply rename the CFLAGS and LDFLAGS variables
used for flags that Meson takes care of by itself. The CFLAGS
variable was previously used for submodules as well, so patches
1 and 2 fix that as well.
I'm keeping Richard's reviewed-by since the changes are pretty
obvious from v1.
v1->v2: include -fno-pie flags as well, since tests/tcg needs them
handle empty CFLAGS and LDFLAGS too
place flags in the built-in options section of the cross file
Paolo Bonzini (4):
configure: cleanup invocation of submodule Make
configure: cleanup CFLAGS and LDFLAGS for submodules
configure: do not clobber environment CFLAGS/CXXFLAGS/LDFLAGS
configure: consistently pass CFLAGS/CXXFLAGS/LDFLAGS to meson
Makefile | 23 +++++++++-------
configure | 75 ++++++++++++++++++++++++++++++++++-------------------
meson.build | 13 +++++++++-
3 files changed, 74 insertions(+), 37 deletions(-)
--
2.26.2
next reply other threads:[~2020-09-23 9:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-23 9:26 Paolo Bonzini [this message]
2020-09-23 9:26 ` [PATCH v2 1/4] configure: cleanup invocation of submodule Make Paolo Bonzini
2020-09-23 9:26 ` [PATCH v2 2/4] configure: cleanup CFLAGS and LDFLAGS for submodules Paolo Bonzini
2020-09-23 9:26 ` [PATCH v2 3/4] configure: do not clobber environment CFLAGS/CXXFLAGS/LDFLAGS Paolo Bonzini
2020-09-23 9:26 ` [PATCH v2 4/4] configure: consistently pass CFLAGS/CXXFLAGS/LDFLAGS to meson 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=20200923092617.1593722-1-pbonzini@redhat.com \
--to=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).