TMPCXX="${TMPDIR1}/${TMPB}.cxx"
TMPE="${TMPDIR1}/${TMPB}.exe"
TMPMO="${TMPDIR1}/${TMPB}.mo"
+TMPTXT="${TMPDIR1}/${TMPB}.txt"
rm -f config.log
# Set QEMU_CXXFLAGS from QEMU_CFLAGS by filtering out those
# options which some versions of GCC's C++ compiler complain about
# because they only make sense for C programs.
- QEMU_CXXFLAGS="$QEMU_CXXFLAGS -D__STDC_LIMIT_MACROS"
+ QEMU_CXXFLAGS="$QEMU_CXXFLAGS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS"
for arg in $QEMU_CFLAGS; do
case $arg in
libs_cpu=""
libs_softmmu=""
libs_tools=""
-audio_pt_int=""
audio_win_int=""
libs_qga=""
debug_info="yes"
stack_protector=""
+use_containers="yes"
if test -e "$source_path/.git"
then
# Distributions want to ensure that several features are compiled in, and it
# is impossible without a --enable-foo that exits if a feature is not found.
-bluez=""
brlapi=""
curl=""
curses=""
vhost_scsi=""
vhost_vsock=""
vhost_user=""
+vhost_user_fs=""
kvm="no"
hax="no"
hvf="no"
linux_user="no"
bsd_user="no"
blobs="yes"
+edk2_blobs="no"
pkgversion=""
pie=""
qom_cast_debug="yes"
tls_priority="NORMAL"
gnutls=""
nettle=""
+nettle_xts="no"
gcrypt=""
gcrypt_hmac="no"
+gcrypt_xts="no"
+qemu_private_xts="yes"
auth_pam=""
vte=""
virglrenderer=""
parallels="yes"
sheepdog="yes"
libxml2=""
-docker="no"
debug_mutex="no"
libpmem=""
default_devices="yes"
-
-# cross compilers defaults, can be overridden with --cross-cc-ARCH
-cross_cc_aarch64="aarch64-linux-gnu-gcc"
-cross_cc_aarch64_be="$cross_cc_aarch64"
-cross_cc_cflags_aarch64_be="-mbig-endian"
-cross_cc_arm="arm-linux-gnueabihf-gcc"
-cross_cc_cflags_armeb="-mbig-endian"
-cross_cc_i386="i386-pc-linux-gnu-gcc"
-cross_cc_cflags_i386=""
-cross_cc_ppc="powerpc-linux-gnu-gcc"
-cross_cc_cflags_ppc="-m32"
-cross_cc_ppc64="powerpc-linux-gnu-gcc"
-cross_cc_cflags_ppc64="-m64"
-cross_cc_ppc64le="powerpc64le-linux-gnu-gcc"
-
-enabled_cross_compilers=""
+plugins="no"
supported_cpu="no"
supported_os="no"
;;
--cross-cc-cflags-*) cc_arch=${opt#--cross-cc-flags-}; cc_arch=${cc_arch%%=*}
eval "cross_cc_cflags_${cc_arch}=\$optarg"
+ cross_cc_vars="$cross_cc_vars cross_cc_cflags_${cc_arch}"
;;
--cross-cc-*) cc_arch=${opt#--cross-cc-}; cc_arch=${cc_arch%%=*}
+ cc_archs="$cc_archs $cc_arch"
eval "cross_cc_${cc_arch}=\$optarg"
+ cross_cc_vars="$cross_cc_vars cross_cc_${cc_arch}"
;;
esac
done
QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
QEMU_INCLUDES="-iquote . -iquote \$(SRC_PATH) -iquote \$(SRC_PATH)/accel/tcg -iquote \$(SRC_PATH)/include"
+QEMU_INCLUDES="$QEMU_INCLUDES -iquote \$(SRC_PATH)/disas/libvixl"
if test "$debug_info" = "yes"; then
CFLAGS="-g $CFLAGS"
LDFLAGS="-g $LDFLAGS"
# Normalise host CPU name and set ARCH.
# Note that this case should only have supported host CPUs, not guests.
case "$cpu" in
- ppc|ppc64|s390|s390x|sparc64|x32|riscv32|riscv64)
+ ppc|ppc64|s390x|sparc64|x32|riscv32|riscv64)
supported_cpu="yes"
- eval "cross_cc_${cpu}=\$host_cc"
;;
ppc64le)
ARCH="ppc64"
supported_cpu="yes"
- cross_cc_ppc64le=$host_cc
;;
i386|i486|i586|i686|i86pc|BePC)
cpu="i386"
supported_cpu="yes"
- cross_cc_i386=$host_cc
;;
x86_64|amd64)
cpu="x86_64"
supported_cpu="yes"
- cross_cc_x86_64=$host_cc
;;
armv*b|armv*l|arm)
cpu="arm"
supported_cpu="yes"
- cross_cc_arm=$host_cc
;;
aarch64)
cpu="aarch64"
supported_cpu="yes"
- cross_cc_aarch64=$host_cc
;;
mips*)
cpu="mips"
supported_cpu="yes"
- cross_cc_mips=$host_cc
;;
sparc|sun4[cdmuv])
cpu="sparc"
supported_cpu="yes"
- cross_cc_sparc=$host_cc
;;
*)
# This will result in either an error or falling back to TCI later
do
if has "$binary"
then
- python="$binary"
+ python=$(command -v "$binary")
break
fi
done
DSOSUF=".dll"
# MinGW needs -mthreads for TLS and macro _MT.
QEMU_CFLAGS="-mthreads $QEMU_CFLAGS"
- LIBS="-lwinmm -lws2_32 -liphlpapi $LIBS"
+ LIBS="-lwinmm -lws2_32 $LIBS"
write_c_skeleton;
if compile_prog "" "-liberty" ; then
LIBS="-liberty $LIBS"
;;
--enable-brlapi) brlapi="yes"
;;
- --disable-bluez) bluez="no"
- ;;
- --enable-bluez) bluez="yes"
- ;;
--disable-kvm) kvm="no"
;;
--enable-kvm) kvm="yes"
;;
--enable-vhost-vsock) vhost_vsock="yes"
;;
+ --disable-vhost-user-fs) vhost_user_fs="no"
+ ;;
+ --enable-vhost-user-fs) vhost_user_fs="yes"
+ ;;
--disable-opengl) opengl="no"
;;
--enable-opengl) opengl="yes"
;;
--disable-libpmem) libpmem=no
;;
+ --enable-xkbcommon) xkbcommon=yes
+ ;;
+ --disable-xkbcommon) xkbcommon=no
+ ;;
+ --enable-plugins) plugins="yes"
+ ;;
+ --disable-plugins) plugins="no"
+ ;;
+ --enable-containers) use_containers="yes"
+ ;;
+ --disable-containers) use_containers="no"
+ ;;
*)
echo "ERROR: unknown option $opt"
echo "Try '$0 --help' for more information"
ppc)
CPU_CFLAGS="-m32"
LDFLAGS="-m32 $LDFLAGS"
- cross_cc_ppc=$cc
- cross_cc_cflags_ppc="$CPU_CFLAGS"
;;
ppc64)
CPU_CFLAGS="-m64"
LDFLAGS="-m64 $LDFLAGS"
- cross_cc_ppc64=$cc
- cross_cc_cflags_ppc64="$CPU_CFLAGS"
;;
sparc)
CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc"
LDFLAGS="-m32 -mv8plus $LDFLAGS"
- cross_cc_sparc=$cc
- cross_cc_cflags_sparc="$CPU_CFLAGS"
;;
sparc64)
CPU_CFLAGS="-m64 -mcpu=ultrasparc"
LDFLAGS="-m64 $LDFLAGS"
- cross_cc_sparc64=$cc
- cross_cc_cflags_sparc64="$CPU_CFLAGS"
;;
s390)
CPU_CFLAGS="-m31"
LDFLAGS="-m31 $LDFLAGS"
- cross_cc_s390=$cc
- cross_cc_cflags_s390="$CPU_CFLAGS"
;;
s390x)
CPU_CFLAGS="-m64"
LDFLAGS="-m64 $LDFLAGS"
- cross_cc_s390x=$cc
- cross_cc_cflags_s390x="$CPU_CFLAGS"
;;
i386)
CPU_CFLAGS="-m32"
LDFLAGS="-m32 $LDFLAGS"
- cross_cc_i386=$cc
- cross_cc_cflags_i386="$CPU_CFLAGS"
;;
x86_64)
# ??? Only extremely old AMD cpus do not have cmpxchg16b.
# runtime and generate the fallback to serial emulation.
CPU_CFLAGS="-m64 -mcx16"
LDFLAGS="-m64 $LDFLAGS"
- cross_cc_x86_64=$cc
- cross_cc_cflags_x86_64="$CPU_CFLAGS"
;;
x32)
CPU_CFLAGS="-mx32"
LDFLAGS="-mx32 $LDFLAGS"
- cross_cc_i386=$cc
- cross_cc_cflags_i386="$CPU_CFLAGS"
;;
# No special flags required for other host CPUs
esac
+eval "cross_cc_${cpu}=\$host_cc"
+cross_cc_vars="$cross_cc_vars cross_cc_${cpu}"
QEMU_CFLAGS="$CPU_CFLAGS $QEMU_CFLAGS"
# For user-mode emulation the host arch has to be one we explicitly
--enable-profiler profiler support
--enable-debug-stack-usage
track the maximum stack usage of stacks created by qemu_alloc_stack
+ --enable-plugins
+ enable plugins via shared library loading
+ --disable-containers don't use containers for cross-building
Optional features, enabled with --enable-FEATURE and
disabled with --disable-FEATURE, default is enabled if available:
curl curl connectivity
membarrier membarrier system call (for Linux 4.14+ or Windows)
fdt fdt device tree
- bluez bluez stack connectivity
kvm KVM acceleration support
hax HAX acceleration support
hvf Hypervisor.framework acceleration support
capstone capstone disassembler support
debug-mutex mutex debugging support
libpmem libpmem support
+ xkbcommon xkbcommon support
NOTE: The object files are built at the place where configure is launched
EOF
int main(void) { return tls_var; }
EOF
+ # check we support --no-pie first...
+ if compile_prog "-Werror -fno-pie" "-no-pie"; then
+ CFLAGS_NOPIE="-fno-pie"
+ LDFLAGS_NOPIE="-nopie"
+ fi
+
if compile_prog "-fPIE -DPIE" "-pie"; then
QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
LDFLAGS="-pie $LDFLAGS"
pie="no"
fi
fi
-
- if compile_prog "-Werror -fno-pie" "-nopie"; then
- CFLAGS_NOPIE="-fno-pie"
- LDFLAGS_NOPIE="-nopie"
- fi
fi
##########################################
;;
esac
+for target in $target_list; do
+ case "$target" in
+ arm-softmmu | aarch64-softmmu | i386-softmmu | x86_64-softmmu)
+ edk2_blobs="yes"
+ ;;
+ esac
+done
+# The EDK2 binaries are compressed with bzip2
+if test "$edk2_blobs" = "yes" && ! has bzip2; then
+ error_exit "The bzip2 program is required for building QEMU"
+fi
+
feature_not_found() {
feature=$1
remedy=$2
if test "$vhost_crypto" = "yes" && test "$vhost_user" = "no"; then
error_exit "--enable-vhost-crypto requires --enable-vhost-user"
fi
+test "$vhost_user_fs" = "" && vhost_user_fs=$vhost_user
+if test "$vhost_user_fs" = "yes" && test "$vhost_user" = "no"; then
+ error_exit "--enable-vhost-user-fs requires --enable-vhost-user"
+fi
# OR the vhost-kernel and vhost-user values for simplicity
if test "$vhost_net" = ""; then
pass="yes"
fi
fi
+ if test "$pass" = "yes"
+ then
+ cat > $TMPC << EOF
+#include <nettle/xts.h>
+int main(void) {
+ return 0;
+}
+EOF
+ if compile_prog "$nettle_cflags" "$nettle_libs" ; then
+ nettle_xts=yes
+ qemu_private_xts=no
+ fi
+ fi
if test "$pass" = "no" && test "$nettle" = "yes"; then
feature_not_found "nettle" "Install nettle devel >= 2.7.1"
else
if compile_prog "$gcrypt_cflags" "$gcrypt_libs" ; then
gcrypt_hmac=yes
fi
+ cat > $TMPC << EOF
+#include <gcrypt.h>
+int main(void) {
+ gcry_cipher_hd_t handle;
+ gcry_cipher_open(&handle, GCRY_CIPHER_AES, GCRY_CIPHER_MODE_XTS, 0);
+ return 0;
+}
+EOF
+ if compile_prog "$gcrypt_cflags" "$gcrypt_libs" ; then
+ gcrypt_xts=yes
+ qemu_private_xts=no
+ fi
elif test "$gcrypt" = "yes"; then
feature_not_found "gcrypt" "Install gcrypt devel >= 1.5.0"
else
pvrdma="no"
fi
+# Let's see if enhanced reg_mr is supported
+if test "$pvrdma" = "yes" ; then
+
+cat > $TMPC <<EOF &&
+#include <infiniband/verbs.h>
+
+int
+main(void)
+{
+ struct ibv_mr *mr;
+ struct ibv_pd *pd = NULL;
+ size_t length = 10;
+ uint64_t iova = 0;
+ int access = 0;
+ void *addr = NULL;
+
+ mr = ibv_reg_mr_iova(pd, addr, length, iova, access);
+
+ ibv_dereg_mr(mr);
+
+ return 0;
+}
+EOF
+ if ! compile_prog "" "-libverbs"; then
+ QEMU_CFLAGS="$QEMU_CFLAGS -DLEGACY_RDMA_REG_MR"
+ fi
+fi
+
##########################################
# VNC SASL detection
if test "$vnc" = "yes" && test "$vnc_sasl" != "no" ; then
pa | try-pa)
if $pkg_config libpulse --exists; then
pulse_libs=$($pkg_config libpulse --libs)
- audio_pt_int="yes"
if test "$drv" = "try-pa"; then
audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-pa/pa/')
fi
fi
fi # test "$curl"
-##########################################
-# bluez support probe
-if test "$bluez" != "no" ; then
- cat > $TMPC << EOF
-#include <bluetooth/bluetooth.h>
-int main(void) { return bt_error(0); }
-EOF
- bluez_cflags=$($pkg_config --cflags bluez 2>/dev/null)
- bluez_libs=$($pkg_config --libs bluez 2>/dev/null)
- if compile_prog "$bluez_cflags" "$bluez_libs" ; then
- bluez=yes
- libs_softmmu="$bluez_libs $libs_softmmu"
- else
- if test "$bluez" = "yes" ; then
- feature_not_found "bluez" "Install bluez-libs/libbluetooth devel"
- fi
- bluez="no"
- fi
-fi
-
##########################################
# glib support probe
if test "$modules" = yes; then
glib_modules="$glib_modules gmodule-export-2.0"
fi
+if test "$plugins" = yes; then
+ glib_modules="$glib_modules gmodule-2.0"
+fi
# This workaround is required due to a bug in pkg-config file for glib as it
# doesn't define GLIB_STATIC_COMPILATION for pkg-config --static
mpathpersist=no
fi
-##########################################
-# libcap probe
-
-if test "$cap" != "no" ; then
- cat > $TMPC <<EOF
-#include <stdio.h>
-#include <sys/capability.h>
-int main(void) { cap_t caps; caps = cap_init(); return caps != NULL; }
-EOF
- if compile_prog "" "-lcap" ; then
- cap=yes
- else
- cap=no
- fi
-fi
-
##########################################
# pthread probe
PTHREADLIBS_LIST="-pthread -lpthread -lpthreadGC2"
atomic64=yes
fi
+#########################################
+# See if --dynamic-list is supported by the linker
+ld_dynamic_list="no"
+if test "$static" = "no" ; then
+ cat > $TMPTXT <<EOF
+{
+ foo;
+};
+EOF
+
+ cat > $TMPC <<EOF
+#include <stdio.h>
+void foo(void);
+
+void foo(void)
+{
+ printf("foo\n");
+}
+
+int main(void)
+{
+ foo();
+ return 0;
+}
+EOF
+
+ if compile_prog "" "-Wl,--dynamic-list=$TMPTXT" ; then
+ ld_dynamic_list="yes"
+ fi
+fi
+
+#########################################
+# See if -exported_symbols_list is supported by the linker
+
+ld_exported_symbols_list="no"
+if test "$static" = "no" ; then
+ cat > $TMPTXT <<EOF
+ _foo
+EOF
+
+ if compile_prog "" "-Wl,-exported_symbols_list,$TMPTXT" ; then
+ ld_exported_symbols_list="yes"
+ fi
+fi
+
+if test "$plugins" = "yes" &&
+ test "$ld_dynamic_list" = "no" &&
+ test "$ld_exported_symbols_list" = "no" ; then
+ error_exit \
+ "Plugin support requires dynamic linking and specifying a set of symbols " \
+ "that are exported to plugins. Unfortunately your linker doesn't " \
+ "support the flag (--dynamic-list or -exported_symbols_list) used " \
+ "for this purpose. You can't build with --static."
+fi
+
########################################
# See if 16-byte vector operations are supported.
# Even without a vector unit the compiler may expand these.
vector16=yes
fi
+########################################
+# See if __attribute__((alias)) is supported.
+# This false for Xcode 9, but has been remedied for Xcode 10.
+# Unfortunately, travis uses Xcode 9 by default.
+
+attralias=no
+cat > $TMPC << EOF
+int x = 1;
+extern const int y __attribute__((alias("x")));
+int main(void) { return 0; }
+EOF
+if compile_prog "" "" ; then
+ attralias=yes
+fi
+
########################################
# check if getauxval is available.
fi
fi
-##########################################
-# Docker and cross-compiler support
-#
-# This is specifically for building test
-# cases for foreign architectures, not
-# cross-compiling QEMU itself.
-
-if has "docker"; then
- docker=$($python $source_path/tests/docker/docker.py probe)
-fi
-
##########################################
# check for libpmem
mkdir -p slirp
slirp_cflags="-I\$(SRC_PATH)/slirp/src -I\$(BUILD_DIR)/slirp/src"
slirp_libs="-L\$(BUILD_DIR)/slirp -lslirp"
+ if test "$mingw32" = "yes" ; then
+ slirp_libs="$slirp_libs -lws2_32 -liphlpapi"
+ fi
;;
system)
fi
if test "$softmmu" = yes ; then
if test "$linux" = yes; then
- if test "$virtfs" != no && test "$cap" = yes && test "$attr" = yes ; then
+ if test "$virtfs" != no && test "$cap_ng" = yes && test "$attr" = yes ; then
virtfs=yes
tools="$tools fsdev/virtfs-proxy-helper\$(EXESUF)"
else
if test "$virtfs" = yes; then
- error_exit "VirtFS requires libcap devel and libattr devel"
+ error_exit "VirtFS requires libcap-ng devel and libattr devel"
fi
virtfs=no
fi
fi
done
fi
-if test "$ARCH" = "ppc64" && test "$targetos" != "Darwin" ; then
- roms="$roms spapr-rtas"
-fi
# Only build s390-ccw bios if we're on s390x and the compiler has -march=z900
if test "$cpu" = "s390x" ; then
echo "local state directory queried at runtime"
echo "Windows SDK $win_sdk"
fi
+echo "Build directory $(pwd)"
echo "Source path $source_path"
echo "GIT binary $git"
echo "GIT submodules $git_submodules"
echo "TLS priority $tls_priority"
echo "GNUTLS support $gnutls"
echo "libgcrypt $gcrypt"
+if test "$gcrypt" = "yes"
+then
+ echo " hmac $gcrypt_hmac"
+ echo " XTS $gcrypt_xts"
+fi
echo "nettle $nettle $(echo_version $nettle $nettle_version)"
+if test "$nettle" = "yes"
+then
+ echo " XTS $nettle_xts"
+fi
echo "libtasn1 $tasn1"
echo "PAM $auth_pam"
echo "iconv support $iconv"
echo "xen ctrl version $xen_ctrl_version"
fi
echo "brlapi support $brlapi"
-echo "bluez support $bluez"
echo "Documentation $docs"
echo "PIE $pie"
echo "vde support $vde"
echo "vhost-scsi support $vhost_scsi"
echo "vhost-vsock support $vhost_vsock"
echo "vhost-user support $vhost_user"
+echo "vhost-user-fs support $vhost_user_fs"
echo "Trace backends $trace_backends"
if have_backend "simple"; then
echo "Trace output file $trace_file-<pid>"
echo "parallels support $parallels"
echo "sheepdog support $sheepdog"
echo "capstone $capstone"
-echo "docker $docker"
echo "libpmem support $libpmem"
echo "libudev $libudev"
echo "default devices $default_devices"
+echo "plugin support $plugins"
if test "$supported_cpu" = "no"; then
echo
echo "CONFIG_L2TPV3=y" >> $config_host_mak
fi
if test "$cap_ng" = "yes" ; then
- echo "CONFIG_LIBCAP=y" >> $config_host_mak
+ echo "CONFIG_LIBCAP_NG=y" >> $config_host_mak
fi
echo "CONFIG_AUDIO_DRIVERS=$audio_drv_list" >> $config_host_mak
for drv in $audio_drv_list; do
echo "COREAUDIO_LIBS=$coreaudio_libs" >> $config_host_mak
echo "DSOUND_LIBS=$dsound_libs" >> $config_host_mak
echo "OSS_LIBS=$oss_libs" >> $config_host_mak
-if test "$audio_pt_int" = "yes" ; then
- echo "CONFIG_AUDIO_PT_INT=y" >> $config_host_mak
-fi
if test "$audio_win_int" = "yes" ; then
echo "CONFIG_AUDIO_WIN_INT=y" >> $config_host_mak
fi
echo "CONFIG_BRLAPI=y" >> $config_host_mak
echo "BRLAPI_LIBS=$brlapi_libs" >> $config_host_mak
fi
-if test "$bluez" = "yes" ; then
- echo "CONFIG_BLUEZ=y" >> $config_host_mak
- echo "BLUEZ_CFLAGS=$bluez_cflags" >> $config_host_mak
-fi
if test "$gtk" = "yes" ; then
echo "CONFIG_GTK=m" >> $config_host_mak
echo "GTK_CFLAGS=$gtk_cflags" >> $config_host_mak
echo "CONFIG_NETTLE=y" >> $config_host_mak
echo "CONFIG_NETTLE_VERSION_MAJOR=${nettle_version%%.*}" >> $config_host_mak
fi
+if test "$qemu_private_xts" = "yes" ; then
+ echo "CONFIG_QEMU_PRIVATE_XTS=y" >> $config_host_mak
+fi
if test "$tasn1" = "yes" ; then
echo "CONFIG_TASN1=y" >> $config_host_mak
fi
if test "$vhost_user" = "yes" ; then
echo "CONFIG_VHOST_USER=y" >> $config_host_mak
fi
+if test "$vhost_user_fs" = "yes" ; then
+ echo "CONFIG_VHOST_USER_FS=y" >> $config_host_mak
+fi
if test "$blobs" = "yes" ; then
echo "INSTALL_BLOBS=yes" >> $config_host_mak
fi
echo "CONFIG_VECTOR16=y" >> $config_host_mak
fi
+if test "$attralias" = "yes" ; then
+ echo "CONFIG_ATTRIBUTE_ALIAS=y" >> $config_host_mak
+fi
+
if test "$getauxval" = "yes" ; then
echo "CONFIG_GETAUXVAL=y" >> $config_host_mak
fi
echo "CONFIG_SHEEPDOG=y" >> $config_host_mak
fi
+if test "$plugins" = "yes" ; then
+ echo "CONFIG_PLUGIN=y" >> $config_host_mak
+ LIBS="-ldl $LIBS"
+ # Copy the export object list to the build dir
+ if test "$ld_dynamic_list" = "yes" ; then
+ echo "CONFIG_HAS_LD_DYNAMIC_LIST=yes" >> $config_host_mak
+ ld_symbols=qemu-plugins-ld.symbols
+ cp "$source_path/plugins/qemu-plugins.symbols" $ld_symbols
+ elif test "$ld_exported_symbols_list" = "yes" ; then
+ echo "CONFIG_HAS_LD_EXPORTED_SYMBOLS_LIST=yes" >> $config_host_mak
+ ld64_symbols=qemu-plugins-ld64.symbols
+ echo "# Automatically generated by configure - do not modify" > $ld64_symbols
+ grep 'qemu_' "$source_path/plugins/qemu-plugins.symbols" | sed 's/;//g' | \
+ sed -E 's/^[[:space:]]*(.*)/_\1/' >> $ld64_symbols
+ else
+ error_exit \
+ "If \$plugins=yes, either \$ld_dynamic_list or " \
+ "\$ld_exported_symbols_list should have been set to 'yes'."
+ fi
+fi
+
if test "$tcg_interpreter" = "yes"; then
QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/tci $QEMU_INCLUDES"
elif test "$ARCH" = "sparc64" ; then
echo "LD=$ld" >> $config_host_mak
echo "RANLIB=$ranlib" >> $config_host_mak
echo "NM=$nm" >> $config_host_mak
+echo "PKG_CONFIG=$pkg_config_exe" >> $config_host_mak
echo "WINDRES=$windres" >> $config_host_mak
echo "CFLAGS=$CFLAGS" >> $config_host_mak
echo "CFLAGS_NOPIE=$CFLAGS_NOPIE" >> $config_host_mak
echo "GCOV=$gcov_tool" >> $config_host_mak
fi
-if test "$docker" != "no"; then
- echo "HAVE_USER_DOCKER=y" >> $config_host_mak
-fi
-
if test "$libudev" != "no"; then
echo "CONFIG_LIBUDEV=y" >> $config_host_mak
echo "LIBUDEV_LIBS=$libudev_libs" >> $config_host_mak
fi
+if test "$edk2_blobs" = "yes" ; then
+ echo "DECOMPRESS_EDK2_BLOBS=y" >> $config_host_mak
+fi
+
# use included Linux headers
if test "$linux" = "yes" ; then
mkdir -p linux-headers
;;
esac
-target_compiler=""
-target_compiler_static=""
-target_compiler_cflags=""
-
mkdir -p $target_dir
echo "# Automatically generated by configure - do not modify" > $config_target_mak
i386)
mttcg="yes"
gdb_xml_files="i386-32bit.xml"
- target_compiler=$cross_cc_i386
- target_compiler_cflags=$cross_cc_ccflags_i386
;;
x86_64)
TARGET_BASE_ARCH=i386
mttcg="yes"
gdb_xml_files="i386-64bit.xml"
- target_compiler=$cross_cc_x86_64
;;
alpha)
mttcg="yes"
- target_compiler=$cross_cc_alpha
;;
arm|armeb)
TARGET_ARCH=arm
bflt="yes"
mttcg="yes"
gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
- target_compiler=$cross_cc_arm
- eval "target_compiler_cflags=\$cross_cc_cflags_${target_name}"
;;
aarch64|aarch64_be)
TARGET_ARCH=aarch64
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"
- target_compiler=$cross_cc_aarch64
- eval "target_compiler_cflags=\$cross_cc_cflags_${target_name}"
;;
cris)
- target_compiler=$cross_cc_cris
;;
hppa)
mttcg="yes"
- target_compiler=$cross_cc_hppa
;;
lm32)
- target_compiler=$cross_cc_lm32
;;
m68k)
bflt="yes"
gdb_xml_files="cf-core.xml cf-fp.xml m68k-fp.xml"
- target_compiler=$cross_cc_m68k
;;
microblaze|microblazeel)
TARGET_ARCH=microblaze
bflt="yes"
echo "TARGET_ABI32=y" >> $config_target_mak
- target_compiler=$cross_cc_microblaze
;;
mips|mipsel)
mttcg="yes"
TARGET_ARCH=mips
- target_compiler=$cross_cc_mips
echo "TARGET_ABI_MIPSO32=y" >> $config_target_mak
;;
mipsn32|mipsn32el)
mttcg="yes"
TARGET_ARCH=mips64
TARGET_BASE_ARCH=mips
- target_compiler=$cross_cc_mipsn32
echo "TARGET_ABI_MIPSN32=y" >> $config_target_mak
echo "TARGET_ABI32=y" >> $config_target_mak
;;
mttcg="yes"
TARGET_ARCH=mips64
TARGET_BASE_ARCH=mips
- target_compiler=$cross_cc_mips64
echo "TARGET_ABI_MIPSN64=y" >> $config_target_mak
;;
moxie)
- target_compiler=$cross_cc_moxie
;;
nios2)
- target_compiler=$cross_cc_nios2
;;
or1k)
- target_compiler=$cross_cc_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_compiler=$cross_cc_ppc
- target_compiler_cflags="$cross_cc_cflags_ppc"
;;
ppc64)
TARGET_BASE_ARCH=ppc
TARGET_ABI_DIR=ppc
mttcg=yes
gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml power-vsx.xml"
- target_compiler=$cross_cc_ppc64
- target_compiler_cflags="$cross_cc_cflags_ppc64"
;;
ppc64le)
TARGET_ARCH=ppc64
TARGET_ABI_DIR=ppc
mttcg=yes
gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml power-vsx.xml"
- target_compiler=$cross_cc_ppc64le
;;
ppc64abi32)
TARGET_ARCH=ppc64
TARGET_ABI_DIR=ppc
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"
- target_compiler=$cross_cc_ppc64abi32
;;
riscv32)
TARGET_BASE_ARCH=riscv
TARGET_ABI_DIR=riscv
mttcg=yes
- gdb_xml_files="riscv-32bit-cpu.xml riscv-32bit-fpu.xml riscv-32bit-csr.xml"
- target_compiler=$cross_cc_riscv32
+ gdb_xml_files="riscv-32bit-cpu.xml riscv-32bit-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-64bit-fpu.xml riscv-64bit-csr.xml"
- target_compiler=$cross_cc_riscv64
+ gdb_xml_files="riscv-64bit-cpu.xml riscv-64bit-fpu.xml riscv-64bit-csr.xml riscv-64bit-virtual.xml"
;;
sh4|sh4eb)
TARGET_ARCH=sh4
bflt="yes"
- target_compiler=$cross_cc_sh4
;;
sparc)
- target_compiler=$cross_cc_sparc
;;
sparc64)
TARGET_BASE_ARCH=sparc
- target_compiler=$cross_cc_sparc64
;;
sparc32plus)
TARGET_ARCH=sparc64
TARGET_BASE_ARCH=sparc
TARGET_ABI_DIR=sparc
- target_compiler=$cross_cc_sparc32plus
echo "TARGET_ABI32=y" >> $config_target_mak
;;
s390x)
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"
- target_compiler=$cross_cc_s390x
;;
tilegx)
- target_compiler=$cross_cc_tilegx
;;
tricore)
- target_compiler=$cross_cc_tricore
;;
unicore32)
- target_compiler=$cross_cc_unicore32
;;
xtensa|xtensaeb)
TARGET_ARCH=xtensa
bflt="yes"
mttcg="yes"
- target_compiler=$cross_cc_xtensa
;;
*)
error_exit "Unsupported target CPU"
TARGET_BASE_ARCH=$TARGET_ARCH
fi
-# Do we have a cross compiler for this target?
-if has $target_compiler; then
-
- write_c_skeleton
-
- if ! do_compiler "$target_compiler" $target_compiler_cflags -o $TMPE $TMPC -static ; then
- # For host systems we might get away with building without -static
- if ! do_compiler "$target_compiler" $target_compiler_cflags -o $TMPE $TMPC ; then
- target_compiler=""
- else
- enabled_cross_compilers="${enabled_cross_compilers} '${target_compiler}'"
- target_compiler_static="n"
- fi
- else
- enabled_cross_compilers="${enabled_cross_compilers} '${target_compiler}'"
- target_compiler_static="y"
- fi
-else
- target_compiler=""
-fi
-
symlink "$source_path/Makefile.target" "$target_dir/Makefile"
upper() {
echo "CONFIG_BSD_USER=y" >> $config_target_mak
fi
-if test -n "$target_compiler"; then
- echo "CROSS_CC_GUEST=\"$target_compiler\"" >> $config_target_mak
-
- if test -n "$target_compiler_static"; then
- echo "CROSS_CC_GUEST_STATIC=$target_compiler_static" >> $config_target_mak
- fi
-
- if test -n "$target_compiler_cflags"; then
- echo "CROSS_CC_GUEST_CFLAGS=$target_compiler_cflags" >> $config_target_mak
- fi
-fi
-
# generate QEMU_CFLAGS/LDFLAGS for targets
echo "PIXMAN_CFLAGS=$pixman_cflags" >> $config_host_mak
echo "PIXMAN_LIBS=$pixman_libs" >> $config_host_mak
-if test -n "$enabled_cross_compilers"; then
- echo
- echo "NOTE: cross-compilers enabled: $enabled_cross_compilers"
-fi
-
if [ "$fdt" = "git" ]; then
echo "config-host.h: dtc/all" >> $config_host_mak
fi
# so the build tree will be missing the link back to the new file, and
# tests might fail. Prefer to keep the relevant files in their own
# directory and symlink the directory instead.
-DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32 tests/libqos tests/qapi-schema tests/tcg/xtensa tests/qemu-iotests tests/vm"
+DIRS="tests tests/tcg tests/tcg/lm32 tests/libqos tests/qapi-schema tests/qemu-iotests tests/vm"
DIRS="$DIRS tests/fp tests/qgraph"
DIRS="$DIRS docs docs/interop fsdev scsi"
-DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas pc-bios/s390-ccw"
+DIRS="$DIRS pc-bios/optionrom pc-bios/s390-ccw"
DIRS="$DIRS roms/seabios roms/vgabios"
-LINKS="Makefile tests/tcg/Makefile"
-LINKS="$LINKS tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
-LINKS="$LINKS tests/tcg/lm32/Makefile tests/tcg/xtensa/Makefile po/Makefile"
-LINKS="$LINKS tests/fp/Makefile"
+LINKS="Makefile"
+LINKS="$LINKS tests/tcg/lm32/Makefile po/Makefile"
+LINKS="$LINKS tests/tcg/Makefile.target tests/fp/Makefile"
+LINKS="$LINKS tests/plugin/Makefile"
LINKS="$LINKS pc-bios/optionrom/Makefile pc-bios/keymaps"
-LINKS="$LINKS pc-bios/spapr-rtas/Makefile"
LINKS="$LINKS pc-bios/s390-ccw/Makefile"
LINKS="$LINKS roms/seabios/Makefile roms/vgabios/Makefile"
LINKS="$LINKS pc-bios/qemu-icon.bmp"
fi
done
+(for i in $cross_cc_vars; do
+ export $i
+done
+export target_list source_path use_containers
+$source_path/tests/tcg/configure.sh)
+
# temporary config to build submodules
for rom in seabios vgabios ; do
config_mak=roms/$rom/config.mak