arm:arm | aarch64:aarch64 | \
i386:i386 | i386:x86_64 | i386:x32 | \
x86_64:i386 | x86_64:x86_64 | x86_64:x32 | \
- mips:mips | mipsel:mips | \
+ mips:mips | mipsel:mips | mips64:mips | mips64el:mips | \
ppc:ppc | ppc64:ppc | ppc:ppc64 | ppc64:ppc64 | ppc64:ppc64le | \
s390x:s390x)
return 0
debug_info="yes"
stack_protector=""
use_containers="yes"
-gdb_bin=$(command -v "gdb")
+gdb_bin=$(command -v "gdb-multiarch" || command -v "gdb")
if test -e "$source_path/.git"
then
audio_drv_list=""
fi
supported_os="yes"
+ pie="no"
;;
GNU/kFreeBSD)
bsd="yes"
# Check for ancillary tools used in testing
genisoimage=
-for binary in genisoimage
+for binary in genisoimage mkisofs
do
if has $binary
then
;;
--static)
static="yes"
- QEMU_LDFLAGS="-static $QEMU_LDFLAGS"
QEMU_PKG_CONFIG_FLAGS="--static $QEMU_PKG_CONFIG_FLAGS"
;;
--mandir=*) mandir="$optarg"
linux_user="no"
fi
+if [ "$bsd_user" = "no" -a "$linux_user" = "no" -a "$softmmu" = "no" ] ; then
+ tcg="no"
+fi
+
default_target_list=""
mak_wilds=""
lzfse support of lzfse compression library
(for reading lzfse-compressed dmg images)
zstd support for zstd compression library
- (for migration compression)
+ (for migration compression and qcow2 cluster compression)
seccomp seccomp support
coroutine-pool coroutine freelist (better performance)
glusterfs GlusterFS backend
if test "$modules" = "yes" ; then
error_exit "static and modules are mutually incompatible"
fi
- if test "$pie" = "yes" ; then
- error_exit "static and pie are mutually incompatible"
- else
- pie="no"
- fi
fi
# Unconditional check for compiler __thread support
"Thread-Local Storage (TLS). Please upgrade to a version that does."
fi
-if test "$pie" != "no" ; then
- cat > $TMPC << EOF
+cat > $TMPC << EOF
#ifdef __linux__
# define THREAD __thread
#else
# define THREAD
#endif
-
static THREAD int tls_var;
-
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
+# Check we support --no-pie first; we will need this for building ROMs.
+if compile_prog "-Werror -fno-pie" "-no-pie"; then
+ CFLAGS_NOPIE="-fno-pie"
+ LDFLAGS_NOPIE="-no-pie"
+fi
+
+if test "$static" = "yes"; then
+ if test "$pie" != "no" && compile_prog "-Werror -fPIE -DPIE" "-static-pie"; then
QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
- QEMU_LDFLAGS="-pie $QEMU_LDFLAGS"
+ QEMU_LDFLAGS="-static-pie $QEMU_LDFLAGS"
pie="yes"
- if compile_prog "" "-Wl,-z,relro -Wl,-z,now" ; then
- QEMU_LDFLAGS="-Wl,-z,relro -Wl,-z,now $QEMU_LDFLAGS"
- fi
+ elif test "$pie" = "yes"; then
+ error_exit "-static-pie not available due to missing toolchain support"
else
- if test "$pie" = "yes"; then
- error_exit "PIE not available due to missing toolchain support"
- else
- echo "Disabling PIE due to missing toolchain support"
- pie="no"
- fi
+ QEMU_LDFLAGS="-static $QEMU_LDFLAGS"
+ pie="no"
fi
+elif test "$pie" = "no"; then
+ QEMU_CFLAGS="$CFLAGS_NOPIE $QEMU_CFLAGS"
+ QEMU_LDFLAGS="$LDFLAGS_NOPIE $QEMU_LDFLAGS"
+elif compile_prog "-Werror -fPIE -DPIE" "-pie"; then
+ QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
+ QEMU_LDFLAGS="-pie $QEMU_LDFLAGS"
+ pie="yes"
+elif test "$pie" = "yes"; then
+ error_exit "PIE not available due to missing toolchain support"
+else
+ echo "Disabling PIE due to missing toolchain support"
+ pie="no"
+fi
+
+# Detect support for PT_GNU_RELRO + DT_BIND_NOW.
+# The combination is known as "full relro", because .got.plt is read-only too.
+if compile_prog "" "-Wl,-z,relro -Wl,-z,now" ; then
+ QEMU_LDFLAGS="-Wl,-z,relro -Wl,-z,now $QEMU_LDFLAGS"
fi
##########################################
if test "$gtk" != "no"; then
gtkpackage="gtk+-3.0"
gtkx11package="gtk+-x11-3.0"
- gtkversion="3.14.0"
+ gtkversion="3.22.0"
if $pkg_config --exists "$gtkpackage >= $gtkversion"; then
gtk_cflags=$($pkg_config --cflags $gtkpackage)
gtk_libs=$($pkg_config --libs $gtkpackage)
oss_libs="$oss_lib"
;;
+ jack | try-jack)
+ if $pkg_config jack --exists; then
+ jack_libs=$($pkg_config jack --libs)
+ if test "$drv" = "try-jack"; then
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-jack/jack/')
+ fi
+ else
+ if test "$drv" = "try-jack"; then
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-jack//')
+ else
+ error_exit "$drv check failed" \
+ "Make sure to have the $drv libs and headers installed."
+ fi
+ fi
+ ;;
+
*)
echo "$audio_possible_drivers" | grep -q "\<$drv\>" || {
error_exit "Unknown driver '$drv' selected" \
kcov=yes
fi
+# If we're making warnings fatal, apply this to Sphinx runs as well
+sphinx_werror=""
+if test "$werror" = "yes"; then
+ sphinx_werror="-W"
+fi
+
# Check we have a new enough version of sphinx-build
has_sphinx_build() {
# This is a bit awkward but works: create a trivial document and
# sphinx-build doesn't exist at all or if it is too old.
mkdir -p "$TMPDIR1/sphinx"
touch "$TMPDIR1/sphinx/index.rst"
- "$sphinx_build" -c "$source_path/docs" -b html "$TMPDIR1/sphinx" "$TMPDIR1/sphinx/out" >/dev/null 2>&1
+ "$sphinx_build" $sphinx_werror -c "$source_path/docs" \
+ -b html "$TMPDIR1/sphinx" \
+ "$TMPDIR1/sphinx/out" >> config.log 2>&1
}
# Check if tools are available to build documentation.
echo "COREAUDIO_LIBS=$coreaudio_libs" >> $config_host_mak
echo "DSOUND_LIBS=$dsound_libs" >> $config_host_mak
echo "OSS_LIBS=$oss_libs" >> $config_host_mak
+echo "JACK_LIBS=$jack_libs" >> $config_host_mak
if test "$audio_win_int" = "yes" ; then
echo "CONFIG_AUDIO_WIN_INT=y" >> $config_host_mak
fi
echo "INSTALL_LIB=$install -c -m 0644" >> $config_host_mak
echo "PYTHON=$python" >> $config_host_mak
echo "SPHINX_BUILD=$sphinx_build" >> $config_host_mak
+echo "SPHINX_WERROR=$sphinx_werror" >> $config_host_mak
echo "GENISOIMAGE=$genisoimage" >> $config_host_mak
echo "CC=$cc" >> $config_host_mak
if $iasl -h > /dev/null 2>&1; then
TARGET_SYSTBL_ABI=common,oabi
bflt="yes"
mttcg="yes"
- gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
+ 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"
+ 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"
;;
cris)
;;
;;
m68k)
bflt="yes"
- gdb_xml_files="cf-core.xml cf-fp.xml m68k-fp.xml"
+ gdb_xml_files="cf-core.xml cf-fp.xml m68k-core.xml m68k-fp.xml"
TARGET_SYSTBL_ABI=common
;;
microblaze|microblazeel)