From nobody Tue Feb 10 13:34:23 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=1623152030; cv=none; d=zohomail.com; s=zohoarc; b=k0jA5CxuV002KELni6bR8BYA3vOfpt/NIvwvETAPPb44sS8jB07ytueGsncT191Rx7pYnC4/w4k6AkEICfebIfglPUNPsMU9MC5Gz3m9gGs818i3e+7iAfDhHXBnvMsrLBehIxoNcF16kBGShcEHXvmkW2nglnS2HtQuQiowbks= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623152030; h=Content-Transfer-Encoding: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=+6KgIoYBMJpHpXaS8pJvWzbEpMSL2UNGph/MLhTPZFs=; b=CV5Peo8SDwcOLkuu0aflA1jsq4U8Cos+aTPCE2CgBzECHJvZoBFdKOAjKG6ZUHcZr0FM/5+9g9WUMJ6oX8bB1cF+PhPRSz0iE1s1/X1vb4lTJEgqBQEnPTVbbzqQvKuiaxXQUNMzeoccG5pwOyAeenA8/eHGnGfwdnrDWmJ+PBE= 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 1623152030160654.5671323968871; Tue, 8 Jun 2021 04:33:50 -0700 (PDT) Received: from localhost ([::1]:35646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqZzR-0003PR-3w for importer@patchew.org; Tue, 08 Jun 2021 07:33:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqZpQ-00071X-Bk for qemu-devel@nongnu.org; Tue, 08 Jun 2021 07:23:32 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:51955) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqZpO-00088C-K5 for qemu-devel@nongnu.org; Tue, 08 Jun 2021 07:23:28 -0400 Received: by mail-wm1-x334.google.com with SMTP id l9so1610373wms.1 for ; Tue, 08 Jun 2021 04:23:26 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id i9sm15388621wrn.54.2021.06.08.04.23.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 04:23:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+6KgIoYBMJpHpXaS8pJvWzbEpMSL2UNGph/MLhTPZFs=; b=GWNBDPGEnz+SjiYVglAjIIn1bu1l19zBCHeOy9WXzSyw1kxvTyPJWkPdhOg/H/Fl/a b94wQPq8RIR5I9rQN2iCefEkA3YA3rL8a49sF9d40QqLJFYFsKjWxfiO3MMtRBtYC2L4 zJr5nstsGIg+ZBmU26eNUa5L1Pke8LaQ0PSZldMvkxYvH+IxzluXjT6C/yhmuwYnD74S eHV/ULi3dvpnsBtFNcNyI7fNFCqIllMzfXiKmWaMBL5W5kinKPMT92/2Gy3m27EZgjq+ hT8nOEJiR1W3BlmkLhXX4hJGrxY5u4j9IDNtz081S5C1aOBpLBiG0xqf2XfWR+GfyzD6 kqag== 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=+6KgIoYBMJpHpXaS8pJvWzbEpMSL2UNGph/MLhTPZFs=; b=f0XkPfvDrdsA4rfamuQM2r8lTbwudds4m3P1SikqBPGh67ME2bmVWJ8Xsrjyq0wwAD NaiiFavX2Ucr5nj1Jvw2d54WT+Zlz4+eMhfbca0gAKn6k4TtD67XHBeHPTBKVlbR62P1 xP6Ef0Aj236PDj2z7Ql+luRkhV5Tu4N33jxRG/ua6glNAAUdnF0qGH72a8pAxsEJNTN0 x3P6BdWWC5+8Z3c4vhyGDSV/npLVuw4N32aV1+Km1pxTUsNuTK1cnS+7cXNjl/KZEI1T we6VSU+3+UV0HwEBBvG9cNv685us2/2gwyPtK2mOn5Db2IhCmzRmwhKZow5a87198dHW 2+5g== X-Gm-Message-State: AOAM533kzMqAzQGQbM986eTOnEF611fPJHsvGczYu2lnG3d7FcuZD8Da 1kZbAs/yGLrj+lJ63cuvUkM32OzcA+ua0A== X-Google-Smtp-Source: ABdhPJylPtGi99LUrdBjHo2SgoBjgolwxVLosFDQZEvhNbaD4O01PFC7AvSQj1vjaRnz18URYBWZNA== X-Received: by 2002:a05:600c:1c28:: with SMTP id j40mr3723235wms.102.1623151405376; Tue, 08 Jun 2021 04:23:25 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 25/26] configure: convert compiler tests to meson, part 5 Date: Tue, 8 Jun 2021 13:23:00 +0200 Message-Id: <20210608112301.402434-26-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210608112301.402434-1-pbonzini@redhat.com> References: <20210608112301.402434-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::334; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x334.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.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, 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: , 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" Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 --- configure | 101 ---------------------------------------------------- meson.build | 26 ++++++++++++++ 2 files changed, 26 insertions(+), 101 deletions(-) diff --git a/configure b/configure index 87143ca00d..527a308470 100755 --- a/configure +++ b/configure @@ -3395,92 +3395,6 @@ EOF fi fi =20 -# Check for inotify functions when we are building linux-user -# emulator. This is done because older glibc versions don't -# have syscall stubs for these implemented. In that case we -# don't provide them even if kernel supports them. -# -inotify=3Dno -cat > $TMPC << EOF -#include - -int -main(void) -{ - /* try to start inotify */ - return inotify_init(); -} -EOF -if compile_prog "" "" ; then - inotify=3Dyes -fi - -inotify1=3Dno -cat > $TMPC << EOF -#include - -int -main(void) -{ - /* try to start inotify */ - return inotify_init1(0); -} -EOF -if compile_prog "" "" ; then - inotify1=3Dyes -fi - -# check if pipe2 is there -pipe2=3Dno -cat > $TMPC << EOF -#include -#include - -int main(void) -{ - int pipefd[2]; - return pipe2(pipefd, O_CLOEXEC); -} -EOF -if compile_prog "" "" ; then - pipe2=3Dyes -fi - -# check if accept4 is there -accept4=3Dno -cat > $TMPC << EOF -#include -#include - -int main(void) -{ - accept4(0, NULL, NULL, SOCK_CLOEXEC); - return 0; -} -EOF -if compile_prog "" "" ; then - accept4=3Dyes -fi - -# check if tee/splice is there. vmsplice was added same time. -splice=3Dno -cat > $TMPC << EOF -#include -#include -#include - -int main(void) -{ - int len, fd =3D 0; - len =3D tee(STDIN_FILENO, STDOUT_FILENO, INT_MAX, SPLICE_F_NONBLOCK); - splice(STDIN_FILENO, NULL, fd, NULL, len, SPLICE_F_MOVE); - return 0; -} -EOF -if compile_prog "" "" ; then - splice=3Dyes -fi - ########################################## # libnuma probe =20 @@ -4720,24 +4634,9 @@ fi if test "$module_upgrades" =3D "yes"; then echo "CONFIG_MODULE_UPGRADES=3Dy" >> $config_host_mak fi -if test "$pipe2" =3D "yes" ; then - echo "CONFIG_PIPE2=3Dy" >> $config_host_mak -fi -if test "$accept4" =3D "yes" ; then - echo "CONFIG_ACCEPT4=3Dy" >> $config_host_mak -fi -if test "$splice" =3D "yes" ; then - echo "CONFIG_SPLICE=3Dy" >> $config_host_mak -fi if test "$have_usbfs" =3D "yes" ; then echo "CONFIG_USBFS=3Dy" >> $config_host_mak fi -if test "$inotify" =3D "yes" ; then - echo "CONFIG_INOTIFY=3Dy" >> $config_host_mak -fi -if test "$inotify1" =3D "yes" ; then - echo "CONFIG_INOTIFY1=3Dy" >> $config_host_mak -fi if test "$gio" =3D "yes" ; then echo "CONFIG_GIO=3Dy" >> $config_host_mak echo "GIO_CFLAGS=3D$gio_cflags" >> $config_host_mak diff --git a/meson.build b/meson.build index e168e166ad..78fa30adbb 100644 --- a/meson.build +++ b/meson.build @@ -1271,6 +1271,7 @@ config_host_data.set('HAVE_SYS_DISK_H', cc.has_header= ('sys/disk.h')) config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h')) config_host_data.set('HAVE_SYS_KCOV_H', cc.has_header('sys/kcov.h')) =20 +config_host_data.set('CONFIG_ACCEPT4', cc.has_function('accept4')) config_host_data.set('CONFIG_CLOCK_ADJTIME', cc.has_function('clock_adjtim= e')) config_host_data.set('CONFIG_DUP3', cc.has_function('dup3')) config_host_data.set('CONFIG_FALLOCATE', cc.has_function('fallocate')) @@ -1304,6 +1305,10 @@ config_host_data.set('CONFIG_FIEMAP', config_host_data.set('CONFIG_GETRANDOM', cc.has_function('getrandom') and cc.has_header_symbol('sys/random.h', 'GRND_NONBLOCK')) +config_host_data.set('CONFIG_INOTIFY', + cc.has_header_symbol('sys/inotify.h', 'inotify_init')) +config_host_data.set('CONFIG_INOTIFY1', + cc.has_header_symbol('sys/inotify.h', 'inotify_init1'= )) config_host_data.set('CONFIG_MACHINE_BSWAP_H', cc.has_header_symbol('machine/bswap.h', 'bswap32', prefix: '''#include @@ -1341,6 +1346,15 @@ config_host_data.set('CONFIG_MADVISE', cc.compiles('= '' config_host_data.set('CONFIG_MEMFD', cc.compiles(gnu_source_prefix + ''' #include int main(void) { return memfd_create("foo", MFD_ALLOW_SEALING); }''')) +config_host_data.set('CONFIG_PIPE2', cc.compiles(gnu_source_prefix + ''' + #include + #include + + int main(void) + { + int pipefd[2]; + return pipe2(pipefd, O_CLOEXEC); + }''')) config_host_data.set('CONFIG_POSIX_MADVISE', cc.compiles(gnu_source_prefix= + ''' #include #include @@ -1350,6 +1364,18 @@ config_host_data.set('CONFIG_SIGNALFD', cc.compiles(= ''' #include #include int main(void) { return syscall(SYS_signalfd, -1, NULL, _NSIG / 8); }'''= )) +config_host_data.set('CONFIG_SPLICE', cc.compiles(gnu_source_prefix + ''' + #include + #include + #include + + int main(void) + { + int len, fd =3D 0; + len =3D tee(STDIN_FILENO, STDOUT_FILENO, INT_MAX, SPLICE_F_NONBLOCK); + splice(STDIN_FILENO, NULL, fd, NULL, len, SPLICE_F_MOVE); + return 0; + }''')) config_host_data.set('CONFIG_STATIC_ASSERT', cc.compiles(''' _Static_assert(1, "success"); int main(void) { --=20 2.31.1