qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Convert remaining submodules to meson, cleanup env var handling
@ 2020-10-05 13:56 Paolo Bonzini
  2020-10-05 13:56 ` [PATCH 1/4] slirp: Convert Makefile bits to meson bits Paolo Bonzini
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Paolo Bonzini @ 2020-10-05 13:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: marcandre.lureau, richard.henderson

The main purpose of this series is to have a correct and consistent
handling of CFLAGS/CXXFLAGS/LDFLAGS environment variables:

- correct: avoid that the -pie flag, used for the compiler checks in
the configure script, ends up being passed to Meson if an LDFLAGS
environment variable exists (patch 3)

- consistent: ensure that CFLAGS that are set in the configure
script are persistent even if Meson is restarted; to do so,
make the configure script store them in the cross file it generates.

In order to avoid having to deal with recursive make, patches 1
and 2 integrate the Meson-based build system with the build of
embedded slirp and libfdt.  This follows the lead of Richard's
patches to do the same with Capstone.

Based-on: <20201003093851.324923-1-richard.henderson@linaro.org>
Supersedes: <20200923092617.1593722-1-pbonzini@redhat.com>

Paolo Bonzini (4):
  slirp: Convert Makefile bits to meson bits
  dtc: Convert Makefile bits to meson bits
  configure: do not clobber environment CFLAGS/CXXFLAGS/LDFLAGS
  configure: consistently pass CFLAGS/CXXFLAGS/LDFLAGS to meson

 Makefile                                      |  28 +--
 configure                                     | 222 +++++-------------
 default-configs/targets/aarch64-softmmu.mak   |   1 +
 default-configs/targets/arm-softmmu.mak       |   1 +
 .../targets/microblaze-softmmu.mak            |   1 +
 .../targets/microblazeel-softmmu.mak          |   1 +
 default-configs/targets/mips64el-softmmu.mak  |   1 +
 default-configs/targets/ppc-softmmu.mak       |   1 +
 default-configs/targets/ppc64-softmmu.mak     |   1 +
 default-configs/targets/riscv32-softmmu.mak   |   1 +
 default-configs/targets/riscv64-softmmu.mak   |   1 +
 default-configs/targets/rx-softmmu.mak        |   1 +
 meson.build                                   | 164 +++++++++++--
 meson_options.txt                             |   6 +
 net/meson.build                               |   2 +-
 tests/qtest/meson.build                       |   6 +-
 16 files changed, 225 insertions(+), 213 deletions(-)

-- 
2.26.2



^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH 0/4] configure: bugfixes and cleanups for CFLAGS
@ 2020-09-20  9:30 Paolo Bonzini
  2020-09-20  9:30 ` [PATCH 3/4] configure: do not clobber environment CFLAGS/CXXFLAGS/LDFLAGS Paolo Bonzini
  0 siblings, 1 reply; 10+ messages in thread
From: Paolo Bonzini @ 2020-09-20  9:30 UTC (permalink / raw)
  To: qemu-devel

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.

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   | 47 ++++++++++++++++++++++++++++++-----------------
 meson.build | 13 ++++++++++++-
 3 files changed, 56 insertions(+), 27 deletions(-)

-- 
2.26.2



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-10-05 17:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-05 13:56 [PATCH 0/4] Convert remaining submodules to meson, cleanup env var handling Paolo Bonzini
2020-10-05 13:56 ` [PATCH 1/4] slirp: Convert Makefile bits to meson bits Paolo Bonzini
2020-10-05 13:56 ` [PATCH 2/4] dtc: " Paolo Bonzini
2020-10-05 14:13   ` Philippe Mathieu-Daudé
2020-10-05 14:16     ` Paolo Bonzini
2020-10-05 13:56 ` [PATCH 3/4] configure: do not clobber environment CFLAGS/CXXFLAGS/LDFLAGS Paolo Bonzini
2020-10-05 13:56 ` [PATCH 4/4] configure: consistently pass CFLAGS/CXXFLAGS/LDFLAGS to meson Paolo Bonzini
2020-10-05 17:15 ` [PATCH 0/4] Convert remaining submodules to meson, cleanup env var handling Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
2020-09-20  9:30 [PATCH 0/4] configure: bugfixes and cleanups for CFLAGS Paolo Bonzini
2020-09-20  9:30 ` [PATCH 3/4] configure: do not clobber environment CFLAGS/CXXFLAGS/LDFLAGS Paolo Bonzini
2020-09-20 23:20   ` Richard Henderson

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).