configure / meson: Move check for headers to meson.build
cover configure / meson: Move check for headers to meson.build
The checks for header files can be done much shorter and nicer in meson.build. Let's move them there.
Thomas Huth (6):
configure: Remove the obsolete check for ifaddrs.h configure / meson: Move check for pty.h to meson.build configure / meson: Move check for drm.h to meson.build configure / meson: Move check for sys/signal.h to meson.build configure / meson: Move check for sys/signal.h to meson.build configure / meson: Move check for linux/btrfs.h to meson.build
configure | 58 --------------------------------------- linux-user/ioctls.h | 2 +- linux-user/syscall.c | 4 +-- linux-user/syscall_defs.h | 2 +- meson.build | 5 ++++ 5 files changed, 9 insertions(+), 62 deletions(-)
Signature · 1 line
2.18.4
PATCH 1/6 configure: Remove the obsolete check for ifaddrs.h
The code that used HAVE_IFADDRS_H has been removed in commit 0a27af918b ("io: use bind() to check for IPv4/6 availability"), so we don't need this check in the configure script anymore.
--- configure | 11 ----------- 1 file changed, 11 deletions(-)
configure +0 -11
@@ -3094,14 +3094,6 @@ EOF fi fi -########################################## -# getifaddrs (for tests/test-io-channel-socket ) - -have_ifaddrs_h=yes -if ! check_include "ifaddrs.h" ; then - have_ifaddrs_h=no -fi - ######################################### # libdrm check have_drm_h=no
@@ -6199,9 +6191,6 @@ fi if test "$auth_pam" = "yes" ; then echo "CONFIG_AUTH_PAM=y" >> $config_host_mak fi -if test "$have_ifaddrs_h" = "yes" ; then - echo "HAVE_IFADDRS_H=y" >> $config_host_mak -fi if test "$have_drm_h" = "yes" ; then echo "HAVE_DRM_H=y" >> $config_host_mak fi
Signature · 1 line
2.18.4
Re: [PATCH 1/6] configure: Remove the obsolete check for ifaddrs.h
Quoted 8 lines · Thomas Huth
The code that used
HAVE_IFADDRS_Hhas been removed in commit0a27af918b("io: usebind()to check for IPv4/6 availability"), so we don't need this check in the configure script anymore.Signed-off-by Thomas Huth <[email protected]>--- configure | 11 ----------- 1 file changed, 11 deletions(-)
r~
Laurent Vivier
AppliedRe: [PATCH 1/6] configure: Remove the obsolete check for ifaddrs.h
In reply to Thomas HuthLe 18/11/2020 à 18:10, Thomas Huth a écrit :
Quoted 30 lines
The code that used
HAVE_IFADDRS_Hhas been removed in commit0a27af918b("io: usebind()to check for IPv4/6 availability"), so we don't need this check in the configure script anymore.Signed-off-by Thomas Huth <[email protected]>--- configure | 11 ----------- 1 file changed, 11 deletions(-)configure +0
-8@@ -3094,14 +3094,6 @@ EOF fi fi -########################################## -# getifaddrs (for tests/test-io-channel-socket ) - -have_ifaddrs_h=yes -if ! check_include "ifaddrs.h" ; then - have_ifaddrs_h=no -fi - ######################################### # libdrm check have_drm_h=no
configure fi · line 6196
Quoted 9 lines
configure +0
-3@@ -6199,9 +6191,6 @@ fi if test "$auth_pam" = "yes" ; then echo "CONFIG_AUTH_PAM=y" >> $config_host_mak fi -if test "$have_ifaddrs_h" = "yes" ; then - echo "HAVE_IFADDRS_H=y" >> $config_host_mak -fi if test "$have_drm_h" = "yes" ; then echo "HAVE_DRM_H=y" >> $config_host_mak fi
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH 2/6 configure / meson: Move check for pty.h to meson.build
In reply to Thomas HuthThis check can be done in a much shorter way in meson.build
--- configure | 9 --------- meson.build | 1 + 2 files changed, 1 insertion(+), 9 deletions(-)
configure +0 -9
@@ -2319,12 +2319,6 @@ else l2tpv3=no fi -if check_include "pty.h" ; then - pty_h=yes -else - pty_h=no -fi - cat > $TMPC <<EOF #include <sys/mman.h> int main(int argc, char *argv[]) {
@@ -6667,9 +6661,6 @@ if test "$sheepdog" = "yes" ; then add_to deprecated_features "sheepdog" echo "CONFIG_SHEEPDOG=y" >> $config_host_mak fi -if test "$pty_h" = "yes" ; then - echo "HAVE_PTY_H=y" >> $config_host_mak -fi if test "$have_mlockall" = "yes" ; then echo "HAVE_MLOCKALL=y" >> $config_host_mak fi
meson.build +1 -0
@@ -808,6 +808,7 @@ config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0] config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1]) config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2]) +config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h')) config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h')) ignored = ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target
Signature · 1 line
2.18.4
Re: [PATCH 2/6] configure / meson: Move check for pty.h to meson.build
Quoted 7 lines · Thomas Huth
This check can be done in a much shorter way in meson.build
Signed-off-by Thomas Huth <[email protected]>--- configure | 9 --------- meson.build | 1 + 2 files changed, 1 insertion(+), 9 deletions(-)
Re: [PATCH 2/6] configure / meson: Move check for pty.h to meson.build
In reply to Thomas HuthQuoted 7 lines · Thomas Huth
This check can be done in a much shorter way in meson.build
Signed-off-by Thomas Huth <[email protected]>--- configure | 9 --------- meson.build | 1 + 2 files changed, 1 insertion(+), 9 deletions(-)
r~
Laurent Vivier
AppliedRe: [PATCH 2/6] configure / meson: Move check for pty.h to meson.build
In reply to Thomas HuthLe 18/11/2020 à 18:10, Thomas Huth a écrit :
Quoted 41 lines
This check can be done in a much shorter way in meson.build
Signed-off-by Thomas Huth <[email protected]>--- configure | 9 --------- meson.build | 1 + 2 files changed, 1 insertion(+), 9 deletions(-)configure +0
-9@@ -2319,12 +2319,6 @@ else l2tpv3=no fi -if check_include "pty.h" ; then - pty_h=yes -else - pty_h=no -fi - cat > $TMPC <<EOF #include <sys/mman.h> int main(int argc, char *argv[]) {@@ -6667,9 +6661,6 @@ if test "$sheepdog" = "yes" ; then add_to deprecated_features "sheepdog" echo "CONFIG_SHEEPDOG=y" >> $config_host_mak fi -if test "$pty_h" = "yes" ; then - echo "HAVE_PTY_H=y" >> $config_host_mak -fi if test "$have_mlockall" = "yes" ; then echo "HAVE_MLOCKALL=y" >> $config_host_mak fimeson.build +0
-0
meson.build config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0] · line 814
Quoted 7 lines
meson.build +1
-0@@ -808,6 +808,7 @@ config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0] config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1]) config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2]) +config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h')) config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h')) ignored = ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH 3/6 configure / meson: Move check for drm.h to meson.build
In reply to Thomas HuthThis check can be done in a much shorter way in meson.build
--- configure | 10 ---------- meson.build | 1 + 2 files changed, 1 insertion(+), 10 deletions(-)
configure +0 -10
@@ -3088,13 +3088,6 @@ EOF fi fi -######################################### -# libdrm check -have_drm_h=no -if check_include "libdrm/drm.h" ; then - have_drm_h=yes -fi - ######################################### # sys/signal.h check have_sys_signal_h=no
@@ -6185,9 +6178,6 @@ fi if test "$auth_pam" = "yes" ; then echo "CONFIG_AUTH_PAM=y" >> $config_host_mak fi -if test "$have_drm_h" = "yes" ; then - echo "HAVE_DRM_H=y" >> $config_host_mak -fi if test "$have_broken_size_max" = "yes" ; then echo "HAVE_BROKEN_SIZE_MAX=y" >> $config_host_mak fi
meson.build +1 -0
@@ -808,6 +808,7 @@ config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0] config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1]) config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2]) +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')) config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h'))
Signature · 1 line
2.18.4
Re: [PATCH 3/6] configure / meson: Move check for drm.h to meson.build
Quoted 7 lines · Thomas Huth
This check can be done in a much shorter way in meson.build
Signed-off-by Thomas Huth <[email protected]>--- configure | 10 ---------- meson.build | 1 + 2 files changed, 1 insertion(+), 10 deletions(-)
Re: [PATCH 3/6] configure / meson: Move check for drm.h to meson.build
In reply to Thomas HuthQuoted 7 lines · Thomas Huth
This check can be done in a much shorter way in meson.build
Signed-off-by Thomas Huth <[email protected]>--- configure | 10 ---------- meson.build | 1 + 2 files changed, 1 insertion(+), 10 deletions(-)
r~
Laurent Vivier
AppliedRe: [PATCH 3/6] configure / meson: Move check for drm.h to meson.build
In reply to Thomas HuthLe 18/11/2020 à 18:10, Thomas Huth a écrit :
Quoted 42 lines
This check can be done in a much shorter way in meson.build
Signed-off-by Thomas Huth <[email protected]>--- configure | 10 ---------- meson.build | 1 + 2 files changed, 1 insertion(+), 10 deletions(-)configure +0
-10@@ -3088,13 +3088,6 @@ EOF fi fi -######################################### -# libdrm check -have_drm_h=no -if check_include "libdrm/drm.h" ; then - have_drm_h=yes -fi - ######################################### # sys/signal.h check have_sys_signal_h=no@@ -6185,9 +6178,6 @@ fi if test "$auth_pam" = "yes" ; then echo "CONFIG_AUTH_PAM=y" >> $config_host_mak fi -if test "$have_drm_h" = "yes" ; then - echo "HAVE_DRM_H=y" >> $config_host_mak -fi if test "$have_broken_size_max" = "yes" ; then echo "HAVE_BROKEN_SIZE_MAX=y" >> $config_host_mak fimeson.build +0
-0
meson.build config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0] · line 814
Quoted 7 lines
meson.build +1
-0@@ -808,6 +808,7 @@ config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0] config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1]) config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2]) +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')) config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h'))
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH 4/6 configure / meson: Move check for sys/signal.h to meson.build
In reply to Thomas HuthThis check can be done in a much shorter way in meson.build
--- configure | 10 ---------- meson.build | 1 + 2 files changed, 1 insertion(+), 10 deletions(-)
configure +0 -10
@@ -3088,13 +3088,6 @@ EOF fi fi -######################################### -# sys/signal.h check -have_sys_signal_h=no -if check_include "sys/signal.h" ; then - have_sys_signal_h=yes -fi - ########################################## # VTE probe
@@ -6184,9 +6177,6 @@ fi if test "$have_openpty" = "yes" ; then echo "HAVE_OPENPTY=y" >> $config_host_mak fi -if test "$have_sys_signal_h" = "yes" ; then - echo "HAVE_SYS_SIGNAL_H=y" >> $config_host_mak -fi # Work around a system header bug with some kernel/XFS header # versions where they both try to define 'struct fsxattr':
meson.build +1 -0
@@ -811,6 +811,7 @@ config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2] 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')) config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h')) +config_host_data.set('HAVE_SYS_SIGNAL_H', cc.has_header('sys/signal.h')) ignored = ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target arrays = ['CONFIG_AUDIO_DRIVERS', 'CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST']
Signature · 1 line
2.18.4
Re: [PATCH 4/6] configure / meson: Move check for sys/signal.h to meson.build
Quoted 7 lines · Thomas Huth
This check can be done in a much shorter way in meson.build
Signed-off-by Thomas Huth <[email protected]>--- configure | 10 ---------- meson.build | 1 + 2 files changed, 1 insertion(+), 10 deletions(-)
Re: [PATCH 4/6] configure / meson: Move check for sys/signal.h to meson.build
In reply to Thomas HuthQuoted 7 lines · Thomas Huth
This check can be done in a much shorter way in meson.build
Signed-off-by Thomas Huth <[email protected]>--- configure | 10 ---------- meson.build | 1 + 2 files changed, 1 insertion(+), 10 deletions(-)
r~
Laurent Vivier
AppliedRe: [PATCH 4/6] configure / meson: Move check for sys/signal.h to meson.build
In reply to Thomas HuthLe 18/11/2020 à 18:10, Thomas Huth a écrit :
Quoted 42 lines
This check can be done in a much shorter way in meson.build
Signed-off-by Thomas Huth <[email protected]>--- configure | 10 ---------- meson.build | 1 + 2 files changed, 1 insertion(+), 10 deletions(-)configure +0
-10@@ -3088,13 +3088,6 @@ EOF fi fi -######################################### -# sys/signal.h check -have_sys_signal_h=no -if check_include "sys/signal.h" ; then - have_sys_signal_h=yes -fi - ########################################## # VTE probe@@ -6184,9 +6177,6 @@ fi if test "$have_openpty" = "yes" ; then echo "HAVE_OPENPTY=y" >> $config_host_mak fi -if test "$have_sys_signal_h" = "yes" ; then - echo "HAVE_SYS_SIGNAL_H=y" >> $config_host_mak -fi # Work around a system header bug with some kernel/XFS header # versions where they both try to define 'struct fsxattr':meson.build +0
-0
meson.build config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2] · line 817
Quoted 7 lines
meson.build +1
-0@@ -811,6 +811,7 @@ config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2] 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')) config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h')) +config_host_data.set('HAVE_SYS_SIGNAL_H', cc.has_header('sys/signal.h')) ignored = ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target arrays = ['CONFIG_AUDIO_DRIVERS', 'CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST']
Applied to my trivial-patches branch.
Thanks,
Laurent
Quoted 2 lines · Thomas Huth
The checks for header files can be done much shorter and nicer in meson.build. Let's move them there.
Nice, thanks. Let's route it through qemu-trivial unless Laurent complains.
Thanks,
Paolo
Quoted 15 lines
Thomas Huth (6):
configure: Remove the obsolete check forifaddrs.hconfigure / meson: Move check forpty.hto meson.build configure / meson: Move check fordrm.hto meson.build configure / meson: Move check forsys/signal.hto meson.build configure / meson: Move check forsys/signal.hto meson.build configure / meson: Move check forlinux/btrfs.hto meson.buildconfigure | 58 --------------------------------------- linux-user/ioctls.h | 2 +- linux-user/syscall.c | 4 +-- linux-user/syscall_defs.h | 2 +- meson.build | 5 ++++ 5 files changed, 9 insertions(+), 62 deletions(-)
PATCH 5/6 configure / meson: Move check for sys/signal.h to meson.build
In reply to Thomas HuthThis check can be done in a much shorter way in meson.build. And while we're at it, rename the #define to HAVE_SYS_KCOV_H to match the other HAVE_someheader_H symbols that we already have.
--- configure | 9 --------- linux-user/ioctls.h | 2 +- linux-user/syscall.c | 2 +- meson.build | 1 + 4 files changed, 3 insertions(+), 11 deletions(-)
configure +0 -9
@@ -4389,12 +4389,6 @@ if compile_prog "" "" ; then syncfs=yes fi -# check for kcov support (kernel must be 4.4+, compiled with certain options) -kcov=no -if check_include sys/kcov.h ; then - kcov=yes -fi - # check for btrfs filesystem support (kernel must be 3.9+) btrfs=no if check_include linux/btrfs.h ; then
@@ -6092,9 +6086,6 @@ fi if test "$syncfs" = "yes" ; then echo "CONFIG_SYNCFS=y" >> $config_host_mak fi -if test "$kcov" = "yes" ; then - echo "CONFIG_KCOV=y" >> $config_host_mak -fi if test "$btrfs" = "yes" ; then echo "CONFIG_BTRFS=y" >> $config_host_mak fi
linux-user/ioctls.h +1 -1
@@ -715,7 +715,7 @@ IOCTL_IGNORE(TIOCSTOP)#endif -#ifdef CONFIG_KCOV +#ifdef HAVE_SYS_KCOV_H IOCTL(KCOV_ENABLE, 0, TYPE_NULL) IOCTL(KCOV_DISABLE, 0, TYPE_NULL)IOCTL (KCOV_INIT_TRACE ,IOC_R ,TYPE_ULONG )
linux-user/syscall.c +1 -1
@@ -73,7 +73,7 @@#ifdef CONFIG_SENDFILE #include <sys/sendfile.h> #endif -#ifdef CONFIG_KCOV +#ifdef HAVE_SYS_KCOV_H #include <sys/kcov.h> #endif
meson.build +1 -0
@@ -811,6 +811,7 @@ config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2] 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')) 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('HAVE_SYS_SIGNAL_H', cc.has_header('sys/signal.h')) ignored = ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target
Signature · 1 line
2.18.4
Re: [PATCH 5/6] configure / meson: Move check for sys/signal.h to meson.build
On 11/18/20 11:10 AM, Thomas Huth wrote:
In the subject: s/signal/kcov/
Quoted 18 lines
This check can be done in a much shorter way in meson.build. And while we're at it, rename the #define to
HAVE_SYS_KCOV_Hto match the otherHAVE_someheader_Hsymbols that we already have.Signed-off-by Thomas Huth <[email protected]>---
configure +1
-5-# check for kcov support (kernel must be 4.4+, compiled with certain options) -kcov=no -if check_include sys/kcov.h ; then - kcov=yes -fi +config_host_data.set('HAVE_SYS_KCOV_H', cc.has_header('sys/kcov.h')) config_host_data.set('HAVE_SYS_SIGNAL_H', cc.has_header('sys/signal.h')) ignored = ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
Philippe Mathieu-Daudé
Reviewed-byRe: [PATCH 5/6] configure / meson: Move check for sys/signal.h to meson.build
Quoted 3 lines · Eric Blake
On 11/18/20 11:10 AM, Thomas Huth wrote:
In the subject: s/signal/kcov/
With the typo fixed:
Re: [PATCH 5/6] configure / meson: Move check for sys/signal.h to meson.build
In reply to Thomas HuthQuoted 11 lines · Thomas Huth
This check can be done in a much shorter way in meson.build. And while we're at it, rename the #define to
HAVE_SYS_KCOV_Hto match the otherHAVE_someheader_Hsymbols that we already have.Signed-off-by Thomas Huth <[email protected]>--- configure | 9 --------- linux-user/ioctls.h | 2 +- linux-user/syscall.c | 2 +- meson.build | 1 + 4 files changed, 3 insertions(+), 11 deletions(-)
r~
Laurent Vivier
AppliedRe: [PATCH 5/6] configure / meson: Move check for sys/signal.h to meson.build
In reply to Thomas HuthLe 18/11/2020 à 18:10, Thomas Huth a écrit :
Quoted 71 lines
This check can be done in a much shorter way in meson.build. And while we're at it, rename the #define to
HAVE_SYS_KCOV_Hto match the otherHAVE_someheader_Hsymbols that we already have.Signed-off-by Thomas Huth <[email protected]>--- configure | 9 --------- linux-user/ioctls.h | 2 +- linux-user/syscall.c | 2 +- meson.build | 1 + 4 files changed, 3 insertions(+), 11 deletions(-)configure +0
-9@@ -4389,12 +4389,6 @@ if compile_prog "" "" ; then syncfs=yes fi -# check for kcov support (kernel must be 4.4+, compiled with certain options) -kcov=no -if check_include sys/kcov.h ; then - kcov=yes -fi - # check for btrfs filesystem support (kernel must be 3.9+) btrfs=no if check_include linux/btrfs.h ; then@@ -6092,9 +6086,6 @@ fi if test "$syncfs" = "yes" ; then echo "CONFIG_SYNCFS=y" >> $config_host_mak fi -if test "$kcov" = "yes" ; then - echo "CONFIG_KCOV=y" >> $config_host_mak -fi if test "$btrfs" = "yes" ; then echo "CONFIG_BTRFS=y" >> $config_host_mak filinux-user/ioctls.h +1
-1@@ -715,7 +715,7 @@ IOCTL_IGNORE(TIOCSTOP)#endif -#ifdef CONFIG_KCOV +#ifdef HAVE_SYS_KCOV_H IOCTL(KCOV_ENABLE, 0, TYPE_NULL) IOCTL(KCOV_DISABLE, 0, TYPE_NULL)IOCTL (KCOV_INIT_TRACE ,IOC_R ,TYPE_ULONG )linux-user/syscall.c +1
-1@@ -73,7 +73,7 @@#ifdef CONFIG_SENDFILE #include <sys/sendfile.h> #endif -#ifdef CONFIG_KCOV +#ifdef HAVE_SYS_KCOV_H #include <sys/kcov.h> #endif meson.build +0
-0
meson.build config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2] · line 817
Quoted 7 lines
meson.build +1
-0@@ -811,6 +811,7 @@ config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2] 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')) 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('HAVE_SYS_SIGNAL_H', cc.has_header('sys/signal.h')) ignored = ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target
Applied to my trivial-patches branch with fixed subject.
Thanks,
Laurent
PATCH 6/6 configure / meson: Move check for linux/btrfs.h to meson.build
In reply to Thomas HuthThis check can be done in a much shorter way in meson.build. And while we're at it, rename the #define to HAVE_BTRFS_H to match the other HAVE_someheader_H symbols that we already have.
--- configure | 9 --------- linux-user/syscall.c | 2 +- linux-user/syscall_defs.h | 2 +- meson.build | 1 + 4 files changed, 3 insertions(+), 11 deletions(-)
configure +0 -9
@@ -4389,12 +4389,6 @@ if compile_prog "" "" ; then syncfs=yes fi -# check for btrfs filesystem support (kernel must be 3.9+) -btrfs=no -if check_include linux/btrfs.h ; then - btrfs=yes -fi - # Search for bswap_32 function byteswap_h=no cat > $TMPC << EOF
@@ -6086,9 +6080,6 @@ fi if test "$syncfs" = "yes" ; then echo "CONFIG_SYNCFS=y" >> $config_host_mak fi -if test "$btrfs" = "yes" ; then - echo "CONFIG_BTRFS=y" >> $config_host_mak -fi if test "$inotify" = "yes" ; then echo "CONFIG_INOTIFY=y" >> $config_host_mak fi
linux-user/syscall.c +1 -1
@@ -112,7 +112,7 @@#include <linux/if_alg.h> #include <linux/rtc.h> #include <sound/asound.h> -#ifdef CONFIG_BTRFS +#ifdef HAVE_BTRFS_H #include <linux/btrfs.h> #endif #ifdef HAVE_DRM_H
linux-user/syscall_defs.h +1 -1
@@ -1006,7 +1006,7 @@ struct target_rtc_pll_info {#define TARGET_FS_IOC32_SETVERSION TARGET_IOW('v', 2, int)/* btrfs ioctls */ -#ifdef CONFIG_BTRFS +#ifdef HAVE_BTRFS_H #define TARGET_BTRFS_IOC_SNAP_CREATE TARGET_IOWU(BTRFS_IOCTL_MAGIC, 1)#define TARGET_BTRFS_IOC_SCAN_DEV TARGET_IOWU(BTRFS_IOCTL_MAGIC, 4)#define TARGET_BTRFS_IOC_FORGET_DEV TARGET_IOWU(BTRFS_IOCTL_MAGIC, 5)
meson.build +1 -0
@@ -808,6 +808,7 @@ config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0] config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1]) config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2]) +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')) config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h'))
Signature · 1 line
2.18.4
Re: [PATCH 6/6] configure / meson: Move check for linux/btrfs.h to meson.build
Quoted 17 lines · Thomas Huth
This check can be done in a much shorter way in meson.build. And while we're at it, rename the #define to
HAVE_BTRFS_Hto match the otherHAVE_someheader_Hsymbols that we already have.Signed-off-by Thomas Huth <[email protected]>--- configure | 9 --------- linux-user/syscall.c | 2 +- linux-user/syscall_defs.h | 2 +- meson.build | 1 + 4 files changed, 3 insertions(+), 11 deletions(-)configure +0
-0
configure if compile_prog "" "" ; then · line 4392
Quoted 4 lines
configure +0
-1@@ -4389,12 +4389,6 @@ if compile_prog "" "" ; then syncfs=yes fi -# check for btrfs filesystem support (kernel must be 3.9+)
Assuming it is now OK to drop this comment:
Quoted 57 lines
configure +0
-8-btrfs=no -if check_include linux/btrfs.h ; then - btrfs=yes -fi - # Search for bswap_32 function byteswap_h=no cat > $TMPC << EOF@@ -6086,9 +6080,6 @@ fi if test "$syncfs" = "yes" ; then echo "CONFIG_SYNCFS=y" >> $config_host_mak fi -if test "$btrfs" = "yes" ; then - echo "CONFIG_BTRFS=y" >> $config_host_mak -fi if test "$inotify" = "yes" ; then echo "CONFIG_INOTIFY=y" >> $config_host_mak filinux-user/syscall.c +1
-1@@ -112,7 +112,7 @@#include <linux/if_alg.h> #include <linux/rtc.h> #include <sound/asound.h> -#ifdef CONFIG_BTRFS +#ifdef HAVE_BTRFS_H #include <linux/btrfs.h> #endif #ifdef HAVE_DRM_H linux-user/syscall_defs.h +1
-1@@ -1006,7 +1006,7 @@ struct target_rtc_pll_info {#define TARGET_FS_IOC32_SETVERSION TARGET_IOW('v', 2, int)/* btrfs ioctls */ -#ifdef CONFIG_BTRFS +#ifdef HAVE_BTRFS_H #define TARGET_BTRFS_IOC_SNAP_CREATE TARGET_IOWU(BTRFS_IOCTL_MAGIC, 1)#define TARGET_BTRFS_IOC_SCAN_DEV TARGET_IOWU(BTRFS_IOCTL_MAGIC, 4)#define TARGET_BTRFS_IOC_FORGET_DEV TARGET_IOWU(BTRFS_IOCTL_MAGIC, 5)meson.build +1
-0@@ -808,6 +808,7 @@ config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0] config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1]) config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2]) +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')) config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h'))
Re: [PATCH 6/6] configure / meson: Move check for linux/btrfs.h to meson.build
In reply to Thomas HuthQuoted 11 lines · Thomas Huth
This check can be done in a much shorter way in meson.build. And while we're at it, rename the #define to
HAVE_BTRFS_Hto match the otherHAVE_someheader_Hsymbols that we already have.Signed-off-by Thomas Huth <[email protected]>--- configure | 9 --------- linux-user/syscall.c | 2 +- linux-user/syscall_defs.h | 2 +- meson.build | 1 + 4 files changed, 3 insertions(+), 11 deletions(-)
r~
Laurent Vivier
AppliedRe: [PATCH 6/6] configure / meson: Move check for linux/btrfs.h to meson.build
In reply to Thomas HuthLe 18/11/2020 à 18:10, Thomas Huth a écrit :
Quoted 71 lines
This check can be done in a much shorter way in meson.build. And while we're at it, rename the #define to
HAVE_BTRFS_Hto match the otherHAVE_someheader_Hsymbols that we already have.Signed-off-by Thomas Huth <[email protected]>--- configure | 9 --------- linux-user/syscall.c | 2 +- linux-user/syscall_defs.h | 2 +- meson.build | 1 + 4 files changed, 3 insertions(+), 11 deletions(-)configure +0
-9@@ -4389,12 +4389,6 @@ if compile_prog "" "" ; then syncfs=yes fi -# check for btrfs filesystem support (kernel must be 3.9+) -btrfs=no -if check_include linux/btrfs.h ; then - btrfs=yes -fi - # Search for bswap_32 function byteswap_h=no cat > $TMPC << EOF@@ -6086,9 +6080,6 @@ fi if test "$syncfs" = "yes" ; then echo "CONFIG_SYNCFS=y" >> $config_host_mak fi -if test "$btrfs" = "yes" ; then - echo "CONFIG_BTRFS=y" >> $config_host_mak -fi if test "$inotify" = "yes" ; then echo "CONFIG_INOTIFY=y" >> $config_host_mak filinux-user/syscall.c +1
-1@@ -112,7 +112,7 @@#include <linux/if_alg.h> #include <linux/rtc.h> #include <sound/asound.h> -#ifdef CONFIG_BTRFS +#ifdef HAVE_BTRFS_H #include <linux/btrfs.h> #endif #ifdef HAVE_DRM_H linux-user/syscall_defs.h +1
-1@@ -1006,7 +1006,7 @@ struct target_rtc_pll_info {#define TARGET_FS_IOC32_SETVERSION TARGET_IOW('v', 2, int)/* btrfs ioctls */ -#ifdef CONFIG_BTRFS +#ifdef HAVE_BTRFS_H #define TARGET_BTRFS_IOC_SNAP_CREATE TARGET_IOWU(BTRFS_IOCTL_MAGIC, 1)#define TARGET_BTRFS_IOC_SCAN_DEV TARGET_IOWU(BTRFS_IOCTL_MAGIC, 4)#define TARGET_BTRFS_IOC_FORGET_DEV TARGET_IOWU(BTRFS_IOCTL_MAGIC, 5)meson.build +0
-0
meson.build config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0] · line 814
Quoted 7 lines
meson.build +1
-0@@ -808,6 +808,7 @@ config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0] config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1]) config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2]) +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')) config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h'))
Applied to my trivial-patches branch.
Thanks,
Laurent