configure: move disassembler configuration to meson
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
660f793093
commit
ca0fc78431
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,7 +2,6 @@
|
|||||||
/build/
|
/build/
|
||||||
/.doctrees
|
/.doctrees
|
||||||
/config-devices.*
|
/config-devices.*
|
||||||
/config-all-disas.*
|
|
||||||
/config-host.*
|
/config-host.*
|
||||||
/config-target.*
|
/config-target.*
|
||||||
/config.status
|
/config.status
|
||||||
|
89
configure
vendored
89
configure
vendored
@ -6612,8 +6612,6 @@ QEMU_LDFLAGS="$fdt_ldflags $QEMU_LDFLAGS"
|
|||||||
|
|
||||||
config_host_mak="config-host.mak"
|
config_host_mak="config-host.mak"
|
||||||
|
|
||||||
echo "# Automatically generated by configure - do not modify" >config-all-disas.mak
|
|
||||||
|
|
||||||
echo "# Automatically generated by configure - do not modify" > $config_host_mak
|
echo "# Automatically generated by configure - do not modify" > $config_host_mak
|
||||||
echo >> $config_host_mak
|
echo >> $config_host_mak
|
||||||
|
|
||||||
@ -7919,93 +7917,6 @@ if test "$target_bsd_user" = "yes" ; then
|
|||||||
echo "CONFIG_BSD_USER=y" >> $config_target_mak
|
echo "CONFIG_BSD_USER=y" >> $config_target_mak
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# generate QEMU_CFLAGS/QEMU_LDFLAGS for targets
|
|
||||||
|
|
||||||
disas_config() {
|
|
||||||
echo "CONFIG_${1}_DIS=y" >> $config_target_mak
|
|
||||||
echo "CONFIG_${1}_DIS=y" >> config-all-disas.mak
|
|
||||||
}
|
|
||||||
|
|
||||||
for i in $ARCH $TARGET_BASE_ARCH ; do
|
|
||||||
case "$i" in
|
|
||||||
alpha)
|
|
||||||
disas_config "ALPHA"
|
|
||||||
;;
|
|
||||||
aarch64)
|
|
||||||
if test -n "${cxx}"; then
|
|
||||||
disas_config "ARM_A64"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
arm)
|
|
||||||
disas_config "ARM"
|
|
||||||
if test -n "${cxx}"; then
|
|
||||||
disas_config "ARM_A64"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
avr)
|
|
||||||
disas_config "AVR"
|
|
||||||
;;
|
|
||||||
cris)
|
|
||||||
disas_config "CRIS"
|
|
||||||
;;
|
|
||||||
hppa)
|
|
||||||
disas_config "HPPA"
|
|
||||||
;;
|
|
||||||
i386|x86_64|x32)
|
|
||||||
disas_config "I386"
|
|
||||||
;;
|
|
||||||
lm32)
|
|
||||||
disas_config "LM32"
|
|
||||||
;;
|
|
||||||
m68k)
|
|
||||||
disas_config "M68K"
|
|
||||||
;;
|
|
||||||
microblaze*)
|
|
||||||
disas_config "MICROBLAZE"
|
|
||||||
;;
|
|
||||||
mips*)
|
|
||||||
disas_config "MIPS"
|
|
||||||
if test -n "${cxx}"; then
|
|
||||||
disas_config "NANOMIPS"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
moxie*)
|
|
||||||
disas_config "MOXIE"
|
|
||||||
;;
|
|
||||||
nios2)
|
|
||||||
disas_config "NIOS2"
|
|
||||||
;;
|
|
||||||
or1k)
|
|
||||||
disas_config "OPENRISC"
|
|
||||||
;;
|
|
||||||
ppc*)
|
|
||||||
disas_config "PPC"
|
|
||||||
;;
|
|
||||||
riscv*)
|
|
||||||
disas_config "RISCV"
|
|
||||||
;;
|
|
||||||
rx)
|
|
||||||
disas_config "RX"
|
|
||||||
;;
|
|
||||||
s390*)
|
|
||||||
disas_config "S390"
|
|
||||||
;;
|
|
||||||
sh4)
|
|
||||||
disas_config "SH4"
|
|
||||||
;;
|
|
||||||
sparc*)
|
|
||||||
disas_config "SPARC"
|
|
||||||
;;
|
|
||||||
xtensa*)
|
|
||||||
disas_config "XTENSA"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
if test "$tcg_interpreter" = "yes" ; then
|
|
||||||
disas_config "TCI"
|
|
||||||
fi
|
|
||||||
|
|
||||||
done # for target in $targets
|
done # for target in $targets
|
||||||
|
|
||||||
if [ "$fdt" = "git" ]; then
|
if [ "$fdt" = "git" ]; then
|
||||||
|
@ -22,6 +22,4 @@ common_ss.add(when: 'CONFIG_SH4_DIS', if_true: files('sh4.c'))
|
|||||||
common_ss.add(when: 'CONFIG_SPARC_DIS', if_true: files('sparc.c'))
|
common_ss.add(when: 'CONFIG_SPARC_DIS', if_true: files('sparc.c'))
|
||||||
common_ss.add(when: 'CONFIG_XTENSA_DIS', if_true: files('xtensa.c'))
|
common_ss.add(when: 'CONFIG_XTENSA_DIS', if_true: files('xtensa.c'))
|
||||||
|
|
||||||
# TODO: As long as the TCG interpreter and its generated code depend
|
specific_ss.add(when: 'CONFIG_TCG_INTERPRETER', if_true: files('tci.c'))
|
||||||
# on the QEMU target, we cannot compile the disassembler here.
|
|
||||||
#common_ss.add(when: 'CONFIG_TCI_DIS', if_true: files('tci.c'))
|
|
||||||
|
45
meson.build
45
meson.build
@ -14,7 +14,6 @@ ss = import('sourceset')
|
|||||||
sh = find_program('sh')
|
sh = find_program('sh')
|
||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
config_host = keyval.load(meson.current_build_dir() / 'config-host.mak')
|
config_host = keyval.load(meson.current_build_dir() / 'config-host.mak')
|
||||||
config_all_disas = keyval.load(meson.current_build_dir() / 'config-all-disas.mak')
|
|
||||||
enable_modules = 'CONFIG_MODULES' in config_host
|
enable_modules = 'CONFIG_MODULES' in config_host
|
||||||
enable_static = 'CONFIG_STATIC' in config_host
|
enable_static = 'CONFIG_STATIC' in config_host
|
||||||
build_docs = 'BUILD_DOCS' in config_host
|
build_docs = 'BUILD_DOCS' in config_host
|
||||||
@ -461,10 +460,44 @@ genh += configure_file(output: 'config-host.h', configuration: config_host_data)
|
|||||||
|
|
||||||
minikconf = find_program('scripts/minikconf.py')
|
minikconf = find_program('scripts/minikconf.py')
|
||||||
config_all_devices = {}
|
config_all_devices = {}
|
||||||
|
config_all_disas = {}
|
||||||
config_devices_mak_list = []
|
config_devices_mak_list = []
|
||||||
config_devices_h = {}
|
config_devices_h = {}
|
||||||
config_target_h = {}
|
config_target_h = {}
|
||||||
config_target_mak = {}
|
config_target_mak = {}
|
||||||
|
|
||||||
|
disassemblers = {
|
||||||
|
'alpha' : ['CONFIG_ALPHA_DIS'],
|
||||||
|
'arm' : ['CONFIG_ARM_DIS'],
|
||||||
|
'avr' : ['CONFIG_AVR_DIS'],
|
||||||
|
'cris' : ['CONFIG_CRIS_DIS'],
|
||||||
|
'hppa' : ['CONFIG_HPPA_DIS'],
|
||||||
|
'i386' : ['CONFIG_I386_DIS'],
|
||||||
|
'x86_64' : ['CONFIG_I386_DIS'],
|
||||||
|
'x32' : ['CONFIG_I386_DIS'],
|
||||||
|
'lm32' : ['CONFIG_LM32_DIS'],
|
||||||
|
'm68k' : ['CONFIG_M68K_DIS'],
|
||||||
|
'microblaze' : ['CONFIG_MICROBLAZE_DIS'],
|
||||||
|
'mips' : ['CONFIG_MIPS_DIS'],
|
||||||
|
'moxie' : ['CONFIG_MOXIE_DIS'],
|
||||||
|
'nios2' : ['CONFIG_NIOS2_DIS'],
|
||||||
|
'or1k' : ['CONFIG_OPENRISC_DIS'],
|
||||||
|
'ppc' : ['CONFIG_PPC_DIS'],
|
||||||
|
'riscv' : ['CONFIG_RISCV_DIS'],
|
||||||
|
'rx' : ['CONFIG_RX_DIS'],
|
||||||
|
's390' : ['CONFIG_S390_DIS'],
|
||||||
|
'sh4' : ['CONFIG_SH4_DIS'],
|
||||||
|
'sparc' : ['CONFIG_SPARC_DIS'],
|
||||||
|
'xtensa' : ['CONFIG_XTENSA_DIS'],
|
||||||
|
}
|
||||||
|
if link_language == 'cpp'
|
||||||
|
disassemblers += {
|
||||||
|
'aarch64' : [ 'CONFIG_ARM_A64_DIS'],
|
||||||
|
'arm' : [ 'CONFIG_ARM_DIS', 'CONFIG_ARM_A64_DIS'],
|
||||||
|
'mips' : [ 'CONFIG_MIPS_DIS', 'CONFIG_NANOMIPS_DIS'],
|
||||||
|
}
|
||||||
|
endif
|
||||||
|
|
||||||
kconfig_external_symbols = [
|
kconfig_external_symbols = [
|
||||||
'CONFIG_KVM',
|
'CONFIG_KVM',
|
||||||
'CONFIG_XEN',
|
'CONFIG_XEN',
|
||||||
@ -480,9 +513,19 @@ kconfig_external_symbols = [
|
|||||||
'CONFIG_PVRDMA',
|
'CONFIG_PVRDMA',
|
||||||
]
|
]
|
||||||
ignored = ['TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_DIRS']
|
ignored = ['TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_DIRS']
|
||||||
|
|
||||||
foreach target : target_dirs
|
foreach target : target_dirs
|
||||||
config_target = keyval.load(meson.current_build_dir() / target / 'config-target.mak')
|
config_target = keyval.load(meson.current_build_dir() / target / 'config-target.mak')
|
||||||
|
|
||||||
|
foreach k, v: disassemblers
|
||||||
|
if config_host['ARCH'].startswith(k) or config_target['TARGET_BASE_ARCH'].startswith(k)
|
||||||
|
foreach sym: v
|
||||||
|
config_target += { sym: 'y' }
|
||||||
|
config_all_disas += { sym: 'y' }
|
||||||
|
endforeach
|
||||||
|
endif
|
||||||
|
endforeach
|
||||||
|
|
||||||
config_target_data = configuration_data()
|
config_target_data = configuration_data()
|
||||||
foreach k, v: config_target
|
foreach k, v: config_target
|
||||||
if not k.startswith('TARGET_') and not k.startswith('CONFIG_')
|
if not k.startswith('TARGET_') and not k.startswith('CONFIG_')
|
||||||
|
Loading…
Reference in New Issue
Block a user