All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Bulekov <alxndr@bu.edu>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, thuth@redhat.com, Li Qiang <liq3ea@163.com>,
	f4bug@amsat.org, Alexander Bulekov <alxndr@bu.edu>
Subject: [PATCH] configure: fix --enable-fuzzing linker failures
Date: Sun, 21 Feb 2021 11:00:44 -0500	[thread overview]
Message-ID: <20210221160044.28581-1-alxndr@bu.edu> (raw)

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	other threads:[~2021-02-21 16:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-21 16:00 Alexander Bulekov [this message]
2021-02-21 16:22 ` [PATCH] configure: fix --enable-fuzzing linker failures Peter Maydell
2021-02-21 16:27   ` Alexander Bulekov
2021-02-21 16:33     ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210221160044.28581-1-alxndr@bu.edu \
    --to=alxndr@bu.edu \
    --cc=f4bug@amsat.org \
    --cc=liq3ea@163.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.