[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 06/22] fuzz: add configure flag --enable-fuzzing
From: |
Oleinik, Alexander |
Subject: |
[Qemu-devel] [PATCH v3 06/22] fuzz: add configure flag --enable-fuzzing |
Date: |
Wed, 18 Sep 2019 23:19:33 +0000 |
Signed-off-by: Alexander Oleinik <address@hidden>
---
configure | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/configure b/configure
index 30aad233d1..775f46f55a 100755
--- a/configure
+++ b/configure
@@ -498,6 +498,7 @@ libxml2=""
debug_mutex="no"
libpmem=""
default_devices="yes"
+fuzzing="no"
supported_cpu="no"
supported_os="no"
@@ -1521,6 +1522,8 @@ for opt do
;;
--disable-libpmem) libpmem=no
;;
+ --enable-fuzzing) fuzzing=yes
+ ;;
*)
echo "ERROR: unknown option $opt"
echo "Try '$0 --help' for more information"
@@ -6429,6 +6432,7 @@ echo "capstone $capstone"
echo "libpmem support $libpmem"
echo "libudev $libudev"
echo "default devices $default_devices"
+echo "fuzzing support $fuzzing"
if test "$supported_cpu" = "no"; then
echo
@@ -7258,6 +7262,10 @@ fi
if test "$sheepdog" = "yes" ; then
echo "CONFIG_SHEEPDOG=y" >> $config_host_mak
fi
+if test "$fuzzing" = "yes" ; then
+ FUZZ_LDFLAGS=" -fsanitize=address,fuzzer"
+ FUZZ_CFLAGS=" -fsanitize=address,fuzzer"
+fi
if test "$tcg_interpreter" = "yes"; then
QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/tci $QEMU_INCLUDES"
@@ -7339,6 +7347,11 @@ if test "$libudev" != "no"; then
echo "CONFIG_LIBUDEV=y" >> $config_host_mak
echo "LIBUDEV_LIBS=$libudev_libs" >> $config_host_mak
fi
+if test "$fuzzing" != "no"; then
+ echo "CONFIG_FUZZ=y" >> $config_host_mak
+ echo "FUZZ_CFLAGS=$FUZZ_CFLAGS" >> $config_host_mak
+ echo "FUZZ_LDFLAGS=$FUZZ_LDFLAGS" >> $config_host_mak
+fi
# use included Linux headers
if test "$linux" = "yes" ; then
--
2.23.0
- [Qemu-devel] [PATCH v3 04/22] qtest: add qtest_server_send abstraction, (continued)
- [Qemu-devel] [PATCH v3 08/22] module: check module wasn't already initialized, Oleinik, Alexander, 2019/09/18
- [Qemu-devel] [PATCH v3 07/22] fuzz: Add target/fuzz makefile rules, Oleinik, Alexander, 2019/09/18
- [Qemu-devel] [PATCH v3 06/22] fuzz: add configure flag --enable-fuzzing,
Oleinik, Alexander <=
- [Qemu-devel] [PATCH v3 09/22] qtest: add in-process incoming command handler, Oleinik, Alexander, 2019/09/18
- [Qemu-devel] [PATCH v3 10/22] tests: provide test variables to other targets, Oleinik, Alexander, 2019/09/18
- [Qemu-devel] [PATCH v3 11/22] libqos: split qos-test and libqos makefile vars, Oleinik, Alexander, 2019/09/18
- [Qemu-devel] [PATCH v3 13/22] libqtest: make qtest_bufwrite send "atomic", Oleinik, Alexander, 2019/09/18