aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure627
1 files changed, 76 insertions, 551 deletions
diff --git a/configure b/configure
index f46f433649..66641099fc 100755
--- a/configure
+++ b/configure
@@ -219,108 +219,6 @@ glob() {
eval test -z '"${1#'"$2"'}"'
}
-supported_hax_target() {
- test "$hax" = "yes" || return 1
- glob "$1" "*-softmmu" || return 1
- case "${1%-softmmu}" in
- i386|x86_64)
- return 0
- ;;
- esac
- return 1
-}
-
-supported_kvm_target() {
- test "$kvm" = "yes" || 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" = "yes" || 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" = "yes" || return 1
- glob "$1" "*-softmmu" || return 1
- case "${1%-softmmu}" in
- x86_64)
- return 0
- ;;
- esac
- return 1
-}
-
-supported_whpx_target() {
- test "$whpx" = "yes" || 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" = "yes" && 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
}
@@ -405,7 +303,7 @@ sdl_image="auto"
virtfs=""
mpath="auto"
vnc="enabled"
-sparse="no"
+sparse="auto"
vde=""
vnc_sasl="auto"
vnc_jpeg="auto"
@@ -413,14 +311,14 @@ vnc_png="auto"
xkbcommon="auto"
xen=""
xen_ctrl_version=""
-xen_pci_passthrough=""
+xen_pci_passthrough="auto"
linux_aio=""
linux_io_uring=""
cap_ng=""
attr=""
libattr=""
xfs=""
-tcg="yes"
+tcg="enabled"
membarrier=""
vhost_net=""
vhost_crypto=""
@@ -428,10 +326,10 @@ vhost_scsi=""
vhost_vsock=""
vhost_user=""
vhost_user_fs=""
-kvm="no"
-hax="no"
-hvf="no"
-whpx="no"
+kvm="auto"
+hax="auto"
+hvf="auto"
+whpx="auto"
rdma=""
pvrdma=""
gprof="no"
@@ -811,14 +709,9 @@ fi
# OS specific
-# host *BSD for user mode
-HOST_VARIANT_DIR=""
-
case $targetos in
MINGW32*)
mingw32="yes"
- hax="yes"
- whpx=""
vhost_user="no"
audio_possible_drivers="dsound sdl"
if check_include dsound.h; then
@@ -841,36 +734,29 @@ FreeBSD)
audio_possible_drivers="oss sdl pa"
# needed for kinfo_getvmmap(3) in libutil.h
netmap="" # enable netmap autodetect
- HOST_VARIANT_DIR="freebsd"
;;
DragonFly)
bsd="yes"
make="${MAKE-gmake}"
audio_drv_list="oss try-sdl"
audio_possible_drivers="oss sdl pa"
- HOST_VARIANT_DIR="dragonfly"
;;
NetBSD)
bsd="yes"
- hax="yes"
make="${MAKE-gmake}"
audio_drv_list="oss try-sdl"
audio_possible_drivers="oss sdl"
oss_lib="-lossaudio"
- HOST_VARIANT_DIR="netbsd"
;;
OpenBSD)
bsd="yes"
make="${MAKE-gmake}"
audio_drv_list="try-sdl"
audio_possible_drivers="sdl"
- HOST_VARIANT_DIR="openbsd"
;;
Darwin)
bsd="yes"
darwin="yes"
- hax="yes"
- hvf=""
if [ "$cpu" = "x86_64" ] ; then
QEMU_CFLAGS="-arch x86_64 $QEMU_CFLAGS"
QEMU_LDFLAGS="-arch x86_64 $QEMU_LDFLAGS"
@@ -882,7 +768,6 @@ Darwin)
# Disable attempts to use ObjectiveC features in os/object.h since they
# won't work when we're compiling with gcc as a C compiler.
QEMU_CFLAGS="-DOS_OBJECT_USE_OBJC=0 $QEMU_CFLAGS"
- HOST_VARIANT_DIR="darwin"
;;
SunOS)
solaris="yes"
@@ -906,7 +791,6 @@ Linux)
audio_possible_drivers="oss alsa sdl pa"
linux="yes"
linux_user="yes"
- kvm="yes"
QEMU_INCLUDES="-isystem ${source_path}/linux-headers -Ilinux-headers $QEMU_INCLUDES"
;;
esac
@@ -1156,9 +1040,9 @@ for opt do
;;
--disable-tsan) tsan="no"
;;
- --enable-sparse) sparse="yes"
+ --enable-sparse) sparse="enabled"
;;
- --disable-sparse) sparse="no"
+ --disable-sparse) sparse="disabled"
;;
--disable-strip) strip_opt="no"
;;
@@ -1188,33 +1072,33 @@ for opt do
;;
--enable-netmap) netmap="yes"
;;
- --disable-xen) xen="no"
+ --disable-xen) xen="disabled"
;;
- --enable-xen) xen="yes"
+ --enable-xen) xen="enabled"
;;
- --disable-xen-pci-passthrough) xen_pci_passthrough="no"
+ --disable-xen-pci-passthrough) xen_pci_passthrough="disabled"
;;
- --enable-xen-pci-passthrough) xen_pci_passthrough="yes"
+ --enable-xen-pci-passthrough) xen_pci_passthrough="enabled"
;;
--disable-brlapi) brlapi="no"
;;
--enable-brlapi) brlapi="yes"
;;
- --disable-kvm) kvm="no"
+ --disable-kvm) kvm="disabled"
;;
- --enable-kvm) kvm="yes"
+ --enable-kvm) kvm="enabled"
;;
- --disable-hax) hax="no"
+ --disable-hax) hax="disabled"
;;
- --enable-hax) hax="yes"
+ --enable-hax) hax="enabled"
;;
- --disable-hvf) hvf="no"
+ --disable-hvf) hvf="disabled"
;;
- --enable-hvf) hvf="yes"
+ --enable-hvf) hvf="enabled"
;;
- --disable-whpx) whpx="no"
+ --disable-whpx) whpx="disabled"
;;
- --enable-whpx) whpx="yes"
+ --enable-whpx) whpx="enabled"
;;
--disable-tcg-interpreter) tcg_interpreter="no"
;;
@@ -1224,9 +1108,9 @@ for opt do
;;
--enable-cap-ng) cap_ng="yes"
;;
- --disable-tcg) tcg="no"
+ --disable-tcg) tcg="disabled"
;;
- --enable-tcg) tcg="yes"
+ --enable-tcg) tcg="enabled"
;;
--disable-malloc-trim) malloc_trim="disabled"
;;
@@ -1710,22 +1594,19 @@ if [ "$ARCH" = "unknown" ]; then
linux_user="no"
fi
-if [ "$bsd_user" = "no" -a "$linux_user" = "no" -a "$softmmu" = "no" ] ; then
- tcg="no"
-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
- mak_wilds="${mak_wilds} $source_path/default-configs/*-softmmu.mak"
+ mak_wilds="${mak_wilds} $source_path/default-configs/targets/*-softmmu.mak"
fi
if [ "$linux_user" = "yes" ]; then
- mak_wilds="${mak_wilds} $source_path/default-configs/*-linux-user.mak"
+ mak_wilds="${mak_wilds} $source_path/default-configs/targets/*-linux-user.mak"
fi
if [ "$bsd_user" = "yes" ]; then
- mak_wilds="${mak_wilds} $source_path/default-configs/*-bsd-user.mak"
+ mak_wilds="${mak_wilds} $source_path/default-configs/targets/*-bsd-user.mak"
fi
# If the user doesn't explicitly specify a deprecated target we will
@@ -2043,16 +1924,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
@@ -2304,12 +2175,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
@@ -2321,10 +2193,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
@@ -2665,10 +2543,11 @@ if test "$seccomp" != "no" ; then
seccomp="no"
fi
fi
+
##########################################
# xen probe
-if test "$xen" != "no" ; then
+if test "$xen" != "disabled" ; then
# Check whether Xen library path is specified via --extra-ldflags to avoid
# overriding this setting with pkg-config output. If not, try pkg-config
# to obtain all needed flags.
@@ -2677,7 +2556,7 @@ if test "$xen" != "no" ; then
$pkg_config --exists xencontrol ; then
xen_ctrl_version="$(printf '%d%02d%02d' \
$($pkg_config --modversion xencontrol | sed 's/\./ /g') )"
- xen=yes
+ xen=enabled
xen_pc="xencontrol xenstore xenguest xenforeignmemory xengnttab"
xen_pc="$xen_pc xenevtchn xendevicemodel"
if $pkg_config --exists xentoolcore; then
@@ -2703,10 +2582,10 @@ int main(void) {
EOF
if ! compile_prog "" "$xen_libs" ; then
# Xen not found
- if test "$xen" = "yes" ; then
+ if test "$xen" = "enabled" ; then
feature_not_found "xen" "Install xen devel"
fi
- xen=no
+ xen=disabled
# Xen unstable
elif
@@ -2732,7 +2611,7 @@ EOF
then
xen_stable_libs="-lxendevicemodel $xen_stable_libs -lxentoolcore"
xen_ctrl_version=41100
- xen=yes
+ xen=enabled
elif
cat > $TMPC <<EOF &&
#undef XC_WANT_COMPAT_MAP_FOREIGN_API
@@ -2752,7 +2631,7 @@ EOF
then
xen_stable_libs="-lxendevicemodel $xen_stable_libs -lxentoolcore"
xen_ctrl_version=41000
- xen=yes
+ xen=enabled
elif
cat > $TMPC <<EOF &&
#undef XC_WANT_COMPAT_DEVICEMODEL_API
@@ -2771,7 +2650,7 @@ EOF
then
xen_stable_libs="-lxendevicemodel $xen_stable_libs"
xen_ctrl_version=40900
- xen=yes
+ xen=enabled
elif
cat > $TMPC <<EOF &&
/*
@@ -2824,7 +2703,7 @@ EOF
compile_prog "" "$xen_libs $xen_stable_libs"
then
xen_ctrl_version=40800
- xen=yes
+ xen=enabled
elif
cat > $TMPC <<EOF &&
/*
@@ -2873,7 +2752,7 @@ EOF
compile_prog "" "$xen_libs $xen_stable_libs"
then
xen_ctrl_version=40701
- xen=yes
+ xen=enabled
# Xen 4.6
elif
@@ -2901,7 +2780,7 @@ EOF
compile_prog "" "$xen_libs"
then
xen_ctrl_version=40600
- xen=yes
+ xen=enabled
# Xen 4.5
elif
@@ -2928,7 +2807,7 @@ EOF
compile_prog "" "$xen_libs"
then
xen_ctrl_version=40500
- xen=yes
+ xen=enabled
elif
cat > $TMPC <<EOF &&
@@ -2953,17 +2832,17 @@ EOF
compile_prog "" "$xen_libs"
then
xen_ctrl_version=40200
- xen=yes
+ xen=enabled
else
- if test "$xen" = "yes" ; then
+ if test "$xen" = "enabled" ; then
feature_not_found "xen (unsupported version)" \
"Install a supported xen (xen 4.2 or newer)"
fi
- xen=no
+ xen=disabled
fi
- if test "$xen" = yes; then
+ if test "$xen" = enabled; then
if test $xen_ctrl_version -ge 40701 ; then
xen_libs="$xen_libs $xen_stable_libs "
fi
@@ -2971,35 +2850,19 @@ EOF
fi
fi
-if test "$xen_pci_passthrough" != "no"; then
- if test "$xen" = "yes" && test "$linux" = "yes"; then
- xen_pci_passthrough=yes
+if test "$xen_pci_passthrough" != "disabled"; then
+ if test "$xen" = "enabled" && test "$linux" = "yes"; then
+ xen_pci_passthrough=enabled
else
- if test "$xen_pci_passthrough" = "yes"; then
+ if test "$xen_pci_passthrough" = "enabled"; then
error_exit "User requested feature Xen PCI Passthrough" \
" but this feature requires /sys from Linux"
fi
- xen_pci_passthrough=no
+ xen_pci_passthrough=disabled
fi
fi
##########################################
-# Windows Hypervisor Platform accelerator (WHPX) check
-if test "$whpx" = "yes" && test "$ARCH" != "x86_64"; then
- error_exit "WHPX requires 64-bit host"
-fi
-if test "$whpx" != "no" && test "$ARCH" = "x86_64"; then
- if check_include "WinHvPlatform.h" && check_include "WinHvEmulation.h"; then
- whpx="yes"
- else
- if test "$whpx" = "yes"; then
- feature_not_found "WinHvPlatform" "WinHvEmulation is not installed"
- fi
- whpx="no"
- fi
-fi
-
-##########################################
# gettext probe
if test "$gettext" != "false" ; then
if has xgettext; then
@@ -3013,19 +2876,6 @@ if test "$gettext" != "false" ; then
fi
##########################################
-# Sparse probe
-if test "$sparse" != "no" ; then
- if has sparse; then
- sparse=yes
- else
- if test "$sparse" = "yes" ; then
- feature_not_found "sparse" "Install sparse binary"
- fi
- sparse=no
- fi
-fi
-
-##########################################
# X11 probe
if $pkg_config --exists "x11"; then
have_x11=yes
@@ -5782,23 +5632,6 @@ fi
#################################################
-# Check to see if we have the Hypervisor framework
-if [ "$hvf" != "no" ] ; then
- cat > $TMPC << EOF
-#include <Hypervisor/hv.h>
-int main() { return 0;}
-EOF
- if ! compile_object ""; then
- if test "$hvf" = "yes"; then
- error_exit "Hypervisor.framework not available"
- fi
- hvf='no'
- else
- hvf='yes'
- fi
-fi
-
-##########################################
# check for sysmacros.h
have_sysmacros=no
@@ -6151,17 +5984,6 @@ if test "$mingw32" = "yes" ; then
done
fi
-# Disable OpenBSD W^X if available
-if test "$tcg" = "yes" && test "$targetos" = "OpenBSD"; then
- cat > $TMPC <<EOF
- int main(void) { return 0; }
-EOF
- wx_ldflags="-Wl,-z,wxneeded"
- if compile_prog "" "$wx_ldflags"; then
- QEMU_LDFLAGS="$QEMU_LDFLAGS $wx_ldflags"
- fi
-fi
-
qemu_confdir="$sysconfdir/$qemu_suffix"
qemu_moddir="$libdir/$qemu_suffix"
qemu_datadir="$datadir/$qemu_suffix"
@@ -6703,7 +6525,7 @@ if test "$virglrenderer" = "yes" ; then
echo "VIRGL_CFLAGS=$virgl_cflags" >> $config_host_mak
echo "VIRGL_LIBS=$virgl_libs" >> $config_host_mak
fi
-if test "$xen" = "yes" ; then
+if test "$xen" = "enabled" ; then
echo "CONFIG_XEN_BACKEND=y" >> $config_host_mak
echo "CONFIG_XEN_CTRL_INTERFACE_VERSION=$xen_ctrl_version" >> $config_host_mak
echo "XEN_CFLAGS=$xen_cflags" >> $config_host_mak
@@ -6783,8 +6605,7 @@ fi
if test "$optreset" = "yes" ; then
echo "HAVE_OPTRESET=y" >> $config_host_mak
fi
-if test "$tcg" = "yes"; then
- echo "CONFIG_TCG=y" >> $config_host_mak
+if test "$tcg" = "enabled"; then
if test "$tcg_interpreter" = "yes" ; then
echo "CONFIG_TCG_INTERPRETER=y" >> $config_host_mak
fi
@@ -7248,9 +7069,6 @@ 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
-if test "$sparse" = "yes" ; then
- echo "SPARSE_CFLAGS = -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-non-pointer-null" >> $config_host_mak
-fi
echo "QEMU_LDFLAGS=$QEMU_LDFLAGS" >> $config_host_mak
echo "LDFLAGS_NOPIE=$LDFLAGS_NOPIE" >> $config_host_mak
echo "LD_I386_EMULATION=$ld_i386_emulation" >> $config_host_mak
@@ -7308,317 +7126,22 @@ 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
- 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
- echo "TARGET_ABI_MIPSN32=y" >> $config_target_mak
- 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
- 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
- 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
- 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_NAME=$target_name" >> $config_target_mak
-echo "TARGET_BASE_ARCH=$TARGET_BASE_ARCH" >> $config_target_mak
-if [ "$TARGET_ABI_DIR" = "" ]; then
- TARGET_ABI_DIR=$TARGET_ARCH
-fi
-echo "TARGET_ABI_DIR=$TARGET_ABI_DIR" >> $config_target_mak
-if [ "$HOST_VARIANT_DIR" != "" ]; then
- echo "HOST_VARIANT_DIR=$HOST_VARIANT_DIR" >> $config_target_mak
-fi
-if [ "$TARGET_SYSTBL_ABI" != "" ]; then
- echo "TARGET_SYSTBL_ABI=$TARGET_SYSTBL_ABI" >> $config_target_mak
- echo "TARGET_SYSTBL=$TARGET_SYSTBL" >> $config_target_mak
-fi
-
-if supported_xen_target $target; then
- echo "CONFIG_XEN=y" >> $config_target_mak
- if test "$xen_pci_passthrough" = yes; then
- echo "CONFIG_XEN_PCI_PASSTHROUGH=y" >> "$config_target_mak"
- fi
-fi
-if supported_kvm_target $target; then
- echo "CONFIG_KVM=y" >> $config_target_mak
-fi
-if supported_hax_target $target; then
- echo "CONFIG_HAX=y" >> $config_target_mak
-fi
-if supported_hvf_target $target; then
- echo "CONFIG_HVF=y" >> $config_target_mak
-fi
-if supported_whpx_target $target; then
- echo "CONFIG_WHPX=y" >> $config_target_mak
-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
- echo "CONFIG_SOFTMMU=y" >> $config_target_mak
- if test "$mttcg" = "yes" ; then
- echo "TARGET_SUPPORTS_MTTCG=y" >> $config_target_mak
- fi
-fi
-if test "$target_user_only" = "yes" ; then
- echo "CONFIG_USER_ONLY=y" >> $config_target_mak
- echo "CONFIG_QEMU_INTERP_PREFIX=\"$interp_prefix1\"" >> $config_target_mak
- symlink "../qemu-$target_name" "$target_dir/qemu-$target_name"
-else
- symlink "../qemu-system-$target_name" "$target_dir/qemu-system-$target_name"
-fi
-if test "$target_linux_user" = "yes" ; then
- echo "CONFIG_LINUX_USER=y" >> $config_target_mak
-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
-if test "$target_bsd_user" = "yes" ; then
- echo "CONFIG_BSD_USER=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"
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 "$numa" = "yes"; then
@@ -7792,7 +7315,9 @@ NINJA=${ninja:-$PWD/ninjatool} $meson setup \
-Dstrip=$(if test "$strip_opt" = yes; then echo true; else echo false; fi) \
-Db_pie=$(if test "$pie" = yes; then echo true; else echo false; fi) \
-Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false; fi) \
- -Dmalloc=$malloc -Dmalloc_trim=$malloc_trim \
+ -Dmalloc=$malloc -Dmalloc_trim=$malloc_trim -Dsparse=$sparse \
+ -Dkvm=$kvm -Dhax=$hax -Dwhpx=$whpx -Dhvf=$hvf \
+ -Dxen=$xen -Dxen_pci_passthrough=$xen_pci_passthrough -Dtcg=$tcg \
-Dcocoa=$cocoa -Dmpath=$mpath -Dsdl=$sdl -Dsdl_image=$sdl_image \
-Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \
-Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f \