qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] configure: propagate --extra-cflags and --extra-ldflags to meson compile tests
@ 2021-11-08  8:43 Paolo Bonzini
  2021-11-08  8:43 ` [PATCH 1/4] configure: simplify calls to meson_quote Paolo Bonzini
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Paolo Bonzini @ 2021-11-08  8:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: thuth

Meson (intentionally) does not add QEMU_CFLAGS to cc.compiles/cc.links
tests, as they are supposed to be independent of the specific sets of
compilation flags used to build the programs.  However, the user can
still use CFLAGS or the toolchain file's LANG_args/LANG_link_args option
to specify -I or -L options that apply to cc.compiles/cc.links as well.

This is also the intended use of configure's --extra-cflags,
--extra-cxxflags and --extra-ldflags options.  For example, if
one has netmap's header in a nonstandard directory, up to commit
837b84b1c078bf3e909 it used to work fine to do:

.../configure --enable-netmap \
     --extra-cflags=-I/path/to/netmap/sys

but since the test was converted to meson, this does not work anymore.

The main change in the series is in patch 3, where these options are
passed to meson via the toolchain file, instead of via config-host.mak.
This solves the issue since the toolchain file's variables have the
same purpose as configure's --extra-*flags arguments.

Paolo


Paolo Bonzini (4):
  configure: simplify calls to meson_quote
  configure: preserve CFLAGS, CXXFLAGS and LDFLAGS in config.status
  configure: propagate --extra-cflags and --extra-ldflags to meson
    compile tests
  configure: ignore preexisting QEMU_*FLAGS envvars

 configure | 46 ++++++++++++++++++++++++++++------------------
 1 file changed, 28 insertions(+), 18 deletions(-)

-- 
2.33.1



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

end of thread, other threads:[~2021-11-08 11:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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é
2021-11-08 10:45     ` Paolo Bonzini

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