From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: berrange@redhat.com, alex.bennee@linaro.org, peter.maydell@linaro.org
Subject: [PATCH 4/7] configure: move QEMU_INCLUDES to meson
Date: Wed, 14 Oct 2020 09:54:13 -0400 [thread overview]
Message-ID: <20201014135416.1290679-5-pbonzini@redhat.com> (raw)
In-Reply-To: <20201014135416.1290679-1-pbonzini@redhat.com>
Confusingly, QEMU_INCLUDES is not used by configure tests. Moving
it to meson.build ensures that Windows paths are specified instead of
the msys paths like /c/Users/...
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 20 --------------------
meson.build | 30 ++++++++++++++++++++++++++++--
2 files changed, 28 insertions(+), 22 deletions(-)
diff --git a/configure b/configure
index b553288c5e..804b7115ab 100755
--- a/configure
+++ b/configure
@@ -536,8 +536,6 @@ QEMU_CFLAGS="-fno-strict-aliasing -fno-common -fwrapv $QEMU_CFLAGS"
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_INCLUDES="-iquote . -iquote ${source_path} -iquote ${source_path}/accel/tcg -iquote ${source_path}/include"
-QEMU_INCLUDES="$QEMU_INCLUDES -iquote ${source_path}/disas/libvixl"
# Flags that are needed during configure but later taken care of by Meson
CONFIGURE_CFLAGS="-std=gnu99 -Wall"
@@ -795,7 +793,6 @@ Linux)
audio_possible_drivers="oss alsa sdl pa"
linux="yes"
linux_user="yes"
- QEMU_INCLUDES="-isystem ${source_path}/linux-headers -Ilinux-headers $QEMU_INCLUDES"
;;
esac
@@ -6918,22 +6915,6 @@ if test "$secret_keyring" = "yes" ; then
echo "CONFIG_SECRET_KEYRING=y" >> $config_host_mak
fi
-if test "$tcg_interpreter" = "yes"; then
- QEMU_INCLUDES="-iquote ${source_path}/tcg/tci $QEMU_INCLUDES"
-elif test "$ARCH" = "sparc64" ; then
- QEMU_INCLUDES="-iquote ${source_path}/tcg/sparc $QEMU_INCLUDES"
-elif test "$ARCH" = "s390x" ; then
- QEMU_INCLUDES="-iquote ${source_path}/tcg/s390 $QEMU_INCLUDES"
-elif test "$ARCH" = "x86_64" || test "$ARCH" = "x32" ; then
- QEMU_INCLUDES="-iquote ${source_path}/tcg/i386 $QEMU_INCLUDES"
-elif test "$ARCH" = "ppc64" ; then
- QEMU_INCLUDES="-iquote ${source_path}/tcg/ppc $QEMU_INCLUDES"
-elif test "$ARCH" = "riscv32" || test "$ARCH" = "riscv64" ; then
- QEMU_INCLUDES="-I${source_path}/tcg/riscv $QEMU_INCLUDES"
-else
- QEMU_INCLUDES="-iquote ${source_path}/tcg/${ARCH} $QEMU_INCLUDES"
-fi
-
echo "ROMS=$roms" >> $config_host_mak
echo "MAKE=$make" >> $config_host_mak
echo "PYTHON=$python" >> $config_host_mak
@@ -6960,7 +6941,6 @@ echo "WINDRES=$windres" >> $config_host_mak
echo "CFLAGS_NOPIE=$CFLAGS_NOPIE" >> $config_host_mak
echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
echo "QEMU_CXXFLAGS=$QEMU_CXXFLAGS" >> $config_host_mak
-echo "QEMU_INCLUDES=$QEMU_INCLUDES" >> $config_host_mak
echo "GLIB_CFLAGS=$glib_cflags" >> $config_host_mak
echo "GLIB_LIBS=$glib_libs" >> $config_host_mak
echo "QEMU_LDFLAGS=$QEMU_LDFLAGS" >> $config_host_mak
diff --git a/meson.build b/meson.build
index 652c37cceb..a1146522e2 100644
--- a/meson.build
+++ b/meson.build
@@ -93,9 +93,35 @@ add_project_arguments(config_host['QEMU_CXXFLAGS'].split(),
native: false, language: 'cpp')
add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(),
native: false, language: ['c', 'cpp', 'objc'])
-add_project_arguments(config_host['QEMU_INCLUDES'].split(),
- language: ['c', 'cpp', 'objc'])
+if targetos == 'linux'
+ add_project_arguments('-isystem', meson.current_source_dir() / 'linux-headers',
+ '-isystem', 'linux-headers',
+ language: ['c', 'cpp'])
+endif
+
+if 'CONFIG_TCG_INTERPRETER' in config_host
+ tcg_arch = 'tci'
+elif config_host['ARCH'] == 'sparc64'
+ tcg_arch = 'sparc'
+elif config_host['ARCH'] == 's390x'
+ tcg_arch = 's390'
+elif config_host['ARCH'] in ['x86_64', 'x32']
+ tcg_arch = 'i386'
+elif config_host['ARCH'] == 'ppc64'
+ tcg_arch = 'ppc'
+elif config_host['ARCH'] in ['riscv32', 'riscv64']
+ tcg_arch = 'riscv'
+else
+ tcg_arch = config_host['ARCH']
+endif
+add_project_arguments('-iquote', meson.current_source_dir() / 'tcg' / tcg_arch,
+ '-iquote', '.',
+ '-iquote', meson.current_source_dir(),
+ '-iquote', meson.current_source_dir() / 'accel/tcg',
+ '-iquote', meson.current_source_dir() / 'include',
+ '-iquote', meson.current_source_dir() / 'disas/libvixl',
+ language: ['c', 'cpp', 'objc'])
link_language = meson.get_external_property('link_language', 'cpp')
if link_language == 'cpp'
--
2.26.2
next prev parent reply other threads:[~2020-10-14 14:00 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-14 13:54 [PATCH 0/7] build: replace ninjatool with ninja Paolo Bonzini
2020-10-14 13:54 ` [PATCH 1/7] tests/Makefile.include: unbreak non-tcg builds Paolo Bonzini
2020-10-14 16:26 ` Daniel P. Berrangé
2020-10-14 13:54 ` [PATCH 2/7] make: run shell with pipefail Paolo Bonzini
2020-10-14 16:27 ` Daniel P. Berrangé
2020-10-14 13:54 ` [PATCH 3/7] tests: add missing generated sources to testqapi Paolo Bonzini
2020-10-14 16:27 ` Daniel P. Berrangé
2020-10-14 13:54 ` Paolo Bonzini [this message]
2020-10-14 16:28 ` [PATCH 4/7] configure: move QEMU_INCLUDES to meson Daniel P. Berrangé
2020-10-14 13:54 ` [PATCH 5/7] dockerfiles: enable Centos 8 PowerTools Paolo Bonzini
2020-10-14 16:33 ` Daniel P. Berrangé
2020-10-14 20:49 ` Cleber Rosa
2020-10-15 6:36 ` Paolo Bonzini
2020-10-14 13:54 ` [PATCH 6/7] add ninja to dockerfiles, CI configurations and test VMs Paolo Bonzini
2020-10-14 16:36 ` Daniel P. Berrangé
2020-10-15 6:50 ` Alex Bennée
2020-10-14 13:54 ` [PATCH 7/7] build: replace ninjatool with ninja Paolo Bonzini
2020-10-14 16:38 ` Daniel P. Berrangé
2020-10-14 13:57 ` [PATCH 0/7] " Peter Maydell
2020-10-15 6:15 ` Howard Spoelstra
2020-10-15 6:34 ` Paolo Bonzini
2020-10-15 7:39 ` Howard Spoelstra
2020-10-15 9:44 ` Paolo Bonzini
2020-10-15 17:39 ` Volker Rümelin
2020-10-15 18:49 ` Mark Cave-Ayland
2020-10-15 21:41 ` Paolo Bonzini
2020-10-16 9:35 ` Mark Cave-Ayland
2020-10-15 23:07 ` Howard Spoelstra
2020-10-15 18:21 ` 罗勇刚(Yonggang Luo)
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=20201014135416.1290679-5-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=peter.maydell@linaro.org \
--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).