kvm_targets = ['riscv32-softmmu']
elif cpu in ['riscv64']
kvm_targets = ['riscv64-softmmu']
+elif cpu in ['loongarch64']
+ kvm_targets = ['loongarch64-softmmu']
else
kvm_targets = []
endif
add_global_link_arguments(cfi_flags, native: false, language: all_languages)
endif
+# Check further flags that make QEMU more robust against malicious parties
+
+hardening_flags = [
+ # Zero out registers used during a function call
+ # upon its return. This makes it harder to assemble
+ # ROP gadgets into something usable
+ '-fzero-call-used-regs=used-gpr',
+
+ # Initialize all stack variables to zero. This makes
+ # it harder to take advantage of uninitialized stack
+ # data to drive exploits
+ '-ftrivial-auto-var-init=zero',
+]
+
+qemu_common_flags += cc.get_supported_arguments(hardening_flags)
+
add_global_arguments(qemu_common_flags, native: false, language: all_languages)
add_global_link_arguments(qemu_ldflags, native: false, language: all_languages)
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',
'hw/arm',
'hw/audio',
'hw/block',
- 'hw/block/dataplane',
'hw/char',
'hw/display',
'hw/dma',
'target/hppa',
'target/i386',
'target/i386/kvm',
+ 'target/loongarch',
'target/mips/tcg',
'target/nios2',
'target/ppc',
arch_deps += t.dependencies()
hw_dir = target_name == 'sparc64' ? 'sparc64' : target_base_arch
- hw = hw_arch[hw_dir].apply(config_target, strict: false)
- arch_srcs += hw.sources()
- arch_deps += hw.dependencies()
+ if hw_arch.has_key(hw_dir)
+ hw = hw_arch[hw_dir].apply(config_target, strict: false)
+ arch_srcs += hw.sources()
+ arch_deps += hw.dependencies()
+ endif
arch_srcs += config_devices_h[target]
link_args += ['@block.syms', '@qemu.syms']
summary_info += {'brlapi support': brlapi}
summary(summary_info, bool_yn: true, section: 'User interface')
+# Graphics backends
+summary_info = {}
+summary_info += {'VirGL support': virgl}
+summary_info += {'Rutabaga support': rutabaga}
+summary(summary_info, bool_yn: true, section: 'Graphics backends')
+
# Audio backends
summary_info = {}
if host_os not in ['darwin', 'haiku', 'windows']
summary_info += {'libtasn1': tasn1}
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}