configure: move QEMU_INCLUDES to meson
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>
This commit is contained in:
parent
97d6efd0a3
commit
1e6e616dc2
20
configure
vendored
20
configure
vendored
@ -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
|
||||
|
30
meson.build
30
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'
|
||||
|
Loading…
Reference in New Issue
Block a user