meson.add_postconf_script(find_program('scripts/symlink-install-tree.py'))
+####################
+# Global variables #
+####################
+
not_found = dependency('', required: false)
keyval = import('keyval')
ss = import('sourceset')
fs = import('fs')
targetos = host_machine.system()
-sh = find_program('sh')
config_host = keyval.load(meson.current_build_dir() / 'config-host.mak')
-cc = meson.get_compiler('c')
-all_languages = ['c']
-if targetos == 'windows' and add_languages('cpp', required: false, native: false)
- all_languages += ['cpp']
- cxx = meson.get_compiler('cpp')
-endif
-if targetos == 'darwin' and \
- add_languages('objc', required: get_option('cocoa'), native: false)
- all_languages += ['objc']
- objc = meson.get_compiler('objc')
-endif
-
# Temporary directory used for files created while
# configure runs. Since it is in the build directory
# we can safely blow away any previous version of it
qemu_desktopdir = get_option('datadir') / 'applications'
qemu_icondir = get_option('datadir') / 'icons'
-config_host_data = configuration_data()
genh = []
qapi_trace_events = []
cpu = host_machine.cpu_family()
target_dirs = config_host['TARGET_DIRS'].split()
+
+############
+# Programs #
+############
+
+sh = find_program('sh')
+python = import('python').find_installation()
+
+cc = meson.get_compiler('c')
+all_languages = ['c']
+if targetos == 'windows' and add_languages('cpp', required: false, native: false)
+ all_languages += ['cpp']
+ cxx = meson.get_compiler('cpp')
+endif
+if targetos == 'darwin' and \
+ add_languages('objc', required: get_option('cocoa'), native: false)
+ all_languages += ['objc']
+ objc = meson.get_compiler('objc')
+endif
+
+dtrace = not_found
+stap = not_found
+if 'dtrace' in get_option('trace_backends')
+ dtrace = find_program('dtrace', required: true)
+ stap = find_program('stap', required: false)
+ if stap.found()
+ # Workaround to avoid dtrace(1) producing a file with 'hidden' symbol
+ # visibility. Define STAP_SDT_V2 to produce 'default' symbol visibility
+ # instead. QEMU --enable-modules depends on this because the SystemTap
+ # semaphores are linked into the main binary and not the module's shared
+ # object.
+ add_global_arguments('-DSTAP_SDT_V2',
+ native: false, language: all_languages)
+ endif
+endif
+
+if get_option('iasl') == ''
+ iasl = find_program('iasl', required: false)
+else
+ iasl = find_program(get_option('iasl'), required: true)
+endif
+
+edk2_targets = [ 'arm-softmmu', 'aarch64-softmmu', 'i386-softmmu', 'x86_64-softmmu' ]
+unpack_edk2_blobs = false
+foreach target : edk2_targets
+ if target in target_dirs
+ bzip2 = find_program('bzip2', required: get_option('install_blobs'))
+ unpack_edk2_blobs = bzip2.found()
+ break
+ endif
+endforeach
+
+#####################
+# Option validation #
+#####################
+
+# Fuzzing
+if get_option('fuzzing') and get_option('fuzzing_engine') == '' and \
+ not cc.links('''
+ #include <stdint.h>
+ #include <sys/types.h>
+ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size);
+ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { return 0; }
+ ''',
+ args: ['-Werror', '-fsanitize=fuzzer'])
+ error('Your compiler does not support -fsanitize=fuzzer')
+endif
+
+# Tracing backends
+if 'ftrace' in get_option('trace_backends') and targetos != 'linux'
+ error('ftrace is supported only on Linux')
+endif
+if 'syslog' in get_option('trace_backends') and not cc.compiles('''
+ #include <syslog.h>
+ int main(void) {
+ openlog("qemu", LOG_PID, LOG_DAEMON);
+ syslog(LOG_INFO, "configure");
+ return 0;
+ }''')
+ error('syslog is not supported on this system')
+endif
+
+# Miscellaneous Linux-only features
+get_option('mpath') \
+ .require(targetos == 'linux', error_message: 'Multipath is supported only on Linux')
+
+multiprocess_allowed = get_option('multiprocess') \
+ .require(targetos == 'linux', error_message: 'Multiprocess QEMU is supported only on Linux') \
+ .allowed()
+
+vfio_user_server_allowed = get_option('vfio_user_server') \
+ .require(targetos == 'linux', error_message: 'vfio-user server is supported only on Linux') \
+ .allowed()
+
+have_tpm = get_option('tpm') \
+ .require(targetos != 'windows', error_message: 'TPM emulation only available on POSIX systems') \
+ .allowed()
+
+# vhost
+have_vhost_user = get_option('vhost_user') \
+ .disable_auto_if(targetos != 'linux') \
+ .require(targetos != 'windows',
+ error_message: 'vhost-user is not available on Windows').allowed()
+have_vhost_vdpa = get_option('vhost_vdpa') \
+ .require(targetos == 'linux',
+ error_message: 'vhost-vdpa is only available on Linux').allowed()
+have_vhost_kernel = get_option('vhost_kernel') \
+ .require(targetos == 'linux',
+ error_message: 'vhost-kernel is only available on Linux').allowed()
+have_vhost_user_crypto = get_option('vhost_crypto') \
+ .require(have_vhost_user,
+ error_message: 'vhost-crypto requires vhost-user to be enabled').allowed()
+
+have_vhost = have_vhost_user or have_vhost_vdpa or have_vhost_kernel
+
+have_vhost_net_user = have_vhost_user and get_option('vhost_net').allowed()
+have_vhost_net_vdpa = have_vhost_vdpa and get_option('vhost_net').allowed()
+have_vhost_net_kernel = have_vhost_kernel and get_option('vhost_net').allowed()
+have_vhost_net = have_vhost_net_kernel or have_vhost_net_user or have_vhost_net_vdpa
+
+# type of binaries to build
have_linux_user = false
have_bsd_user = false
have_system = false
have_system = have_system or target.endswith('-softmmu')
endforeach
have_user = have_linux_user or have_bsd_user
+
have_tools = get_option('tools') \
.disable_auto_if(not have_system) \
.allowed()
.require(targetos in ['sunos', 'linux', 'windows', 'freebsd', 'netbsd', 'openbsd'],
error_message: 'unsupported OS for QEMU guest agent') \
.allowed()
+have_block = have_system or have_tools
+
enable_modules = get_option('modules') \
.require(targetos != 'windows',
error_message: 'Modules are not available for Windows') \
.require(not get_option('prefer_static'),
error_message: 'Modules are incompatible with static linking') \
.allowed()
-have_block = have_system or have_tools
-python = import('python').find_installation()
+#######################################
+# Variables for host and accelerators #
+#######################################
if cpu not in supported_cpus
host_arch = 'unknown'
else
kvm_targets = []
endif
+accelerator_targets = { 'CONFIG_KVM': kvm_targets }
-kvm_targets_c = '""'
-if get_option('kvm').allowed() and targetos == 'linux'
- kvm_targets_c = '"' + '" ,"'.join(kvm_targets) + '"'
+if cpu in ['x86', 'x86_64']
+ xen_targets = ['i386-softmmu', 'x86_64-softmmu']
+elif cpu in ['arm', 'aarch64']
+ # i386 emulator provides xenpv machine type for multiple architectures
+ xen_targets = ['i386-softmmu', 'x86_64-softmmu', 'aarch64-softmmu']
+else
+ xen_targets = []
endif
-config_host_data.set('CONFIG_KVM_TARGETS', kvm_targets_c)
-
-accelerator_targets = { 'CONFIG_KVM': kvm_targets }
+accelerator_targets += { 'CONFIG_XEN': xen_targets }
if cpu in ['aarch64']
accelerator_targets += {
}
endif
-if cpu in ['x86', 'x86_64', 'arm', 'aarch64']
- # i386 emulator provides xenpv machine type for multiple architectures
- accelerator_targets += {
- 'CONFIG_XEN': ['i386-softmmu', 'x86_64-softmmu', 'aarch64-softmmu'],
- }
-endif
if cpu in ['x86', 'x86_64']
accelerator_targets += {
'CONFIG_HVF': ['x86_64-softmmu'],
modular_tcg = ['i386-softmmu', 'x86_64-softmmu']
endif
-edk2_targets = [ 'arm-softmmu', 'aarch64-softmmu', 'i386-softmmu', 'x86_64-softmmu' ]
-unpack_edk2_blobs = false
-foreach target : edk2_targets
- if target in target_dirs
- bzip2 = find_program('bzip2', required: get_option('install_blobs'))
- unpack_edk2_blobs = bzip2.found()
- break
- endif
-endforeach
-
-dtrace = not_found
-stap = not_found
-if 'dtrace' in get_option('trace_backends')
- dtrace = find_program('dtrace', required: true)
- stap = find_program('stap', required: false)
- if stap.found()
- # Workaround to avoid dtrace(1) producing a file with 'hidden' symbol
- # visibility. Define STAP_SDT_V2 to produce 'default' symbol visibility
- # instead. QEMU --enable-modules depends on this because the SystemTap
- # semaphores are linked into the main binary and not the module's shared
- # object.
- add_global_arguments('-DSTAP_SDT_V2',
- native: false, language: all_languages)
- endif
-endif
-
-if get_option('iasl') == ''
- iasl = find_program('iasl', required: false)
-else
- iasl = find_program(get_option('iasl'), required: true)
-endif
-
##################
# Compiler flags #
##################
qemu_common_flags = ['-march=i486'] + qemu_common_flags
endif
-if get_option('gprof')
- qemu_common_flags += ['-p']
- qemu_ldflags += ['-p']
-endif
-
if get_option('prefer_static')
qemu_ldflags += get_option('b_pie') ? '-static-pie' : '-static'
endif
endif
endif
+if get_option('cfi')
+ cfi_flags=[]
+ # Check for dependency on LTO
+ if not get_option('b_lto')
+ error('Selected Control-Flow Integrity but LTO is disabled')
+ endif
+ if enable_modules
+ error('Selected Control-Flow Integrity is not compatible with modules')
+ endif
+ # Check for cfi flags. CFI requires LTO so we can't use
+ # get_supported_arguments, but need a more complex "compiles" which allows
+ # custom arguments
+ if cc.compiles('int main () { return 0; }', name: '-fsanitize=cfi-icall',
+ args: ['-flto', '-fsanitize=cfi-icall'] )
+ cfi_flags += '-fsanitize=cfi-icall'
+ else
+ error('-fsanitize=cfi-icall is not supported by the compiler')
+ endif
+ if cc.compiles('int main () { return 0; }',
+ name: '-fsanitize-cfi-icall-generalize-pointers',
+ args: ['-flto', '-fsanitize=cfi-icall',
+ '-fsanitize-cfi-icall-generalize-pointers'] )
+ cfi_flags += '-fsanitize-cfi-icall-generalize-pointers'
+ else
+ error('-fsanitize-cfi-icall-generalize-pointers is not supported by the compiler')
+ endif
+ if get_option('cfi_debug')
+ if cc.compiles('int main () { return 0; }',
+ name: '-fno-sanitize-trap=cfi-icall',
+ args: ['-flto', '-fsanitize=cfi-icall',
+ '-fno-sanitize-trap=cfi-icall'] )
+ cfi_flags += '-fno-sanitize-trap=cfi-icall'
+ else
+ error('-fno-sanitize-trap=cfi-icall is not supported by the compiler')
+ endif
+ endif
+ add_global_arguments(cfi_flags, native: false, language: all_languages)
+ add_global_link_arguments(cfi_flags, native: false, language: all_languages)
+endif
+
add_global_arguments(qemu_common_flags, native: false, language: all_languages)
add_global_link_arguments(qemu_ldflags, native: false, language: all_languages)
'-Wno-tautological-type-limit-compare',
'-Wno-psabi',
'-Wno-gnu-variable-sized-type-not-at-end',
+ '-Wshadow=local',
]
if targetos != 'darwin'
'-Wno-non-pointer-null'])
endif
-###########################################
-# Target-specific checks and dependencies #
-###########################################
-
-# Fuzzing
-if get_option('fuzzing') and get_option('fuzzing_engine') == '' and \
- not cc.links('''
- #include <stdint.h>
- #include <sys/types.h>
- int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size);
- int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { return 0; }
- ''',
- args: ['-Werror', '-fsanitize=fuzzer'])
- error('Your compiler does not support -fsanitize=fuzzer')
-endif
-
-# Tracing backends
-if 'ftrace' in get_option('trace_backends') and targetos != 'linux'
- error('ftrace is supported only on Linux')
-endif
-if 'syslog' in get_option('trace_backends') and not cc.compiles('''
- #include <syslog.h>
- int main(void) {
- openlog("qemu", LOG_PID, LOG_DAEMON);
- syslog(LOG_INFO, "configure");
- return 0;
- }''')
- error('syslog is not supported on this system')
-endif
-
-# Miscellaneous Linux-only features
-get_option('mpath') \
- .require(targetos == 'linux', error_message: 'Multipath is supported only on Linux')
+#####################################
+# Host-specific libraries and flags #
+#####################################
-multiprocess_allowed = get_option('multiprocess') \
- .require(targetos == 'linux', error_message: 'Multiprocess QEMU is supported only on Linux') \
- .allowed()
-
-vfio_user_server_allowed = get_option('vfio_user_server') \
- .require(targetos == 'linux', error_message: 'vfio-user server is supported only on Linux') \
- .allowed()
-
-have_tpm = get_option('tpm') \
- .require(targetos != 'windows', error_message: 'TPM emulation only available on POSIX systems') \
- .allowed()
-
-# vhost
-have_vhost_user = get_option('vhost_user') \
- .disable_auto_if(targetos != 'linux') \
- .require(targetos != 'windows',
- error_message: 'vhost-user is not available on Windows').allowed()
-have_vhost_vdpa = get_option('vhost_vdpa') \
- .require(targetos == 'linux',
- error_message: 'vhost-vdpa is only available on Linux').allowed()
-have_vhost_kernel = get_option('vhost_kernel') \
- .require(targetos == 'linux',
- error_message: 'vhost-kernel is only available on Linux').allowed()
-have_vhost_user_crypto = get_option('vhost_crypto') \
- .require(have_vhost_user,
- error_message: 'vhost-crypto requires vhost-user to be enabled').allowed()
-
-have_vhost = have_vhost_user or have_vhost_vdpa or have_vhost_kernel
-
-have_vhost_net_user = have_vhost_user and get_option('vhost_net').allowed()
-have_vhost_net_vdpa = have_vhost_vdpa and get_option('vhost_net').allowed()
-have_vhost_net_kernel = have_vhost_kernel and get_option('vhost_net').allowed()
-have_vhost_net = have_vhost_net_kernel or have_vhost_net_user or have_vhost_net_vdpa
-
-# Target-specific libraries and flags
libm = cc.find_library('m', required: false)
threads = dependency('threads')
util = cc.find_library('util', required: false)
coref = []
iokit = []
emulator_link_args = []
-nvmm =not_found
-hvf = not_found
midl = not_found
widl = not_found
pathcch = not_found
endif
endif
-# Target-specific configuration of accelerators
+###############################################
+# Host-specific configuration of accelerators #
+###############################################
+
accelerators = []
if get_option('kvm').allowed() and targetos == 'linux'
accelerators += 'CONFIG_KVM'
accelerators += 'CONFIG_WHPX'
endif
endif
+
+hvf = not_found
if get_option('hvf').allowed()
hvf = dependency('appleframeworks', modules: 'Hypervisor',
required: get_option('hvf'))
accelerators += 'CONFIG_HVF'
endif
endif
+
+nvmm = not_found
if targetos == 'netbsd'
nvmm = cc.find_library('nvmm', required: get_option('nvmm'))
if nvmm.found()
error('WHPX not available on this platform')
endif
+xen = not_found
+if get_option('xen').enabled() or (get_option('xen').auto() and have_system)
+ xencontrol = dependency('xencontrol', required: false,
+ method: 'pkg-config')
+ if xencontrol.found()
+ xen_pc = declare_dependency(version: xencontrol.version(),
+ dependencies: [
+ xencontrol,
+ # disabler: true makes xen_pc.found() return false if any is not found
+ dependency('xenstore', required: false,
+ method: 'pkg-config',
+ disabler: true),
+ dependency('xenforeignmemory', required: false,
+ method: 'pkg-config',
+ disabler: true),
+ dependency('xengnttab', required: false,
+ method: 'pkg-config',
+ disabler: true),
+ dependency('xenevtchn', required: false,
+ method: 'pkg-config',
+ disabler: true),
+ dependency('xendevicemodel', required: false,
+ method: 'pkg-config',
+ disabler: true),
+ # optional, no "disabler: true"
+ dependency('xentoolcore', required: false,
+ method: 'pkg-config')])
+ if xen_pc.found()
+ xen = xen_pc
+ endif
+ endif
+ if not xen.found()
+ xen_tests = [ '4.11.0', '4.10.0', '4.9.0', '4.8.0', '4.7.1' ]
+ xen_libs = {
+ '4.11.0': [ 'xenstore', 'xenctrl', 'xendevicemodel', 'xenforeignmemory', 'xengnttab', 'xenevtchn', 'xentoolcore' ],
+ '4.10.0': [ 'xenstore', 'xenctrl', 'xendevicemodel', 'xenforeignmemory', 'xengnttab', 'xenevtchn', 'xentoolcore' ],
+ '4.9.0': [ 'xenstore', 'xenctrl', 'xendevicemodel', 'xenforeignmemory', 'xengnttab', 'xenevtchn' ],
+ '4.8.0': [ 'xenstore', 'xenctrl', 'xenforeignmemory', 'xengnttab', 'xenevtchn' ],
+ '4.7.1': [ 'xenstore', 'xenctrl', 'xenforeignmemory', 'xengnttab', 'xenevtchn' ],
+ }
+ xen_deps = {}
+ foreach ver: xen_tests
+ # cache the various library tests to avoid polluting the logs
+ xen_test_deps = []
+ foreach l: xen_libs[ver]
+ if l not in xen_deps
+ xen_deps += { l: cc.find_library(l, required: false) }
+ endif
+ xen_test_deps += xen_deps[l]
+ endforeach
+
+ # Use -D to pick just one of the test programs in scripts/xen-detect.c
+ xen_version = ver.split('.')
+ xen_ctrl_version = xen_version[0] + \
+ ('0' + xen_version[1]).substring(-2) + \
+ ('0' + xen_version[2]).substring(-2)
+ if cc.links(files('scripts/xen-detect.c'),
+ args: '-DCONFIG_XEN_CTRL_INTERFACE_VERSION=' + xen_ctrl_version,
+ dependencies: xen_test_deps)
+ xen = declare_dependency(version: ver, dependencies: xen_test_deps)
+ break
+ endif
+ endforeach
+ endif
+ if xen.found()
+ accelerators += 'CONFIG_XEN'
+ elif get_option('xen').enabled()
+ error('could not compile and link Xen test program')
+ endif
+endif
+have_xen_pci_passthrough = get_option('xen_pci_passthrough') \
+ .require(xen.found(),
+ error_message: 'Xen PCI passthrough requested but Xen not enabled') \
+ .require(targetos == 'linux',
+ error_message: 'Xen PCI passthrough not available on this platform') \
+ .require(cpu == 'x86' or cpu == 'x86_64',
+ error_message: 'Xen PCI passthrough not available on this platform') \
+ .allowed()
+
################
# Dependencies #
################
method: 'pkg-config')
endif
pixman = not_found
-if have_system or have_tools
- pixman = dependency('pixman-1', required: have_system, version:'>=0.21.8',
+if not get_option('pixman').auto() or have_system or have_tools
+ pixman = dependency('pixman-1', required: get_option('pixman'), version:'>=0.21.8',
method: 'pkg-config')
endif
+
zlib = dependency('zlib', required: true)
libaio = not_found
method: 'pkg-config')
endif
spice = not_found
-if not get_option('spice').auto() or have_system
+if get_option('spice') \
+ .disable_auto_if(not have_system) \
+ .require(pixman.found(),
+ error_message: 'cannot enable SPICE if pixman is not available') \
+ .allowed()
spice = dependency('spice-server', version: '>=0.14.0',
required: get_option('spice'),
method: 'pkg-config')
virgl = dependency('virglrenderer',
method: 'pkg-config',
required: get_option('virglrenderer'))
- if virgl.found()
- config_host_data.set('HAVE_VIRGL_D3D_INFO_EXT',
- cc.has_member('struct virgl_renderer_resource_info_ext', 'd3d_tex2d',
- prefix: '#include <virglrenderer.h>',
- dependencies: virgl))
- endif
+endif
+rutabaga = not_found
+if not get_option('rutabaga_gfx').auto() or have_system or have_vhost_user_gpu
+ rutabaga = dependency('rutabaga_gfx_ffi',
+ method: 'pkg-config',
+ required: get_option('rutabaga_gfx'))
endif
blkio = not_found
if not get_option('blkio').auto() or have_block
endif
endif
+hv_balloon = false
+if get_option('hv_balloon').allowed() and have_system
+ if cc.links('''
+ #include <string.h>
+ #include <gmodule.h>
+ int main(void) {
+ GTree *tree;
+
+ tree = g_tree_new((GCompareFunc)strcmp);
+ (void)g_tree_node_first(tree);
+ g_tree_destroy(tree);
+ return 0;
+ }
+ ''', dependencies: glib)
+ hv_balloon = true
+ else
+ if get_option('hv_balloon').enabled()
+ error('could not enable hv-balloon, update your glib')
+ else
+ warning('could not find glib support for hv-balloon, disabling')
+ endif
+ endif
+endif
+
libssh = not_found
if not get_option('libssh').auto() or have_block
libssh = dependency('libssh', version: '>=0.8.7',
endif
endif
+capstone = not_found
+if not get_option('capstone').auto() or have_system or have_user
+ capstone = dependency('capstone', version: '>=3.0.5',
+ method: 'pkg-config',
+ required: get_option('capstone'))
+
+ # Some versions of capstone have broken pkg-config file
+ # that reports a wrong -I path, causing the #include to
+ # fail later. If the system has such a broken version
+ # do not use it.
+ if capstone.found() and not cc.compiles('#include <capstone.h>',
+ dependencies: [capstone])
+ capstone = not_found
+ if get_option('capstone').enabled()
+ error('capstone requested, but it does not appear to work')
+ endif
+ endif
+endif
+
gmp = dependency('gmp', required: false, method: 'pkg-config')
if nettle.found() and gmp.found()
hogweed = dependency('hogweed', version: '>=3.4',
vte = not_found
have_gtk_clipboard = get_option('gtk_clipboard').enabled()
-if not get_option('gtk').auto() or have_system
+if get_option('gtk') \
+ .disable_auto_if(not have_system) \
+ .require(pixman.found(),
+ error_message: 'cannot enable GTK if pixman is not available') \
+ .allowed()
gtk = dependency('gtk+-3.0', version: '>=3.22.0',
method: 'pkg-config',
required: get_option('gtk'))
vnc = not_found
jpeg = not_found
sasl = not_found
-if get_option('vnc').allowed() and have_system
+if get_option('vnc') \
+ .disable_auto_if(not have_system) \
+ .require(pixman.found(),
+ error_message: 'cannot enable VNC if pixman is not available') \
+ .allowed()
vnc = declare_dependency() # dummy dependency
jpeg = dependency('libjpeg', required: get_option('vnc_jpeg'),
method: 'pkg-config')
snappy = not_found
if get_option('snappy').enabled()
error('could not link libsnappy')
- else
- warning('could not link libsnappy, disabling')
- endif
-endif
-
-lzo = not_found
-if not get_option('lzo').auto() or have_system
- lzo = cc.find_library('lzo2', has_headers: ['lzo/lzo1x.h'],
- required: get_option('lzo'))
-endif
-if lzo.found() and not cc.links('''
- #include <lzo/lzo1x.h>
- int main(void) { lzo_version(); return 0; }''', dependencies: lzo)
- lzo = not_found
- if get_option('lzo').enabled()
- error('could not link liblzo2')
- else
- warning('could not link liblzo2, disabling')
- endif
-endif
-
-numa = not_found
-if not get_option('numa').auto() or have_system or have_tools
- numa = cc.find_library('numa', has_headers: ['numa.h'],
- required: get_option('numa'))
-endif
-if numa.found() and not cc.links('''
- #include <numa.h>
- int main(void) { return numa_available(); }
- ''', dependencies: numa)
- numa = not_found
- if get_option('numa').enabled()
- error('could not link numa')
- else
- warning('could not link numa, disabling')
- endif
-endif
-
-rdma = not_found
-if not get_option('rdma').auto() or have_system
- libumad = cc.find_library('ibumad', required: get_option('rdma'))
- rdma_libs = [cc.find_library('rdmacm', has_headers: ['rdma/rdma_cma.h'],
- required: get_option('rdma')),
- cc.find_library('ibverbs', required: get_option('rdma')),
- libumad]
- rdma = declare_dependency(dependencies: rdma_libs)
- foreach lib: rdma_libs
- if not lib.found()
- rdma = not_found
- endif
- endforeach
-endif
-
-xen = not_found
-if get_option('xen').enabled() or (get_option('xen').auto() and have_system)
- xencontrol = dependency('xencontrol', required: false,
- method: 'pkg-config')
- if xencontrol.found()
- xen_pc = declare_dependency(version: xencontrol.version(),
- dependencies: [
- xencontrol,
- # disabler: true makes xen_pc.found() return false if any is not found
- dependency('xenstore', required: false,
- method: 'pkg-config',
- disabler: true),
- dependency('xenforeignmemory', required: false,
- method: 'pkg-config',
- disabler: true),
- dependency('xengnttab', required: false,
- method: 'pkg-config',
- disabler: true),
- dependency('xenevtchn', required: false,
- method: 'pkg-config',
- disabler: true),
- dependency('xendevicemodel', required: false,
- method: 'pkg-config',
- disabler: true),
- # optional, no "disabler: true"
- dependency('xentoolcore', required: false,
- method: 'pkg-config')])
- if xen_pc.found()
- xen = xen_pc
- endif
- endif
- if not xen.found()
- xen_tests = [ '4.11.0', '4.10.0', '4.9.0', '4.8.0', '4.7.1' ]
- xen_libs = {
- '4.11.0': [ 'xenstore', 'xenctrl', 'xendevicemodel', 'xenforeignmemory', 'xengnttab', 'xenevtchn', 'xentoolcore' ],
- '4.10.0': [ 'xenstore', 'xenctrl', 'xendevicemodel', 'xenforeignmemory', 'xengnttab', 'xenevtchn', 'xentoolcore' ],
- '4.9.0': [ 'xenstore', 'xenctrl', 'xendevicemodel', 'xenforeignmemory', 'xengnttab', 'xenevtchn' ],
- '4.8.0': [ 'xenstore', 'xenctrl', 'xenforeignmemory', 'xengnttab', 'xenevtchn' ],
- '4.7.1': [ 'xenstore', 'xenctrl', 'xenforeignmemory', 'xengnttab', 'xenevtchn' ],
- }
- xen_deps = {}
- foreach ver: xen_tests
- # cache the various library tests to avoid polluting the logs
- xen_test_deps = []
- foreach l: xen_libs[ver]
- if l not in xen_deps
- xen_deps += { l: cc.find_library(l, required: false) }
- endif
- xen_test_deps += xen_deps[l]
- endforeach
+ else
+ warning('could not link libsnappy, disabling')
+ endif
+endif
- # Use -D to pick just one of the test programs in scripts/xen-detect.c
- xen_version = ver.split('.')
- xen_ctrl_version = xen_version[0] + \
- ('0' + xen_version[1]).substring(-2) + \
- ('0' + xen_version[2]).substring(-2)
- if cc.links(files('scripts/xen-detect.c'),
- args: '-DCONFIG_XEN_CTRL_INTERFACE_VERSION=' + xen_ctrl_version,
- dependencies: xen_test_deps)
- xen = declare_dependency(version: ver, dependencies: xen_test_deps)
- break
- endif
- endforeach
+lzo = not_found
+if not get_option('lzo').auto() or have_system
+ lzo = cc.find_library('lzo2', has_headers: ['lzo/lzo1x.h'],
+ required: get_option('lzo'))
+endif
+if lzo.found() and not cc.links('''
+ #include <lzo/lzo1x.h>
+ int main(void) { lzo_version(); return 0; }''', dependencies: lzo)
+ lzo = not_found
+ if get_option('lzo').enabled()
+ error('could not link liblzo2')
+ else
+ warning('could not link liblzo2, disabling')
endif
- if xen.found()
- accelerators += 'CONFIG_XEN'
- elif get_option('xen').enabled()
- error('could not compile and link Xen test program')
+endif
+
+numa = not_found
+if not get_option('numa').auto() or have_system or have_tools
+ numa = cc.find_library('numa', has_headers: ['numa.h'],
+ required: get_option('numa'))
+endif
+if numa.found() and not cc.links('''
+ #include <numa.h>
+ int main(void) { return numa_available(); }
+ ''', dependencies: numa)
+ numa = not_found
+ if get_option('numa').enabled()
+ error('could not link numa')
+ else
+ warning('could not link numa, disabling')
endif
endif
-have_xen_pci_passthrough = get_option('xen_pci_passthrough') \
- .require(xen.found(),
- error_message: 'Xen PCI passthrough requested but Xen not enabled') \
- .require(targetos == 'linux',
- error_message: 'Xen PCI passthrough not available on this platform') \
- .require(cpu == 'x86' or cpu == 'x86_64',
- error_message: 'Xen PCI passthrough not available on this platform') \
- .allowed()
+rdma = not_found
+if not get_option('rdma').auto() or have_system
+ libumad = cc.find_library('ibumad', required: get_option('rdma'))
+ rdma_libs = [cc.find_library('rdmacm', has_headers: ['rdma/rdma_cma.h'],
+ required: get_option('rdma')),
+ cc.find_library('ibverbs', required: get_option('rdma')),
+ libumad]
+ rdma = declare_dependency(dependencies: rdma_libs)
+ foreach lib: rdma_libs
+ if not lib.found()
+ rdma = not_found
+ endif
+ endforeach
+endif
cacard = not_found
if not get_option('smartcard').auto() or have_system
version: '>=2.5.1', method: 'pkg-config')
endif
u2f = not_found
-if have_system
+if not get_option('u2f').auto() or have_system
u2f = dependency('u2f-emu', required: get_option('u2f'),
method: 'pkg-config')
endif
canokey = not_found
-if have_system
+if not get_option('canokey').auto() or have_system
canokey = dependency('canokey-qemu', required: get_option('canokey'),
method: 'pkg-config')
endif
# config-host.h #
#################
+config_host_data = configuration_data()
+
audio_drivers_selected = []
if have_system
audio_drivers_available = {
config_host_data.set('CONFIG_AUDIO_DRIVERS',
'"' + '", "'.join(audio_drivers_selected) + '", ')
-if get_option('cfi')
- cfi_flags=[]
- # Check for dependency on LTO
- if not get_option('b_lto')
- error('Selected Control-Flow Integrity but LTO is disabled')
- endif
- if enable_modules
- error('Selected Control-Flow Integrity is not compatible with modules')
- endif
- # Check for cfi flags. CFI requires LTO so we can't use
- # get_supported_arguments, but need a more complex "compiles" which allows
- # custom arguments
- if cc.compiles('int main () { return 0; }', name: '-fsanitize=cfi-icall',
- args: ['-flto', '-fsanitize=cfi-icall'] )
- cfi_flags += '-fsanitize=cfi-icall'
- else
- error('-fsanitize=cfi-icall is not supported by the compiler')
- endif
- if cc.compiles('int main () { return 0; }',
- name: '-fsanitize-cfi-icall-generalize-pointers',
- args: ['-flto', '-fsanitize=cfi-icall',
- '-fsanitize-cfi-icall-generalize-pointers'] )
- cfi_flags += '-fsanitize-cfi-icall-generalize-pointers'
- else
- error('-fsanitize-cfi-icall-generalize-pointers is not supported by the compiler')
- endif
- if get_option('cfi_debug')
- if cc.compiles('int main () { return 0; }',
- name: '-fno-sanitize-trap=cfi-icall',
- args: ['-flto', '-fsanitize=cfi-icall',
- '-fno-sanitize-trap=cfi-icall'] )
- cfi_flags += '-fno-sanitize-trap=cfi-icall'
- else
- error('-fno-sanitize-trap=cfi-icall is not supported by the compiler')
- endif
- endif
- add_global_arguments(cfi_flags, native: false, language: all_languages)
- add_global_link_arguments(cfi_flags, native: false, language: all_languages)
-endif
-
have_host_block_device = (targetos != 'darwin' or
cc.has_header('IOKit/storage/IOMedia.h'))
config_host_data.set('HOST_' + host_arch.to_upper(), 1)
+kvm_targets_c = '""'
+if get_option('kvm').allowed() and targetos == 'linux'
+ kvm_targets_c = '"' + '" ,"'.join(kvm_targets) + '"'
+endif
+config_host_data.set('CONFIG_KVM_TARGETS', kvm_targets_c)
+
if get_option('module_upgrades') and not enable_modules
error('Cannot enable module-upgrades as modules are not enabled')
endif
config_host_data.set('CONFIG_BDRV_WHITELIST_TOOLS', get_option('block_drv_whitelist_in_tools'))
config_host_data.set('CONFIG_BRLAPI', brlapi.found())
config_host_data.set('CONFIG_BSD', targetos in bsd_oses)
+config_host_data.set('CONFIG_CAPSTONE', capstone.found())
config_host_data.set('CONFIG_COCOA', cocoa.found())
config_host_data.set('CONFIG_DARWIN', targetos == 'darwin')
config_host_data.set('CONFIG_FUZZ', get_option('fuzzing'))
config_host_data.set('CONFIG_PLUGIN', get_option('plugins'))
config_host_data.set('CONFIG_RBD', rbd.found())
config_host_data.set('CONFIG_RDMA', rdma.found())
+config_host_data.set('CONFIG_RELOCATABLE', get_option('relocatable'))
config_host_data.set('CONFIG_SAFESTACK', get_option('safe_stack'))
config_host_data.set('CONFIG_SDL', sdl.found())
config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found())
if seccomp.found()
config_host_data.set('CONFIG_SECCOMP_SYSRAWRC', seccomp_has_sysrawrc)
endif
+config_host_data.set('CONFIG_PIXMAN', pixman.found())
+config_host_data.set('CONFIG_SLIRP', slirp.found())
config_host_data.set('CONFIG_SNAPPY', snappy.found())
config_host_data.set('CONFIG_SOLARIS', targetos == 'sunos')
if get_option('tcg').allowed()
config_host_data.set('CONFIG_TSAN', get_option('tsan'))
config_host_data.set('CONFIG_USB_LIBUSB', libusb.found())
config_host_data.set('CONFIG_VDE', vde.found())
+config_host_data.set('CONFIG_VHOST', have_vhost)
config_host_data.set('CONFIG_VHOST_NET', have_vhost_net)
config_host_data.set('CONFIG_VHOST_NET_USER', have_vhost_net_user)
config_host_data.set('CONFIG_VHOST_NET_VDPA', have_vhost_net_vdpa)
config_host_data.set('CONFIG_VNC', vnc.found())
config_host_data.set('CONFIG_VNC_JPEG', jpeg.found())
config_host_data.set('CONFIG_VNC_SASL', sasl.found())
+if virgl.found()
+ config_host_data.set('HAVE_VIRGL_D3D_INFO_EXT',
+ cc.has_member('struct virgl_renderer_resource_info_ext', 'd3d_tex2d',
+ prefix: '#include <virglrenderer.h>',
+ dependencies: virgl))
+endif
config_host_data.set('CONFIG_VIRTFS', have_virtfs)
config_host_data.set('CONFIG_VTE', vte.found())
config_host_data.set('CONFIG_XKBCOMMON', xkbcommon.found())
message('Disabling coroutine pool to measure stack usage')
have_coroutine_pool = false
endif
-config_host_data.set10('CONFIG_COROUTINE_POOL', have_coroutine_pool)
+config_host_data.set('CONFIG_COROUTINE_POOL', have_coroutine_pool)
config_host_data.set('CONFIG_DEBUG_GRAPH_LOCK', get_option('debug_graph_lock'))
config_host_data.set('CONFIG_DEBUG_MUTEX', get_option('debug_mutex'))
config_host_data.set('CONFIG_DEBUG_STACK_USAGE', get_option('debug_stack_usage'))
config_host_data.set('CONFIG_DEBUG_TCG', get_option('debug_tcg'))
-config_host_data.set('CONFIG_GPROF', get_option('gprof'))
config_host_data.set('CONFIG_LIVE_BLOCK_MIGRATION', get_option('live_block_migration').allowed())
config_host_data.set('CONFIG_QOM_CAST_DEBUG', get_option('qom_cast_debug'))
config_host_data.set('CONFIG_REPLICATION', get_option('replication').allowed())
config_host_data.set('HAVE_OPENPTY', cc.has_function('openpty', dependencies: util))
config_host_data.set('HAVE_STRCHRNUL', cc.has_function('strchrnul'))
config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system', prefix: '#include <stdlib.h>'))
+config_host_data.set('HAVE_GETLOADAVG_FUNCTION', cc.has_function('getloadavg', prefix: '#include <stdlib.h>'))
if rbd.found()
config_host_data.set('HAVE_RBD_NAMESPACE_EXISTS',
cc.has_function('rbd_namespace_exists',
########################
minikconf = find_program('scripts/minikconf.py')
-config_targetos = {
- (targetos == 'windows' ? 'CONFIG_WIN32' : 'CONFIG_POSIX'): 'y'
-}
-if targetos == 'darwin'
- config_targetos += {'CONFIG_DARWIN': 'y'}
-elif targetos == 'linux'
- config_targetos += {'CONFIG_LINUX': 'y'}
-endif
-if targetos in bsd_oses
- config_targetos += {'CONFIG_BSD': 'y'}
-endif
+config_targetos = {}
config_all = {}
config_all_devices = {}
host_kconfig = \
(get_option('fuzzing') ? ['CONFIG_FUZZ=y'] : []) + \
(have_tpm ? ['CONFIG_TPM=y'] : []) + \
+ (pixman.found() ? ['CONFIG_PIXMAN=y'] : []) + \
(spice.found() ? ['CONFIG_SPICE=y'] : []) + \
(have_ivshmem ? ['CONFIG_IVSHMEM=y'] : []) + \
(opengl.found() ? ['CONFIG_OPENGL=y'] : []) + \
(targetos == 'linux' ? ['CONFIG_LINUX=y'] : []) + \
(have_pvrdma ? ['CONFIG_PVRDMA=y'] : []) + \
(multiprocess_allowed ? ['CONFIG_MULTIPROCESS_ALLOWED=y'] : []) + \
- (vfio_user_server_allowed ? ['CONFIG_VFIO_USER_SERVER_ALLOWED=y'] : [])
+ (vfio_user_server_allowed ? ['CONFIG_VFIO_USER_SERVER_ALLOWED=y'] : []) + \
+ (hv_balloon ? ['CONFIG_HV_BALLOON_POSSIBLE=y'] : [])
ignored = [ 'TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_ARCH' ]
command: [find_program('scripts/make-config-poison.sh'),
target_configs_h])
-##############
-# Submodules #
-##############
-
-capstone = not_found
-if not get_option('capstone').auto() or have_system or have_user
- capstone = dependency('capstone', version: '>=3.0.5',
- method: 'pkg-config',
- required: get_option('capstone'))
-
- # Some versions of capstone have broken pkg-config file
- # that reports a wrong -I path, causing the #include to
- # fail later. If the system has such a broken version
- # do not use it.
- if capstone.found() and not cc.compiles('#include <capstone.h>',
- dependencies: [capstone])
- capstone = not_found
- if get_option('capstone').enabled()
- error('capstone requested, but it does not appear to work')
- endif
- endif
-endif
+###############
+# Subprojects #
+###############
libvfio_user_dep = not_found
if have_system and vfio_user_server_allowed
fdt_opt = 'disabled'
endif
-config_host_data.set('CONFIG_CAPSTONE', capstone.found())
config_host_data.set('CONFIG_FDT', fdt.found())
-config_host_data.set('CONFIG_SLIRP', slirp.found())
+
+vhost_user = not_found
+if targetos == 'linux' and have_vhost_user
+ libvhost_user = subproject('libvhost-user')
+ vhost_user = libvhost_user.get_variable('vhost_user_dep')
+endif
+
+libvduse = not_found
+if have_libvduse
+ libvduse_proj = subproject('libvduse')
+ libvduse = libvduse_proj.get_variable('libvduse_dep')
+endif
#####################
# Generated sources #
endforeach
genh += hxdep
-###################
-# Collect sources #
-###################
-
-authz_ss = ss.source_set()
-blockdev_ss = ss.source_set()
-block_ss = ss.source_set()
-chardev_ss = ss.source_set()
-common_ss = ss.source_set()
-crypto_ss = ss.source_set()
-hwcore_ss = ss.source_set()
-io_ss = ss.source_set()
-qmp_ss = ss.source_set()
-qom_ss = ss.source_set()
-system_ss = ss.source_set()
-specific_fuzz_ss = ss.source_set()
-specific_ss = ss.source_set()
-stub_ss = ss.source_set()
-trace_ss = ss.source_set()
-user_ss = ss.source_set()
-util_ss = ss.source_set()
-
-# accel modules
-qtest_module_ss = ss.source_set()
-tcg_module_ss = ss.source_set()
-
-modules = {}
-target_modules = {}
-hw_arch = {}
-target_arch = {}
-target_softmmu_arch = {}
-target_user_arch = {}
-
###############
# Trace files #
###############
'hw/gpio',
'migration',
'net',
- 'softmmu',
+ 'system',
'ui',
'hw/remote',
]
]
endif
-vhost_user = not_found
-if targetos == 'linux' and have_vhost_user
- libvhost_user = subproject('libvhost-user')
- vhost_user = libvhost_user.get_variable('vhost_user_dep')
-endif
+###################
+# Collect sources #
+###################
-libvduse = not_found
-if have_libvduse
- libvduse_proj = subproject('libvduse')
- libvduse = libvduse_proj.get_variable('libvduse_dep')
-endif
+authz_ss = ss.source_set()
+blockdev_ss = ss.source_set()
+block_ss = ss.source_set()
+chardev_ss = ss.source_set()
+common_ss = ss.source_set()
+crypto_ss = ss.source_set()
+hwcore_ss = ss.source_set()
+io_ss = ss.source_set()
+qmp_ss = ss.source_set()
+qom_ss = ss.source_set()
+system_ss = ss.source_set()
+specific_fuzz_ss = ss.source_set()
+specific_ss = ss.source_set()
+stub_ss = ss.source_set()
+trace_ss = ss.source_set()
+user_ss = ss.source_set()
+util_ss = ss.source_set()
+
+# accel modules
+qtest_module_ss = ss.source_set()
+tcg_module_ss = ss.source_set()
+
+modules = {}
+target_modules = {}
+hw_arch = {}
+target_arch = {}
+target_system_arch = {}
+target_user_arch = {}
# NOTE: the trace/ subdirectory needs the qapi_trace_events variable
# that is filled in by qapi/.
# os-posix.c contains POSIX-specific functions used by qemu-storage-daemon,
# os-win32.c does not
- blockdev_ss.add(when: 'CONFIG_POSIX', if_true: files('os-posix.c'))
- system_ss.add(when: 'CONFIG_WIN32', if_true: [files('os-win32.c')])
+ if targetos == 'windows'
+ system_ss.add(files('os-win32.c'))
+ else
+ blockdev_ss.add(files('os-posix.c'))
+ endif
endif
-common_ss.add(files('cpus-common.c'))
-specific_ss.add(files('cpu.c'))
+common_ss.add(files('cpu-common.c'))
+specific_ss.add(files('cpu-target.c'))
-subdir('softmmu')
+subdir('system')
# Work around a gcc bug/misfeature wherein constant propagation looks
# through an alias:
pagevary = declare_dependency(link_with: pagevary)
endif
common_ss.add(pagevary)
-specific_ss.add(files('page-vary.c'))
+specific_ss.add(files('page-vary-target.c'))
subdir('backends')
subdir('disas')
target_modules += { 'accel' : { 'qtest': qtest_module_ss,
'tcg': tcg_real_module_ss }}
-########################
-# Library dependencies #
-########################
+##############################################
+# Internal static_libraries and dependencies #
+##############################################
modinfo_collect = find_program('scripts/modinfo-collect.py')
modinfo_generate = find_program('scripts/modinfo-generate.py')
modinfo_files = []
block_mods = []
-softmmu_mods = []
+system_mods = []
foreach d, list : modules
if not (d == 'block' ? have_block : have_system)
continue
if d == 'block'
block_mods += sl
else
- softmmu_mods += sl
+ system_mods += sl
endif
if module_ss.sources() != []
# FIXME: Should use sl.extract_all_objects(recursive: true) as
include_directories: target_inc,
c_args: c_args,
pic: true)
- softmmu_mods += sl
+ system_mods += sl
# FIXME: Should use sl.extract_all_objects(recursive: true) too.
modinfo_files += custom_target(module_name + '.modinfo',
output: module_name + '.modinfo',
capture: true,
command: [undefsym, nm, '@INPUT@'])
qemu_syms = custom_target('qemu.syms', output: 'qemu.syms',
- input: [libqemuutil, softmmu_mods],
+ input: [libqemuutil, system_mods],
capture: true,
command: [undefsym, nm, '@INPUT@'])
###########
emulator_modules = []
-foreach m : block_mods + softmmu_mods
+foreach m : block_mods + system_mods
emulator_modules += shared_module(m.name(),
build_by_default: true,
name_prefix: '',
dependencies: common_all.dependencies(),
name_suffix: 'fa')
-feature_to_c = find_program('scripts/feature_to_c.sh')
+feature_to_c = find_program('scripts/feature_to_c.py')
if targetos == 'darwin'
entitlement = find_program('scripts/entitlement.sh')
endif
if target.endswith('-softmmu')
target_type='system'
- t = target_softmmu_arch[target_base_arch].apply(config_target, strict: false)
+ t = target_system_arch[target_base_arch].apply(config_target, strict: false)
arch_srcs += t.sources()
arch_deps += t.dependencies()
execs = [{
'name': 'qemu-system-' + target_name,
'win_subsystem': 'console',
- 'sources': files('softmmu/main.c'),
+ 'sources': files('system/main.c'),
'dependencies': []
}]
if targetos == 'windows' and (sdl.found() or gtk.found())
execs += [{
'name': 'qemu-system-' + target_name + 'w',
'win_subsystem': 'windows',
- 'sources': files('softmmu/main.c'),
+ 'sources': files('system/main.c'),
'dependencies': []
}]
endif
if get_option('plugins')
install_headers('include/qemu/qemu-plugin.h')
+ if targetos == 'windows'
+ # On windows, we want to deliver the qemu_plugin_api.lib file in the qemu installer,
+ # so that plugin authors can compile against it.
+ install_data(win32_qemu_plugin_api_lib, install_dir: 'lib')
+ endif
endif
subdir('qga')
summary_info = {}
summary_info += {'python': '@0@ (version: @1@)'.format(python.full_path(), python.language_version())}
summary_info += {'sphinx-build': sphinx_build}
-if config_host.has_key('HAVE_GDB_BIN')
- summary_info += {'gdb': config_host['HAVE_GDB_BIN']}
+
+# FIXME: the [binaries] section of machine files, which can be probed
+# with find_program(), would be great for passing gdb and genisoimage
+# paths from configure to Meson. However, there seems to be no way to
+# hide a program (for example if gdb is too old).
+if config_host.has_key('GDB')
+ summary_info += {'gdb': config_host['GDB']}
endif
summary_info += {'iasl': iasl}
summary_info += {'genisoimage': config_host['GENISOIMAGE']}
endif
summary_info += {'D-Bus display': dbus_display}
summary_info += {'QOM debugging': get_option('qom_cast_debug')}
+summary_info += {'Relocatable install': get_option('relocatable')}
summary_info += {'vhost-kernel support': have_vhost_kernel}
summary_info += {'vhost-net support': have_vhost_net}
summary_info += {'vhost-user support': have_vhost_user}
else
summary_info += {'C++ compiler': false}
endif
-if targetos == 'darwin'
+if 'objc' in all_languages
summary_info += {'Objective-C compiler': ' '.join(meson.get_compiler('objc').cmd_array())}
+else
+ summary_info += {'Objective-C compiler': false}
endif
option_cflags = (get_option('debug') ? ['-g'] : [])
if get_option('optimization') != 'plain'
if 'cpp' in all_languages
summary_info += {'CXXFLAGS': ' '.join(get_option('cpp_args') + option_cflags)}
endif
-if targetos == 'darwin'
+if 'objc' in all_languages
summary_info += {'OBJCFLAGS': ' '.join(get_option('objc_args') + option_cflags)}
endif
link_args = get_option('c_link_args')
summary_info += {'avx2 optimization': config_host_data.get('CONFIG_AVX2_OPT')}
summary_info += {'avx512bw optimization': config_host_data.get('CONFIG_AVX512BW_OPT')}
summary_info += {'avx512f optimization': config_host_data.get('CONFIG_AVX512F_OPT')}
-if get_option('gprof')
- gprof_info = 'YES (deprecated)'
-else
- gprof_info = get_option('gprof')
-endif
-summary_info += {'gprof': gprof_info}
summary_info += {'gcov': get_option('b_coverage')}
summary_info += {'thread sanitizer': get_option('tsan')}
summary_info += {'CFI support': get_option('cfi')}
summary_info += {'PAM': pam}
summary_info += {'iconv support': iconv}
summary_info += {'virgl support': virgl}
+summary_info += {'rutabaga support': rutabaga}
summary_info += {'blkio support': blkio}
summary_info += {'curl support': curl}
summary_info += {'Multipath support': mpathpersist}
endif
summary_info += {'seccomp support': seccomp}
summary_info += {'GlusterFS support': glusterfs}
+summary_info += {'hv-balloon support': hv_balloon}
summary_info += {'TPM support': have_tpm}
summary_info += {'libssh support': libssh}
summary_info += {'lzo support': lzo}
message('If you want to help supporting QEMU on this platform, please')
message('contact the developers at qemu-devel@nongnu.org.')
endif
+
+actually_reloc = get_option('relocatable')
+# check if get_relocated_path() is actually able to relocate paths
+if get_option('relocatable') and \
+ not (get_option('prefix') / get_option('bindir')).startswith(get_option('prefix') / '')
+ message()
+ warning('bindir not included within prefix, the installation will not be relocatable.')
+ actually_reloc = false
+endif
+if not actually_reloc and (targetos == 'windows' or get_option('relocatable'))
+ if targetos == 'windows'
+ message()
+ warning('Windows installs should usually be relocatable.')
+ endif
+ message()
+ message('QEMU will have to be installed under ' + get_option('prefix') + '.')
+ message('Use --disable-relocatable to remove this warning.')
+endif