From nobody Tue Feb 10 01:33:20 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 162550197804722.8107024791949; Mon, 5 Jul 2021 09:19:38 -0700 (PDT) Received: from localhost ([::1]:41758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0RJp-0000NB-0X for importer@patchew.org; Mon, 05 Jul 2021 12:19:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0R1S-0001Ou-2l for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:38 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:41913) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0R1Q-0003gP-5S for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:37 -0400 Received: by mail-wr1-x433.google.com with SMTP id u8so22622598wrq.8 for ; Mon, 05 Jul 2021 09:00:32 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id b12sm1217063wrt.78.2021.07.05.09.00.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 09:00:31 -0700 (PDT) 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=0skwyYzRx8lw1Lptcw6cX8ImdqPgrLgTWanS4XnbGr4=; b=tYctCtxnpL+oioJbWglLMDYDztY/fQnoHN/EpaG/dgqn8JiI1hfNSeP60NTGteIlrT yDYJiSvlXSMNu1idDUceTztQmXqt7WmdnrdGjZjQkGjiVx1MeqGDfQ6n8wyekkBRVjE3 KG3RhiUFsOxFHVuaWjtLdtzw56XrEur0jlvWm7zN0A+CgT0Aaw3s1H5Y/1ugcrz5Tiim Iw1qd/WwZuzxT/L8JKF/r2i/PS7uqU73xTaLA2H6KP0PyCTQV55oE2KyYR5SZwKlESq8 56yRzKG68KFVthmp0ufepKTkAAMpqxOJ1xcciLX2c5vLJtg2cY7f0cn8tuO/xRcW9rqe aQbg== 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=0skwyYzRx8lw1Lptcw6cX8ImdqPgrLgTWanS4XnbGr4=; b=oNdMpxe4Hur/9OZBYtnRo144QyGmnXmNmv6m8jD2ZNz4DZGyMk1jYjC987su9GsuMl bPFkvcqBimBO8O5eothM9tCAivi+3nO4bEQw8F9L5Z4yItsw9jxr0YRiHqNZf4RuIE6o tA9m4Z7WMd82PK5jw76ic+QgHMvzppMiIOXYXKJcbV0jSrj0SinRmhpD1pAvaIUMhzSW vT/w7If6XTvBrin6rWpBNxh4A1YWSQw3XK/xTN7AyGwTjcxd13OXZNRsu+5euJB2lLOA 0BWz/q/af40qzKi+gv3/0f93hdQTYbEGbKqtHC7wPUarDAzlJoEml4+aAhTSLbjEGVvB cDRA== X-Gm-Message-State: AOAM530qzD7F1nklKnOx9bupim90gShhSGSWPHzfZCAFAFXDfZGgF1zv eH2/e7vABBFY+V6wuAA4zSF/ieN+gXE= X-Google-Smtp-Source: ABdhPJwWCtni8FtbupdqamfsAIrMwMedT3gkg6tgvMgQFUNxxj3b8INtD5FkDXASjvV9Ndud8RHmMA== X-Received: by 2002:a5d:4f01:: with SMTP id c1mr17037239wru.266.1625500831470; Mon, 05 Jul 2021 09:00:31 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 16/17] configure: convert compiler tests to meson, part 5 Date: Mon, 5 Jul 2021 18:00:17 +0200 Message-Id: <20210705160018.241397-17-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210705160018.241397-1-pbonzini@redhat.com> References: <20210705160018.241397-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::433; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x433.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?Daniel=20P=20=2E=20Berrang=C3=A9?= 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: 1625501983760100001 Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Paolo Bonzini --- configure | 101 ---------------------------------------------------- meson.build | 26 ++++++++++++++ 2 files changed, 26 insertions(+), 101 deletions(-) diff --git a/configure b/configure index 83168ceb52..1cac47399d 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 cb50a2e473..12162264db 100644 --- a/meson.build +++ b/meson.build @@ -1268,6 +1268,7 @@ config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_head= er('sys/ioccom.h')) config_host_data.set('HAVE_SYS_KCOV_H', cc.has_header('sys/kcov.h')) =20 # has_function +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')) @@ -1302,6 +1303,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 @@ -1345,6 +1350,15 @@ config_host_data.set('CONFIG_MADVISE', cc.compiles(g= nu_source_prefix + ''' 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 @@ -1354,6 +1368,18 @@ config_host_data.set('CONFIG_SIGNALFD', cc.compiles(= gnu_source_prefix + ''' #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; + }''')) =20 # Some versions of Mac OS X incorrectly define SIZE_MAX config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.compiles(''' --=20 2.31.1