qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] configure: fix --enable-fuzzing linker failures


From: Alexander Bulekov
Subject: [PATCH] configure: fix --enable-fuzzing linker failures
Date: Sun, 21 Feb 2021 11:00:44 -0500

With --enable-fuzzing, QEMU_CFLAGS include -fsanitize=fuzzer-no-link.
This should allow us to build non-fuzzer binaries using objects
instrumented for fuzzing. However, to do that, we also need to link with
-fsanitize=fuzzer-no-link. We were not doing that.

Reported-by: Li Qiang <liq3ea@163.com>
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
---
 configure | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure b/configure
index a79b3746d4..02aaea31c8 100755
--- a/configure
+++ b/configure
@@ -6097,6 +6097,7 @@ if test "$fuzzing" = "yes" ; then
   # needed CFLAGS have already been provided
   if test -z "${LIB_FUZZING_ENGINE+xxx}" ; then
     QEMU_CFLAGS="$QEMU_CFLAGS -fsanitize=fuzzer-no-link"
+    QEMU_LDFLAGS="$QEMU_CFLAGS -fsanitize=fuzzer-no-link"
     FUZZ_EXE_LDFLAGS="-fsanitize=fuzzer"
   else
     FUZZ_EXE_LDFLAGS="$LIB_FUZZING_ENGINE"
-- 
2.27.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]