From nobody Sat Feb 7 05:52:31 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=163.com ARC-Seal: i=1; a=rsa-sha256; t=1613913521; cv=none; d=zohomail.com; s=zohoarc; b=XUyLx6BJyFHVteNxsyZneAIVWXNqnzB9moTz9T8Aj5MqyQCsTOjhlFXXSKEo2TlwB7/2tnnHHUqhp4DwUIjJ4iOiEpXzuNJT7V5FWrW+66FR/Fw734EEYxOtrfcaOS8hSlj1d+n0+B1leCZvpukcx+bgKNC4MhLr+qE6h9gc16I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613913521; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=y9y7qceyOLFNRGKx/9DKLOUHL1sYnPZYeZK/llcHXcU=; b=h5TkeGDiFmDXEyAdkh1paa96e3mbcZ2rzVcX33djIC1GAn19z0AAEyWvRTUf+RDhVApRA422HmnSSxESmTWQf1GPhC2z72dQBDFWRTTXDl9okbGH6DLWOtGVK3ykM85q3UeX3ggKin/AdQxbaCQuI0BrB2N6vmUuQMPi48553UI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1613913521188277.7872196679267; Sun, 21 Feb 2021 05:18:41 -0800 (PST) Received: from localhost ([::1]:56274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDodD-0003ce-Dq for importer@patchew.org; Sun, 21 Feb 2021 08:18:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDoae-0002Dq-Mv for qemu-devel@nongnu.org; Sun, 21 Feb 2021 08:16:05 -0500 Received: from m12-17.163.com ([220.181.12.17]:40420) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lDoaV-0002IL-9C for qemu-devel@nongnu.org; Sun, 21 Feb 2021 08:15:58 -0500 Received: from ubuntu.localdomain (unknown [183.157.98.27]) by smtp13 (Coremail) with SMTP id EcCowAB3tIgVWTJgKkCwmA--.18015S4; Sun, 21 Feb 2021 20:59:02 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=y9y7q ceyOLFNRGKx/9DKLOUHL1sYnPZYeZK/llcHXcU=; b=X+gxdXjE71Gh6+rYVkS8r kcP7/yGldzZse3aZwIYfrDLV29pzQDke5EHs4vUTbrlImkI/2kCOYWrnYAhPIs0l FNmBYaas7SANOuMgi7qZVwh1X9zEsf0sunzKtajaBeGg50jcOtXDqOsm8nAIDpBA n9ls0TNfFhf3Rwb42n1t60= From: Li Qiang To: pbonzini@redhat.com, f4bug@amsat.org, thuth@redhat.com, alxndr@bu.edu Subject: [PATCH] configure: force enable-sanitizers together with enable-fuzzing Date: Sun, 21 Feb 2021 04:59:00 -0800 Message-Id: <20210221125900.425495-1-liq3ea@163.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: EcCowAB3tIgVWTJgKkCwmA--.18015S4 X-Coremail-Antispam: 1Uf129KBjvJXoWxGw4UJr45ArW7AF1rKFy5twb_yoW5ZF4xp3 Z2gry7Kr1rJFZ5tFZ7Gw1xuFWkXFZ5AayakFZxGF4UWFsxCw4j9rnrWwn09F4UX340qFyS kFyDWw43Xry5taDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UEhFsUUUUU= X-Originating-IP: [183.157.98.27] X-CM-SenderInfo: 5oltjvrd6rljoofrz/xtbCCg9AbV2MZ95CKAAAsq Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=220.181.12.17; envelope-from=liq3ea@163.com; helo=m12-17.163.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Li Qiang , liq3ea@gmail.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @163.com) Content-Type: text/plain; charset="utf-8" If we execute configure with --enable-fuzzing but without --enable-sanitizers, we will have a lot of 'undefined reference' build error such as following: clang-10 -o subprojects/libvhost-user/link-test subprojects/libvhost-user/= link-test.p/link-test.c.o -Wl,--as-needed -Wl,--no-undefined -pie -Wl,--who= le-archive -Wl,--start-group subprojects/libvhost-user/libvhost-user.a -Wl,= --end-group -Wl,--no-whole-archive -Wl,--warn-common -Wl,-z,relro -Wl,-z,no= w -m64 -fstack-protector-strong -pthread /usr/bin/ld: subprojects/libvhost-user/link-test.p/link-test.c.o: in functi= on `main': /home/test/qemu/build/../subprojects/libvhost-user/link-test.c:34: undefine= d reference to `__sancov_lowest_stack' /usr/bin/ld: /home/test/qemu/build/../subprojects/libvhost-user/link-test.c= :(.text.main[main]+0x55): undefined reference to `__sancov_lowest_stack' /usr/bin/ld: /home/test/qemu/build/../subprojects/libvhost-user/link-test.c= :41: undefined reference to `__sanitizer_cov_trace_const_cmp4' /usr/bin/ld: subprojects/libvhost-user/link-test.p/link-test.c.o: in functi= on `sancov.module_ctor_8bit_counters': link-test.c:(.text.sancov.module_ctor_8bit_counters[sancov.module_ctor_8bit= _counters]+0x16): undefined reference to `__sanitizer_cov_8bit_counters_ini= t' /usr/bin/ld: link-test.c:(.text.sancov.module_ctor_8bit_counters[sancov.mod= ule_ctor_8bit_counters]+0x2f): undefined reference to `__sanitizer_cov_pcs_= init' /usr/bin/ld: subprojects/libvhost-user/libvhost-user.a(libvhost-user.c.o): = in function `vu_gpa_to_va': /home/test/qemu/build/../subprojects/libvhost-user/libvhost-user.c:182: und= efined reference to `__sanitizer_cov_trace_const_cmp8' /usr/bin/ld: /home/test/qemu/build/../subprojects/libvhost-user/libvhost-us= er.c:187: undefined reference to `__sanitizer_cov_trace_cmp4' /usr/bin/ld: /home/test/qemu/build/../subprojects/libvhost-user/libvhost-us= er.c:190: undefined reference to `__sanitizer_cov_trace_cmp8' /usr/bin/ld: /home/test/qemu/build/../subprojects/libvhost-user/libvhost-us= er.c:190: undefined reference to `__sanitizer_cov_trace_cmp8' /usr/bin/ld: /home/test/qemu/build/../subprojects/libvhost-user/libvhost-us= er.c:191: undefined reference to `__sanitizer_cov_trace_cmp8' Let's avoid this error by enforcing fuzzing and sanitizers together. Signed-off-by: Li Qiang --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure b/configure index a34f91171d..9f00a1d887 100755 --- a/configure +++ b/configure @@ -6083,6 +6083,9 @@ if test "$have_mlockall" =3D "yes" ; then echo "HAVE_MLOCKALL=3Dy" >> $config_host_mak fi if test "$fuzzing" =3D "yes" ; then + if test "$sanitizers" =3D "no"; then + error_exit "enable-fuzzing also needs enable-sanitizers" + fi # If LIB_FUZZING_ENGINE is set, assume we are running on OSS-Fuzz, and t= he # needed CFLAGS have already been provided if test -z "${LIB_FUZZING_ENGINE+xxx}" ; then --=20 2.25.1