From nobody Thu Nov 13 06:07:58 2025 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1578090279; cv=none; d=zohomail.com; s=zohoarc; b=W7Hr9FfaB82g1H6X6pyDI/7m5vJFOzEa+54qStMsFB/+YKYzb9K7qA2fltOiYHw1H2qK9nzD+Q2YkioqrmupHn81AViu1hD9sxiSBhTvrsYeu+XrOzU/MG7wn9XDhBigXvk/2JvyFuJX8N9Lx3ezwjP0qrdotH8ffSRg+ngVSSM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578090279; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=bW1Cc1u7kYCmTs1pAJUo5AICkQ67eWWMQWGuA+fFj8c=; b=Ke4WLY/aFnVQ5qKhBu5dZSMCU6gospuBlZp+8m+IFziwY+8MTaTi41d4mhPWifoYTMdBFMlrS/GwXxjLE6sPxvMauQCmPd63kgfN5yfuVzOk1K7zHeVSSwB/E1/L6OPjpnsyjNfEGioJdigHhKW+QR79jQ9rYrEACOY9oy5cDzE= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1578090279863446.44712897165834; Fri, 3 Jan 2020 14:24:39 -0800 (PST) Received: from localhost ([::1]:57382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inVN0-0005hB-O9 for importer@patchew.org; Fri, 03 Jan 2020 17:24:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39671) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inVHq-0006yp-O6 for qemu-devel@nongnu.org; Fri, 03 Jan 2020 17:19:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1inVHp-00087W-9Z for qemu-devel@nongnu.org; Fri, 03 Jan 2020 17:19:18 -0500 Received: from mx2.rt-rk.com ([89.216.37.149]:53922 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1inVHp-00081c-0f for qemu-devel@nongnu.org; Fri, 03 Jan 2020 17:19:17 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 7B8991A1F94; Fri, 3 Jan 2020 23:18:10 +0100 (CET) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.14.106]) by mail.rt-rk.com (Postfix) with ESMTPSA id 44C6D1A221D; Fri, 3 Jan 2020 23:18:10 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v3 10/12] configure: Detect kcov support and introduce CONFIG_KCOV Date: Fri, 3 Jan 2020 23:18:00 +0100 Message-Id: <1578089882-3587-11-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1578089882-3587-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1578089882-3587-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 89.216.37.149 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: laurent@vivier.eu, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Aleksandar Markovic kcov is kernel code coverage tracing tool. It requires kernel 4.4+ compiled with certain kernel options. Its interface consists of three ioctls. This patch checks if kcov support is present on build machine, and stores the result in variable CONFIG_KCOV, meant to be used in linux-user code related to the support for above mentioned ioctls. Signed-off-by: Aleksandar Markovic --- configure | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/configure b/configure index 940bf9e..bf162d4 100755 --- a/configure +++ b/configure @@ -4752,6 +4752,24 @@ if compile_prog "" "" ; then syncfs=3Dyes fi =20 +# check for kcov support (kernel must be 4.4+, compiled with certain optio= ns) +kcov=3Dno +cat > $TMPC << EOF +#include + +int main(void) +{ + ioctl(-1, KIOENABLE, NULL); + ioctl(-1, KIODISABLE, NULL); + ioctl(-1, KIOSETBUFSIZE, NULL); + + return 0; +} +EOF +if compile_prog "" "" ; then + kcov=3Dyes +fi + # Check we have a new enough version of sphinx-build has_sphinx_build() { # This is a bit awkward but works: create a trivial document and @@ -6874,6 +6892,9 @@ fi if test "$syncfs" =3D "yes" ; then echo "CONFIG_SYNCFS=3Dy" >> $config_host_mak fi +if test "$kcov" =3D "yes" ; then + echo "CONFIG_KCOV=3Dy" >> $config_host_mak +fi if test "$inotify" =3D "yes" ; then echo "CONFIG_INOTIFY=3Dy" >> $config_host_mak fi --=20 2.7.4