* [PATCH 1/6] configure: Remove the obsolete check for ifaddrs.h
2020-11-18 17:10 [PATCH 0/6] configure / meson: Move check for headers to meson.build Thomas Huth
@ 2020-11-18 17:10 ` Thomas Huth
2020-11-20 0:06 ` Richard Henderson
2020-12-13 17:56 ` Laurent Vivier
2020-11-18 17:10 ` [PATCH 2/6] configure / meson: Move check for pty.h to meson.build Thomas Huth
` (5 subsequent siblings)
6 siblings, 2 replies; 26+ messages in thread
From: Thomas Huth @ 2020-11-18 17:10 UTC (permalink / raw)
To: qemu-devel, Paolo Bonzini; +Cc: Laurent Vivier
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.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
configure | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/configure b/configure
index 714e75b5d8..6c8f56c514 100755
--- a/configure
+++ b/configure
@@ -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
--
2.18.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH 1/6] configure: Remove the obsolete check for ifaddrs.h
2020-11-18 17:10 ` [PATCH 1/6] configure: Remove the obsolete check for ifaddrs.h Thomas Huth
@ 2020-11-20 0:06 ` Richard Henderson
2020-12-13 17:56 ` Laurent Vivier
1 sibling, 0 replies; 26+ messages in thread
From: Richard Henderson @ 2020-11-20 0:06 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Paolo Bonzini; +Cc: Laurent Vivier
On 11/18/20 9:10 AM, Thomas Huth wrote:
> 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.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> configure | 11 -----------
> 1 file changed, 11 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 1/6] configure: Remove the obsolete check for ifaddrs.h
2020-11-18 17:10 ` [PATCH 1/6] configure: Remove the obsolete check for ifaddrs.h Thomas Huth
2020-11-20 0:06 ` Richard Henderson
@ 2020-12-13 17:56 ` Laurent Vivier
1 sibling, 0 replies; 26+ messages in thread
From: Laurent Vivier @ 2020-12-13 17:56 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Paolo Bonzini; +Cc: qemu-trivial
Le 18/11/2020 à 18:10, Thomas Huth a écrit :
> 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.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> configure | 11 -----------
> 1 file changed, 11 deletions(-)
>
> diff --git a/configure b/configure
> index 714e75b5d8..6c8f56c514 100755
> --- a/configure
> +++ b/configure
> @@ -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
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 2/6] configure / meson: Move check for pty.h to meson.build
2020-11-18 17:10 [PATCH 0/6] configure / meson: Move check for headers to meson.build Thomas Huth
2020-11-18 17:10 ` [PATCH 1/6] configure: Remove the obsolete check for ifaddrs.h Thomas Huth
@ 2020-11-18 17:10 ` Thomas Huth
2020-11-18 18:15 ` Philippe Mathieu-Daudé
` (2 more replies)
2020-11-18 17:10 ` [PATCH 3/6] configure / meson: Move check for drm.h " Thomas Huth
` (4 subsequent siblings)
6 siblings, 3 replies; 26+ messages in thread
From: Thomas Huth @ 2020-11-18 17:10 UTC (permalink / raw)
To: qemu-devel, Paolo Bonzini; +Cc: Laurent Vivier
This check can be done in a much shorter way in meson.build
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
configure | 9 ---------
meson.build | 1 +
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/configure b/configure
index 6c8f56c514..5a5e486373 100755
--- a/configure
+++ b/configure
@@ -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
diff --git a/meson.build b/meson.build
index 7ddf983ff7..97a6445249 100644
--- a/meson.build
+++ b/meson.build
@@ -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
--
2.18.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH 2/6] configure / meson: Move check for pty.h to meson.build
2020-11-18 17:10 ` [PATCH 2/6] configure / meson: Move check for pty.h to meson.build Thomas Huth
@ 2020-11-18 18:15 ` Philippe Mathieu-Daudé
2020-11-20 0:09 ` Richard Henderson
2020-12-13 17:57 ` Laurent Vivier
2 siblings, 0 replies; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-11-18 18:15 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Paolo Bonzini; +Cc: Laurent Vivier
On 11/18/20 6:10 PM, Thomas Huth wrote:
> This check can be done in a much shorter way in meson.build
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> configure | 9 ---------
> meson.build | 1 +
> 2 files changed, 1 insertion(+), 9 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 2/6] configure / meson: Move check for pty.h to meson.build
2020-11-18 17:10 ` [PATCH 2/6] configure / meson: Move check for pty.h to meson.build Thomas Huth
2020-11-18 18:15 ` Philippe Mathieu-Daudé
@ 2020-11-20 0:09 ` Richard Henderson
2020-12-13 17:57 ` Laurent Vivier
2 siblings, 0 replies; 26+ messages in thread
From: Richard Henderson @ 2020-11-20 0:09 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Paolo Bonzini; +Cc: Laurent Vivier
On 11/18/20 9:10 AM, Thomas Huth wrote:
> This check can be done in a much shorter way in meson.build
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> configure | 9 ---------
> meson.build | 1 +
> 2 files changed, 1 insertion(+), 9 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 2/6] configure / meson: Move check for pty.h to meson.build
2020-11-18 17:10 ` [PATCH 2/6] configure / meson: Move check for pty.h to meson.build Thomas Huth
2020-11-18 18:15 ` Philippe Mathieu-Daudé
2020-11-20 0:09 ` Richard Henderson
@ 2020-12-13 17:57 ` Laurent Vivier
2 siblings, 0 replies; 26+ messages in thread
From: Laurent Vivier @ 2020-12-13 17:57 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Paolo Bonzini; +Cc: qemu-trivial
Le 18/11/2020 à 18:10, Thomas Huth a écrit :
> This check can be done in a much shorter way in meson.build
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> configure | 9 ---------
> meson.build | 1 +
> 2 files changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/configure b/configure
> index 6c8f56c514..5a5e486373 100755
> --- a/configure
> +++ b/configure
> @@ -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
> diff --git a/meson.build b/meson.build
> index 7ddf983ff7..97a6445249 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -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
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 3/6] configure / meson: Move check for drm.h to meson.build
2020-11-18 17:10 [PATCH 0/6] configure / meson: Move check for headers to meson.build Thomas Huth
2020-11-18 17:10 ` [PATCH 1/6] configure: Remove the obsolete check for ifaddrs.h Thomas Huth
2020-11-18 17:10 ` [PATCH 2/6] configure / meson: Move check for pty.h to meson.build Thomas Huth
@ 2020-11-18 17:10 ` Thomas Huth
2020-11-18 18:15 ` Philippe Mathieu-Daudé
` (2 more replies)
2020-11-18 17:10 ` [PATCH 4/6] configure / meson: Move check for sys/signal.h " Thomas Huth
` (3 subsequent siblings)
6 siblings, 3 replies; 26+ messages in thread
From: Thomas Huth @ 2020-11-18 17:10 UTC (permalink / raw)
To: qemu-devel, Paolo Bonzini; +Cc: Laurent Vivier
This check can be done in a much shorter way in meson.build
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
configure | 10 ----------
meson.build | 1 +
2 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/configure b/configure
index 5a5e486373..b3e1052a58 100755
--- a/configure
+++ b/configure
@@ -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
diff --git a/meson.build b/meson.build
index 97a6445249..d6b633f17f 100644
--- a/meson.build
+++ b/meson.build
@@ -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'))
--
2.18.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH 3/6] configure / meson: Move check for drm.h to meson.build
2020-11-18 17:10 ` [PATCH 3/6] configure / meson: Move check for drm.h " Thomas Huth
@ 2020-11-18 18:15 ` Philippe Mathieu-Daudé
2020-11-20 0:09 ` Richard Henderson
2020-12-13 17:58 ` Laurent Vivier
2 siblings, 0 replies; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-11-18 18:15 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Paolo Bonzini; +Cc: Laurent Vivier
On 11/18/20 6:10 PM, Thomas Huth wrote:
> This check can be done in a much shorter way in meson.build
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> configure | 10 ----------
> meson.build | 1 +
> 2 files changed, 1 insertion(+), 10 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 3/6] configure / meson: Move check for drm.h to meson.build
2020-11-18 17:10 ` [PATCH 3/6] configure / meson: Move check for drm.h " Thomas Huth
2020-11-18 18:15 ` Philippe Mathieu-Daudé
@ 2020-11-20 0:09 ` Richard Henderson
2020-12-13 17:58 ` Laurent Vivier
2 siblings, 0 replies; 26+ messages in thread
From: Richard Henderson @ 2020-11-20 0:09 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Paolo Bonzini; +Cc: Laurent Vivier
On 11/18/20 9:10 AM, Thomas Huth wrote:
> This check can be done in a much shorter way in meson.build
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> configure | 10 ----------
> meson.build | 1 +
> 2 files changed, 1 insertion(+), 10 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 3/6] configure / meson: Move check for drm.h to meson.build
2020-11-18 17:10 ` [PATCH 3/6] configure / meson: Move check for drm.h " Thomas Huth
2020-11-18 18:15 ` Philippe Mathieu-Daudé
2020-11-20 0:09 ` Richard Henderson
@ 2020-12-13 17:58 ` Laurent Vivier
2 siblings, 0 replies; 26+ messages in thread
From: Laurent Vivier @ 2020-12-13 17:58 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Paolo Bonzini; +Cc: qemu-trivial
Le 18/11/2020 à 18:10, Thomas Huth a écrit :
> This check can be done in a much shorter way in meson.build
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> configure | 10 ----------
> meson.build | 1 +
> 2 files changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/configure b/configure
> index 5a5e486373..b3e1052a58 100755
> --- a/configure
> +++ b/configure
> @@ -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
> diff --git a/meson.build b/meson.build
> index 97a6445249..d6b633f17f 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -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
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 4/6] configure / meson: Move check for sys/signal.h to meson.build
2020-11-18 17:10 [PATCH 0/6] configure / meson: Move check for headers to meson.build Thomas Huth
` (2 preceding siblings ...)
2020-11-18 17:10 ` [PATCH 3/6] configure / meson: Move check for drm.h " Thomas Huth
@ 2020-11-18 17:10 ` Thomas Huth
2020-11-18 18:16 ` Philippe Mathieu-Daudé
` (2 more replies)
2020-11-18 17:10 ` [PATCH 5/6] " Thomas Huth
` (2 subsequent siblings)
6 siblings, 3 replies; 26+ messages in thread
From: Thomas Huth @ 2020-11-18 17:10 UTC (permalink / raw)
To: qemu-devel, Paolo Bonzini; +Cc: Laurent Vivier
This check can be done in a much shorter way in meson.build
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
configure | 10 ----------
meson.build | 1 +
2 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/configure b/configure
index b3e1052a58..871e4bb9fb 100755
--- a/configure
+++ b/configure
@@ -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':
diff --git a/meson.build b/meson.build
index d6b633f17f..054e40e9a5 100644
--- a/meson.build
+++ b/meson.build
@@ -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']
--
2.18.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH 4/6] configure / meson: Move check for sys/signal.h to meson.build
2020-11-18 17:10 ` [PATCH 4/6] configure / meson: Move check for sys/signal.h " Thomas Huth
@ 2020-11-18 18:16 ` Philippe Mathieu-Daudé
2020-11-20 0:10 ` Richard Henderson
2020-12-13 17:59 ` Laurent Vivier
2 siblings, 0 replies; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-11-18 18:16 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Paolo Bonzini; +Cc: Laurent Vivier
On 11/18/20 6:10 PM, Thomas Huth wrote:
> This check can be done in a much shorter way in meson.build
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> configure | 10 ----------
> meson.build | 1 +
> 2 files changed, 1 insertion(+), 10 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 4/6] configure / meson: Move check for sys/signal.h to meson.build
2020-11-18 17:10 ` [PATCH 4/6] configure / meson: Move check for sys/signal.h " Thomas Huth
2020-11-18 18:16 ` Philippe Mathieu-Daudé
@ 2020-11-20 0:10 ` Richard Henderson
2020-12-13 17:59 ` Laurent Vivier
2 siblings, 0 replies; 26+ messages in thread
From: Richard Henderson @ 2020-11-20 0:10 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Paolo Bonzini; +Cc: Laurent Vivier
On 11/18/20 9:10 AM, Thomas Huth wrote:
> This check can be done in a much shorter way in meson.build
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> configure | 10 ----------
> meson.build | 1 +
> 2 files changed, 1 insertion(+), 10 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 4/6] configure / meson: Move check for sys/signal.h to meson.build
2020-11-18 17:10 ` [PATCH 4/6] configure / meson: Move check for sys/signal.h " Thomas Huth
2020-11-18 18:16 ` Philippe Mathieu-Daudé
2020-11-20 0:10 ` Richard Henderson
@ 2020-12-13 17:59 ` Laurent Vivier
2 siblings, 0 replies; 26+ messages in thread
From: Laurent Vivier @ 2020-12-13 17:59 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Paolo Bonzini; +Cc: qemu-trivial
Le 18/11/2020 à 18:10, Thomas Huth a écrit :
> This check can be done in a much shorter way in meson.build
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> configure | 10 ----------
> meson.build | 1 +
> 2 files changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/configure b/configure
> index b3e1052a58..871e4bb9fb 100755
> --- a/configure
> +++ b/configure
> @@ -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':
> diff --git a/meson.build b/meson.build
> index d6b633f17f..054e40e9a5 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -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
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 5/6] configure / meson: Move check for sys/signal.h to meson.build
2020-11-18 17:10 [PATCH 0/6] configure / meson: Move check for headers to meson.build Thomas Huth
` (3 preceding siblings ...)
2020-11-18 17:10 ` [PATCH 4/6] configure / meson: Move check for sys/signal.h " Thomas Huth
@ 2020-11-18 17:10 ` Thomas Huth
2020-11-18 17:27 ` Eric Blake
` (2 more replies)
2020-11-18 17:10 ` [PATCH 6/6] configure / meson: Move check for linux/btrfs.h " Thomas Huth
2020-11-18 17:20 ` [PATCH 0/6] configure / meson: Move check for headers " Paolo Bonzini
6 siblings, 3 replies; 26+ messages in thread
From: Thomas Huth @ 2020-11-18 17:10 UTC (permalink / raw)
To: qemu-devel, Paolo Bonzini; +Cc: Laurent Vivier
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_H to match the other
HAVE_someheader_H symbols that we already have.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
configure | 9 ---------
linux-user/ioctls.h | 2 +-
linux-user/syscall.c | 2 +-
meson.build | 1 +
4 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/configure b/configure
index 871e4bb9fb..8d40a0beb3 100755
--- a/configure
+++ b/configure
@@ -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
diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index 585874f090..8efb4d38c0 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -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)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 27adee908e..063130be04 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -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
diff --git a/meson.build b/meson.build
index 054e40e9a5..ab9571a354 100644
--- a/meson.build
+++ b/meson.build
@@ -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
--
2.18.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH 5/6] configure / meson: Move check for sys/signal.h to meson.build
2020-11-18 17:10 ` [PATCH 5/6] " Thomas Huth
@ 2020-11-18 17:27 ` Eric Blake
2020-11-18 18:19 ` Philippe Mathieu-Daudé
2020-11-20 0:11 ` Richard Henderson
2020-12-13 18:01 ` Laurent Vivier
2 siblings, 1 reply; 26+ messages in thread
From: Eric Blake @ 2020-11-18 17:27 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Paolo Bonzini; +Cc: Laurent Vivier
On 11/18/20 11:10 AM, Thomas Huth wrote:
In the subject: s/signal/kcov/
> 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_H to match the other
> HAVE_someheader_H symbols that we already have.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> -# 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
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 5/6] configure / meson: Move check for sys/signal.h to meson.build
2020-11-18 17:27 ` Eric Blake
@ 2020-11-18 18:19 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-11-18 18:19 UTC (permalink / raw)
To: Eric Blake, Thomas Huth, qemu-devel, Paolo Bonzini; +Cc: Laurent Vivier
On 11/18/20 6:27 PM, Eric Blake wrote:
> On 11/18/20 11:10 AM, Thomas Huth wrote:
>
> In the subject: s/signal/kcov/
With the typo fixed:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 5/6] configure / meson: Move check for sys/signal.h to meson.build
2020-11-18 17:10 ` [PATCH 5/6] " Thomas Huth
2020-11-18 17:27 ` Eric Blake
@ 2020-11-20 0:11 ` Richard Henderson
2020-12-13 18:01 ` Laurent Vivier
2 siblings, 0 replies; 26+ messages in thread
From: Richard Henderson @ 2020-11-20 0:11 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Paolo Bonzini; +Cc: Laurent Vivier
On 11/18/20 9:10 AM, Thomas Huth wrote:
> 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_H to match the other
> HAVE_someheader_H symbols that we already have.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> configure | 9 ---------
> linux-user/ioctls.h | 2 +-
> linux-user/syscall.c | 2 +-
> meson.build | 1 +
> 4 files changed, 3 insertions(+), 11 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 5/6] configure / meson: Move check for sys/signal.h to meson.build
2020-11-18 17:10 ` [PATCH 5/6] " Thomas Huth
2020-11-18 17:27 ` Eric Blake
2020-11-20 0:11 ` Richard Henderson
@ 2020-12-13 18:01 ` Laurent Vivier
2 siblings, 0 replies; 26+ messages in thread
From: Laurent Vivier @ 2020-12-13 18:01 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Paolo Bonzini; +Cc: qemu-trivial
Le 18/11/2020 à 18:10, Thomas Huth a écrit :
> 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_H to match the other
> HAVE_someheader_H symbols that we already have.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> configure | 9 ---------
> linux-user/ioctls.h | 2 +-
> linux-user/syscall.c | 2 +-
> meson.build | 1 +
> 4 files changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/configure b/configure
> index 871e4bb9fb..8d40a0beb3 100755
> --- a/configure
> +++ b/configure
> @@ -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
> diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
> index 585874f090..8efb4d38c0 100644
> --- a/linux-user/ioctls.h
> +++ b/linux-user/ioctls.h
> @@ -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)
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 27adee908e..063130be04 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -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
>
> diff --git a/meson.build b/meson.build
> index 054e40e9a5..ab9571a354 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -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
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 6/6] configure / meson: Move check for linux/btrfs.h to meson.build
2020-11-18 17:10 [PATCH 0/6] configure / meson: Move check for headers to meson.build Thomas Huth
` (4 preceding siblings ...)
2020-11-18 17:10 ` [PATCH 5/6] " Thomas Huth
@ 2020-11-18 17:10 ` Thomas Huth
2020-11-18 18:18 ` Philippe Mathieu-Daudé
` (2 more replies)
2020-11-18 17:20 ` [PATCH 0/6] configure / meson: Move check for headers " Paolo Bonzini
6 siblings, 3 replies; 26+ messages in thread
From: Thomas Huth @ 2020-11-18 17:10 UTC (permalink / raw)
To: qemu-devel, Paolo Bonzini; +Cc: Laurent Vivier
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_H to match the other
HAVE_someheader_H symbols that we already have.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
configure | 9 ---------
linux-user/syscall.c | 2 +-
linux-user/syscall_defs.h | 2 +-
meson.build | 1 +
4 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/configure b/configure
index 8d40a0beb3..1ba4bf9a3d 100755
--- a/configure
+++ b/configure
@@ -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
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 063130be04..7bf99beb18 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -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
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index cabbfb762d..b934d0b606 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -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)
diff --git a/meson.build b/meson.build
index ab9571a354..bf62e260ed 100644
--- a/meson.build
+++ b/meson.build
@@ -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'))
--
2.18.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH 6/6] configure / meson: Move check for linux/btrfs.h to meson.build
2020-11-18 17:10 ` [PATCH 6/6] configure / meson: Move check for linux/btrfs.h " Thomas Huth
@ 2020-11-18 18:18 ` Philippe Mathieu-Daudé
2020-11-20 0:12 ` Richard Henderson
2020-12-13 18:02 ` Laurent Vivier
2 siblings, 0 replies; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-11-18 18:18 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Paolo Bonzini; +Cc: Laurent Vivier
On 11/18/20 6:10 PM, Thomas Huth wrote:
> 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_H to match the other
> HAVE_someheader_H symbols that we already have.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> configure | 9 ---------
> linux-user/syscall.c | 2 +-
> linux-user/syscall_defs.h | 2 +-
> meson.build | 1 +
> 4 files changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/configure b/configure
> index 8d40a0beb3..1ba4bf9a3d 100755
> --- a/configure
> +++ b/configure
> @@ -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:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> -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
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 063130be04..7bf99beb18 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -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
> diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
> index cabbfb762d..b934d0b606 100644
> --- a/linux-user/syscall_defs.h
> +++ b/linux-user/syscall_defs.h
> @@ -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)
> diff --git a/meson.build b/meson.build
> index ab9571a354..bf62e260ed 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -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'))
>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 6/6] configure / meson: Move check for linux/btrfs.h to meson.build
2020-11-18 17:10 ` [PATCH 6/6] configure / meson: Move check for linux/btrfs.h " Thomas Huth
2020-11-18 18:18 ` Philippe Mathieu-Daudé
@ 2020-11-20 0:12 ` Richard Henderson
2020-12-13 18:02 ` Laurent Vivier
2 siblings, 0 replies; 26+ messages in thread
From: Richard Henderson @ 2020-11-20 0:12 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Paolo Bonzini; +Cc: Laurent Vivier
On 11/18/20 9:10 AM, Thomas Huth wrote:
> 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_H to match the other
> HAVE_someheader_H symbols that we already have.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> configure | 9 ---------
> linux-user/syscall.c | 2 +-
> linux-user/syscall_defs.h | 2 +-
> meson.build | 1 +
> 4 files changed, 3 insertions(+), 11 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 6/6] configure / meson: Move check for linux/btrfs.h to meson.build
2020-11-18 17:10 ` [PATCH 6/6] configure / meson: Move check for linux/btrfs.h " Thomas Huth
2020-11-18 18:18 ` Philippe Mathieu-Daudé
2020-11-20 0:12 ` Richard Henderson
@ 2020-12-13 18:02 ` Laurent Vivier
2 siblings, 0 replies; 26+ messages in thread
From: Laurent Vivier @ 2020-12-13 18:02 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Paolo Bonzini; +Cc: qemu-trivial
Le 18/11/2020 à 18:10, Thomas Huth a écrit :
> 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_H to match the other
> HAVE_someheader_H symbols that we already have.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> configure | 9 ---------
> linux-user/syscall.c | 2 +-
> linux-user/syscall_defs.h | 2 +-
> meson.build | 1 +
> 4 files changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/configure b/configure
> index 8d40a0beb3..1ba4bf9a3d 100755
> --- a/configure
> +++ b/configure
> @@ -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
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 063130be04..7bf99beb18 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -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
> diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
> index cabbfb762d..b934d0b606 100644
> --- a/linux-user/syscall_defs.h
> +++ b/linux-user/syscall_defs.h
> @@ -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)
> diff --git a/meson.build b/meson.build
> index ab9571a354..bf62e260ed 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -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
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 0/6] configure / meson: Move check for headers to meson.build
2020-11-18 17:10 [PATCH 0/6] configure / meson: Move check for headers to meson.build Thomas Huth
` (5 preceding siblings ...)
2020-11-18 17:10 ` [PATCH 6/6] configure / meson: Move check for linux/btrfs.h " Thomas Huth
@ 2020-11-18 17:20 ` Paolo Bonzini
6 siblings, 0 replies; 26+ messages in thread
From: Paolo Bonzini @ 2020-11-18 17:20 UTC (permalink / raw)
To: Thomas Huth, qemu-devel; +Cc: qemu-trivial, Laurent Vivier
On 18/11/20 18:10, Thomas Huth wrote:
> 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
> 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(-)
>
^ permalink raw reply [flat|nested] 26+ messages in thread