]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
configure: do not clobber CFLAGS with --enable-fuzzing
authorAlexander Bulekov <alxndr@bu.edu>
Wed, 8 Jul 2020 20:01:03 +0000 (16:01 -0400)
committerThomas Huth <thuth@redhat.com>
Mon, 13 Jul 2020 09:40:52 +0000 (11:40 +0200)
When configuring with --enable-fuzzing, we overwrote the CFLAGS
added by all the preceding checks. Instead of overwriting CFLAGS, append
the ones we need.

Fixes: adc28027ff ("fuzz: add configure flag --enable-fuzzing")
Reported-by: Li Qiang <liq3ea@163.com>
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20200708200104.21978-2-alxndr@bu.edu>
Tested-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
configure

index f59418f6de870a6d3e36b82115ebdec9aed5eed2..69a89113f783d94019eaf3e390ecf9e2cee4ec95 100755 (executable)
--- a/configure
+++ b/configure
@@ -7926,7 +7926,7 @@ if test "$fuzzing" = "yes" ; then
   if test "$have_fuzzer" = "yes"; then
     FUZZ_LDFLAGS=" -fsanitize=address,fuzzer"
     FUZZ_CFLAGS=" -fsanitize=address,fuzzer"
-    CFLAGS=" -fsanitize=address,fuzzer-no-link"
+    CFLAGS="$CFLAGS -fsanitize=address,fuzzer-no-link"
   else
     error_exit "Your compiler doesn't support -fsanitize=address,fuzzer"
     exit 1