From nobody Tue Feb 10 02:55:10 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634229899368541.1100784515332; Thu, 14 Oct 2021 09:44:59 -0700 (PDT) Received: from localhost ([::1]:58288 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mb3qk-0004VY-B6 for importer@patchew.org; Thu, 14 Oct 2021 12:44:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mb3cB-0003jP-Nj for qemu-devel@nongnu.org; Thu, 14 Oct 2021 12:29:55 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:43770) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mb3c9-0000f6-V0 for qemu-devel@nongnu.org; Thu, 14 Oct 2021 12:29:55 -0400 Received: by mail-ed1-x52b.google.com with SMTP id i20so25746014edj.10 for ; Thu, 14 Oct 2021 09:29:53 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id x22sm2658404edv.14.2021.10.14.09.29.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Oct 2021 09:29:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ncrd4Iry7De5PP7WGyTpKaYN3ujrNzg5cS7gtoDsikk=; b=WaJlV4lVfgUHg4dhOVsvFGvUwM+7mkaPdCRWD/RddwgeJtNJXido/iYO3nl0InF0k0 E1aumPlMUlpnU2qxCQdcCaOBngyhwyA8x6P7eSHU8gNHycjIgfgGWvGS2TrtaeN85yXC gVQ1ZHiyFJXaTdfGr0OjX6Rh/4SOFuNOMipe5EDWKPEfNmO95D6CxqQRrh4saB8YdUq8 DkeUN+qekyVfLKlOYfyg7A1LuYc7EZmQ4Yh2noMr3kdRWEAbtPre4rd1Oc+IPiK5ZAU2 4oCFvT/vrn28WqmmnigTa3dTMUkYD4I8C/SW33KZdkmUMEuyjC2xUx2m161d5zar5ag7 H8AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ncrd4Iry7De5PP7WGyTpKaYN3ujrNzg5cS7gtoDsikk=; b=bs2LvET+bvzX0ZOZGx3gwKZSUnCpqsBpZy8xHCnxTLYji64qQt8mSSqIPnQwL8mzKo uY+MFrrV81Jbpu80TGj2e/pifXunTdA6nD239+VajJ8EUkRJS9z5TC5oRR2Gg3nPj72A +VI+dvBvhxZcpwsjaljZebEwtJV0u07U8gcLjmb6kTIi6u+/2HaxHjaASpNU8QO0b5xC 6xhH2bCQCyWSy+ZSpwvT19/7v2+dwTazstjPUHupbSZLAU5SGupkqxnGqKnqoSQJh/cw ZlgMVgkhdJ/4cxyNWZT9IARQXXkHVVf8/FBrBkBKUqwnWTMeFVyeQORILLATg0q+Xdyt k7ew== X-Gm-Message-State: AOAM5315le8b9BM2q7u85UXfLErDOkiGE8ovOFsopXQ1RWVANs3kShjX JMe0gdNPWS6ctKYLRO+qPDYT+e+15Kk= X-Google-Smtp-Source: ABdhPJxUeGauGg5dkTCWktpaKOJWpUVlRL9c5Vvs2vpE1ESKyJO371vMHOUs04l8/O3ZEALasnLJkA== X-Received: by 2002:a50:e183:: with SMTP id k3mr10223223edl.22.1634228992672; Thu, 14 Oct 2021 09:29:52 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 14/26] configure, meson: move remaining HAVE_* compiler tests to Meson Date: Thu, 14 Oct 2021 18:29:26 +0200 Message-Id: <20211014162938.430211-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211014162938.430211-1-pbonzini@redhat.com> References: <20211014162938.430211-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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::52b; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52b.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.25, 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: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634229899700100001 Remove some special cases by moving them to Meson. Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20211007130829.632254-8-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- configure | 37 ------------------------------------- meson.build | 19 ++++++++++++++++++- 2 files changed, 18 insertions(+), 38 deletions(-) diff --git a/configure b/configure index 6efea3cfc6..e78f58978f 100755 --- a/configure +++ b/configure @@ -2403,18 +2403,6 @@ else l2tpv3=3Dno fi =20 -cat > $TMPC < -int main(int argc, char *argv[]) { - return mlockall(MCL_FUTURE); -} -EOF -if compile_prog "" "" ; then - have_mlockall=3Dyes -else - have_mlockall=3Dno -fi - ######################################### # vhost interdependencies and host support =20 @@ -3842,21 +3830,6 @@ if test "$fortify_source" !=3D "no"; then fi fi =20 -########################################## -# check if struct fsxattr is available via linux/fs.h - -have_fsxattr=3Dno -cat > $TMPC << EOF -#include -struct fsxattr foo; -int main(void) { - return 0; -} -EOF -if compile_prog "" "" ; then - have_fsxattr=3Dyes -fi - ########################################## # check for usable membarrier system call if test "$membarrier" =3D "yes"; then @@ -4358,13 +4331,6 @@ if test "$gdbus_codegen" !=3D "" ; then fi echo "CONFIG_TLS_PRIORITY=3D\"$tls_priority\"" >> $config_host_mak =20 -# Work around a system header bug with some kernel/XFS header -# versions where they both try to define 'struct fsxattr': -# xfs headers will not try to redefine structs from linux headers -# if this macro is set. -if test "$have_fsxattr" =3D "yes" ; then - echo "HAVE_FSXATTR=3Dy" >> $config_host_mak -fi if test "$xen" =3D "enabled" ; then echo "CONFIG_XEN_BACKEND=3Dy" >> $config_host_mak echo "CONFIG_XEN_CTRL_INTERFACE_VERSION=3D$xen_ctrl_version" >> $config_= host_mak @@ -4569,9 +4535,6 @@ fi if test "$parallels" =3D "yes" ; then echo "CONFIG_PARALLELS=3Dy" >> $config_host_mak fi -if test "$have_mlockall" =3D "yes" ; then - echo "HAVE_MLOCKALL=3Dy" >> $config_host_mak -fi =20 if test "$plugins" =3D "yes" ; then echo "CONFIG_PLUGIN=3Dy" >> $config_host_mak diff --git a/meson.build b/meson.build index bdcedf2eef..e8e728bf72 100644 --- a/meson.build +++ b/meson.build @@ -1601,6 +1601,23 @@ config_host_data.set('CONFIG_SPLICE', cc.links(gnu_s= ource_prefix + ''' return 0; }''')) =20 +config_host_data.set('HAVE_MLOCKALL', cc.links(gnu_source_prefix + ''' + #include + int main(int argc, char *argv[]) { + return mlockall(MCL_FUTURE); + }''')) + +# Work around a system header bug with some kernel/XFS header +# versions where they both try to define 'struct fsxattr': +# xfs headers will not try to redefine structs from linux headers +# if this macro is set. +config_host_data.set('HAVE_FSXATTR', cc.links(''' + #include ' + struct fsxattr foo; + int main(void) { + return 0; + }''')) + # Some versions of Mac OS X incorrectly define SIZE_MAX config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.compiles(''' #include @@ -1625,7 +1642,7 @@ foreach k, v: config_host config_host_data.set('HOST_' + v.to_upper(), 1) elif strings.contains(k) config_host_data.set_quoted(k, v) - elif k.startswith('CONFIG_') or k.startswith('HAVE_') + elif k.startswith('CONFIG_') config_host_data.set(k, v =3D=3D 'y' ? 1 : v) endif endforeach --=20 2.31.1