All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] First batch of configure cleanups
@ 2020-12-17  8:50 Paolo Bonzini
  2020-12-17  8:50 ` [PATCH 1/4] configure: remove useless code to check for Xen PCI passthrough Paolo Bonzini
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Paolo Bonzini @ 2020-12-17  8:50 UTC (permalink / raw)
  To: qemu-devel

After the Meson cleanups from yesterday, here are some
small improvements to configure, mostly removing obsolete
code.

Paolo


Paolo Bonzini (4):
  configure: remove useless code to check for Xen PCI passthrough
  configure: remove variable bogus_os
  configure: accept --enable-slirp
  configure: remove CONFIG_FILEVERSION and CONFIG_PRODUCTVERSION

 configure  | 27 +++------------------------
 version.rc |  4 ++--
 2 files changed, 5 insertions(+), 26 deletions(-)

-- 
2.29.2



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/4] configure: remove useless code to check for Xen PCI passthrough
  2020-12-17  8:50 [PATCH 0/4] First batch of configure cleanups Paolo Bonzini
@ 2020-12-17  8:50 ` Paolo Bonzini
  2020-12-17 10:20   ` Marc-André Lureau
  2020-12-17  8:50 ` [PATCH 2/4] configure: remove variable bogus_os Paolo Bonzini
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Paolo Bonzini @ 2020-12-17  8:50 UTC (permalink / raw)
  To: qemu-devel

meson.build is already doing the same check, so remove it from
configure.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/configure b/configure
index 708cf365f0..085a5ad7ff 100755
--- a/configure
+++ b/configure
@@ -2879,18 +2879,6 @@ EOF
   fi
 fi
 
-if test "$xen_pci_passthrough" != "disabled"; then
-  if test "$xen" = "enabled" && test "$linux" = "yes"; then
-    xen_pci_passthrough=enabled
-  else
-    if test "$xen_pci_passthrough" = "enabled"; then
-      error_exit "User requested feature Xen PCI Passthrough" \
-          " but this feature requires /sys from Linux"
-    fi
-    xen_pci_passthrough=disabled
-  fi
-fi
-
 ##########################################
 # X11 probe
 if $pkg_config --exists "x11"; then
-- 
2.29.2




^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/4] configure: remove variable bogus_os
  2020-12-17  8:50 [PATCH 0/4] First batch of configure cleanups Paolo Bonzini
  2020-12-17  8:50 ` [PATCH 1/4] configure: remove useless code to check for Xen PCI passthrough Paolo Bonzini
@ 2020-12-17  8:50 ` Paolo Bonzini
  2020-12-17  9:04   ` Thomas Huth
  2020-12-17 10:21   ` Marc-André Lureau
  2020-12-17  8:50 ` [PATCH 3/4] configure: accept --enable-slirp Paolo Bonzini
  2020-12-17  8:50 ` [PATCH 4/4] configure: remove CONFIG_FILEVERSION and CONFIG_PRODUCTVERSION Paolo Bonzini
  3 siblings, 2 replies; 11+ messages in thread
From: Paolo Bonzini @ 2020-12-17  8:50 UTC (permalink / raw)
  To: qemu-devel

The condition can be tested also from $targetos, clean up.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/configure b/configure
index 085a5ad7ff..18af8207d9 100755
--- a/configure
+++ b/configure
@@ -467,7 +467,6 @@ gettext="auto"
 fuse="auto"
 fuse_lseek="auto"
 
-bogus_os="no"
 malloc_trim="auto"
 
 # parse CC options second
@@ -620,7 +619,6 @@ else
   # might be going to just print the --help text, or it might
   # be the result of a missing compiler.
   targetos='bogus'
-  bogus_os='yes'
 fi
 
 # Some host OSes need non-standard checks for which CPU to use.
@@ -2016,7 +2014,7 @@ if test -z "$werror" ; then
     fi
 fi
 
-if test "$bogus_os" = "yes"; then
+if test "$targetos" = "bogus"; then
     # Now that we know that we're not printing the help and that
     # the compiler works (so the results of the check_defines we used
     # to identify the OS are reliable), if we didn't recognize the
-- 
2.29.2




^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/4] configure: accept --enable-slirp
  2020-12-17  8:50 [PATCH 0/4] First batch of configure cleanups Paolo Bonzini
  2020-12-17  8:50 ` [PATCH 1/4] configure: remove useless code to check for Xen PCI passthrough Paolo Bonzini
  2020-12-17  8:50 ` [PATCH 2/4] configure: remove variable bogus_os Paolo Bonzini
@ 2020-12-17  8:50 ` Paolo Bonzini
  2020-12-17  9:06   ` Thomas Huth
  2020-12-17 10:22   ` Marc-André Lureau
  2020-12-17  8:50 ` [PATCH 4/4] configure: remove CONFIG_FILEVERSION and CONFIG_PRODUCTVERSION Paolo Bonzini
  3 siblings, 2 replies; 11+ messages in thread
From: Paolo Bonzini @ 2020-12-17  8:50 UTC (permalink / raw)
  To: qemu-devel

Meson understands -Dslirp=enabled, so there is no reason not to
accept the configure option as well.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configure b/configure
index 18af8207d9..568818e72d 100755
--- a/configure
+++ b/configure
@@ -1083,6 +1083,8 @@ for opt do
   ;;
   --disable-slirp) slirp="disabled"
   ;;
+  --enable-slirp) slirp="enabled"
+  ;;
   --enable-slirp=git) slirp="internal"
   ;;
   --enable-slirp=system) slirp="system"
-- 
2.29.2




^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/4] configure: remove CONFIG_FILEVERSION and CONFIG_PRODUCTVERSION
  2020-12-17  8:50 [PATCH 0/4] First batch of configure cleanups Paolo Bonzini
                   ` (2 preceding siblings ...)
  2020-12-17  8:50 ` [PATCH 3/4] configure: accept --enable-slirp Paolo Bonzini
@ 2020-12-17  8:50 ` Paolo Bonzini
  2020-12-17 10:30   ` Marc-André Lureau
  3 siblings, 1 reply; 11+ messages in thread
From: Paolo Bonzini @ 2020-12-17  8:50 UTC (permalink / raw)
  To: qemu-devel

version.rc can just use existing preprocessor symbols.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure  | 9 ---------
 version.rc | 4 ++--
 2 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/configure b/configure
index 568818e72d..74eebfd692 100755
--- a/configure
+++ b/configure
@@ -5929,15 +5929,6 @@ if test "$bigendian" = "yes" ; then
 fi
 if test "$mingw32" = "yes" ; then
   echo "CONFIG_WIN32=y" >> $config_host_mak
-  rc_version=$(cat $source_path/VERSION)
-  version_major=${rc_version%%.*}
-  rc_version=${rc_version#*.}
-  version_minor=${rc_version%%.*}
-  rc_version=${rc_version#*.}
-  version_subminor=${rc_version%%.*}
-  version_micro=0
-  echo "CONFIG_FILEVERSION=$version_major,$version_minor,$version_subminor,$version_micro" >> $config_host_mak
-  echo "CONFIG_PRODUCTVERSION=$version_major,$version_minor,$version_subminor,$version_micro" >> $config_host_mak
   if test "$guest_agent_with_vss" = "yes" ; then
     echo "CONFIG_QGA_VSS=y" >> $config_host_mak
     echo "QGA_VSS_PROVIDER=$qga_vss_provider" >> $config_host_mak
diff --git a/version.rc b/version.rc
index d8e1569991..0daadbf981 100644
--- a/version.rc
+++ b/version.rc
@@ -2,8 +2,8 @@
 #include "config-host.h"
 
 VS_VERSION_INFO VERSIONINFO
-FILEVERSION CONFIG_FILEVERSION
-PRODUCTVERSION CONFIG_PRODUCTVERSION
+FILEVERSION QEMU_VERSION_MAJOR,QEMU_VERSION_MINOR,QEMU_VERSION_MICRO,0
+PRODUCTVERSION QEMU_VERSION_MAJOR,QEMU_VERSION_MINOR,QEMU_VERSION_MICRO,0
 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
 FILEOS VOS_NT_WINDOWS32
 FILETYPE VFT_APP
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/4] configure: remove variable bogus_os
  2020-12-17  8:50 ` [PATCH 2/4] configure: remove variable bogus_os Paolo Bonzini
@ 2020-12-17  9:04   ` Thomas Huth
  2020-12-17 10:21   ` Marc-André Lureau
  1 sibling, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2020-12-17  9:04 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

On 17/12/2020 09.50, Paolo Bonzini wrote:
> The condition can be tested also from $targetos, clean up.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  configure | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/configure b/configure
> index 085a5ad7ff..18af8207d9 100755
> --- a/configure
> +++ b/configure
> @@ -467,7 +467,6 @@ gettext="auto"
>  fuse="auto"
>  fuse_lseek="auto"
>  
> -bogus_os="no"
>  malloc_trim="auto"
>  
>  # parse CC options second
> @@ -620,7 +619,6 @@ else
>    # might be going to just print the --help text, or it might
>    # be the result of a missing compiler.
>    targetos='bogus'
> -  bogus_os='yes'
>  fi
>  
>  # Some host OSes need non-standard checks for which CPU to use.
> @@ -2016,7 +2014,7 @@ if test -z "$werror" ; then
>      fi
>  fi
>  
> -if test "$bogus_os" = "yes"; then
> +if test "$targetos" = "bogus"; then
>      # Now that we know that we're not printing the help and that
>      # the compiler works (so the results of the check_defines we used
>      # to identify the OS are reliable), if we didn't recognize the
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/4] configure: accept --enable-slirp
  2020-12-17  8:50 ` [PATCH 3/4] configure: accept --enable-slirp Paolo Bonzini
@ 2020-12-17  9:06   ` Thomas Huth
  2020-12-17 10:22   ` Marc-André Lureau
  1 sibling, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2020-12-17  9:06 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

On 17/12/2020 09.50, Paolo Bonzini wrote:
> Meson understands -Dslirp=enabled, so there is no reason not to
> accept the configure option as well.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  configure | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/configure b/configure
> index 18af8207d9..568818e72d 100755
> --- a/configure
> +++ b/configure
> @@ -1083,6 +1083,8 @@ for opt do
>    ;;
>    --disable-slirp) slirp="disabled"
>    ;;
> +  --enable-slirp) slirp="enabled"
> +  ;;
>    --enable-slirp=git) slirp="internal"
>    ;;
>    --enable-slirp=system) slirp="system"
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/4] configure: remove useless code to check for Xen PCI passthrough
  2020-12-17  8:50 ` [PATCH 1/4] configure: remove useless code to check for Xen PCI passthrough Paolo Bonzini
@ 2020-12-17 10:20   ` Marc-André Lureau
  0 siblings, 0 replies; 11+ messages in thread
From: Marc-André Lureau @ 2020-12-17 10:20 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: QEMU

[-- Attachment #1: Type: text/plain, Size: 1103 bytes --]

On Thu, Dec 17, 2020 at 12:51 PM Paolo Bonzini <pbonzini@redhat.com> wrote:

> meson.build is already doing the same check, so remove it from
> configure.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

---
>  configure | 12 ------------
>  1 file changed, 12 deletions(-)
>
> diff --git a/configure b/configure
> index 708cf365f0..085a5ad7ff 100755
> --- a/configure
> +++ b/configure
> @@ -2879,18 +2879,6 @@ EOF
>    fi
>  fi
>
> -if test "$xen_pci_passthrough" != "disabled"; then
> -  if test "$xen" = "enabled" && test "$linux" = "yes"; then
> -    xen_pci_passthrough=enabled
> -  else
> -    if test "$xen_pci_passthrough" = "enabled"; then
> -      error_exit "User requested feature Xen PCI Passthrough" \
> -          " but this feature requires /sys from Linux"
> -    fi
> -    xen_pci_passthrough=disabled
> -  fi
> -fi
> -
>  ##########################################
>  # X11 probe
>  if $pkg_config --exists "x11"; then
> --
> 2.29.2
>
>
>
>

-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 1988 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/4] configure: remove variable bogus_os
  2020-12-17  8:50 ` [PATCH 2/4] configure: remove variable bogus_os Paolo Bonzini
  2020-12-17  9:04   ` Thomas Huth
@ 2020-12-17 10:21   ` Marc-André Lureau
  1 sibling, 0 replies; 11+ messages in thread
From: Marc-André Lureau @ 2020-12-17 10:21 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: QEMU

[-- Attachment #1: Type: text/plain, Size: 1300 bytes --]

On Thu, Dec 17, 2020 at 12:50 PM Paolo Bonzini <pbonzini@redhat.com> wrote:

> The condition can be tested also from $targetos, clean up.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

---
>  configure | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/configure b/configure
> index 085a5ad7ff..18af8207d9 100755
> --- a/configure
> +++ b/configure
> @@ -467,7 +467,6 @@ gettext="auto"
>  fuse="auto"
>  fuse_lseek="auto"
>
> -bogus_os="no"
>  malloc_trim="auto"
>
>  # parse CC options second
> @@ -620,7 +619,6 @@ else
>    # might be going to just print the --help text, or it might
>    # be the result of a missing compiler.
>    targetos='bogus'
> -  bogus_os='yes'
>  fi
>
>  # Some host OSes need non-standard checks for which CPU to use.
> @@ -2016,7 +2014,7 @@ if test -z "$werror" ; then
>      fi
>  fi
>
> -if test "$bogus_os" = "yes"; then
> +if test "$targetos" = "bogus"; then
>      # Now that we know that we're not printing the help and that
>      # the compiler works (so the results of the check_defines we used
>      # to identify the OS are reliable), if we didn't recognize the
> --
> 2.29.2
>
>
>
>

-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 2205 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/4] configure: accept --enable-slirp
  2020-12-17  8:50 ` [PATCH 3/4] configure: accept --enable-slirp Paolo Bonzini
  2020-12-17  9:06   ` Thomas Huth
@ 2020-12-17 10:22   ` Marc-André Lureau
  1 sibling, 0 replies; 11+ messages in thread
From: Marc-André Lureau @ 2020-12-17 10:22 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: QEMU

[-- Attachment #1: Type: text/plain, Size: 785 bytes --]

On Thu, Dec 17, 2020 at 12:52 PM Paolo Bonzini <pbonzini@redhat.com> wrote:

> Meson understands -Dslirp=enabled, so there is no reason not to
> accept the configure option as well.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

---
>  configure | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/configure b/configure
> index 18af8207d9..568818e72d 100755
> --- a/configure
> +++ b/configure
> @@ -1083,6 +1083,8 @@ for opt do
>    ;;
>    --disable-slirp) slirp="disabled"
>    ;;
> +  --enable-slirp) slirp="enabled"
> +  ;;
>    --enable-slirp=git) slirp="internal"
>    ;;
>    --enable-slirp=system) slirp="system"
> --
> 2.29.2
>
>
>
>

-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 1560 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 4/4] configure: remove CONFIG_FILEVERSION and CONFIG_PRODUCTVERSION
  2020-12-17  8:50 ` [PATCH 4/4] configure: remove CONFIG_FILEVERSION and CONFIG_PRODUCTVERSION Paolo Bonzini
@ 2020-12-17 10:30   ` Marc-André Lureau
  0 siblings, 0 replies; 11+ messages in thread
From: Marc-André Lureau @ 2020-12-17 10:30 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: QEMU

[-- Attachment #1: Type: text/plain, Size: 1886 bytes --]

On Thu, Dec 17, 2020 at 12:50 PM Paolo Bonzini <pbonzini@redhat.com> wrote:

> version.rc can just use existing preprocessor symbols.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

---
>  configure  | 9 ---------
>  version.rc | 4 ++--
>  2 files changed, 2 insertions(+), 11 deletions(-)
>
> diff --git a/configure b/configure
> index 568818e72d..74eebfd692 100755
> --- a/configure
> +++ b/configure
> @@ -5929,15 +5929,6 @@ if test "$bigendian" = "yes" ; then
>  fi
>  if test "$mingw32" = "yes" ; then
>    echo "CONFIG_WIN32=y" >> $config_host_mak
> -  rc_version=$(cat $source_path/VERSION)
> -  version_major=${rc_version%%.*}
> -  rc_version=${rc_version#*.}
> -  version_minor=${rc_version%%.*}
> -  rc_version=${rc_version#*.}
> -  version_subminor=${rc_version%%.*}
> -  version_micro=0
> -  echo
> "CONFIG_FILEVERSION=$version_major,$version_minor,$version_subminor,$version_micro"
> >> $config_host_mak
> -  echo
> "CONFIG_PRODUCTVERSION=$version_major,$version_minor,$version_subminor,$version_micro"
> >> $config_host_mak
>    if test "$guest_agent_with_vss" = "yes" ; then
>      echo "CONFIG_QGA_VSS=y" >> $config_host_mak
>      echo "QGA_VSS_PROVIDER=$qga_vss_provider" >> $config_host_mak
> diff --git a/version.rc b/version.rc
> index d8e1569991..0daadbf981 100644
> --- a/version.rc
> +++ b/version.rc
> @@ -2,8 +2,8 @@
>  #include "config-host.h"
>
>  VS_VERSION_INFO VERSIONINFO
> -FILEVERSION CONFIG_FILEVERSION
> -PRODUCTVERSION CONFIG_PRODUCTVERSION
> +FILEVERSION QEMU_VERSION_MAJOR,QEMU_VERSION_MINOR,QEMU_VERSION_MICRO,0
> +PRODUCTVERSION QEMU_VERSION_MAJOR,QEMU_VERSION_MINOR,QEMU_VERSION_MICRO,0
>  FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
>  FILEOS VOS_NT_WINDOWS32
>  FILETYPE VFT_APP
> --
> 2.29.2
>

-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 2793 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-12-17 10:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-17  8:50 [PATCH 0/4] First batch of configure cleanups Paolo Bonzini
2020-12-17  8:50 ` [PATCH 1/4] configure: remove useless code to check for Xen PCI passthrough Paolo Bonzini
2020-12-17 10:20   ` Marc-André Lureau
2020-12-17  8:50 ` [PATCH 2/4] configure: remove variable bogus_os Paolo Bonzini
2020-12-17  9:04   ` Thomas Huth
2020-12-17 10:21   ` Marc-André Lureau
2020-12-17  8:50 ` [PATCH 3/4] configure: accept --enable-slirp Paolo Bonzini
2020-12-17  9:06   ` Thomas Huth
2020-12-17 10:22   ` Marc-André Lureau
2020-12-17  8:50 ` [PATCH 4/4] configure: remove CONFIG_FILEVERSION and CONFIG_PRODUCTVERSION Paolo Bonzini
2020-12-17 10:30   ` Marc-André Lureau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.