From nobody Tue Feb 10 10:55:18 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614326931; cv=none; d=zohomail.com; s=zohoarc; b=hdqBnuBrtUlhf1sobb1HIvmXK+TVNcS4T+7fKjFzaDDzubXKMSBIYqjqSNAWEf403qYFPpFlDFF+vAusGv2zrzmoNQMPp+iQeAjspHEDI0gMYV3FoIMeVolIfvXjRqYhGK73Bey2PaNn6b9da967jOOx+l0h322Mof4cox6JNTQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614326931; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yXIWvdB/EerYRecTTmg1n1mknTNJJTJWRa3KyltqPKU=; b=UKapWglmqUNkXhKqvIarYobDV6ok9Z96AgxIjKSoQ7iaTMJQM7vFEPg8XFp6OQM52hEEm9U3LF7LNExFVtAoHw2e4tlIToClD0ijO1MYzADW+ueZ7h8wG/36BCbBMhoFI25rABPy2pRb9Dt5iui++VA64rMXVz6Cj04g/ITc5MM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail 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 1614326931522618.6870913216545; Fri, 26 Feb 2021 00:08:51 -0800 (PST) Received: from localhost ([::1]:33350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lFYB8-0003l1-60 for importer@patchew.org; Fri, 26 Feb 2021 03:08:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFY7x-0001ia-4l for qemu-devel@nongnu.org; Fri, 26 Feb 2021 03:05:33 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:35836) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lFY7v-00042s-7q for qemu-devel@nongnu.org; Fri, 26 Feb 2021 03:05:32 -0500 Received: by mail-wm1-x332.google.com with SMTP id o16so6955218wmh.0 for ; Fri, 26 Feb 2021 00:05:30 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n66sm10700830wmn.25.2021.02.26.00.05.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Feb 2021 00:05:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yXIWvdB/EerYRecTTmg1n1mknTNJJTJWRa3KyltqPKU=; b=Qmi+NZjWS8ZZ+NLakI5UbC+nGTeVkQ2moF7KPSTytSwsS7/uXMs5fcg8X4E6Uh/KTb nz+2br67AOi/DgA8NAuABXVYT/+UklYA4Z027U52R1uv+mwcflWq/TpI1GUq+RWuE7A6 AtkfY8AN6Rrvf3N7uBYLpGQh7I17ubXGGOTWgkD37lT7JlzFnKLnrMn/RtQCRjPo00Sb CEHRPkH4e9OJ6eCGExdWfTYvfHenq5IhTA2qg62EwOMhuJ6PiQ5A6vcF2br3IvqrCIEW 9qkR+ve7Oev0Vn2Fna6UJdS4zHhl9CvQ+TdF9C4iAu++49deCbCj0euMHSmFcQV6nR4n 5ytQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=yXIWvdB/EerYRecTTmg1n1mknTNJJTJWRa3KyltqPKU=; b=LDKABeT82RnEB+IqwHI45XB9+DLbKRbKlis5ZeqWrQgiGxP4lOGUpewvvpbNQ+/FR8 A6bD16mpZ/WFQOrr4RRzoOhNSnjw9lANzeeZiULMJPWI5N2Ep2F4qGukwAZY1fu7xv8V yyM66E0VjfDxe71bad36OkpPxGugSJbpjKeQ2E6XlqIZgRyuiK6aiIH9Zh6KRrjlSnNd YCXecD+c8xSK0ktLgzcPQiGb9YCbiHgV4H3nPqJVw4siqn39OdOsS2QCxNPTy8fBRGou cOy9HEY1I1DubLMaVZtV3xbNtGWiAjR5ok73V4GGVUMriMSqZRJI7xiA4jWbVKunr0hr ygaw== X-Gm-Message-State: AOAM533Hq2LQNwif/mttmvfxYcxFHxNITs2QoGDHcKd5OuVHV8utJOri +NhCIOSjACzjxHaEUR0gaZ+hiEcuWd8= X-Google-Smtp-Source: ABdhPJw8cIKjCSZ4BafE+4vnmU/Osfg9nhJIyF9PkOXQTfCL81iideiRsYSk4ogGWEKMVPlgjTJbTQ== X-Received: by 2002:a7b:c5c7:: with SMTP id n7mr1534632wmk.63.1614326729156; Fri, 26 Feb 2021 00:05:29 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 02/29] configure: fix --enable-fuzzing linker failures Date: Fri, 26 Feb 2021 09:04:59 +0100 Message-Id: <20210226080526.651705-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210226080526.651705-1-pbonzini@redhat.com> References: <20210226080526.651705-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::332; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x332.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: Alexander Bulekov , Li Qiang Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Alexander Bulekov With --enable-fuzzing, QEMU_CFLAGS include -fsanitize=3Dfuzzer-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=3Dfuzzer-no-link. We were not doing that. Reported-by: Li Qiang , Signed-off-by: Alexander Bulekov Message-Id: <20210221174510.22542-1-alxndr@bu.edu> Signed-off-by: Paolo Bonzini --- configure | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configure b/configure index a79b3746d4..19f2b88589 100755 --- a/configure +++ b/configure @@ -6096,7 +6096,17 @@ if test "$fuzzing" =3D "yes" ; then # 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 + # Add CFLAGS to tell clang to add fuzzer-related instrumentation to al= l the + # compiled code. QEMU_CFLAGS=3D"$QEMU_CFLAGS -fsanitize=3Dfuzzer-no-link" + # To build non-fuzzer binaries with --enable-fuzzing, link everything = with + # fsanitize=3Dfuzzer-no-link. Otherwise, the linker will be unable to = bind + # the fuzzer-related callbacks added by instrumentation. + QEMU_LDFLAGS=3D"$QEMU_LDFLAGS -fsanitize=3Dfuzzer-no-link" + # For the actual fuzzer binaries, we need to link against the libfuzzer + # library. Provide the flags for doing this in FUZZ_EXE_LDFLAGS. The m= eson + # rule for the fuzzer adds these to the link_args. They need to be + # configurable, to support OSS-Fuzz FUZZ_EXE_LDFLAGS=3D"-fsanitize=3Dfuzzer" else FUZZ_EXE_LDFLAGS=3D"$LIB_FUZZING_ENGINE" --=20 2.29.2