[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 19/26] configure: convert compiler tests to meson, part 1
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH 19/26] configure: convert compiler tests to meson, part 1 |
Date: |
Tue, 15 Jun 2021 15:59:44 +0100 |
User-agent: |
Mutt/2.0.7 (2021-05-04) |
On Tue, Jun 08, 2021 at 01:22:54PM +0200, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> configure | 348 ---------------------------------------------
> meson.build | 35 ++++-
> ui/vnc-auth-sasl.c | 2 +-
> util/meson.build | 4 +-
> 4 files changed, 38 insertions(+), 351 deletions(-)
> diff --git a/meson.build b/meson.build
> index 2a19f6c1bd..fe8f64763b 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1055,10 +1055,12 @@ endif
>
> # Check whether the glibc provides statx()
>
> -statx_test = '''
> +gnu_source_prefix = '''
> #ifndef _GNU_SOURCE
> #define _GNU_SOURCE
> #endif
> +'''
> +statx_test = gnu_source_prefix + '''
> #include <sys/stat.h>
> int main(void) {
> struct statx statxbuf;
> @@ -1260,6 +1262,7 @@ config_host_data.set('QEMU_VERSION_MICRO',
> meson.project_version().split('.')[2]
>
> config_host_data.set('HAVE_HOST_BLOCK_DEVICE', have_host_block_device)
>
> +config_host_data.set('CONFIG_EPOLL', cc.has_header('sys/epoll.h'))
Why add this here rather than with the other CONFIG_ checks ?
> config_host_data.set('HAVE_BTRFS_H', cc.has_header('linux/btrfs.h'))
> config_host_data.set('HAVE_DRM_H', cc.has_header('libdrm/drm.h'))
> config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h'))
> @@ -1267,9 +1270,39 @@ 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'))
>
> +config_host_data.set('CONFIG_CLOCK_ADJTIME',
> cc.has_function('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_fallocate'))
> +config_host_data.set('CONFIG_PPOLL', cc.has_function('ppoll'))
> config_host_data.set('CONFIG_PREADV', cc.has_function('preadv', prefix:
> '#include <sys/uio.h>'))
> +config_host_data.set('CONFIG_SENDFILE', cc.has_function('sendfile'))
> +config_host_data.set('CONFIG_SETNS', cc.has_function('setns') and
> cc.has_function('unshare'))
> +config_host_data.set('CONFIG_SYNCFS', cc.has_function('syncfs'))
> +config_host_data.set('CONFIG_SYNC_FILE_RANGE',
> cc.has_function('sync_file_range'))
> +config_host_data.set('CONFIG_TIMERFD', cc.has_function('timerfd_create'))
> +config_host_data.set('HAVE_OPENPTY', cc.has_function('openpty',
> dependencies: util))
> config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system',
> prefix: '#include <stdlib.h>'))
This function looks even more out of place
>
> +config_host_data.set('CONFIG_BYTESWAP_H',
> + cc.has_header_symbol('byteswap.h', 'bswap_32'))
> +config_host_data.set('CONFIG_EPOLL_CREATE1',
> + cc.has_header_symbol('sys/epoll.h', 'epoll_create1'))
Why not sort next to CONFIG_EPOLL
> +config_host_data.set('CONFIG_FALLOCATE_PUNCH_HOLE',
> + cc.has_header_symbol('linux/falloc.h',
> 'FALLOC_FL_PUNCH_HOLE') and
> + cc.has_header_symbol('linux/falloc.h',
> 'FALLOC_FL_KEEP_SIZE'))
> +config_host_data.set('CONFIG_FALLOCATE_ZERO_RANGE',
> + cc.has_header_symbol('linux/falloc.h',
> 'FALLOC_FL_ZERO_RANGE'))
And next to CONFIG_FALLOCATE ?
> +config_host_data.set('CONFIG_FIEMAP',
> + cc.has_header('linux/fiemap.h') and
> + cc.has_header_symbol('linux/fs.h', 'FS_IOC_FIEMAP'))
> +config_host_data.set('CONFIG_MACHINE_BSWAP_H',
> + cc.has_header_symbol('machine/bswap.h', 'bswap32',
> + prefix: '''#include <sys/endian.h>
> + #include
> <sys/types.h>'''))
> +config_host_data.set('CONFIG_PRCTL_PR_SET_TIMERSLACK',
> + cc.has_header_symbol('sys/prctl.h',
> 'PR_SET_TIMERSLACK'))
> +
> # Some versions of Mac OS X incorrectly define SIZE_MAX
> config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.compiles('''
> #include <stdint.h>
> diff --git a/ui/vnc-auth-sasl.c b/ui/vnc-auth-sasl.c
> index 47fdae5b21..cf65a0b161 100644
> --- a/ui/vnc-auth-sasl.c
> +++ b/ui/vnc-auth-sasl.c
> @@ -33,7 +33,7 @@
> * files that use SASL API need to disable -Wdeprecated-declarations.
> */
> #ifdef CONFIG_DARWIN
> -#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
> +#pragma GCC diagnostic warning "-Wdeprecated-declarations"
Why this change now ?
> #endif
>
> /* Max amount of data we send/recv for SASL steps to prevent DOS */
> diff --git a/util/meson.build b/util/meson.build
> index 97fad44105..7fe9da60ab 100644
> --- a/util/meson.build
> +++ b/util/meson.build
> @@ -3,7 +3,9 @@ util_ss.add(files('osdep.c', 'cutils.c', 'unicode.c',
> 'qemu-timer-common.c'))
> util_ss.add(when: 'CONFIG_ATOMIC64', if_false: files('atomic64.c'))
> util_ss.add(when: 'CONFIG_POSIX', if_true: files('aio-posix.c'))
> util_ss.add(when: 'CONFIG_POSIX', if_true: files('fdmon-poll.c'))
> -util_ss.add(when: 'CONFIG_EPOLL_CREATE1', if_true: files('fdmon-epoll.c'))
> +if config_host_data.get('CONFIG_EPOLL_CREATE1')
> + util_ss.add(files('fdmon-epoll.c'))
> +endif
Why does this need to change ?
> util_ss.add(when: ['CONFIG_LINUX_IO_URING', linux_io_uring], if_true:
> files('fdmon-io_uring.c'))
> util_ss.add(when: 'CONFIG_POSIX', if_true: files('compatfd.c'))
> util_ss.add(when: 'CONFIG_POSIX', if_true: files('event_notifier-posix.c'))
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- [PATCH 23/26] configure: convert CONFIG_STATIC_ASSERT tests to meson, (continued)
- [PATCH 23/26] configure: convert CONFIG_STATIC_ASSERT tests to meson, Paolo Bonzini, 2021/06/08
- [PATCH 22/26] configure: convert compiler tests to meson, part 3, Paolo Bonzini, 2021/06/08
- [PATCH 26/26] configure: convert compiler tests to meson, part 6, Paolo Bonzini, 2021/06/08
- [PATCH 25/26] configure: convert compiler tests to meson, part 5, Paolo Bonzini, 2021/06/08
- [PATCH 19/26] configure: convert compiler tests to meson, part 1, Paolo Bonzini, 2021/06/08
- Re: [PATCH 19/26] configure: convert compiler tests to meson, part 1,
Daniel P . Berrangé <=
- [PATCH 24/26] configure: convert compiler tests to meson, part 4, Paolo Bonzini, 2021/06/08