From: Paolo Bonzini <pbonzini@redhat.com> To: qemu-devel@nongnu.org Cc: "Daniel P . Berrangé" <berrange@redhat.com> Subject: [PULL 06/22] configure: move QEMU_INCLUDES to meson Date: Fri, 16 Oct 2020 07:47:58 -0400 Message-ID: <20201016114814.1564523-7-pbonzini@redhat.com> (raw) In-Reply-To: <20201016114814.1564523-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/... Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> 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 f839c2a557..8aa03876d4 100755 --- a/configure +++ b/configure @@ -537,8 +537,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" @@ -796,7 +794,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 @@ -6776,22 +6773,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 @@ -6818,7 +6799,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 1a4a482492..88f757eac9 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 index Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-16 11:47 [PULL 00/22] Build system + misc changes for 2020-10-16 Paolo Bonzini 2020-10-16 11:47 ` [PULL 01/22] submodules: bump meson to 0.55.3 Paolo Bonzini 2020-10-16 11:47 ` [PULL 02/22] Makefile: Ensure cscope.out/tags/TAGS are generated in the source tree Paolo Bonzini 2020-10-16 11:47 ` [PULL 03/22] tests/Makefile.include: unbreak non-tcg builds Paolo Bonzini 2020-10-16 11:47 ` [PULL 04/22] make: run shell with pipefail Paolo Bonzini 2020-10-16 11:47 ` [PULL 05/22] tests: add missing generated sources to testqapi Paolo Bonzini 2020-10-16 11:47 ` Paolo Bonzini [this message] 2020-10-16 11:47 ` [PULL 07/22] dockerfiles: enable Centos 8 PowerTools Paolo Bonzini 2020-10-16 11:48 ` [PULL 08/22] add ninja to dockerfiles, CI configurations and test VMs Paolo Bonzini 2020-10-16 11:48 ` [PULL 09/22] build: cleanups to Makefile Paolo Bonzini 2020-10-16 11:48 ` [PULL 10/22] build: replace ninjatool with ninja Paolo Bonzini 2020-10-16 11:48 ` [PULL 11/22] build: add --enable/--disable-libudev Paolo Bonzini 2020-10-16 11:48 ` [PULL 12/22] meson.build: don't condition iconv detection on library detection Paolo Bonzini 2020-10-16 11:48 ` [PULL 13/22] meson: cleanup curses/iconv test Paolo Bonzini 2020-10-16 11:48 ` [PULL 14/22] configure: fix handling of --docdir parameter Paolo Bonzini 2020-10-16 11:48 ` [PULL 15/22] meson: Only install icons and qemu.desktop if have_system Paolo Bonzini 2020-10-16 11:48 ` [PULL 16/22] docs: Fix Sphinx configuration for msys2/mingw Paolo Bonzini 2020-10-16 11:48 ` [PULL 17/22] meson: move SPHINX_ARGS references within "if build_docs" Paolo Bonzini 2020-10-16 11:48 ` [PULL 18/22] meson: Move the detection logic for sphinx to meson Paolo Bonzini 2020-10-16 13:27 ` 罗勇刚(Yonggang Luo) 2020-10-19 19:40 ` Eric Blake 2020-10-16 11:48 ` [PULL 19/22] cirrus: Enable doc build on msys2/mingw Paolo Bonzini 2020-10-16 11:48 ` [PULL 20/22] fuzz: Disable QEMU's SIG{INT,HUP,TERM} handlers Paolo Bonzini 2020-10-16 11:48 ` [PULL 21/22] hax: unbreak accelerator cpu code after cpus.c split Paolo Bonzini 2020-10-16 11:48 ` [PULL 22/22] ci: include configure and meson logs in all jobs if configure fails 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=20201016114814.1564523-7-pbonzini@redhat.com \ --to=pbonzini@redhat.com \ --cc=berrange@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
QEMU-Devel Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/qemu-devel/0 qemu-devel/git/0.git git clone --mirror https://lore.kernel.org/qemu-devel/1 qemu-devel/git/1.git git clone --mirror https://lore.kernel.org/qemu-devel/2 qemu-devel/git/2.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 qemu-devel qemu-devel/ https://lore.kernel.org/qemu-devel \ qemu-devel@nongnu.org public-inbox-index qemu-devel Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.nongnu.qemu-devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git