From nobody Tue Feb 10 02:54:54 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 1625501752500895.5557607671515; Mon, 5 Jul 2021 09:15:52 -0700 (PDT) Received: from localhost ([::1]:32968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0RGB-0002es-2U for importer@patchew.org; Mon, 05 Jul 2021 12:15:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0R1Q-0001NZ-F9 for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:37 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:37836) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0R1M-0003gL-3Z for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:34 -0400 Received: by mail-wr1-x430.google.com with SMTP id i94so22672225wri.4 for ; Mon, 05 Jul 2021 09:00:31 -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:30 -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=dWfQhBashspj92n3O9gjSje6wEHhYNIVjiIMVmNraZU=; b=indDN2xPtvoL8pX2tOGJCPO3L2TAO3oKO3is7jpXKGCjc856Ex8BSKrbF3u1HZyAYF 6Dqf+rk4VG8AFdiKm1Lzx1eSZ8dKHaAWB8KeIvZ1XEpwI+xcYJp7UFIl8gJeIWun3DXN JrCNegb4/NCxJ3+TLW199U6hn+qlO7xdtcXFsSdetUJdg8+chxE5/MMN6jiz7/6pVVZg gYmhIKOrOUA43aR59StfibKqXAWCMgxOQlblZCHy5amsvdX2kifqrL3f4F3da6PBjFF+ 7snkavco0FNbhgrnTOoN5Zh/9qtcTrWvT1445esVtBK1+nfczu4ZAVUDAEBQf0tLQkhZ Faiw== 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=dWfQhBashspj92n3O9gjSje6wEHhYNIVjiIMVmNraZU=; b=uEMgdpd2YosLuHkbz8PdbrpHYJ6d1dJ3JFYAzdVcVWiFVEOFRI1dlP6KOb8tfjFN/N 85LEWB8/kij4AnJH/obDRnB75pLyrv/T1KEXdiAOYrA/sihL+CidDXu0hXUTwuHVXJ// siqUI5FwJVvNDxCWRhY1ON2wvJwnUGSL3MKJWmzXj+vf9M2lNKiXupgwqMf3wvlBiqIH KZV8stBJ/UKPR8VpViA6WruWJFGcvFgI8xaoIfqJo8l5c8RMyq+1gvEd6/E9Bq5vk1jD c5Q+Em3BA+ff7Ux+y1kLbMMl9RL1mKmmBoAskFSPzTsnaaKNnL2quoHNtB9MVrVolVIr SAcg== X-Gm-Message-State: AOAM531qF5ZG0Euk+nVBXewKqT4qivzhHaJnY/QSLD9MWgEPUPy4/ZTY qWQz8aFbb5apC1IzQpqKY81u3vCBXVw= X-Google-Smtp-Source: ABdhPJz5Jc991yM6L2Hn3WrGjGSosSmD7ZIZHl5KxKQwFEQq/M2vjHj1crGkvMMzdfqstAkv/Dy5Yw== X-Received: by 2002:a05:6000:511:: with SMTP id a17mr16577550wrf.351.1625500830815; Mon, 05 Jul 2021 09:00:30 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 15/17] configure: convert compiler tests to meson, part 4 Date: Mon, 5 Jul 2021 18:00:16 +0200 Message-Id: <20210705160018.241397-16-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::430; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x430.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: 1625501757979100001 And remove them from the summary, since now their outcome is verbosely included in the meson output. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Paolo Bonzini --- configure | 137 ---------------------------------------------------- meson.build | 39 +++++++++++++-- 2 files changed, 34 insertions(+), 142 deletions(-) diff --git a/configure b/configure index cf7f71fe40..83168ceb52 100755 --- a/configure +++ b/configure @@ -3511,59 +3511,6 @@ elif test "$jemalloc" =3D "yes" ; then malloc=3Djemalloc fi =20 -########################################## -# signalfd probe -signalfd=3D"no" -cat > $TMPC << EOF -#include -#include -#include -int main(void) { return syscall(SYS_signalfd, -1, NULL, _NSIG / 8); } -EOF - -if compile_prog "" "" ; then - signalfd=3Dyes -fi - -# check if optreset global is declared by -optreset=3D"no" -cat > $TMPC << EOF -#include -int main(void) { return optreset; } -EOF - -if compile_prog "" "" ; then - optreset=3Dyes -fi - -# check if eventfd is supported -eventfd=3Dno -cat > $TMPC << EOF -#include - -int main(void) -{ - return eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); -} -EOF -if compile_prog "" "" ; then - eventfd=3Dyes -fi - -# check if memfd is supported -memfd=3Dno -cat > $TMPC << EOF -#include - -int main(void) -{ - return memfd_create("foo", MFD_ALLOW_SEALING); -} -EOF -if compile_prog "" "" ; then - memfd=3Dyes -fi - # check for usbfs have_usbfs=3Dno if test "$linux_user" =3D "yes"; then @@ -3711,66 +3658,6 @@ case "$capstone" in ;; esac =20 -########################################## -# check if we have fdatasync - -fdatasync=3Dno -cat > $TMPC << EOF -#include -int main(void) { -#if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO > 0 -return fdatasync(0); -#else -#error Not supported -#endif -} -EOF -if compile_prog "" "" ; then - fdatasync=3Dyes -fi - -########################################## -# check if we have madvise - -madvise=3Dno -cat > $TMPC << EOF -#include -#include -#include -int main(void) { return madvise(NULL, 0, MADV_DONTNEED); } -EOF -if compile_prog "" "" ; then - madvise=3Dyes -fi - -########################################## -# check if we have posix_madvise - -posix_madvise=3Dno -cat > $TMPC << EOF -#include -#include -int main(void) { return posix_madvise(NULL, 0, POSIX_MADV_DONTNEED); } -EOF -if compile_prog "" "" ; then - posix_madvise=3Dyes -fi - -########################################## -# check if we have posix_memalign() - -posix_memalign=3Dno -cat > $TMPC << EOF -#include -int main(void) { - void *p; - return posix_memalign(&p, 8, 8); -} -EOF -if compile_prog "" "" ; then - posix_memalign=3Dyes -fi - ########################################## # check if we have posix_syslog =20 @@ -4842,12 +4729,6 @@ fi if test "$splice" =3D "yes" ; then echo "CONFIG_SPLICE=3Dy" >> $config_host_mak fi -if test "$eventfd" =3D "yes" ; then - echo "CONFIG_EVENTFD=3Dy" >> $config_host_mak -fi -if test "$memfd" =3D "yes" ; then - echo "CONFIG_MEMFD=3Dy" >> $config_host_mak -fi if test "$have_usbfs" =3D "yes" ; then echo "CONFIG_USBFS=3Dy" >> $config_host_mak fi @@ -4922,27 +4803,9 @@ fi if test "$membarrier" =3D "yes" ; then echo "CONFIG_MEMBARRIER=3Dy" >> $config_host_mak fi -if test "$signalfd" =3D "yes" ; then - echo "CONFIG_SIGNALFD=3Dy" >> $config_host_mak -fi -if test "$optreset" =3D "yes" ; then - echo "HAVE_OPTRESET=3Dy" >> $config_host_mak -fi if test "$tcg" =3D "enabled" -a "$tcg_interpreter" =3D "true" ; then echo "CONFIG_TCG_INTERPRETER=3Dy" >> $config_host_mak fi -if test "$fdatasync" =3D "yes" ; then - echo "CONFIG_FDATASYNC=3Dy" >> $config_host_mak -fi -if test "$madvise" =3D "yes" ; then - echo "CONFIG_MADVISE=3Dy" >> $config_host_mak -fi -if test "$posix_madvise" =3D "yes" ; then - echo "CONFIG_POSIX_MADVISE=3Dy" >> $config_host_mak -fi -if test "$posix_memalign" =3D "yes" ; then - echo "CONFIG_POSIX_MEMALIGN=3Dy" >> $config_host_mak -fi =20 if test "$spice_protocol" =3D "yes" ; then echo "CONFIG_SPICE_PROTOCOL=3Dy" >> $config_host_mak diff --git a/meson.build b/meson.build index 5fec46bb65..cb50a2e473 100644 --- a/meson.build +++ b/meson.build @@ -1272,6 +1272,7 @@ config_host_data.set('CONFIG_CLOCK_ADJTIME', cc.has_f= unction('clock_adjtime')) config_host_data.set('CONFIG_DUP3', cc.has_function('dup3')) config_host_data.set('CONFIG_FALLOCATE', cc.has_function('fallocate')) config_host_data.set('CONFIG_POSIX_FALLOCATE', cc.has_function('posix_fall= ocate')) +config_host_data.set('CONFIG_POSIX_MEMALIGN', cc.has_function('posix_memal= ign')) config_host_data.set('CONFIG_PPOLL', cc.has_function('ppoll')) config_host_data.set('CONFIG_PREADV', cc.has_function('preadv', prefix: '#= include ')) config_host_data.set('CONFIG_SEM_TIMEDWAIT', cc.has_function('sem_timedwai= t', dependencies: threads)) @@ -1311,6 +1312,8 @@ config_host_data.set('CONFIG_RTNETLINK', cc.has_header_symbol('linux/rtnetlink.h', 'IFLA_PROTO= _DOWN')) config_host_data.set('CONFIG_SYSMACROS', cc.has_header_symbol('sys/sysmacros.h', 'makedev')) +config_host_data.set('HAVE_OPTRESET', + cc.has_header_symbol('getopt.h', 'optreset')) config_host_data.set('HAVE_UTMPX', cc.has_header_symbol('utmpx.h', 'struct utmpx')) =20 @@ -1322,6 +1325,36 @@ config_host_data.set('HAVE_STRUCT_STAT_ST_ATIM', cc.has_member('struct stat', 'st_atim', prefix: '#include ')) =20 +config_host_data.set('CONFIG_EVENTFD', cc.compiles(''' + #include + int main(void) { return eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); }''')) +config_host_data.set('CONFIG_FDATASYNC', cc.compiles(gnu_source_prefix + '= '' + #include + int main(void) { + #if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO > 0 + return fdatasync(0); + #else + #error Not supported + #endif + }''')) +config_host_data.set('CONFIG_MADVISE', cc.compiles(gnu_source_prefix + ''' + #include + #include + #include + int main(void) { return madvise(NULL, 0, MADV_DONTNEED); }''')) +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_POSIX_MADVISE', cc.compiles(gnu_source_prefix= + ''' + #include + #include + int main(void) { return posix_madvise(NULL, 0, POSIX_MADV_DONTNEED); }''= ')) +config_host_data.set('CONFIG_SIGNALFD', cc.compiles(gnu_source_prefix + ''' + #include + #include + #include + int main(void) { return syscall(SYS_signalfd, -1, NULL, _NSIG / 8); }'''= )) + # Some versions of Mac OS X incorrectly define SIZE_MAX config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.compiles(''' #include @@ -1398,7 +1431,7 @@ if link_language =3D=3D 'cpp' } endif =20 -have_ivshmem =3D config_host.has_key('CONFIG_EVENTFD') +have_ivshmem =3D config_host_data.get('CONFIG_EVENTFD') host_kconfig =3D \ ('CONFIG_TPM' in config_host ? ['CONFIG_TPM=3Dy'] : []) + \ ('CONFIG_SPICE' in config_host ? ['CONFIG_SPICE=3Dy'] : []) + \ @@ -2711,10 +2744,6 @@ summary_info +=3D {'PIE': get_option('= b_pie')} summary_info +=3D {'static build': config_host.has_key('CONFIG_STATIC= ')} summary_info +=3D {'malloc trim support': has_malloc_trim} summary_info +=3D {'membarrier': config_host.has_key('CONFIG_MEMBAR= RIER')} -summary_info +=3D {'fdatasync': config_host.has_key('CONFIG_FDATAS= YNC')} -summary_info +=3D {'madvise': config_host.has_key('CONFIG_MADVIS= E')} -summary_info +=3D {'posix_madvise': config_host.has_key('CONFIG_POSIX_= MADVISE')} -summary_info +=3D {'posix_memalign': config_host.has_key('CONFIG_POSIX_= MEMALIGN')} summary_info +=3D {'debug stack usage': config_host.has_key('CONFIG_DEBUG_= STACK_USAGE')} summary_info +=3D {'mutex debugging': config_host.has_key('CONFIG_DEBUG_= MUTEX')} summary_info +=3D {'memory allocator': get_option('malloc')} --=20 2.31.1