From: Alexander Bulekov <alx...@bu.edu>

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 <liq...@163.com>
Signed-off-by: Alexander Bulekov <alx...@bu.edu>
Message-Id: <20200708200104.21978-2-alx...@bu.edu>
Tested-by: Li Qiang <liq...@gmail.com>
Reviewed-by: Li Qiang <liq...@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com>
Signed-off-by: Thomas Huth <th...@redhat.com>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
-- 
2.18.1


Reply via email to