summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlexander Bulekov <alxndr@bu.edu>2020-07-08 16:01:03 -0400
committerThomas Huth <thuth@redhat.com>2020-07-13 11:40:52 +0200
commit0ab6c2384ccae8968517f6883897509cd5f51a40 (patch)
treeb0d1a224a7fd8ff3d21f51b3b31741e40db54b1b
parentd1abf3fc6abc01fd5f8985af92726f87b5efd80a (diff)
downloadfocaccia-qemu-0ab6c2384ccae8968517f6883897509cd5f51a40.tar.gz
focaccia-qemu-0ab6c2384ccae8968517f6883897509cd5f51a40.zip
configure: do not clobber CFLAGS with --enable-fuzzing
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>
-rwxr-xr-xconfigure2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure b/configure
index f59418f6de..69a89113f7 100755
--- 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