All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] configure cleanups for QEMU 8.2
@ 2023-08-29  8:29 Paolo Bonzini
  2023-08-29  8:29 ` [PATCH 01/10] meson: do not unnecessarily use cmake for dependencies Paolo Bonzini
                   ` (9 more replies)
  0 siblings, 10 replies; 33+ messages in thread
From: Paolo Bonzini @ 2023-08-29  8:29 UTC (permalink / raw)
  To: qemu-devel

This includes a few more patches cleaning up the configure/meson
separation.  The highlights are fixing --host-cc, removing the
last traces of compiler detection from config-host.mak, and
dropping the useless pc-bios/Makefile.

Paolo Bonzini (10):
  meson: do not unnecessarily use cmake for dependencies
  meson: update unsupported host/CPU messages
  configure: remove HOST_CC
  configure: create native file with contents of $host_cc
  meson: compile bundled device trees
  contrib/plugins: use an independent makefile
  meson: do not use config_host to pick tap implementations
  configure, meson: move simple OS definitions to meson
  configure: remove $linux and $mingw32 variables
  configure: move --enable-debug-tcg to meson

 configure                                 | 65 +++++++++--------------
 contrib/plugins/Makefile                  | 18 +++----
 hw/9pfs/meson.build                       |  4 +-
 meson.build                               | 43 ++++++++-------
 meson_options.txt                         |  2 +
 net/meson.build                           | 18 ++++---
 pc-bios/Makefile                          | 19 -------
 pc-bios/meson.build                       | 25 +++++++--
 scripts/meson-buildoptions.sh             |  3 ++
 tests/migration/meson.build               |  2 +-
 tests/qtest/meson.build                   |  2 +-
 tests/tcg/tricore/Makefile.softmmu-target |  2 +-
 12 files changed, 101 insertions(+), 102 deletions(-)
 delete mode 100644 pc-bios/Makefile

-- 
2.41.0



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

* [PATCH 01/10] meson: do not unnecessarily use cmake for dependencies
  2023-08-29  8:29 [PATCH 00/10] configure cleanups for QEMU 8.2 Paolo Bonzini
@ 2023-08-29  8:29 ` Paolo Bonzini
  2023-08-29 17:14   ` Daniel P. Berrangé
  2023-08-29  8:29 ` [PATCH 02/10] meson: update unsupported host/CPU messages Paolo Bonzini
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 33+ messages in thread
From: Paolo Bonzini @ 2023-08-29  8:29 UTC (permalink / raw)
  To: qemu-devel

Both gvnc and sysprof-capture come with pkg-config files, so specify
the method to find them.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 tests/migration/meson.build | 2 +-
 tests/qtest/meson.build     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/migration/meson.build b/tests/migration/meson.build
index ac71f132901..a91aa61c659 100644
--- a/tests/migration/meson.build
+++ b/tests/migration/meson.build
@@ -1,4 +1,4 @@
-sysprof = dependency('sysprof-capture-4', required: false)
+sysprof = dependency('sysprof-capture-4', method: 'pkg-config', required: false)
 glib_static = dependency('glib-2.0', version: glib_req_ver, required: false,
                          method: 'pkg-config', static: true)
 
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index b071d400b37..df63909ee51 100644
--- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build
@@ -321,7 +321,7 @@ qtests = {
 }
 
 if vnc.found()
-  gvnc = dependency('gvnc-1.0', required: false)
+  gvnc = dependency('gvnc-1.0', method: 'pkg-config', required: false)
   if gvnc.found()
     qtests += {'vnc-display-test': [gvnc]}
     qtests_generic += [ 'vnc-display-test' ]
-- 
2.41.0



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

* [PATCH 02/10] meson: update unsupported host/CPU messages
  2023-08-29  8:29 [PATCH 00/10] configure cleanups for QEMU 8.2 Paolo Bonzini
  2023-08-29  8:29 ` [PATCH 01/10] meson: do not unnecessarily use cmake for dependencies Paolo Bonzini
@ 2023-08-29  8:29 ` Paolo Bonzini
  2023-08-29 10:34   ` Daniel P. Berrangé
  2023-08-29  8:29 ` [PATCH 03/10] configure: remove HOST_CC Paolo Bonzini
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 33+ messages in thread
From: Paolo Bonzini @ 2023-08-29  8:29 UTC (permalink / raw)
  To: qemu-devel

Unsupported CPU and OSes are not really going away, but the
project simply does not guarantee that they work.  Rephrase
the messages accordingly.  While at it, move the warning for
TCI performance at the end where it is more visible.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 meson.build | 38 +++++++++++++++++++++-----------------
 1 file changed, 21 insertions(+), 17 deletions(-)

diff --git a/meson.build b/meson.build
index 98e68ef0b1e..02b035a3808 100644
--- a/meson.build
+++ b/meson.build
@@ -678,9 +678,7 @@ endif
 tcg_arch = host_arch
 if get_option('tcg').allowed()
   if host_arch == 'unknown'
-    if get_option('tcg_interpreter')
-      warning('Unsupported CPU @0@, will use TCG with TCI (slow)'.format(cpu))
-    else
+    if not get_option('tcg_interpreter')
       error('Unsupported CPU @0@, try --enable-tcg-interpreter'.format(cpu))
     endif
   elif get_option('tcg_interpreter')
@@ -4317,28 +4315,34 @@ summary_info += {'selinux':           selinux}
 summary_info += {'libdw':             libdw}
 summary(summary_info, bool_yn: true, section: 'Dependencies')
 
-if not supported_cpus.contains(cpu)
+if host_arch == 'unknown'
   message()
-  warning('SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!')
+  warning('UNSUPPORTED HOST CPU')
   message()
-  message('CPU host architecture ' + cpu + ' support is not currently maintained.')
-  message('The QEMU project intends to remove support for this host CPU in')
-  message('a future release if nobody volunteers to maintain it and to')
-  message('provide a build host for our continuous integration setup.')
-  message('configure has succeeded and you can continue to build, but')
-  message('if you care about QEMU on this platform you should contact')
-  message('us upstream at qemu-devel@nongnu.org.')
+  message('Support for CPU host architecture ' + cpu + ' is not currently')
+  message('maintained. The QEMU project does not guarantee that QEMU will')
+  message('compile or work on this host CPU. You can help by volunteering')
+  message('to maintain it and providing a build host for our continuous.')
+  message('integration setup.')
 endif
 
 if not supported_oses.contains(targetos)
   message()
-  warning('WARNING: SUPPORT FOR THIS HOST OS WILL GO AWAY IN FUTURE RELEASES!')
+  warning('UNSUPPORTED HOST OS')
+  message()
+  message('Support for host OS ' + targetos + 'is not currently maintained.')
+  message('The QEMU project does not guarantee that QEMU will compile or')
+  message('work on this operating system. You can help by volunteering')
+  message('to maintain it and providing a build host for our continuous.')
+  message('integration setup.')
+endif
+
+if host_arch == 'unknown' or not supported_oses.contains(targetos)
   message()
-  message('Host OS ' + targetos + 'support is not currently maintained.')
-  message('The QEMU project intends to remove support for this host OS in')
-  message('a future release if nobody volunteers to maintain it and to')
-  message('provide a build host for our continuous integration setup.')
   message('configure has succeeded and you can continue to build, but')
+  if host_arch == 'unknown' and get_option('tcg').allowed() and target_dirs.length() > 0
+    message('QEMU will use a slow interpreter to emulate the target CPU;')
+  endif
   message('if you care about QEMU on this platform you should contact')
   message('us upstream at qemu-devel@nongnu.org.')
 endif
-- 
2.41.0



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

* [PATCH 03/10] configure: remove HOST_CC
  2023-08-29  8:29 [PATCH 00/10] configure cleanups for QEMU 8.2 Paolo Bonzini
  2023-08-29  8:29 ` [PATCH 01/10] meson: do not unnecessarily use cmake for dependencies Paolo Bonzini
  2023-08-29  8:29 ` [PATCH 02/10] meson: update unsupported host/CPU messages Paolo Bonzini
@ 2023-08-29  8:29 ` Paolo Bonzini
  2023-08-29 17:12   ` Daniel P. Berrangé
  2023-08-29 18:40   ` Richard Henderson
  2023-08-29  8:29 ` [PATCH 04/10] configure: create native file with contents of $host_cc Paolo Bonzini
                   ` (6 subsequent siblings)
  9 siblings, 2 replies; 33+ messages in thread
From: Paolo Bonzini @ 2023-08-29  8:29 UTC (permalink / raw)
  To: qemu-devel

$(HOST_CC) is only used to invoke the preprocessor, and $(CC) can be
used instead now that there is a Tricore C compiler.  Remove the variable
from config-host.mak.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure                                 | 1 -
 tests/tcg/tricore/Makefile.softmmu-target | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/configure b/configure
index b9bd008592a..3423f008d5c 100755
--- a/configure
+++ b/configure
@@ -1794,7 +1794,6 @@ fi
 mkdir -p tests/tcg
 echo "# Automatically generated by configure - do not modify" > $config_host_mak
 echo "SRC_PATH=$source_path" >> $config_host_mak
-echo "HOST_CC=$host_cc" >> $config_host_mak
 
 # versioned checked in the main config_host.mak above
 if test -n "$gdb_bin"; then
diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target
index aff7c1b5802..2ec0bd36225 100644
--- a/tests/tcg/tricore/Makefile.softmmu-target
+++ b/tests/tcg/tricore/Makefile.softmmu-target
@@ -28,7 +28,7 @@ TESTS += test_context_save_areas.c.tst
 QEMU_OPTS += -M tricore_testboard -cpu tc27x -nographic -kernel
 
 %.pS: $(ASM_TESTS_PATH)/%.S
-	$(HOST_CC) -E -o $@ $<
+	$(CC) -E -o $@ $<
 
 %.o: %.pS
 	$(AS) $(ASFLAGS) -o $@ $<
-- 
2.41.0



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

* [PATCH 04/10] configure: create native file with contents of $host_cc
  2023-08-29  8:29 [PATCH 00/10] configure cleanups for QEMU 8.2 Paolo Bonzini
                   ` (2 preceding siblings ...)
  2023-08-29  8:29 ` [PATCH 03/10] configure: remove HOST_CC Paolo Bonzini
@ 2023-08-29  8:29 ` Paolo Bonzini
  2023-08-29 16:54   ` Peter Maydell
                     ` (2 more replies)
  2023-08-29  8:29 ` [PATCH 05/10] meson: compile bundled device trees Paolo Bonzini
                   ` (5 subsequent siblings)
  9 siblings, 3 replies; 33+ messages in thread
From: Paolo Bonzini @ 2023-08-29  8:29 UTC (permalink / raw)
  To: qemu-devel

The argument of --host-cc is not obeyed when cross compiling.  To avoid
this issue, place it in a configuration file and pass it to meson
with --native-file.

While at it, clarify that --host-cc is not obeyed anyway when _not_
cross compiling.

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

diff --git a/configure b/configure
index 3423f008d5c..b2bc1ff5f7b 100755
--- a/configure
+++ b/configure
@@ -922,7 +922,7 @@ Advanced options (experts only):
   --cross-prefix=PREFIX    use PREFIX for compile tools, PREFIX can be blank [$cross_prefix]
   --cc=CC                  use C compiler CC [$cc]
   --host-cc=CC             use C compiler CC [$host_cc] for code run at
-                           build time
+                           build time when cross compiling
   --cxx=CXX                use C++ compiler CXX [$cxx]
   --objcc=OBJCC            use Objective-C compiler OBJCC [$objcc]
   --extra-cflags=CFLAGS    append extra C compiler flags CFLAGS
@@ -1886,7 +1886,6 @@ if test "$skip_meson" = no; then
   echo "windres = [$(meson_quote $windres)]" >> $cross
   echo "windmc = [$(meson_quote $windmc)]" >> $cross
   if test "$cross_compile" = "yes"; then
-    cross_arg="--cross-file config-meson.cross"
     echo "[host_machine]" >> $cross
     echo "system = '$targetos'" >> $cross
     case "$cpu" in
@@ -1903,6 +1902,14 @@ if test "$skip_meson" = no; then
     else
         echo "endian = 'little'" >> $cross
     fi
+    cross_arg="--cross-file config-meson.cross"
+
+    native="config-meson.native.new"
+    echo "# Automatically generated by configure - do not modify" > $native
+    echo "[binaries]" >> $native
+    echo "c = [$(meson_quote $host_cc)]" >> $native
+    mv $native config-meson.native
+    cross_arg="$cross_arg --native-file config-meson.native"
   else
     cross_arg="--native-file config-meson.cross"
   fi
-- 
2.41.0



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

* [PATCH 05/10] meson: compile bundled device trees
  2023-08-29  8:29 [PATCH 00/10] configure cleanups for QEMU 8.2 Paolo Bonzini
                   ` (3 preceding siblings ...)
  2023-08-29  8:29 ` [PATCH 04/10] configure: create native file with contents of $host_cc Paolo Bonzini
@ 2023-08-29  8:29 ` Paolo Bonzini
  2023-08-29 14:25   ` Philippe Mathieu-Daudé
  2023-08-29 18:47   ` Richard Henderson
  2023-08-29  8:29 ` [PATCH 06/10] contrib/plugins: use an independent makefile Paolo Bonzini
                   ` (4 subsequent siblings)
  9 siblings, 2 replies; 33+ messages in thread
From: Paolo Bonzini @ 2023-08-29  8:29 UTC (permalink / raw)
  To: qemu-devel

If dtc is available, compile the .dts files in the pc-bios directory
instead of using the precompiled binaries.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 pc-bios/Makefile    | 19 -------------------
 pc-bios/meson.build | 25 +++++++++++++++++++++----
 2 files changed, 21 insertions(+), 23 deletions(-)
 delete mode 100644 pc-bios/Makefile

diff --git a/pc-bios/Makefile b/pc-bios/Makefile
deleted file mode 100644
index 315288df84e..00000000000
--- a/pc-bios/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# NOTE: only compilable with x86 cross compile tools
-#
-include ../config-host.mak
-
-DEFINES=
-
-TARGETS=
-
-all: $(TARGETS)
-
-%.o: %.S
-	$(CC) $(DEFINES) -c -o $@ $<
-
-%.dtb: %.dts
-	dtc -I dts -O dtb -o $@ $<
-
-clean:
-	rm -f $(TARGETS) *.o *~
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index a7224ef4699..e67fa433a1b 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -57,10 +57,6 @@ blobs = [
   'efi-e1000e.rom',
   'efi-vmxnet3.rom',
   'qemu-nsis.bmp',
-  'bamboo.dtb',
-  'canyonlands.dtb',
-  'petalogix-s3adsp1800.dtb',
-  'petalogix-ml605.dtb',
   'multiboot.bin',
   'multiboot_dma.bin',
   'linuxboot.bin',
@@ -84,6 +80,27 @@ blobs = [
   'vof-nvram.bin',
 ]
 
+dtc = find_program('dtc', required: false)
+foreach f : [
+  'bamboo.dts',
+  'canyonlands.dts',
+  'petalogix-s3adsp1800.dts',
+  'petalogix-ml605.dts',
+]
+  out = fs.replace_suffix(f, '.dtb')
+  if dtc.found()
+    custom_target(f,
+        build_by_default: have_system,
+        input: files(f),
+        output: out,
+        install: get_option('install_blobs'),
+        install_dir: qemu_datadir,
+        command: [ dtc, '-I', 'dts', '-O', 'dtb', '-o', '@OUTPUT@', '@INPUT0@' ])
+  else
+    blobs += out
+  endif
+endforeach
+
 if get_option('install_blobs')
   install_data(blobs, install_dir: qemu_datadir)
 endif
-- 
2.41.0



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

* [PATCH 06/10] contrib/plugins: use an independent makefile
  2023-08-29  8:29 [PATCH 00/10] configure cleanups for QEMU 8.2 Paolo Bonzini
                   ` (4 preceding siblings ...)
  2023-08-29  8:29 ` [PATCH 05/10] meson: compile bundled device trees Paolo Bonzini
@ 2023-08-29  8:29 ` Paolo Bonzini
  2023-08-29 17:16   ` Daniel P. Berrangé
  2023-08-29  8:29 ` [PATCH 07/10] meson: do not use config_host to pick tap implementations Paolo Bonzini
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 33+ messages in thread
From: Paolo Bonzini @ 2023-08-29  8:29 UTC (permalink / raw)
  To: qemu-devel

The initial reason to write this patch was to remove the last use of
CONFIG_DEBUG_TCG from the makefiles; the flags to use to build TCG
plugins are unrelated to --enable-debug-tcg, and instead they should
be the same as those used to build emulators (the plugins are not build
via meson for demonstration reasons only).

However, since contrib/plugins/Makefile is also the last case of doing
a compilation job using config-host.mak, go a step further and make it
use a completely separate configuration file, removing all references
to compilers from the toplevel config-host.mak.  Clean up references to
empty variables, and use .SECONDARY so that intermediate object files
are not deleted.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure                | 12 +++++++++---
 contrib/plugins/Makefile | 18 +++++++++---------
 2 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/configure b/configure
index b2bc1ff5f7b..4a7e7afb996 100755
--- a/configure
+++ b/configure
@@ -245,7 +245,7 @@ for opt do
   esac
 done
 
-
+default_cflags='-O2 -g'
 git_submodules_action="update"
 git="git"
 debug_tcg="no"
@@ -768,6 +768,7 @@ for opt do
       meson_option_parse --enable-debug-graph-lock ""
       meson_option_parse --enable-debug-mutex ""
       meson_option_add -Doptimization=0
+      default_cflags='-O0 -g'
   ;;
   --disable-tcg) tcg="disabled"
                  plugins="no"
@@ -1763,8 +1764,6 @@ echo "PYTHON=$python" >> $config_host_mak
 echo "GENISOIMAGE=$genisoimage" >> $config_host_mak
 echo "MESON=$meson" >> $config_host_mak
 echo "NINJA=$ninja" >> $config_host_mak
-echo "PKG_CONFIG=${pkg_config}" >> $config_host_mak
-echo "CC=$cc" >> $config_host_mak
 echo "EXESUF=$EXESUF" >> $config_host_mak
 
 # use included Linux headers for KVM architectures
@@ -1789,6 +1788,13 @@ if test "$ccache_cpp2" = "yes"; then
   echo "export CCACHE_CPP2=y" >> $config_host_mak
 fi
 
+# contrib/plugins configuration
+echo "# Automatically generated by configure - do not modify" > contrib/plugins/$config_host_mak
+echo "SRC_PATH=$source_path/contrib/plugins" >> contrib/plugins/$config_host_mak
+echo "PKG_CONFIG=${pkg_config}" >> $config_host_mak
+echo "CC=$cc $CPU_CFLAGS" >> contrib/plugins/$config_host_mak
+echo "CFLAGS=${CFLAGS-$default_cflags} $EXTRA_CFLAGS" >> contrib/plugins/$config_host_mak
+
 # tests/tcg configuration
 (config_host_mak=tests/tcg/config-host.mak
 mkdir -p tests/tcg
diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile
index b2b9db9f51a..0751201bcb3 100644
--- a/contrib/plugins/Makefile
+++ b/contrib/plugins/Makefile
@@ -6,11 +6,11 @@
 # programs that the main configure has already done for us.
 #
 
-BUILD_DIR := $(CURDIR)/../..
+include config-host.mak
 
-include $(BUILD_DIR)/config-host.mak
+TOP_SRC_PATH = $(SRC_PATH)/../..
 
-VPATH += $(SRC_PATH)/contrib/plugins
+VPATH += $(SRC_PATH)
 
 NAMES :=
 NAMES += execlog
@@ -26,21 +26,21 @@ SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES)))
 
 # The main QEMU uses Glib extensively so it's perfectly fine to use it
 # in plugins (which many example do).
-CFLAGS := $(shell $(PKG_CONFIG) --cflags glib-2.0)
-CFLAGS += -fPIC -Wall
-CFLAGS += $(if $(CONFIG_DEBUG_TCG), -ggdb -O0)
-CFLAGS += -I$(SRC_PATH)/include/qemu
+PLUGIN_CFLAGS := $(shell $(PKG_CONFIG) --cflags glib-2.0)
+PLUGIN_CFLAGS += -fPIC -Wall
+PLUGIN_CFLAGS += -I$(TOP_SRC_PATH)/include/qemu
 
 all: $(SONAMES)
 
 %.o: %.c
-	$(CC) $(CFLAGS) -c -o $@ $<
+	$(CC) $(CFLAGS) $(PLUGIN_CFLAGS) -c -o $@ $<
 
 lib%.so: %.o
-	$(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDLIBS)
+	$(CC) -shared -Wl,-soname,$@ -o $@ $^
 
 clean:
 	rm -f *.o *.so *.d
 	rm -Rf .libs
 
 .PHONY: all clean
+.SECONDARY:
-- 
2.41.0



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

* [PATCH 07/10] meson: do not use config_host to pick tap implementations
  2023-08-29  8:29 [PATCH 00/10] configure cleanups for QEMU 8.2 Paolo Bonzini
                   ` (5 preceding siblings ...)
  2023-08-29  8:29 ` [PATCH 06/10] contrib/plugins: use an independent makefile Paolo Bonzini
@ 2023-08-29  8:29 ` Paolo Bonzini
  2023-08-29 14:26   ` Philippe Mathieu-Daudé
  2023-08-29 17:05   ` Daniel P. Berrangé
  2023-08-29  8:29 ` [PATCH 08/10] configure, meson: move simple OS definitions to meson Paolo Bonzini
                   ` (2 subsequent siblings)
  9 siblings, 2 replies; 33+ messages in thread
From: Paolo Bonzini @ 2023-08-29  8:29 UTC (permalink / raw)
  To: qemu-devel

The target OS is invariant and does not depend on the configuration, so move
away from config_host and just use unconditional rules in softmmu_ss.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 net/meson.build | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/net/meson.build b/net/meson.build
index bdf564a57b2..d2d70634e5e 100644
--- a/net/meson.build
+++ b/net/meson.build
@@ -41,15 +41,17 @@ if have_vhost_net_user
   system_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-user-stub.c'))
 endif
 
-system_ss.add(when: 'CONFIG_LINUX', if_true: files('tap-linux.c'))
-system_ss.add(when: 'CONFIG_BSD', if_true: files('tap-bsd.c'))
-system_ss.add(when: 'CONFIG_SOLARIS', if_true: files('tap-solaris.c'))
-tap_posix = ['tap.c']
-if not config_host.has_key('CONFIG_LINUX') and not config_host.has_key('CONFIG_BSD') and not config_host.has_key('CONFIG_SOLARIS')
-  tap_posix += 'tap-stub.c'
+if targetos == 'windows'
+  system_ss.add(files('tap-win32.c'))
+elif targetos == 'linux'
+  system_ss.add(files('tap.c', 'tap-linux.c'))
+elif targetos in bsd_oses
+  system_ss.add(files('tap.c', 'tap-bsd.c'))
+elif targetos == 'solaris'
+  system_ss.add(files('tap.c', 'tap-solaris.c'))
+else
+  system_ss.add(files('tap.c', 'tap-stub.c'))
 endif
-system_ss.add(when: 'CONFIG_POSIX', if_true: files(tap_posix))
-system_ss.add(when: 'CONFIG_WIN32', if_true: files('tap-win32.c'))
 if have_vhost_net_vdpa
   system_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-vdpa.c'), if_false: files('vhost-vdpa-stub.c'))
   system_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-vdpa-stub.c'))
-- 
2.41.0



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

* [PATCH 08/10] configure, meson: move simple OS definitions to meson
  2023-08-29  8:29 [PATCH 00/10] configure cleanups for QEMU 8.2 Paolo Bonzini
                   ` (6 preceding siblings ...)
  2023-08-29  8:29 ` [PATCH 07/10] meson: do not use config_host to pick tap implementations Paolo Bonzini
@ 2023-08-29  8:29 ` Paolo Bonzini
  2023-08-29 14:28   ` Philippe Mathieu-Daudé
  2023-08-29  8:29 ` [PATCH 09/10] configure: remove $linux and $mingw32 variables Paolo Bonzini
  2023-08-29  8:29 ` [PATCH 10/10] configure: move --enable-debug-tcg to meson Paolo Bonzini
  9 siblings, 1 reply; 33+ messages in thread
From: Paolo Bonzini @ 2023-08-29  8:29 UTC (permalink / raw)
  To: qemu-devel

CONFIG_DARWIN and CONFIG_SOLARIS are only used in C sources.
Move them to config_host_data.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure           | 12 ------------
 hw/9pfs/meson.build |  4 +++-
 meson.build         |  2 ++
 3 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/configure b/configure
index 4a7e7afb996..eba5befa2cf 100755
--- a/configure
+++ b/configure
@@ -377,7 +377,6 @@ fi
 mingw32="no"
 bsd="no"
 linux="no"
-solaris="no"
 case $targetos in
 windows)
   mingw32="yes"
@@ -402,10 +401,6 @@ openbsd)
 ;;
 darwin)
   bsd="yes"
-  darwin="yes"
-;;
-sunos)
-  solaris="yes"
 ;;
 haiku)
   pie="no"
@@ -1726,13 +1721,6 @@ if test "$linux" = "yes" ; then
   echo "CONFIG_LINUX=y" >> $config_host_mak
 fi
 
-if test "$darwin" = "yes" ; then
-  echo "CONFIG_DARWIN=y" >> $config_host_mak
-fi
-
-if test "$solaris" = "yes" ; then
-  echo "CONFIG_SOLARIS=y" >> $config_host_mak
-fi
 echo "SRC_PATH=$source_path" >> $config_host_mak
 echo "TARGET_DIRS=$target_list" >> $config_host_mak
 
diff --git a/hw/9pfs/meson.build b/hw/9pfs/meson.build
index 2944ea63c38..c6a2ccfcc85 100644
--- a/hw/9pfs/meson.build
+++ b/hw/9pfs/meson.build
@@ -14,7 +14,9 @@ fs_ss.add(files(
   'coxattr.c',
 ))
 fs_ss.add(when: 'CONFIG_LINUX', if_true: files('9p-util-linux.c'))
-fs_ss.add(when: 'CONFIG_DARWIN', if_true: files('9p-util-darwin.c'))
+if targetos == 'darwin'
+  fs_ss.add(files('9p-util-darwin.c'))
+endif
 fs_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xen-9p-backend.c'))
 system_ss.add_all(when: 'CONFIG_FSDEV_9P', if_true: fs_ss)
 
diff --git a/meson.build b/meson.build
index 02b035a3808..d3d10140c57 100644
--- a/meson.build
+++ b/meson.build
@@ -2070,6 +2070,7 @@ config_host_data.set('CONFIG_ATTR', libattr.found())
 config_host_data.set('CONFIG_BDRV_WHITELIST_TOOLS', get_option('block_drv_whitelist_in_tools'))
 config_host_data.set('CONFIG_BRLAPI', brlapi.found())
 config_host_data.set('CONFIG_COCOA', cocoa.found())
+config_host_data.set('CONFIG_DARWIN', targetos == 'darwin')
 config_host_data.set('CONFIG_FUZZ', get_option('fuzzing'))
 config_host_data.set('CONFIG_GCOV', get_option('b_coverage'))
 config_host_data.set('CONFIG_LIBUDEV', libudev.found())
@@ -2125,6 +2126,7 @@ if seccomp.found()
   config_host_data.set('CONFIG_SECCOMP_SYSRAWRC', seccomp_has_sysrawrc)
 endif
 config_host_data.set('CONFIG_SNAPPY', snappy.found())
+config_host_data.set('CONFIG_SOLARIS', targetos == 'sunos')
 config_host_data.set('CONFIG_TPM', have_tpm)
 config_host_data.set('CONFIG_TSAN', get_option('tsan'))
 config_host_data.set('CONFIG_USB_LIBUSB', libusb.found())
-- 
2.41.0



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

* [PATCH 09/10] configure: remove $linux and $mingw32 variables
  2023-08-29  8:29 [PATCH 00/10] configure cleanups for QEMU 8.2 Paolo Bonzini
                   ` (7 preceding siblings ...)
  2023-08-29  8:29 ` [PATCH 08/10] configure, meson: move simple OS definitions to meson Paolo Bonzini
@ 2023-08-29  8:29 ` Paolo Bonzini
  2023-08-29 14:28   ` Philippe Mathieu-Daudé
  2023-08-29 17:05   ` Daniel P. Berrangé
  2023-08-29  8:29 ` [PATCH 10/10] configure: move --enable-debug-tcg to meson Paolo Bonzini
  9 siblings, 2 replies; 33+ messages in thread
From: Paolo Bonzini @ 2023-08-29  8:29 UTC (permalink / raw)
  To: qemu-devel

Just use $targetos always.

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

diff --git a/configure b/configure
index eba5befa2cf..aed48db68fd 100755
--- a/configure
+++ b/configure
@@ -374,12 +374,9 @@ fi
 
 # OS specific
 
-mingw32="no"
 bsd="no"
-linux="no"
 case $targetos in
 windows)
-  mingw32="yes"
   plugins="no"
   pie="no"
 ;;
@@ -405,9 +402,6 @@ darwin)
 haiku)
   pie="no"
 ;;
-linux)
-  linux="yes"
-;;
 esac
 
 if test ! -z "$cpu" ; then
@@ -622,7 +616,7 @@ do
     fi
 done
 
-if test "$mingw32" = "yes" ; then
+if test "$targetos" = "windows" ; then
   EXESUF=".exe"
   prefix="/qemu"
   bindir=""
@@ -805,7 +799,7 @@ for opt do
   ;;
   --enable-download) download="enabled"; git_submodules_action=update;
   ;;
-  --enable-plugins) if test "$mingw32" = "yes"; then
+  --enable-plugins) if test "$targetos" = "windows"; then
                         error_exit "TCG plugins not currently supported on Windows platforms"
                     else
                         plugins="yes"
@@ -1070,7 +1064,7 @@ fi
 # by default.  Only enable by default for git builds
 if test -z "$werror" ; then
     if test -e "$source_path/.git" && \
-        { test "$linux" = "yes" || test "$mingw32" = "yes"; }; then
+        { test "$targetos" = linux || test "$targetos" = "windows"; }; then
         werror="yes"
     else
         werror="no"
@@ -1708,7 +1702,7 @@ echo all: >> $config_host_mak
 if test "$debug_tcg" = "yes" ; then
   echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak
 fi
-if test "$mingw32" = "yes" ; then
+if test "$targetos" = "windows"; then
   echo "CONFIG_WIN32=y" >> $config_host_mak
   echo "QEMU_GA_MANUFACTURER=${QEMU_GA_MANUFACTURER-QEMU}" >> $config_host_mak
   echo "QEMU_GA_DISTRO=${QEMU_GA_DISTRO-Linux}" >> $config_host_mak
@@ -1717,7 +1711,7 @@ else
   echo "CONFIG_POSIX=y" >> $config_host_mak
 fi
 
-if test "$linux" = "yes" ; then
+if test "$targetos" = "linux" ; then
   echo "CONFIG_LINUX=y" >> $config_host_mak
 fi
 
@@ -1755,7 +1749,7 @@ echo "NINJA=$ninja" >> $config_host_mak
 echo "EXESUF=$EXESUF" >> $config_host_mak
 
 # use included Linux headers for KVM architectures
-if test "$linux" = "yes" && test -n "$linux_arch"; then
+if test "$targetos" = "linux" && test -n "$linux_arch"; then
   symlink "$source_path/linux-headers/asm-$linux_arch" linux-headers/asm
 fi
 
-- 
2.41.0



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

* [PATCH 10/10] configure: move --enable-debug-tcg to meson
  2023-08-29  8:29 [PATCH 00/10] configure cleanups for QEMU 8.2 Paolo Bonzini
                   ` (8 preceding siblings ...)
  2023-08-29  8:29 ` [PATCH 09/10] configure: remove $linux and $mingw32 variables Paolo Bonzini
@ 2023-08-29  8:29 ` Paolo Bonzini
  2023-08-29 16:57   ` Peter Maydell
                     ` (2 more replies)
  9 siblings, 3 replies; 33+ messages in thread
From: Paolo Bonzini @ 2023-08-29  8:29 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure                     | 11 +----------
 meson.build                   |  3 ++-
 meson_options.txt             |  2 ++
 scripts/meson-buildoptions.sh |  3 +++
 4 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/configure b/configure
index aed48db68fd..40729a6d5f5 100755
--- a/configure
+++ b/configure
@@ -248,7 +248,6 @@ done
 default_cflags='-O2 -g'
 git_submodules_action="update"
 git="git"
-debug_tcg="no"
 docs="auto"
 EXESUF=""
 prefix="/usr/local"
@@ -747,13 +746,9 @@ for opt do
     # configure to be used by RPM and similar macros that set
     # lots of directory switches by default.
   ;;
-  --enable-debug-tcg) debug_tcg="yes"
-  ;;
-  --disable-debug-tcg) debug_tcg="no"
-  ;;
   --enable-debug)
       # Enable debugging options that aren't excessively noisy
-      debug_tcg="yes"
+      meson_option_parse --enable-debug-tcg ""
       meson_option_parse --enable-debug-graph-lock ""
       meson_option_parse --enable-debug-mutex ""
       meson_option_add -Doptimization=0
@@ -948,7 +943,6 @@ cat << EOF
   linux-user      all linux usermode emulation targets
   bsd-user        all BSD usermode emulation targets
   pie             Position Independent Executables
-  debug-tcg       TCG debugging (default is disabled)
 
 NOTE: The object files are built at the place where configure is launched
 EOF
@@ -1699,9 +1693,6 @@ echo >> $config_host_mak
 
 echo all: >> $config_host_mak
 
-if test "$debug_tcg" = "yes" ; then
-  echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak
-fi
 if test "$targetos" = "windows"; then
   echo "CONFIG_WIN32=y" >> $config_host_mak
   echo "QEMU_GA_MANUFACTURER=${QEMU_GA_MANUFACTURER-QEMU}" >> $config_host_mak
diff --git a/meson.build b/meson.build
index d3d10140c57..45f9cc62a60 100644
--- a/meson.build
+++ b/meson.build
@@ -2201,6 +2201,7 @@ config_host_data.set10('CONFIG_COROUTINE_POOL', have_coroutine_pool)
 config_host_data.set('CONFIG_DEBUG_GRAPH_LOCK', get_option('debug_graph_lock'))
 config_host_data.set('CONFIG_DEBUG_MUTEX', get_option('debug_mutex'))
 config_host_data.set('CONFIG_DEBUG_STACK_USAGE', get_option('debug_stack_usage'))
+config_host_data.set('CONFIG_DEBUG_TCG', get_option('debug_tcg'))
 config_host_data.set('CONFIG_GPROF', get_option('gprof'))
 config_host_data.set('CONFIG_LIVE_BLOCK_MIGRATION', get_option('live_block_migration').allowed())
 config_host_data.set('CONFIG_QOM_CAST_DEBUG', get_option('qom_cast_debug'))
@@ -4158,7 +4159,7 @@ if config_all.has_key('CONFIG_TCG')
     summary_info += {'TCG backend':   'native (@0@)'.format(cpu)}
   endif
   summary_info += {'TCG plugins': config_host.has_key('CONFIG_PLUGIN')}
-  summary_info += {'TCG debug enabled': config_host.has_key('CONFIG_DEBUG_TCG')}
+  summary_info += {'TCG debug enabled': get_option('debug_tcg')}
 endif
 summary_info += {'target list':       ' '.join(target_dirs)}
 if have_system
diff --git a/meson_options.txt b/meson_options.txt
index aaea5ddd779..5d6b889554c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -83,6 +83,8 @@ option('xen_pci_passthrough', type: 'feature', value: 'auto',
        description: 'Xen PCI passthrough support')
 option('tcg', type: 'feature', value: 'enabled',
        description: 'TCG support')
+option('debug_tcg', type: 'boolean', value: false,
+       description: 'TCG debugging')
 option('tcg_interpreter', type: 'boolean', value: false,
        description: 'TCG with bytecode interpreter (slow)')
 option('safe_stack', type: 'boolean', value: false,
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index 9da3fe299b7..5567fd29985 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -29,6 +29,7 @@ meson_options_help() {
   printf "%s\n" '  --enable-debug-mutex     mutex debugging support'
   printf "%s\n" '  --enable-debug-stack-usage'
   printf "%s\n" '                           measure coroutine stack usage'
+  printf "%s\n" '  --enable-debug-tcg       TCG debugging'
   printf "%s\n" '  --enable-fdt[=CHOICE]    Whether and how to find the libfdt library'
   printf "%s\n" '                           (choices: auto/disabled/enabled/internal/system)'
   printf "%s\n" '  --enable-fuzzing         build fuzzing targets'
@@ -276,6 +277,8 @@ _meson_option_parse() {
     --disable-debug-mutex) printf "%s" -Ddebug_mutex=false ;;
     --enable-debug-stack-usage) printf "%s" -Ddebug_stack_usage=true ;;
     --disable-debug-stack-usage) printf "%s" -Ddebug_stack_usage=false ;;
+    --enable-debug-tcg) printf "%s" -Ddebug_tcg=true ;;
+    --disable-debug-tcg) printf "%s" -Ddebug_tcg=false ;;
     --enable-dmg) printf "%s" -Ddmg=enabled ;;
     --disable-dmg) printf "%s" -Ddmg=disabled ;;
     --docdir=*) quote_sh "-Ddocdir=$2" ;;
-- 
2.41.0



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

* Re: [PATCH 02/10] meson: update unsupported host/CPU messages
  2023-08-29  8:29 ` [PATCH 02/10] meson: update unsupported host/CPU messages Paolo Bonzini
@ 2023-08-29 10:34   ` Daniel P. Berrangé
  2023-08-31  8:20     ` Paolo Bonzini
  0 siblings, 1 reply; 33+ messages in thread
From: Daniel P. Berrangé @ 2023-08-29 10:34 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Tue, Aug 29, 2023 at 10:29:23AM +0200, Paolo Bonzini wrote:
> Unsupported CPU and OSes are not really going away, but the
> project simply does not guarantee that they work.  Rephrase
> the messages accordingly.  While at it, move the warning for
> TCI performance at the end where it is more visible.

I think I agree wrt to CPUs, but in the case of OS I think
it is fairly accurate as-is.

When we bump the minimum version of libraries we will not
pay attention to unsupported OS, so it is entirely possible
to bump to a version that means the ability to run on an
OS goes away entirely (unless the user is willing to rebuild
packages at newer versions).

When writing #ifdefs for portability we also may explicitly
delete #ifdefs from unsupported OS platforms  if we consider
them obsolete enough. So again I think the ability to use an
unsupported OS may indeed goaway entirely.

> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  meson.build | 38 +++++++++++++++++++++-----------------
>  1 file changed, 21 insertions(+), 17 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 98e68ef0b1e..02b035a3808 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -678,9 +678,7 @@ endif
>  tcg_arch = host_arch
>  if get_option('tcg').allowed()
>    if host_arch == 'unknown'
> -    if get_option('tcg_interpreter')
> -      warning('Unsupported CPU @0@, will use TCG with TCI (slow)'.format(cpu))
> -    else
> +    if not get_option('tcg_interpreter')
>        error('Unsupported CPU @0@, try --enable-tcg-interpreter'.format(cpu))
>      endif
>    elif get_option('tcg_interpreter')
> @@ -4317,28 +4315,34 @@ summary_info += {'selinux':           selinux}
>  summary_info += {'libdw':             libdw}
>  summary(summary_info, bool_yn: true, section: 'Dependencies')
>  
> -if not supported_cpus.contains(cpu)
> +if host_arch == 'unknown'
>    message()
> -  warning('SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!')
> +  warning('UNSUPPORTED HOST CPU')
>    message()
> -  message('CPU host architecture ' + cpu + ' support is not currently maintained.')
> -  message('The QEMU project intends to remove support for this host CPU in')
> -  message('a future release if nobody volunteers to maintain it and to')
> -  message('provide a build host for our continuous integration setup.')
> -  message('configure has succeeded and you can continue to build, but')
> -  message('if you care about QEMU on this platform you should contact')
> -  message('us upstream at qemu-devel@nongnu.org.')
> +  message('Support for CPU host architecture ' + cpu + ' is not currently')
> +  message('maintained. The QEMU project does not guarantee that QEMU will')
> +  message('compile or work on this host CPU. You can help by volunteering')
> +  message('to maintain it and providing a build host for our continuous.')
> +  message('integration setup.')
>  endif
>  
>  if not supported_oses.contains(targetos)
>    message()
> -  warning('WARNING: SUPPORT FOR THIS HOST OS WILL GO AWAY IN FUTURE RELEASES!')
> +  warning('UNSUPPORTED HOST OS')
> +  message()
> +  message('Support for host OS ' + targetos + 'is not currently maintained.')
> +  message('The QEMU project does not guarantee that QEMU will compile or')
> +  message('work on this operating system. You can help by volunteering')
> +  message('to maintain it and providing a build host for our continuous.')
> +  message('integration setup.')
> +endif
> +
> +if host_arch == 'unknown' or not supported_oses.contains(targetos)
>    message()
> -  message('Host OS ' + targetos + 'support is not currently maintained.')
> -  message('The QEMU project intends to remove support for this host OS in')
> -  message('a future release if nobody volunteers to maintain it and to')
> -  message('provide a build host for our continuous integration setup.')
>    message('configure has succeeded and you can continue to build, but')
> +  if host_arch == 'unknown' and get_option('tcg').allowed() and target_dirs.length() > 0
> +    message('QEMU will use a slow interpreter to emulate the target CPU;')
> +  endif
>    message('if you care about QEMU on this platform you should contact')
>    message('us upstream at qemu-devel@nongnu.org.')
>  endif
> -- 
> 2.41.0
> 
> 

With 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 :|



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

* Re: [PATCH 05/10] meson: compile bundled device trees
  2023-08-29  8:29 ` [PATCH 05/10] meson: compile bundled device trees Paolo Bonzini
@ 2023-08-29 14:25   ` Philippe Mathieu-Daudé
  2023-08-29 18:48     ` Richard Henderson
  2023-08-29 18:47   ` Richard Henderson
  1 sibling, 1 reply; 33+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-29 14:25 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

On 29/8/23 10:29, Paolo Bonzini wrote:
> If dtc is available, compile the .dts files in the pc-bios directory
> instead of using the precompiled binaries.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   pc-bios/Makefile    | 19 -------------------
>   pc-bios/meson.build | 25 +++++++++++++++++++++----
>   2 files changed, 21 insertions(+), 23 deletions(-)
>   delete mode 100644 pc-bios/Makefile


> +dtc = find_program('dtc', required: false)
> +foreach f : [
> +  'bamboo.dts',
> +  'canyonlands.dts',
> +  'petalogix-s3adsp1800.dts',
> +  'petalogix-ml605.dts',
> +]
> +  out = fs.replace_suffix(f, '.dtb')

Does that work when building from read-only source directory?

> +  if dtc.found()
> +    custom_target(f,
> +        build_by_default: have_system,
> +        input: files(f),
> +        output: out,
> +        install: get_option('install_blobs'),
> +        install_dir: qemu_datadir,
> +        command: [ dtc, '-I', 'dts', '-O', 'dtb', '-o', '@OUTPUT@', '@INPUT0@' ])
> +  else
> +    blobs += out
> +  endif
> +endforeach
> +
>   if get_option('install_blobs')
>     install_data(blobs, install_dir: qemu_datadir)
>   endif



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

* Re: [PATCH 07/10] meson: do not use config_host to pick tap implementations
  2023-08-29  8:29 ` [PATCH 07/10] meson: do not use config_host to pick tap implementations Paolo Bonzini
@ 2023-08-29 14:26   ` Philippe Mathieu-Daudé
  2023-08-29 17:05   ` Daniel P. Berrangé
  1 sibling, 0 replies; 33+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-29 14:26 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

On 29/8/23 10:29, Paolo Bonzini wrote:
> The target OS is invariant and does not depend on the configuration, so move
> away from config_host and just use unconditional rules in softmmu_ss.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   net/meson.build | 18 ++++++++++--------
>   1 file changed, 10 insertions(+), 8 deletions(-)

Nice.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>



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

* Re: [PATCH 08/10] configure, meson: move simple OS definitions to meson
  2023-08-29  8:29 ` [PATCH 08/10] configure, meson: move simple OS definitions to meson Paolo Bonzini
@ 2023-08-29 14:28   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 33+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-29 14:28 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

On 29/8/23 10:29, Paolo Bonzini wrote:
> CONFIG_DARWIN and CONFIG_SOLARIS are only used in C sources.
> Move them to config_host_data.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   configure           | 12 ------------
>   hw/9pfs/meson.build |  4 +++-
>   meson.build         |  2 ++
>   3 files changed, 5 insertions(+), 13 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>



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

* Re: [PATCH 09/10] configure: remove $linux and $mingw32 variables
  2023-08-29  8:29 ` [PATCH 09/10] configure: remove $linux and $mingw32 variables Paolo Bonzini
@ 2023-08-29 14:28   ` Philippe Mathieu-Daudé
  2023-08-29 17:05   ` Daniel P. Berrangé
  1 sibling, 0 replies; 33+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-29 14:28 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

On 29/8/23 10:29, Paolo Bonzini wrote:
> Just use $targetos always.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   configure | 18 ++++++------------
>   1 file changed, 6 insertions(+), 12 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>



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

* Re: [PATCH 04/10] configure: create native file with contents of $host_cc
  2023-08-29  8:29 ` [PATCH 04/10] configure: create native file with contents of $host_cc Paolo Bonzini
@ 2023-08-29 16:54   ` Peter Maydell
  2023-08-29 17:14   ` Daniel P. Berrangé
  2023-08-29 18:45   ` Richard Henderson
  2 siblings, 0 replies; 33+ messages in thread
From: Peter Maydell @ 2023-08-29 16:54 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

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

On Tue, 29 Aug 2023 at 09:31, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The argument of --host-cc is not obeyed when cross compiling.  To avoid
> this issue, place it in a configuration file and pass it to meson
> with --native-file.
>
> While at it, clarify that --host-cc is not obeyed anyway when _not_
> cross compiling.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  configure | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index 3423f008d5c..b2bc1ff5f7b 100755
> --- a/configure
> +++ b/configure
> @@ -922,7 +922,7 @@ Advanced options (experts only):
>    --cross-prefix=PREFIX    use PREFIX for compile tools, PREFIX can be
blank [$cross_prefix]
>    --cc=CC                  use C compiler CC [$cc]
>    --host-cc=CC             use C compiler CC [$host_cc] for code run at
> -                           build time
> +                           build time when cross compiling
>    --cxx=CXX                use C++ compiler CXX [$cxx]
>    --objcc=OBJCC            use Objective-C compiler OBJCC [$objcc]
>    --extra-cflags=CFLAGS    append extra C compiler flags CFLAGS
> @@ -1886,7 +1886,6 @@ if test "$skip_meson" = no; then
>    echo "windres = [$(meson_quote $windres)]" >> $cross
>    echo "windmc = [$(meson_quote $windmc)]" >> $cross
>    if test "$cross_compile" = "yes"; then
> -    cross_arg="--cross-file config-meson.cross"
>      echo "[host_machine]" >> $cross
>      echo "system = '$targetos'" >> $cross
>      case "$cpu" in
> @@ -1903,6 +1902,14 @@ if test "$skip_meson" = no; then
>      else
>          echo "endian = 'little'" >> $cross
>      fi
> +    cross_arg="--cross-file config-meson.cross"
> +
> +    native="config-meson.native.new"
> +    echo "# Automatically generated by configure - do not modify" >
$native
> +    echo "[binaries]" >> $native
> +    echo "c = [$(meson_quote $host_cc)]" >> $native
> +    mv $native config-meson.native
> +    cross_arg="$cross_arg --native-file config-meson.native"
>    else
>      cross_arg="--native-file config-meson.cross"
>    fi
> --

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM

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

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

* Re: [PATCH 10/10] configure: move --enable-debug-tcg to meson
  2023-08-29  8:29 ` [PATCH 10/10] configure: move --enable-debug-tcg to meson Paolo Bonzini
@ 2023-08-29 16:57   ` Peter Maydell
  2023-08-29 18:52   ` Richard Henderson
  2023-08-31  8:17   ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 33+ messages in thread
From: Peter Maydell @ 2023-08-29 16:57 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Tue, 29 Aug 2023 at 09:31, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  configure                     | 11 +----------
>  meson.build                   |  3 ++-
>  meson_options.txt             |  2 ++
>  scripts/meson-buildoptions.sh |  3 +++
>  4 files changed, 8 insertions(+), 11 deletions(-)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM


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

* Re: [PATCH 07/10] meson: do not use config_host to pick tap implementations
  2023-08-29  8:29 ` [PATCH 07/10] meson: do not use config_host to pick tap implementations Paolo Bonzini
  2023-08-29 14:26   ` Philippe Mathieu-Daudé
@ 2023-08-29 17:05   ` Daniel P. Berrangé
  1 sibling, 0 replies; 33+ messages in thread
From: Daniel P. Berrangé @ 2023-08-29 17:05 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Tue, Aug 29, 2023 at 10:29:28AM +0200, Paolo Bonzini wrote:
> The target OS is invariant and does not depend on the configuration, so move
> away from config_host and just use unconditional rules in softmmu_ss.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  net/meson.build | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With 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 :|



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

* Re: [PATCH 09/10] configure: remove $linux and $mingw32 variables
  2023-08-29  8:29 ` [PATCH 09/10] configure: remove $linux and $mingw32 variables Paolo Bonzini
  2023-08-29 14:28   ` Philippe Mathieu-Daudé
@ 2023-08-29 17:05   ` Daniel P. Berrangé
  1 sibling, 0 replies; 33+ messages in thread
From: Daniel P. Berrangé @ 2023-08-29 17:05 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Tue, Aug 29, 2023 at 10:29:30AM +0200, Paolo Bonzini wrote:
> Just use $targetos always.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  configure | 18 ++++++------------
>  1 file changed, 6 insertions(+), 12 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With 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 :|



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

* Re: [PATCH 03/10] configure: remove HOST_CC
  2023-08-29  8:29 ` [PATCH 03/10] configure: remove HOST_CC Paolo Bonzini
@ 2023-08-29 17:12   ` Daniel P. Berrangé
  2023-08-29 18:40   ` Richard Henderson
  1 sibling, 0 replies; 33+ messages in thread
From: Daniel P. Berrangé @ 2023-08-29 17:12 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Tue, Aug 29, 2023 at 10:29:24AM +0200, Paolo Bonzini wrote:
> $(HOST_CC) is only used to invoke the preprocessor, and $(CC) can be
> used instead now that there is a Tricore C compiler.  Remove the variable
> from config-host.mak.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  configure                                 | 1 -
>  tests/tcg/tricore/Makefile.softmmu-target | 2 +-
>  2 files changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With 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 :|



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

* Re: [PATCH 04/10] configure: create native file with contents of $host_cc
  2023-08-29  8:29 ` [PATCH 04/10] configure: create native file with contents of $host_cc Paolo Bonzini
  2023-08-29 16:54   ` Peter Maydell
@ 2023-08-29 17:14   ` Daniel P. Berrangé
  2023-08-31  8:26     ` Paolo Bonzini
  2023-08-29 18:45   ` Richard Henderson
  2 siblings, 1 reply; 33+ messages in thread
From: Daniel P. Berrangé @ 2023-08-29 17:14 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Tue, Aug 29, 2023 at 10:29:25AM +0200, Paolo Bonzini wrote:
> The argument of --host-cc is not obeyed when cross compiling.  To avoid
> this issue, place it in a configuration file and pass it to meson
> with --native-file.
> 
> While at it, clarify that --host-cc is not obeyed anyway when _not_
> cross compiling.

I presume that's refering to this piece of code

if test -z "${CC}${cross_prefix}"; then
  cc="$host_cc"
else
  cc="${CC-${cross_prefix}gcc}"
fi

which is using $host_cc *before* --host-cc is processed, thus
meaning it is always at its default value of 'cc'.

Perhaps the above code snippet should just be changed to

  if test -z "${CC}${cross_prefix}"; then
    cc="cc"
  else
    cc="${CC-${cross_prefix}gcc}"
  fi

to make it clear that we were not intending to honour the
--host-cc value for this code.

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

None the less, this patch is correct, so with or without
that above change:

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

> 
> diff --git a/configure b/configure
> index 3423f008d5c..b2bc1ff5f7b 100755
> --- a/configure
> +++ b/configure
> @@ -922,7 +922,7 @@ Advanced options (experts only):
>    --cross-prefix=PREFIX    use PREFIX for compile tools, PREFIX can be blank [$cross_prefix]
>    --cc=CC                  use C compiler CC [$cc]
>    --host-cc=CC             use C compiler CC [$host_cc] for code run at
> -                           build time
> +                           build time when cross compiling
>    --cxx=CXX                use C++ compiler CXX [$cxx]
>    --objcc=OBJCC            use Objective-C compiler OBJCC [$objcc]
>    --extra-cflags=CFLAGS    append extra C compiler flags CFLAGS
> @@ -1886,7 +1886,6 @@ if test "$skip_meson" = no; then
>    echo "windres = [$(meson_quote $windres)]" >> $cross
>    echo "windmc = [$(meson_quote $windmc)]" >> $cross
>    if test "$cross_compile" = "yes"; then
> -    cross_arg="--cross-file config-meson.cross"
>      echo "[host_machine]" >> $cross
>      echo "system = '$targetos'" >> $cross
>      case "$cpu" in
> @@ -1903,6 +1902,14 @@ if test "$skip_meson" = no; then
>      else
>          echo "endian = 'little'" >> $cross
>      fi
> +    cross_arg="--cross-file config-meson.cross"
> +
> +    native="config-meson.native.new"
> +    echo "# Automatically generated by configure - do not modify" > $native
> +    echo "[binaries]" >> $native
> +    echo "c = [$(meson_quote $host_cc)]" >> $native
> +    mv $native config-meson.native
> +    cross_arg="$cross_arg --native-file config-meson.native"
>    else
>      cross_arg="--native-file config-meson.cross"
>    fi
> -- 
> 2.41.0
> 
> 

With 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 :|



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

* Re: [PATCH 01/10] meson: do not unnecessarily use cmake for dependencies
  2023-08-29  8:29 ` [PATCH 01/10] meson: do not unnecessarily use cmake for dependencies Paolo Bonzini
@ 2023-08-29 17:14   ` Daniel P. Berrangé
  0 siblings, 0 replies; 33+ messages in thread
From: Daniel P. Berrangé @ 2023-08-29 17:14 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Tue, Aug 29, 2023 at 10:29:22AM +0200, Paolo Bonzini wrote:
> Both gvnc and sysprof-capture come with pkg-config files, so specify
> the method to find them.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  tests/migration/meson.build | 2 +-
>  tests/qtest/meson.build     | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With 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 :|



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

* Re: [PATCH 06/10] contrib/plugins: use an independent makefile
  2023-08-29  8:29 ` [PATCH 06/10] contrib/plugins: use an independent makefile Paolo Bonzini
@ 2023-08-29 17:16   ` Daniel P. Berrangé
  0 siblings, 0 replies; 33+ messages in thread
From: Daniel P. Berrangé @ 2023-08-29 17:16 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Tue, Aug 29, 2023 at 10:29:27AM +0200, Paolo Bonzini wrote:
> The initial reason to write this patch was to remove the last use of
> CONFIG_DEBUG_TCG from the makefiles; the flags to use to build TCG
> plugins are unrelated to --enable-debug-tcg, and instead they should
> be the same as those used to build emulators (the plugins are not build
> via meson for demonstration reasons only).
> 
> However, since contrib/plugins/Makefile is also the last case of doing
> a compilation job using config-host.mak, go a step further and make it
> use a completely separate configuration file, removing all references
> to compilers from the toplevel config-host.mak.  Clean up references to
> empty variables, and use .SECONDARY so that intermediate object files
> are not deleted.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  configure                | 12 +++++++++---
>  contrib/plugins/Makefile | 18 +++++++++---------
>  2 files changed, 18 insertions(+), 12 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

With 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 :|



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

* Re: [PATCH 03/10] configure: remove HOST_CC
  2023-08-29  8:29 ` [PATCH 03/10] configure: remove HOST_CC Paolo Bonzini
  2023-08-29 17:12   ` Daniel P. Berrangé
@ 2023-08-29 18:40   ` Richard Henderson
  1 sibling, 0 replies; 33+ messages in thread
From: Richard Henderson @ 2023-08-29 18:40 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

On 8/29/23 01:29, Paolo Bonzini wrote:
> $(HOST_CC) is only used to invoke the preprocessor, and $(CC) can be
> used instead now that there is a Tricore C compiler.  Remove the variable
> from config-host.mak.
> 
> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
> ---
>   configure                                 | 1 -
>   tests/tcg/tricore/Makefile.softmmu-target | 2 +-
>   2 files changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


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

* Re: [PATCH 04/10] configure: create native file with contents of $host_cc
  2023-08-29  8:29 ` [PATCH 04/10] configure: create native file with contents of $host_cc Paolo Bonzini
  2023-08-29 16:54   ` Peter Maydell
  2023-08-29 17:14   ` Daniel P. Berrangé
@ 2023-08-29 18:45   ` Richard Henderson
  2 siblings, 0 replies; 33+ messages in thread
From: Richard Henderson @ 2023-08-29 18:45 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

On 8/29/23 01:29, Paolo Bonzini wrote:
> The argument of --host-cc is not obeyed when cross compiling.  To avoid
> this issue, place it in a configuration file and pass it to meson
> with --native-file.
> 
> While at it, clarify that --host-cc is not obeyed anyway when_not_
> cross compiling.
> 
> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
> ---
>   configure | 11 +++++++++--
>   1 file changed, 9 insertions(+), 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


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

* Re: [PATCH 05/10] meson: compile bundled device trees
  2023-08-29  8:29 ` [PATCH 05/10] meson: compile bundled device trees Paolo Bonzini
  2023-08-29 14:25   ` Philippe Mathieu-Daudé
@ 2023-08-29 18:47   ` Richard Henderson
  1 sibling, 0 replies; 33+ messages in thread
From: Richard Henderson @ 2023-08-29 18:47 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

On 8/29/23 01:29, Paolo Bonzini wrote:
> If dtc is available, compile the .dts files in the pc-bios directory
> instead of using the precompiled binaries.
> 
> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
> ---
>   pc-bios/Makefile    | 19 -------------------
>   pc-bios/meson.build | 25 +++++++++++++++++++++----
>   2 files changed, 21 insertions(+), 23 deletions(-)
>   delete mode 100644 pc-bios/Makefile

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


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

* Re: [PATCH 05/10] meson: compile bundled device trees
  2023-08-29 14:25   ` Philippe Mathieu-Daudé
@ 2023-08-29 18:48     ` Richard Henderson
  0 siblings, 0 replies; 33+ messages in thread
From: Richard Henderson @ 2023-08-29 18:48 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Paolo Bonzini, qemu-devel

On 8/29/23 07:25, Philippe Mathieu-Daudé wrote:
> On 29/8/23 10:29, Paolo Bonzini wrote:
>> If dtc is available, compile the .dts files in the pc-bios directory
>> instead of using the precompiled binaries.
>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>>   pc-bios/Makefile    | 19 -------------------
>>   pc-bios/meson.build | 25 +++++++++++++++++++++----
>>   2 files changed, 21 insertions(+), 23 deletions(-)
>>   delete mode 100644 pc-bios/Makefile
> 
> 
>> +dtc = find_program('dtc', required: false)
>> +foreach f : [
>> +  'bamboo.dts',
>> +  'canyonlands.dts',
>> +  'petalogix-s3adsp1800.dts',
>> +  'petalogix-ml605.dts',
>> +]
>> +  out = fs.replace_suffix(f, '.dtb')
> 
> Does that work when building from read-only source directory?
> 
>> +  if dtc.found()
>> +    custom_target(f,
>> +        build_by_default: have_system,
>> +        input: files(f),
>> +        output: out,

Yes, because the output will be in the build directory, and installed from there,

>> +        install: get_option('install_blobs'),
>> +        install_dir: qemu_datadir,
>> +        command: [ dtc, '-I', 'dts', '-O', 'dtb', '-o', '@OUTPUT@', '@INPUT0@' ])
>> +  else
>> +    blobs += out

whereas the fallback case copies from the source directory.


r~

>> +  endif
>> +endforeach
>> +
>>   if get_option('install_blobs')
>>     install_data(blobs, install_dir: qemu_datadir)
>>   endif
> 
> 



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

* Re: [PATCH 10/10] configure: move --enable-debug-tcg to meson
  2023-08-29  8:29 ` [PATCH 10/10] configure: move --enable-debug-tcg to meson Paolo Bonzini
  2023-08-29 16:57   ` Peter Maydell
@ 2023-08-29 18:52   ` Richard Henderson
  2023-08-31  8:17   ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 33+ messages in thread
From: Richard Henderson @ 2023-08-29 18:52 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

On 8/29/23 01:29, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
> ---
>   configure                     | 11 +----------
>   meson.build                   |  3 ++-
>   meson_options.txt             |  2 ++
>   scripts/meson-buildoptions.sh |  3 +++
>   4 files changed, 8 insertions(+), 11 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


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

* Re: [PATCH 10/10] configure: move --enable-debug-tcg to meson
  2023-08-29  8:29 ` [PATCH 10/10] configure: move --enable-debug-tcg to meson Paolo Bonzini
  2023-08-29 16:57   ` Peter Maydell
  2023-08-29 18:52   ` Richard Henderson
@ 2023-08-31  8:17   ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 33+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-31  8:17 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

On 29/8/23 10:29, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   configure                     | 11 +----------
>   meson.build                   |  3 ++-
>   meson_options.txt             |  2 ++
>   scripts/meson-buildoptions.sh |  3 +++
>   4 files changed, 8 insertions(+), 11 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>



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

* Re: [PATCH 02/10] meson: update unsupported host/CPU messages
  2023-08-29 10:34   ` Daniel P. Berrangé
@ 2023-08-31  8:20     ` Paolo Bonzini
  2023-08-31  8:51       ` Daniel P. Berrangé
  0 siblings, 1 reply; 33+ messages in thread
From: Paolo Bonzini @ 2023-08-31  8:20 UTC (permalink / raw)
  To: Daniel P. Berrangé; +Cc: qemu-devel

On Tue, Aug 29, 2023 at 12:34 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
> I think I agree wrt to CPUs, but in the case of OS I think
> it is fairly accurate as-is.

Ok, I wanted to leave out the "*intends* to remove support" part,
which is too strong; but I agree that keeping some kind of "support
may go away in future releases unless you act" is a good idea.

Paolo



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

* Re: [PATCH 04/10] configure: create native file with contents of $host_cc
  2023-08-29 17:14   ` Daniel P. Berrangé
@ 2023-08-31  8:26     ` Paolo Bonzini
  0 siblings, 0 replies; 33+ messages in thread
From: Paolo Bonzini @ 2023-08-31  8:26 UTC (permalink / raw)
  To: Daniel P. Berrangé; +Cc: qemu-devel

On Tue, Aug 29, 2023 at 7:14 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> On Tue, Aug 29, 2023 at 10:29:25AM +0200, Paolo Bonzini wrote:
> > The argument of --host-cc is not obeyed when cross compiling.  To avoid
> > this issue, place it in a configuration file and pass it to meson
> > with --native-file.
> >
> > While at it, clarify that --host-cc is not obeyed anyway when _not_
> > cross compiling.
>
> I presume that's refering to this piece of code
>
> if test -z "${CC}${cross_prefix}"; then
>   cc="$host_cc"
> else
>   cc="${CC-${cross_prefix}gcc}"
> fi
>
> which is using $host_cc *before* --host-cc is processed, thus
> meaning it is always at its default value of 'cc'.

That, plus the fact that --native-file is only used in cross
compilation scenarios; when doing a native compilation there's no
difference between "native: true" and "native: false" as far as Meson
is concerned.

> Perhaps the above code snippet should just be changed to
>
>   if test -z "${CC}${cross_prefix}"; then
>     cc="cc"
>   else
>     cc="${CC-${cross_prefix}gcc}"
>   fi
>
> to make it clear that we were not intending to honour the
> --host-cc value for this code.

Since I have to send a v2 anyway for the (un)supported OS message,
I'll do the change.

Paolo



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

* Re: [PATCH 02/10] meson: update unsupported host/CPU messages
  2023-08-31  8:20     ` Paolo Bonzini
@ 2023-08-31  8:51       ` Daniel P. Berrangé
  0 siblings, 0 replies; 33+ messages in thread
From: Daniel P. Berrangé @ 2023-08-31  8:51 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Thu, Aug 31, 2023 at 10:20:26AM +0200, Paolo Bonzini wrote:
> On Tue, Aug 29, 2023 at 12:34 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
> > I think I agree wrt to CPUs, but in the case of OS I think
> > it is fairly accurate as-is.
> 
> Ok, I wanted to leave out the "*intends* to remove support" part,
> which is too strong; but I agree that keeping some kind of "support
> may go away in future releases unless you act" is a good idea.

Yeah, making the language a little more fuzzy would be ok.

With 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 :|



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

end of thread, other threads:[~2023-08-31  8:51 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-29  8:29 [PATCH 00/10] configure cleanups for QEMU 8.2 Paolo Bonzini
2023-08-29  8:29 ` [PATCH 01/10] meson: do not unnecessarily use cmake for dependencies Paolo Bonzini
2023-08-29 17:14   ` Daniel P. Berrangé
2023-08-29  8:29 ` [PATCH 02/10] meson: update unsupported host/CPU messages Paolo Bonzini
2023-08-29 10:34   ` Daniel P. Berrangé
2023-08-31  8:20     ` Paolo Bonzini
2023-08-31  8:51       ` Daniel P. Berrangé
2023-08-29  8:29 ` [PATCH 03/10] configure: remove HOST_CC Paolo Bonzini
2023-08-29 17:12   ` Daniel P. Berrangé
2023-08-29 18:40   ` Richard Henderson
2023-08-29  8:29 ` [PATCH 04/10] configure: create native file with contents of $host_cc Paolo Bonzini
2023-08-29 16:54   ` Peter Maydell
2023-08-29 17:14   ` Daniel P. Berrangé
2023-08-31  8:26     ` Paolo Bonzini
2023-08-29 18:45   ` Richard Henderson
2023-08-29  8:29 ` [PATCH 05/10] meson: compile bundled device trees Paolo Bonzini
2023-08-29 14:25   ` Philippe Mathieu-Daudé
2023-08-29 18:48     ` Richard Henderson
2023-08-29 18:47   ` Richard Henderson
2023-08-29  8:29 ` [PATCH 06/10] contrib/plugins: use an independent makefile Paolo Bonzini
2023-08-29 17:16   ` Daniel P. Berrangé
2023-08-29  8:29 ` [PATCH 07/10] meson: do not use config_host to pick tap implementations Paolo Bonzini
2023-08-29 14:26   ` Philippe Mathieu-Daudé
2023-08-29 17:05   ` Daniel P. Berrangé
2023-08-29  8:29 ` [PATCH 08/10] configure, meson: move simple OS definitions to meson Paolo Bonzini
2023-08-29 14:28   ` Philippe Mathieu-Daudé
2023-08-29  8:29 ` [PATCH 09/10] configure: remove $linux and $mingw32 variables Paolo Bonzini
2023-08-29 14:28   ` Philippe Mathieu-Daudé
2023-08-29 17:05   ` Daniel P. Berrangé
2023-08-29  8:29 ` [PATCH 10/10] configure: move --enable-debug-tcg to meson Paolo Bonzini
2023-08-29 16:57   ` Peter Maydell
2023-08-29 18:52   ` Richard Henderson
2023-08-31  8:17   ` Philippe Mathieu-Daudé

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.