From: Alexander Bulekov Date: Wed, 8 Jul 2020 20:01:03 +0000 (-0400) Subject: configure: do not clobber CFLAGS with --enable-fuzzing X-Git-Tag: qemu-xen-4.15.0~79^2~7 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=0ab6c2384ccae8968517f6883897509cd5f51a40;p=qemu-xen.git 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 Signed-off-by: Alexander Bulekov Message-Id: <20200708200104.21978-2-alxndr@bu.edu> Tested-by: Li Qiang Reviewed-by: Li Qiang Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- 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