configure: remove target configuration

The config-target.mak files are small constant, we can therefore just
write them down explicitly.

This removes a pretty large part of the configure script, including the
whole logic to detect which accelerators are supported by each target.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2020-09-21 04:37:49 -04:00
parent 859c3d5990
commit fdb75aeff7
74 changed files with 412 additions and 455 deletions

474
configure vendored
View File

@ -219,108 +219,6 @@ glob() {
eval test -z '"${1#'"$2"'}"'
}
supported_hax_target() {
test "$hax" = "enabled" || return 1
glob "$1" "*-softmmu" || return 1
case "${1%-softmmu}" in
i386|x86_64)
return 0
;;
esac
return 1
}
supported_kvm_target() {
test "$kvm" = "enabled" || return 1
glob "$1" "*-softmmu" || return 1
case "${1%-softmmu}:$cpu" in
aarch64:aarch64 | \
i386:i386 | i386:x86_64 | i386:x32 | \
x86_64:i386 | x86_64:x86_64 | x86_64:x32 | \
mips:mips | mipsel:mips | mips64:mips | mips64el:mips | \
ppc:ppc | ppc64:ppc | ppc:ppc64 | ppc64:ppc64 | ppc64:ppc64le | \
s390x:s390x)
return 0
;;
esac
return 1
}
supported_xen_target() {
test "$xen" = "enabled" || return 1
glob "$1" "*-softmmu" || return 1
# Only i386 and x86_64 provide the xenpv machine.
case "${1%-softmmu}" in
i386|x86_64)
return 0
;;
esac
return 1
}
supported_hvf_target() {
test "$hvf" = "enabled" || return 1
glob "$1" "*-softmmu" || return 1
case "${1%-softmmu}" in
x86_64)
return 0
;;
esac
return 1
}
supported_whpx_target() {
test "$whpx" = "enabled" || return 1
glob "$1" "*-softmmu" || return 1
case "${1%-softmmu}" in
i386|x86_64)
return 0
;;
esac
return 1
}
deprecated_targets_list=ppc64abi32-linux-user,tilegx-linux-user,lm32-softmmu,unicore32-softmmu
deprecated_features=""
supported_target() {
case "$1" in
*-softmmu)
;;
*-linux-user)
if test "$linux" != "yes"; then
print_error "Target '$target' is only available on a Linux host"
return 1
fi
;;
*-bsd-user)
if test "$bsd" != "yes"; then
print_error "Target '$target' is only available on a BSD host"
return 1
fi
;;
*)
print_error "Invalid target name '$target'"
return 1
;;
esac
# if a deprecated target is enabled we note it here
if echo "$deprecated_targets_list" | grep -q "$1"; then
add_to deprecated_features $1
fi
test "$tcg" = "enabled" && return 0
supported_kvm_target "$1" && return 0
supported_xen_target "$1" && return 0
supported_hax_target "$1" && return 0
supported_hvf_target "$1" && return 0
supported_whpx_target "$1" && return 0
print_error "TCG disabled, but hardware accelerator not available for '$target'"
return 1
}
ld_has() {
$ld --help 2>/dev/null | grep ".$1" >/dev/null 2>&1
}
@ -1701,7 +1599,8 @@ if [ "$bsd_user" = "no" -a "$linux_user" = "no" -a "$softmmu" = "no" ] ; then
fi
default_target_list=""
deprecated_targets_list=ppc64abi32-linux-user,tilegx-linux-user,lm32-softmmu,unicore32-softmmu
deprecated_features=""
mak_wilds=""
if [ "$softmmu" = "yes" ]; then
@ -2029,16 +1928,6 @@ if ! compile_prog ; then
error_exit "\"$cc\" cannot build an executable (is your linker broken?)"
fi
# Now we have handled --enable-tcg-interpreter and know we're not just
# printing the help message, bail out if the host CPU isn't supported.
if test "$ARCH" = "unknown"; then
if test "$tcg_interpreter" = "yes" ; then
echo "Unsupported CPU = $cpu, will use TCG with TCI (experimental)"
else
error_exit "Unsupported CPU = $cpu, try --enable-tcg-interpreter"
fi
fi
# Consult white-list to determine whether to enable werror
# by default. Only enable by default for git builds
if test -z "$werror" ; then
@ -2290,12 +2179,13 @@ if test "$solaris" = "yes" ; then
fi
if test -z "${target_list+xxx}" ; then
default_targets=yes
for target in $default_target_list; do
supported_target $target 2>/dev/null && \
target_list="$target_list $target"
target_list="$target_list $target"
done
target_list="${target_list# }"
else
default_targets=no
target_list=$(echo "$target_list" | sed -e 's/,/ /g')
for target in $target_list; do
# Check that we recognised the target name; this allows a more
@ -2307,10 +2197,16 @@ else
error_exit "Unknown target name '$target'"
;;
esac
supported_target $target || exit 1
done
fi
for target in $target_list; do
# if a deprecated target is enabled we note it here
if echo "$deprecated_targets_list" | grep -q "$target"; then
add_to deprecated_features $target
fi
done
# see if system emulation was really requested
case " $target_list " in
*"-softmmu "*) softmmu=yes
@ -2652,28 +2548,6 @@ if test "$seccomp" != "no" ; then
fi
fi
##########################################
# simple accelerator probes
if test "$kvm" != "disabled" ; then
if test "$linux" = yes ; then
kvm=enabled
else
if test "$kvm" = "enabled" ; then
feature_not_found "kvm" "KVM is only available on Linux"
fi
kvm=disabled
fi
fi
if test "$hax" = "auto" ; then
if test "$mingw" = yes || test "$darwin" = yes || test "$targetos" = NetBSD; then
hax=enabled
else
hax=disabled
fi
fi
##########################################
# xen probe
@ -2992,23 +2866,6 @@ if test "$xen_pci_passthrough" != "disabled"; then
fi
fi
##########################################
# Windows Hypervisor Platform accelerator (WHPX) check
if test "$whpx" != "disabled"; then
if test "$mingw32" = yes && test "$ARCH" = "x86_64" &&
check_include "WinHvPlatform.h" && check_include "WinHvEmulation.h"; then
whpx="enabled"
else
if test "$whpx" = "enabled"; then
if test "$ARCH" != "x86_64"; then
error_exit "WHPX requires 64-bit host"
fi
feature_not_found "WinHvPlatform" "WinHvEmulation is not installed"
fi
whpx="disabled"
fi
fi
##########################################
# gettext probe
if test "$gettext" != "false" ; then
@ -5832,23 +5689,6 @@ fi
#################################################
# Check to see if we have the Hypervisor framework
if [ "$hvf" != "disabled" ] ; then
cat > $TMPC << EOF
#include <Hypervisor/hv.h>
int main() { return 0;}
EOF
if test "$darwin" = yes && compile_object ""; then
hvf='enabled'
else
if test "$hvf" = "enabled"; then
error_exit "Hypervisor.framework not available"
fi
hvf='disabled'
fi
fi
##########################################
# check for sysmacros.h
have_sysmacros=no
@ -7362,285 +7202,14 @@ if test "$linux" = "yes" ; then
fi
for target in $target_list; do
target_dir="$target"
config_target_mak=$target_dir/config-target.mak
target_name=$(echo $target | cut -d '-' -f 1)
target_aligned_only="no"
case "$target_name" in
alpha|hppa|mips64el|mips64|mipsel|mips|mipsn32|mipsn32el|sh4|sh4eb|sparc|sparc64|sparc32plus|xtensa|xtensaeb)
target_aligned_only="yes"
;;
esac
target_bigendian="no"
case "$target_name" in
armeb|aarch64_be|hppa|lm32|m68k|microblaze|mips|mipsn32|mips64|moxie|or1k|ppc|ppc64|ppc64abi32|s390x|sh4eb|sparc|sparc64|sparc32plus|xtensaeb)
target_bigendian="yes"
;;
esac
target_softmmu="no"
target_user_only="no"
target_linux_user="no"
target_bsd_user="no"
case "$target" in
${target_name}-softmmu)
target_softmmu="yes"
;;
${target_name}-linux-user)
target_user_only="yes"
target_linux_user="yes"
;;
${target_name}-bsd-user)
target_user_only="yes"
target_bsd_user="yes"
;;
*)
error_exit "Target '$target' not recognised"
exit 1
;;
esac
mkdir -p $target_dir
echo "# Automatically generated by configure - do not modify" > $config_target_mak
bflt="no"
mttcg="no"
interp_prefix1=$(echo "$interp_prefix" | sed "s/%M/$target_name/g")
gdb_xml_files=""
TARGET_ARCH="$target_name"
TARGET_BASE_ARCH=""
TARGET_ABI_DIR=""
TARGET_SYSTBL_ABI=""
TARGET_SYSTBL=""
case "$target_name" in
i386)
mttcg="yes"
gdb_xml_files="i386-32bit.xml"
TARGET_SYSTBL_ABI=i386
TARGET_SYSTBL=syscall_32.tbl
;;
x86_64)
TARGET_BASE_ARCH=i386
TARGET_SYSTBL_ABI=common,64
TARGET_SYSTBL=syscall_64.tbl
mttcg="yes"
gdb_xml_files="i386-64bit.xml"
;;
alpha)
mttcg="yes"
TARGET_SYSTBL_ABI=common
;;
arm|armeb)
TARGET_ARCH=arm
TARGET_SYSTBL_ABI=common,oabi
bflt="yes"
mttcg="yes"
gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml arm-m-profile.xml"
;;
aarch64|aarch64_be)
TARGET_ARCH=aarch64
TARGET_BASE_ARCH=arm
bflt="yes"
mttcg="yes"
gdb_xml_files="aarch64-core.xml aarch64-fpu.xml arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml arm-m-profile.xml"
;;
avr)
gdb_xml_files="avr-cpu.xml"
target_compiler=$cross_cc_avr
;;
cris)
;;
hppa)
mttcg="yes"
TARGET_SYSTBL_ABI=common,32
;;
lm32)
;;
m68k)
bflt="yes"
gdb_xml_files="cf-core.xml cf-fp.xml m68k-core.xml m68k-fp.xml"
TARGET_SYSTBL_ABI=common
;;
microblaze|microblazeel)
TARGET_ARCH=microblaze
TARGET_SYSTBL_ABI=common
mttcg="yes"
bflt="yes"
;;
mips|mipsel)
mttcg="yes"
TARGET_ARCH=mips
test "$target_user_only" = yes && echo "TARGET_ABI_MIPSO32=y" >> $config_target_mak
TARGET_SYSTBL_ABI=o32
TARGET_SYSTBL=syscall_o32.tbl
;;
mipsn32|mipsn32el)
mttcg="yes"
TARGET_ARCH=mips64
TARGET_BASE_ARCH=mips
test "$target_user_only" = yes && echo "TARGET_ABI_MIPSN32=y" >> $config_target_mak
test "$target_user_only" = yes && echo "TARGET_ABI32=y" >> $config_target_mak
TARGET_SYSTBL_ABI=n32
TARGET_SYSTBL=syscall_n32.tbl
;;
mips64|mips64el)
mttcg="no"
TARGET_ARCH=mips64
TARGET_BASE_ARCH=mips
test "$target_user_only" = yes && echo "TARGET_ABI_MIPSN64=y" >> $config_target_mak
TARGET_SYSTBL_ABI=n64
TARGET_SYSTBL=syscall_n64.tbl
;;
moxie)
;;
nios2)
;;
or1k)
TARGET_ARCH=openrisc
TARGET_BASE_ARCH=openrisc
;;
ppc)
gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
TARGET_SYSTBL_ABI=common,nospu,32
;;
ppc64)
TARGET_BASE_ARCH=ppc
TARGET_ABI_DIR=ppc
TARGET_SYSTBL_ABI=common,nospu,64
mttcg=yes
gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml power-vsx.xml"
;;
ppc64le)
TARGET_ARCH=ppc64
TARGET_BASE_ARCH=ppc
TARGET_ABI_DIR=ppc
TARGET_SYSTBL_ABI=common,nospu,64
mttcg=yes
gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml power-vsx.xml"
;;
ppc64abi32)
TARGET_ARCH=ppc64
TARGET_BASE_ARCH=ppc
TARGET_ABI_DIR=ppc
TARGET_SYSTBL_ABI=common,nospu,32
test "$target_user_only" = yes && echo "TARGET_ABI32=y" >> $config_target_mak
gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml power-vsx.xml"
;;
riscv32)
TARGET_BASE_ARCH=riscv
TARGET_ABI_DIR=riscv
mttcg=yes
gdb_xml_files="riscv-32bit-cpu.xml riscv-32bit-fpu.xml riscv-64bit-fpu.xml riscv-32bit-csr.xml riscv-32bit-virtual.xml"
;;
riscv64)
TARGET_BASE_ARCH=riscv
TARGET_ABI_DIR=riscv
mttcg=yes
gdb_xml_files="riscv-64bit-cpu.xml riscv-32bit-fpu.xml riscv-64bit-fpu.xml riscv-64bit-csr.xml riscv-64bit-virtual.xml"
;;
rx)
TARGET_ARCH=rx
bflt="yes"
target_compiler=$cross_cc_rx
gdb_xml_files="rx-core.xml"
;;
sh4|sh4eb)
TARGET_ARCH=sh4
TARGET_SYSTBL_ABI=common
bflt="yes"
;;
sparc)
TARGET_SYSTBL_ABI=common,32
;;
sparc64)
TARGET_BASE_ARCH=sparc
TARGET_SYSTBL_ABI=common,64
;;
sparc32plus)
TARGET_ARCH=sparc64
TARGET_BASE_ARCH=sparc
TARGET_ABI_DIR=sparc
TARGET_SYSTBL_ABI=common,32
test "$target_user_only" = yes && echo "TARGET_ABI32=y" >> $config_target_mak
;;
s390x)
TARGET_SYSTBL_ABI=common,64
mttcg=yes
gdb_xml_files="s390x-core64.xml s390-acr.xml s390-fpr.xml s390-vx.xml s390-cr.xml s390-virt.xml s390-gs.xml"
;;
tilegx)
;;
tricore)
;;
unicore32)
;;
xtensa|xtensaeb)
TARGET_ARCH=xtensa
TARGET_SYSTBL_ABI=common
bflt="yes"
mttcg="yes"
;;
*)
error_exit "Unsupported target CPU"
;;
esac
# TARGET_BASE_ARCH needs to be defined after TARGET_ARCH
if [ "$TARGET_BASE_ARCH" = "" ]; then
TARGET_BASE_ARCH=$TARGET_ARCH
fi
if [ "$TARGET_SYSTBL_ABI" != "" ] && [ "$TARGET_SYSTBL" = "" ]; then
TARGET_SYSTBL=syscall.tbl
fi
upper() {
echo "$@"| LC_ALL=C tr '[a-z]' '[A-Z]'
}
target_arch_name="$(upper $TARGET_ARCH)"
echo "TARGET_$target_arch_name=y" >> $config_target_mak
echo "TARGET_BASE_ARCH=$TARGET_BASE_ARCH" >> $config_target_mak
if test "$target_user_only" = "yes" ; then
if [ "$TARGET_ABI_DIR" = "" ]; then
TARGET_ABI_DIR=$TARGET_ARCH
fi
echo "TARGET_ABI_DIR=$TARGET_ABI_DIR" >> $config_target_mak
fi
if test "$target_linux_user" = "yes" ; then
if [ "$TARGET_SYSTBL_ABI" != "" ]; then
echo "TARGET_SYSTBL_ABI=$TARGET_SYSTBL_ABI" >> $config_target_mak
echo "TARGET_SYSTBL=$TARGET_SYSTBL" >> $config_target_mak
fi
fi
if test "$target_aligned_only" = "yes" ; then
echo "TARGET_ALIGNED_ONLY=y" >> $config_target_mak
fi
if test "$target_bigendian" = "yes" ; then
echo "TARGET_WORDS_BIGENDIAN=y" >> $config_target_mak
fi
if test "$target_softmmu" = "yes" ; then
if test "$mttcg" = "yes" ; then
echo "TARGET_SUPPORTS_MTTCG=y" >> $config_target_mak
fi
fi
if test "$target_user_only" = "yes" ; then
symlink "../qemu-$target_name" "$target_dir/qemu-$target_name"
else
symlink "../qemu-system-$target_name" "$target_dir/qemu-system-$target_name"
fi
list=""
if test ! -z "$gdb_xml_files" ; then
for x in $gdb_xml_files; do
list="$list gdb-xml/$x"
done
echo "TARGET_XML_FILES=$list" >> $config_target_mak
fi
if test "$target_user_only" = "yes" && test "$bflt" = "yes"; then
echo "TARGET_HAS_BFLT=y" >> $config_target_mak
fi
done # for target in $targets
target_dir="$target"
target_name=$(echo $target | cut -d '-' -f 1)
mkdir -p $target_dir
case $target in
*-user) symlink "../qemu-$target_name" "$target_dir/qemu-$target_name" ;;
*) symlink "../qemu-system-$target_name" "$target_dir/qemu-system-$target_name" ;;
esac
done
if [ "$fdt" = "git" ]; then
subdirs="$subdirs dtc"
@ -7649,6 +7218,9 @@ if [ "$capstone" = "git" -o "$capstone" = "internal" ]; then
subdirs="$subdirs capstone"
fi
echo "CONFIG_QEMU_INTERP_PREFIX=$interp_prefix" | sed 's/%M/@0@/' >> $config_host_mak
if test "$default_targets" = "yes"; then
echo "CONFIG_DEFAULT_TARGETS=y" >> $config_host_mak
fi
echo "SUBDIRS=$subdirs" >> $config_host_mak
if test -n "$LIBCAPSTONE"; then
echo "LIBCAPSTONE=$LIBCAPSTONE" >> $config_host_mak

View File

@ -0,0 +1,5 @@
TARGET_AARCH64=y
TARGET_BASE_ARCH=arm
TARGET_ABI_DIR=aarch64
TARGET_XML_FILES= gdb-xml/aarch64-core.xml gdb-xml/aarch64-fpu.xml gdb-xml/arm-core.xml gdb-xml/arm-vfp.xml gdb-xml/arm-vfp3.xml gdb-xml/arm-neon.xml gdb-xml/arm-m-profile.xml
TARGET_HAS_BFLT=y

View File

@ -0,0 +1,4 @@
TARGET_AARCH64=y
TARGET_BASE_ARCH=arm
TARGET_SUPPORTS_MTTCG=y
TARGET_XML_FILES= gdb-xml/aarch64-core.xml gdb-xml/aarch64-fpu.xml gdb-xml/arm-core.xml gdb-xml/arm-vfp.xml gdb-xml/arm-vfp3.xml gdb-xml/arm-neon.xml gdb-xml/arm-m-profile.xml

View File

@ -0,0 +1,6 @@
TARGET_AARCH64=y
TARGET_BASE_ARCH=arm
TARGET_ABI_DIR=aarch64
TARGET_WORDS_BIGENDIAN=y
TARGET_XML_FILES= gdb-xml/aarch64-core.xml gdb-xml/aarch64-fpu.xml gdb-xml/arm-core.xml gdb-xml/arm-vfp.xml gdb-xml/arm-vfp3.xml gdb-xml/arm-neon.xml gdb-xml/arm-m-profile.xml
TARGET_HAS_BFLT=y

View File

@ -0,0 +1,6 @@
TARGET_ALPHA=y
TARGET_BASE_ARCH=alpha
TARGET_ABI_DIR=alpha
TARGET_SYSTBL_ABI=common
TARGET_SYSTBL=syscall.tbl
TARGET_ALIGNED_ONLY=y

View File

@ -0,0 +1,4 @@
TARGET_ALPHA=y
TARGET_BASE_ARCH=alpha
TARGET_ALIGNED_ONLY=y
TARGET_SUPPORTS_MTTCG=y

View File

@ -0,0 +1,7 @@
TARGET_ARM=y
TARGET_BASE_ARCH=arm
TARGET_ABI_DIR=arm
TARGET_SYSTBL_ABI=common,oabi
TARGET_SYSTBL=syscall.tbl
TARGET_XML_FILES= gdb-xml/arm-core.xml gdb-xml/arm-vfp.xml gdb-xml/arm-vfp3.xml gdb-xml/arm-neon.xml gdb-xml/arm-m-profile.xml
TARGET_HAS_BFLT=y

View File

@ -0,0 +1,4 @@
TARGET_ARM=y
TARGET_BASE_ARCH=arm
TARGET_SUPPORTS_MTTCG=y
TARGET_XML_FILES= gdb-xml/arm-core.xml gdb-xml/arm-vfp.xml gdb-xml/arm-vfp3.xml gdb-xml/arm-neon.xml gdb-xml/arm-m-profile.xml

View File

@ -0,0 +1,8 @@
TARGET_ARM=y
TARGET_BASE_ARCH=arm
TARGET_ABI_DIR=arm
TARGET_SYSTBL_ABI=common,oabi
TARGET_SYSTBL=syscall.tbl
TARGET_WORDS_BIGENDIAN=y
TARGET_XML_FILES= gdb-xml/arm-core.xml gdb-xml/arm-vfp.xml gdb-xml/arm-vfp3.xml gdb-xml/arm-neon.xml gdb-xml/arm-m-profile.xml
TARGET_HAS_BFLT=y

View File

@ -0,0 +1,3 @@
TARGET_AVR=y
TARGET_BASE_ARCH=avr
TARGET_XML_FILES= gdb-xml/avr-cpu.xml

View File

@ -0,0 +1,3 @@
TARGET_CRIS=y
TARGET_BASE_ARCH=cris
TARGET_ABI_DIR=cris

View File

@ -0,0 +1,2 @@
TARGET_CRIS=y
TARGET_BASE_ARCH=cris

View File

@ -0,0 +1,7 @@
TARGET_HPPA=y
TARGET_BASE_ARCH=hppa
TARGET_ABI_DIR=hppa
TARGET_SYSTBL_ABI=common,32
TARGET_SYSTBL=syscall.tbl
TARGET_ALIGNED_ONLY=y
TARGET_WORDS_BIGENDIAN=y

View File

@ -0,0 +1,5 @@
TARGET_HPPA=y
TARGET_BASE_ARCH=hppa
TARGET_ALIGNED_ONLY=y
TARGET_WORDS_BIGENDIAN=y
TARGET_SUPPORTS_MTTCG=y

View File

@ -0,0 +1,4 @@
TARGET_I386=y
TARGET_BASE_ARCH=i386
TARGET_ABI_DIR=i386
TARGET_XML_FILES= gdb-xml/i386-32bit.xml

View File

@ -0,0 +1,6 @@
TARGET_I386=y
TARGET_BASE_ARCH=i386
TARGET_ABI_DIR=i386
TARGET_SYSTBL_ABI=i386
TARGET_SYSTBL=syscall_32.tbl
TARGET_XML_FILES= gdb-xml/i386-32bit.xml

View File

@ -0,0 +1,4 @@
TARGET_I386=y
TARGET_BASE_ARCH=i386
TARGET_SUPPORTS_MTTCG=y
TARGET_XML_FILES= gdb-xml/i386-32bit.xml

View File

@ -0,0 +1,3 @@
TARGET_LM32=y
TARGET_BASE_ARCH=lm32
TARGET_WORDS_BIGENDIAN=y

View File

@ -0,0 +1,8 @@
TARGET_M68K=y
TARGET_BASE_ARCH=m68k
TARGET_ABI_DIR=m68k
TARGET_SYSTBL_ABI=common
TARGET_SYSTBL=syscall.tbl
TARGET_WORDS_BIGENDIAN=y
TARGET_XML_FILES= gdb-xml/cf-core.xml gdb-xml/cf-fp.xml gdb-xml/m68k-core.xml gdb-xml/m68k-fp.xml
TARGET_HAS_BFLT=y

View File

@ -0,0 +1,4 @@
TARGET_M68K=y
TARGET_BASE_ARCH=m68k
TARGET_WORDS_BIGENDIAN=y
TARGET_XML_FILES= gdb-xml/cf-core.xml gdb-xml/cf-fp.xml gdb-xml/m68k-core.xml gdb-xml/m68k-fp.xml

View File

@ -0,0 +1,7 @@
TARGET_MICROBLAZE=y
TARGET_BASE_ARCH=microblaze
TARGET_ABI_DIR=microblaze
TARGET_SYSTBL_ABI=common
TARGET_SYSTBL=syscall.tbl
TARGET_WORDS_BIGENDIAN=y
TARGET_HAS_BFLT=y

View File

@ -0,0 +1,4 @@
TARGET_MICROBLAZE=y
TARGET_BASE_ARCH=microblaze
TARGET_WORDS_BIGENDIAN=y
TARGET_SUPPORTS_MTTCG=y

View File

@ -0,0 +1,6 @@
TARGET_MICROBLAZE=y
TARGET_BASE_ARCH=microblaze
TARGET_ABI_DIR=microblaze
TARGET_SYSTBL_ABI=common
TARGET_SYSTBL=syscall.tbl
TARGET_HAS_BFLT=y

View File

@ -0,0 +1,3 @@
TARGET_MICROBLAZE=y
TARGET_BASE_ARCH=microblaze
TARGET_SUPPORTS_MTTCG=y

View File

@ -0,0 +1,8 @@
TARGET_ABI_MIPSO32=y
TARGET_MIPS=y
TARGET_BASE_ARCH=mips
TARGET_ABI_DIR=mips
TARGET_SYSTBL_ABI=o32
TARGET_SYSTBL=syscall_o32.tbl
TARGET_ALIGNED_ONLY=y
TARGET_WORDS_BIGENDIAN=y

View File

@ -0,0 +1,5 @@
TARGET_MIPS=y
TARGET_BASE_ARCH=mips
TARGET_ALIGNED_ONLY=y
TARGET_WORDS_BIGENDIAN=y
TARGET_SUPPORTS_MTTCG=y

View File

@ -0,0 +1,8 @@
TARGET_ABI_MIPSN64=y
TARGET_MIPS64=y
TARGET_BASE_ARCH=mips
TARGET_ABI_DIR=mips64
TARGET_SYSTBL_ABI=n64
TARGET_SYSTBL=syscall_n64.tbl
TARGET_ALIGNED_ONLY=y
TARGET_WORDS_BIGENDIAN=y

View File

@ -0,0 +1,4 @@
TARGET_MIPS64=y
TARGET_BASE_ARCH=mips
TARGET_ALIGNED_ONLY=y
TARGET_WORDS_BIGENDIAN=y

View File

@ -0,0 +1,7 @@
TARGET_ABI_MIPSN64=y
TARGET_MIPS64=y
TARGET_BASE_ARCH=mips
TARGET_ABI_DIR=mips64
TARGET_SYSTBL_ABI=n64
TARGET_SYSTBL=syscall_n64.tbl
TARGET_ALIGNED_ONLY=y

View File

@ -0,0 +1,3 @@
TARGET_MIPS64=y
TARGET_BASE_ARCH=mips
TARGET_ALIGNED_ONLY=y

View File

@ -0,0 +1,7 @@
TARGET_ABI_MIPSO32=y
TARGET_MIPS=y
TARGET_BASE_ARCH=mips
TARGET_ABI_DIR=mips
TARGET_SYSTBL_ABI=o32
TARGET_SYSTBL=syscall_o32.tbl
TARGET_ALIGNED_ONLY=y

View File

@ -0,0 +1,4 @@
TARGET_MIPS=y
TARGET_BASE_ARCH=mips
TARGET_ALIGNED_ONLY=y
TARGET_SUPPORTS_MTTCG=y

View File

@ -0,0 +1,9 @@
TARGET_ABI_MIPSN32=y
TARGET_ABI32=y
TARGET_MIPS64=y
TARGET_BASE_ARCH=mips
TARGET_ABI_DIR=mips64
TARGET_SYSTBL_ABI=n32
TARGET_SYSTBL=syscall_n32.tbl
TARGET_ALIGNED_ONLY=y
TARGET_WORDS_BIGENDIAN=y

View File

@ -0,0 +1,8 @@
TARGET_ABI_MIPSN32=y
TARGET_ABI32=y
TARGET_MIPS64=y
TARGET_BASE_ARCH=mips
TARGET_ABI_DIR=mips64
TARGET_SYSTBL_ABI=n32
TARGET_SYSTBL=syscall_n32.tbl
TARGET_ALIGNED_ONLY=y

View File

@ -0,0 +1,3 @@
TARGET_MOXIE=y
TARGET_BASE_ARCH=moxie
TARGET_WORDS_BIGENDIAN=y

View File

@ -0,0 +1,3 @@
TARGET_NIOS2=y
TARGET_BASE_ARCH=nios2
TARGET_ABI_DIR=nios2

View File

@ -0,0 +1,2 @@
TARGET_NIOS2=y
TARGET_BASE_ARCH=nios2

View File

@ -0,0 +1,4 @@
TARGET_OPENRISC=y
TARGET_BASE_ARCH=openrisc
TARGET_ABI_DIR=openrisc
TARGET_WORDS_BIGENDIAN=y

View File

@ -0,0 +1,3 @@
TARGET_OPENRISC=y
TARGET_BASE_ARCH=openrisc
TARGET_WORDS_BIGENDIAN=y

View File

@ -0,0 +1,7 @@
TARGET_PPC=y
TARGET_BASE_ARCH=ppc
TARGET_ABI_DIR=ppc
TARGET_SYSTBL_ABI=common,nospu,32
TARGET_SYSTBL=syscall.tbl
TARGET_WORDS_BIGENDIAN=y
TARGET_XML_FILES= gdb-xml/power-core.xml gdb-xml/power-fpu.xml gdb-xml/power-altivec.xml gdb-xml/power-spe.xml

View File

@ -0,0 +1,4 @@
TARGET_PPC=y
TARGET_BASE_ARCH=ppc
TARGET_WORDS_BIGENDIAN=y
TARGET_XML_FILES= gdb-xml/power-core.xml gdb-xml/power-fpu.xml gdb-xml/power-altivec.xml gdb-xml/power-spe.xml

View File

@ -0,0 +1,7 @@
TARGET_PPC64=y
TARGET_BASE_ARCH=ppc
TARGET_ABI_DIR=ppc
TARGET_SYSTBL_ABI=common,nospu,64
TARGET_SYSTBL=syscall.tbl
TARGET_WORDS_BIGENDIAN=y
TARGET_XML_FILES= gdb-xml/power64-core.xml gdb-xml/power-fpu.xml gdb-xml/power-altivec.xml gdb-xml/power-spe.xml gdb-xml/power-vsx.xml

View File

@ -0,0 +1,5 @@
TARGET_PPC64=y
TARGET_BASE_ARCH=ppc
TARGET_WORDS_BIGENDIAN=y
TARGET_SUPPORTS_MTTCG=y
TARGET_XML_FILES= gdb-xml/power64-core.xml gdb-xml/power-fpu.xml gdb-xml/power-altivec.xml gdb-xml/power-spe.xml gdb-xml/power-vsx.xml

View File

@ -0,0 +1,8 @@
TARGET_ABI32=y
TARGET_PPC64=y
TARGET_BASE_ARCH=ppc
TARGET_ABI_DIR=ppc
TARGET_SYSTBL_ABI=common,nospu,32
TARGET_SYSTBL=syscall.tbl
TARGET_WORDS_BIGENDIAN=y
TARGET_XML_FILES= gdb-xml/power64-core.xml gdb-xml/power-fpu.xml gdb-xml/power-altivec.xml gdb-xml/power-spe.xml gdb-xml/power-vsx.xml

View File

@ -0,0 +1,6 @@
TARGET_PPC64=y
TARGET_BASE_ARCH=ppc
TARGET_ABI_DIR=ppc
TARGET_SYSTBL_ABI=common,nospu,64
TARGET_SYSTBL=syscall.tbl
TARGET_XML_FILES= gdb-xml/power64-core.xml gdb-xml/power-fpu.xml gdb-xml/power-altivec.xml gdb-xml/power-spe.xml gdb-xml/power-vsx.xml

View File

@ -0,0 +1,4 @@
TARGET_RISCV32=y
TARGET_BASE_ARCH=riscv
TARGET_ABI_DIR=riscv
TARGET_XML_FILES= gdb-xml/riscv-32bit-cpu.xml gdb-xml/riscv-32bit-fpu.xml gdb-xml/riscv-64bit-fpu.xml gdb-xml/riscv-32bit-csr.xml gdb-xml/riscv-32bit-virtual.xml

View File

@ -0,0 +1,4 @@
TARGET_RISCV32=y
TARGET_BASE_ARCH=riscv
TARGET_SUPPORTS_MTTCG=y
TARGET_XML_FILES= gdb-xml/riscv-32bit-cpu.xml gdb-xml/riscv-32bit-fpu.xml gdb-xml/riscv-64bit-fpu.xml gdb-xml/riscv-32bit-csr.xml gdb-xml/riscv-32bit-virtual.xml

View File

@ -0,0 +1,4 @@
TARGET_RISCV64=y
TARGET_BASE_ARCH=riscv
TARGET_ABI_DIR=riscv
TARGET_XML_FILES= gdb-xml/riscv-64bit-cpu.xml gdb-xml/riscv-32bit-fpu.xml gdb-xml/riscv-64bit-fpu.xml gdb-xml/riscv-64bit-csr.xml gdb-xml/riscv-64bit-virtual.xml

View File

@ -0,0 +1,4 @@
TARGET_RISCV64=y
TARGET_BASE_ARCH=riscv
TARGET_SUPPORTS_MTTCG=y
TARGET_XML_FILES= gdb-xml/riscv-64bit-cpu.xml gdb-xml/riscv-32bit-fpu.xml gdb-xml/riscv-64bit-fpu.xml gdb-xml/riscv-64bit-csr.xml gdb-xml/riscv-64bit-virtual.xml

View File

@ -0,0 +1,3 @@
TARGET_RX=y
TARGET_BASE_ARCH=rx
TARGET_XML_FILES= gdb-xml/rx-core.xml

View File

@ -0,0 +1,7 @@
TARGET_S390X=y
TARGET_BASE_ARCH=s390x
TARGET_ABI_DIR=s390x
TARGET_SYSTBL_ABI=common,64
TARGET_SYSTBL=syscall.tbl
TARGET_WORDS_BIGENDIAN=y
TARGET_XML_FILES= gdb-xml/s390x-core64.xml gdb-xml/s390-acr.xml gdb-xml/s390-fpr.xml gdb-xml/s390-vx.xml gdb-xml/s390-cr.xml gdb-xml/s390-virt.xml gdb-xml/s390-gs.xml

View File

@ -0,0 +1,5 @@
TARGET_S390X=y
TARGET_BASE_ARCH=s390x
TARGET_WORDS_BIGENDIAN=y
TARGET_SUPPORTS_MTTCG=y
TARGET_XML_FILES= gdb-xml/s390x-core64.xml gdb-xml/s390-acr.xml gdb-xml/s390-fpr.xml gdb-xml/s390-vx.xml gdb-xml/s390-cr.xml gdb-xml/s390-virt.xml gdb-xml/s390-gs.xml

View File

@ -0,0 +1,7 @@
TARGET_SH4=y
TARGET_BASE_ARCH=sh4
TARGET_ABI_DIR=sh4
TARGET_SYSTBL_ABI=common
TARGET_SYSTBL=syscall.tbl
TARGET_ALIGNED_ONLY=y
TARGET_HAS_BFLT=y

View File

@ -0,0 +1,3 @@
TARGET_SH4=y
TARGET_BASE_ARCH=sh4
TARGET_ALIGNED_ONLY=y

View File

@ -0,0 +1,8 @@
TARGET_SH4=y
TARGET_BASE_ARCH=sh4
TARGET_ABI_DIR=sh4
TARGET_SYSTBL_ABI=common
TARGET_SYSTBL=syscall.tbl
TARGET_ALIGNED_ONLY=y
TARGET_WORDS_BIGENDIAN=y
TARGET_HAS_BFLT=y

View File

@ -0,0 +1,4 @@
TARGET_SH4=y
TARGET_BASE_ARCH=sh4
TARGET_ALIGNED_ONLY=y
TARGET_WORDS_BIGENDIAN=y

View File

@ -0,0 +1,5 @@
TARGET_SPARC=y
TARGET_BASE_ARCH=sparc
TARGET_ABI_DIR=sparc
TARGET_ALIGNED_ONLY=y
TARGET_WORDS_BIGENDIAN=y

View File

@ -0,0 +1,7 @@
TARGET_SPARC=y
TARGET_BASE_ARCH=sparc
TARGET_ABI_DIR=sparc
TARGET_SYSTBL_ABI=common,32
TARGET_SYSTBL=syscall.tbl
TARGET_ALIGNED_ONLY=y
TARGET_WORDS_BIGENDIAN=y

View File

@ -0,0 +1,4 @@
TARGET_SPARC=y
TARGET_BASE_ARCH=sparc
TARGET_ALIGNED_ONLY=y
TARGET_WORDS_BIGENDIAN=y

View File

@ -0,0 +1,8 @@
TARGET_ABI32=y
TARGET_SPARC64=y
TARGET_BASE_ARCH=sparc
TARGET_ABI_DIR=sparc
TARGET_SYSTBL_ABI=common,32
TARGET_SYSTBL=syscall.tbl
TARGET_ALIGNED_ONLY=y
TARGET_WORDS_BIGENDIAN=y

View File

@ -0,0 +1,5 @@
TARGET_SPARC64=y
TARGET_BASE_ARCH=sparc
TARGET_ABI_DIR=sparc64
TARGET_ALIGNED_ONLY=y
TARGET_WORDS_BIGENDIAN=y

View File

@ -0,0 +1,7 @@
TARGET_SPARC64=y
TARGET_BASE_ARCH=sparc
TARGET_ABI_DIR=sparc64
TARGET_SYSTBL_ABI=common,64
TARGET_SYSTBL=syscall.tbl
TARGET_ALIGNED_ONLY=y
TARGET_WORDS_BIGENDIAN=y

View File

@ -0,0 +1,4 @@
TARGET_SPARC64=y
TARGET_BASE_ARCH=sparc
TARGET_ALIGNED_ONLY=y
TARGET_WORDS_BIGENDIAN=y

View File

@ -0,0 +1,3 @@
TARGET_TILEGX=y
TARGET_BASE_ARCH=tilegx
TARGET_ABI_DIR=tilegx

View File

@ -0,0 +1,2 @@
TARGET_TRICORE=y
TARGET_BASE_ARCH=tricore

View File

@ -0,0 +1,2 @@
TARGET_UNICORE32=y
TARGET_BASE_ARCH=unicore32

View File

@ -0,0 +1,4 @@
TARGET_X86_64=y
TARGET_BASE_ARCH=i386
TARGET_ABI_DIR=x86_64
TARGET_XML_FILES= gdb-xml/i386-64bit.xml

View File

@ -0,0 +1,6 @@
TARGET_X86_64=y
TARGET_BASE_ARCH=i386
TARGET_ABI_DIR=x86_64
TARGET_SYSTBL_ABI=common,64
TARGET_SYSTBL=syscall_64.tbl
TARGET_XML_FILES= gdb-xml/i386-64bit.xml

View File

@ -0,0 +1,4 @@
TARGET_X86_64=y
TARGET_BASE_ARCH=i386
TARGET_SUPPORTS_MTTCG=y
TARGET_XML_FILES= gdb-xml/i386-64bit.xml

View File

@ -0,0 +1,7 @@
TARGET_XTENSA=y
TARGET_BASE_ARCH=xtensa
TARGET_ABI_DIR=xtensa
TARGET_SYSTBL_ABI=common
TARGET_SYSTBL=syscall.tbl
TARGET_ALIGNED_ONLY=y
TARGET_HAS_BFLT=y

View File

@ -0,0 +1,4 @@
TARGET_XTENSA=y
TARGET_BASE_ARCH=xtensa
TARGET_ALIGNED_ONLY=y
TARGET_SUPPORTS_MTTCG=y

View File

@ -0,0 +1,8 @@
TARGET_XTENSA=y
TARGET_BASE_ARCH=xtensa
TARGET_ABI_DIR=xtensa
TARGET_SYSTBL_ABI=common
TARGET_SYSTBL=syscall.tbl
TARGET_ALIGNED_ONLY=y
TARGET_WORDS_BIGENDIAN=y
TARGET_HAS_BFLT=y

View File

@ -0,0 +1,5 @@
TARGET_XTENSA=y
TARGET_BASE_ARCH=xtensa
TARGET_ALIGNED_ONLY=y
TARGET_WORDS_BIGENDIAN=y
TARGET_SUPPORTS_MTTCG=y

View File

@ -723,13 +723,25 @@ kconfig_external_symbols = [
]
ignored = ['TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_DIRS']
default_targets = 'CONFIG_DEFAULT_TARGETS' in config_host
actual_target_dirs = []
foreach target : target_dirs
config_target = { 'TARGET_NAME': target.split('-')[0] }
if target.endswith('linux-user')
assert(targetos == 'linux')
if targetos != 'linux'
if default_targets
continue
endif
error('Target @0@ is only available on a Linux host'.format(target))
endif
config_target += { 'CONFIG_LINUX_USER': 'y' }
elif target.endswith('bsd-user')
assert('CONFIG_BSD' in config_host)
if 'CONFIG_BSD' not in config_host
if default_targets
continue
endif
error('Target @0@ is only available on a BSD host'.format(target))
endif
config_target += { 'CONFIG_BSD_USER': 'y' }
elif target.endswith('softmmu')
config_target += { 'CONFIG_SOFTMMU': 'y' }
@ -753,8 +765,14 @@ foreach target : target_dirs
have_accel = true
endif
endforeach
assert(have_accel)
if not have_accel
if default_targets
continue
endif
error('No accelerator available for target @0@'.format(target))
endif
actual_target_dirs += target
config_target += keyval.load('default-configs/targets' / target + '.mak')
foreach k, v: disassemblers
@ -816,6 +834,7 @@ foreach target : target_dirs
endif
config_target_mak += {target: config_target}
endforeach
target_dirs = actual_target_dirs
# This configuration is used to build files that are shared by
# multiple binaries, and then extracted out of the "common"
@ -1519,7 +1538,7 @@ if config_host.has_key('CONFIG_MODULES')
endif
summary_info += {'host CPU': cpu}
summary_info += {'host endianness': build_machine.endian()}
summary_info += {'target list': config_host['TARGET_DIRS']}
summary_info += {'target list': ' '.join(target_dirs)}
summary_info += {'gprof enabled': config_host.has_key('CONFIG_GPROF')}
summary_info += {'sparse enabled': meson.get_compiler('c').cmd_array().contains('cgcc')}
summary_info += {'strip binaries': get_option('strip')}