aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure18
1 files changed, 17 insertions, 1 deletions
diff --git a/configure b/configure
index e804a92e4..b851c45c8 100755
--- a/configure
+++ b/configure
@@ -271,6 +271,7 @@ cpu_emulation="yes"
kvm_kmod="no"
check_utests="no"
user_pie="no"
+zero_malloc=""
# OS specific
if check_define __linux__ ; then
@@ -1930,8 +1931,9 @@ fi
# Consult white-list to determine whether to enable werror
# by default. Only enable by default for git builds
+z_version=`cut -f3 -d. $source_path/VERSION`
+
if test -z "$werror" ; then
- z_version=`cut -f3 -d. $source_path/VERSION`
if test "$z_version" = "50" -a \
"$linux" = "yes" ; then
werror="yes"
@@ -1940,6 +1942,16 @@ if test -z "$werror" ; then
fi
fi
+# Disable zero malloc errors for official releases unless explicitly told to
+# enable/disable
+if test -z "$zero_malloc" ; then
+ if test "$z_version" = "50" ; then
+ zero_malloc="no"
+ else
+ zero_malloc="yes"
+ fi
+fi
+
if test "$werror" = "yes" ; then
QEMU_CFLAGS="-Werror $QEMU_CFLAGS"
fi
@@ -2273,6 +2285,10 @@ fi
echo "CONFIG_UNAME_RELEASE=\"$uname_release\"" >> $config_host_mak
+if test "$zero_malloc" = "yes" ; then
+ echo "CONFIG_ZERO_MALLOC=y" >> $config_host_mak
+fi
+
# USB host support
case "$usb" in
linux)