All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Small meson updates for QEMU 7.2
@ 2022-09-27  9:59 Paolo Bonzini
  2022-09-27  9:59 ` [PATCH 1/5] ui: fix path to dbus-display1.h Paolo Bonzini
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Paolo Bonzini @ 2022-09-27  9:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: marcandre.lureau

Update Meson to 0.61.5 to fix a few longstanding issues:
- `checkinstall` on Debian Bullseye fails with `FileNotFoundError:` (#848)
- Meson warns about a broken Python install on Debian/Ubuntu (#873)
- dbus-display must be built as a module

Paolo Bonzini (5):
  ui: fix path to dbus-display1.h
  meson: require 0.61.3
  meson: multiple names can be passed to dependency()
  configure, meson: move C++ compiler detection to meson.build
  configure, meson: move linker flag detection to meson

 configure                       | 75 +--------------------------------
 meson                           |  2 +-
 meson.build                     | 67 +++++++++++++++++++----------
 qga/meson.build                 |  2 +-
 scripts/main.c                  |  1 +
 tests/qtest/dbus-display-test.c |  2 +-
 ui/dbus.h                       |  2 +-
 7 files changed, 50 insertions(+), 101 deletions(-)
 create mode 100644 scripts/main.c

-- 
2.37.3



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

* [PATCH 1/5] ui: fix path to dbus-display1.h
  2022-09-27  9:59 [PATCH 0/5] Small meson updates for QEMU 7.2 Paolo Bonzini
@ 2022-09-27  9:59 ` Paolo Bonzini
  2022-09-27 10:38   ` Marc-André Lureau
  2022-09-27  9:59 ` [PATCH 2/5] meson: require 0.61.3 Paolo Bonzini
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 15+ messages in thread
From: Paolo Bonzini @ 2022-09-27  9:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: marcandre.lureau

While the source directory is always included in the include path,
the corresponding directory in the build tree is not.  Therefore,
custom_targets (e.g. ui/dbus-display1.h) must be referred to using
the full path.

This avoids a build failure when ui/dbus-chardev.c is not built as
a module:

In file included from ../ui/dbus-chardev.c:32:
../ui/dbus.h:34:10: fatal error: dbus-display1.h: No such file or directory
   34 | #include "dbus-display1.h"
      |          ^~~~~~~~~~~~~~~~~

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 tests/qtest/dbus-display-test.c | 2 +-
 ui/dbus.h                       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/qtest/dbus-display-test.c b/tests/qtest/dbus-display-test.c
index 8be5974763..cb1b62d1d1 100644
--- a/tests/qtest/dbus-display-test.c
+++ b/tests/qtest/dbus-display-test.c
@@ -3,7 +3,7 @@
 #include <gio/gio.h>
 #include <gio/gunixfdlist.h>
 #include "libqtest.h"
-#include "dbus-display1.h"
+#include "ui/dbus-display1.h"
 
 static GDBusConnection*
 test_dbus_p2p_from_fd(int fd)
diff --git a/ui/dbus.h b/ui/dbus.h
index c001c11f70..9c149e7b41 100644
--- a/ui/dbus.h
+++ b/ui/dbus.h
@@ -31,7 +31,7 @@
 #include "ui/console.h"
 #include "ui/clipboard.h"
 
-#include "dbus-display1.h"
+#include "ui/dbus-display1.h"
 
 typedef struct DBusClipboardRequest {
     GDBusMethodInvocation *invocation;
-- 
2.37.3



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

* [PATCH 2/5] meson: require 0.61.3
  2022-09-27  9:59 [PATCH 0/5] Small meson updates for QEMU 7.2 Paolo Bonzini
  2022-09-27  9:59 ` [PATCH 1/5] ui: fix path to dbus-display1.h Paolo Bonzini
@ 2022-09-27  9:59 ` Paolo Bonzini
  2022-09-27 10:54   ` Marc-André Lureau
  2022-09-27  9:59 ` [PATCH 3/5] meson: multiple names can be passed to dependency() Paolo Bonzini
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 15+ messages in thread
From: Paolo Bonzini @ 2022-09-27  9:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: marcandre.lureau

This removes the dependency of dbus-display on --enable-modules.  It also allows
cleanups in modinfo collection and allows moving C++ compiler detection to
meson.build.

Because it is now deprecated to use install_subdir to create an empty directory,
replace it with install_emptydir.

Updating the Meson submodule to 0.61.5 also removes the message

    WARNING: Broken python installation detected. Python files installed
    by Meson might not be found by python interpreter.

unless using system meson is forced with --meson.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/873
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/848
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure       | 2 +-
 meson           | 2 +-
 meson.build     | 5 +----
 qga/meson.build | 2 +-
 4 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/configure b/configure
index a963e6afb3..680d96d09f 100755
--- a/configure
+++ b/configure
@@ -1114,7 +1114,7 @@ fi
 python="$python -B"
 
 if test -z "$meson"; then
-    if test "$explicit_python" = no && has meson && version_ge "$(meson --version)" 0.59.3; then
+    if test "$explicit_python" = no && has meson && version_ge "$(meson --version)" 0.61.5; then
         meson=meson
     elif test "$git_submodules_action" != 'ignore' ; then
         meson=git
diff --git a/meson b/meson
index 12f9f04ba0..3a9b285a55 160000
--- a/meson
+++ b/meson
@@ -1 +1 @@
-Subproject commit 12f9f04ba0decfda425dbbf9a501084c153a2d18
+Subproject commit 3a9b285a55b91b53b2acda987192274352ecb5be
diff --git a/meson.build b/meson.build
index 1f6634d4cd..8be01ba1c3 100644
--- a/meson.build
+++ b/meson.build
@@ -1,4 +1,4 @@
-project('qemu', ['c'], meson_version: '>=0.59.3',
+project('qemu', ['c'], meson_version: '>=0.61.3',
         default_options: ['warning_level=1', 'c_std=gnu11', 'cpp_std=gnu++11', 'b_colorout=auto',
                           'b_staticpic=false', 'stdsplit=false', 'optimization=2', 'b_pie=true'],
         version: files('VERSION'))
@@ -1669,12 +1669,9 @@ endif
 have_host_block_device = (targetos != 'darwin' or
     cc.has_header('IOKit/storage/IOMedia.h'))
 
-# FIXME enable_modules shouldn't be necessary, but: https://github.com/mesonbuild/meson/issues/8333
 dbus_display = get_option('dbus_display') \
   .require(gio.version().version_compare('>=2.64'),
            error_message: '-display dbus requires glib>=2.64') \
-  .require(enable_modules,
-           error_message: '-display dbus requires --enable-modules') \
   .require(gdbus_codegen.found(),
            error_message: '-display dbus requires gdbus-codegen') \
   .require(opengl.found() and gbm.found(),
diff --git a/qga/meson.build b/qga/meson.build
index 65c1e93846..a0ffd6d268 100644
--- a/qga/meson.build
+++ b/qga/meson.build
@@ -138,7 +138,7 @@ else
   if get_option('guest_agent_msi').enabled()
     error('MSI guest agent package is available only for MinGW Windows cross-compilation')
   endif
-  install_subdir('run', install_dir: get_option('localstatedir'))
+  install_emptydir(get_option('localstatedir') / 'run')
 endif
 
 alias_target('qemu-ga', all_qga)
-- 
2.37.3



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

* [PATCH 3/5] meson: multiple names can be passed to dependency()
  2022-09-27  9:59 [PATCH 0/5] Small meson updates for QEMU 7.2 Paolo Bonzini
  2022-09-27  9:59 ` [PATCH 1/5] ui: fix path to dbus-display1.h Paolo Bonzini
  2022-09-27  9:59 ` [PATCH 2/5] meson: require 0.61.3 Paolo Bonzini
@ 2022-09-27  9:59 ` Paolo Bonzini
  2022-09-27 10:54   ` Marc-André Lureau
  2022-09-27  9:59 ` [PATCH 4/5] configure, meson: move C++ compiler detection to meson.build Paolo Bonzini
  2022-09-27  9:59 ` [PATCH 5/5] configure, meson: move linker flag detection to meson Paolo Bonzini
  4 siblings, 1 reply; 15+ messages in thread
From: Paolo Bonzini @ 2022-09-27  9:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: marcandre.lureau

This is new in Meson 0.60.0.

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

diff --git a/meson.build b/meson.build
index 8be01ba1c3..e1700d1d55 100644
--- a/meson.build
+++ b/meson.build
@@ -825,14 +825,10 @@ if have_system and get_option('curses').allowed()
     }'''
 
   curses_dep_list = targetos == 'windows' ? ['ncurses', 'ncursesw'] : ['ncursesw']
-  foreach curses_dep : curses_dep_list
-    if not curses.found()
-      curses = dependency(curses_dep,
-                          required: false,
-                          method: 'pkg-config',
-                          kwargs: static_kwargs)
-    endif
-  endforeach
+  curses = dependency(curses_dep_list,
+                      required: false,
+                      method: 'pkg-config',
+                      kwargs: static_kwargs)
   msg = get_option('curses').enabled() ? 'curses library not found' : ''
   curses_compile_args = ['-DNCURSES_WIDECHAR=1']
   if curses.found()
-- 
2.37.3



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

* [PATCH 4/5] configure, meson: move C++ compiler detection to meson.build
  2022-09-27  9:59 [PATCH 0/5] Small meson updates for QEMU 7.2 Paolo Bonzini
                   ` (2 preceding siblings ...)
  2022-09-27  9:59 ` [PATCH 3/5] meson: multiple names can be passed to dependency() Paolo Bonzini
@ 2022-09-27  9:59 ` Paolo Bonzini
  2022-09-27 11:00   ` Marc-André Lureau
  2022-09-28 16:25   ` Richard Henderson
  2022-09-27  9:59 ` [PATCH 5/5] configure, meson: move linker flag detection to meson Paolo Bonzini
  4 siblings, 2 replies; 15+ messages in thread
From: Paolo Bonzini @ 2022-09-27  9:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: marcandre.lureau

The test is slightly weaker than before, because it does not
call an extern "C" function from a C source file.  However,
in practice what we seek to detect is ABI compatibility of the
various sanitizer flags, and for that it is enough to compile
anything with CC and link it with CXX.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure      | 57 --------------------------------------------------
 meson.build    | 37 ++++++++++++++++++++++----------
 scripts/main.c |  1 +
 3 files changed, 27 insertions(+), 68 deletions(-)
 create mode 100644 scripts/main.c

diff --git a/configure b/configure
index 680d96d09f..0a6f57c371 100755
--- a/configure
+++ b/configure
@@ -75,7 +75,6 @@ fi
 TMPB="qemu-conf"
 TMPC="${TMPDIR1}/${TMPB}.c"
 TMPO="${TMPDIR1}/${TMPB}.o"
-TMPCXX="${TMPDIR1}/${TMPB}.cxx"
 TMPM="${TMPDIR1}/${TMPB}.m"
 TMPE="${TMPDIR1}/${TMPB}.exe"
 
@@ -158,10 +157,6 @@ do_cc() {
     do_compiler_werror "$cc" $CPU_CFLAGS "$@"
 }
 
-do_cxx() {
-    do_compiler_werror "$cxx" $CPU_CFLAGS "$@"
-}
-
 do_objc() {
     do_compiler_werror "$objcc" $CPU_CFLAGS "$@"
 }
@@ -171,24 +166,6 @@ add_to() {
     eval $1=\${$1:+\"\$$1 \"}\$2
 }
 
-update_cxxflags() {
-    # Set QEMU_CXXFLAGS from QEMU_CFLAGS by filtering out those
-    # options which some versions of GCC's C++ compiler complain about
-    # because they only make sense for C programs.
-    QEMU_CXXFLAGS="-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS"
-    CONFIGURE_CXXFLAGS=$(echo "$CONFIGURE_CFLAGS" | sed s/-std=gnu11/-std=gnu++11/)
-    for arg in $QEMU_CFLAGS; do
-        case $arg in
-            -Wstrict-prototypes|-Wmissing-prototypes|-Wnested-externs|\
-            -Wold-style-declaration|-Wold-style-definition|-Wredundant-decls)
-                ;;
-            *)
-                QEMU_CXXFLAGS=${QEMU_CXXFLAGS:+$QEMU_CXXFLAGS }$arg
-                ;;
-        esac
-    done
-}
-
 compile_object() {
   local_cflags="$1"
   do_cc $CFLAGS $EXTRA_CFLAGS $CONFIGURE_CFLAGS $QEMU_CFLAGS $local_cflags -c -o $TMPO $TMPC
@@ -2371,38 +2348,6 @@ fi
 #######################################
 # generate config-host.mak
 
-# Check that the C++ compiler exists and works with the C compiler.
-# All the QEMU_CXXFLAGS are based on QEMU_CFLAGS. Keep this at the end to don't miss any other that could be added.
-if has $cxx; then
-    cat > $TMPC <<EOF
-int c_function(void);
-int main(void) { return c_function(); }
-EOF
-
-    compile_object
-
-    cat > $TMPCXX <<EOF
-extern "C" {
-   int c_function(void);
-}
-int c_function(void) { return 42; }
-EOF
-
-    update_cxxflags
-
-    if do_cxx $CXXFLAGS $EXTRA_CXXFLAGS $CONFIGURE_CXXFLAGS $QEMU_CXXFLAGS -o $TMPE $TMPCXX $TMPO $QEMU_LDFLAGS; then
-        # C++ compiler $cxx works ok with C compiler $cc
-        :
-    else
-        echo "C++ compiler $cxx does not work with C compiler $cc"
-        echo "Disabling C++ specific optional code"
-        cxx=
-    fi
-else
-    echo "No C++ compiler available; disabling C++ specific optional code"
-    cxx=
-fi
-
 if ! (GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then
     exit 1
 fi
@@ -2486,7 +2431,6 @@ echo "MESON=$meson" >> $config_host_mak
 echo "NINJA=$ninja" >> $config_host_mak
 echo "CC=$cc" >> $config_host_mak
 echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
-echo "QEMU_CXXFLAGS=$QEMU_CXXFLAGS" >> $config_host_mak
 echo "QEMU_OBJCFLAGS=$QEMU_OBJCFLAGS" >> $config_host_mak
 echo "GLIB_CFLAGS=$glib_cflags" >> $config_host_mak
 echo "GLIB_LIBS=$glib_libs" >> $config_host_mak
@@ -2608,7 +2552,6 @@ if test "$skip_meson" = no; then
       echo "${a}-softmmu = '$c'" >> $cross
   done
 
-  test -z "$cxx" && echo "link_language = 'c'" >> $cross
   echo "[built-in options]" >> $cross
   echo "c_args = [$(meson_quote $CFLAGS $EXTRA_CFLAGS)]" >> $cross
   echo "cpp_args = [$(meson_quote $CXXFLAGS $EXTRA_CXXFLAGS)]" >> $cross
diff --git a/meson.build b/meson.build
index e1700d1d55..f57a60ac4c 100644
--- a/meson.build
+++ b/meson.build
@@ -180,7 +180,6 @@ endif
 ##################
 
 qemu_cflags = config_host['QEMU_CFLAGS'].split()
-qemu_cxxflags = config_host['QEMU_CXXFLAGS'].split()
 qemu_objcflags = config_host['QEMU_OBJCFLAGS'].split()
 qemu_ldflags = config_host['QEMU_LDFLAGS'].split()
 
@@ -194,7 +193,6 @@ endif
 
 if get_option('gprof')
   qemu_cflags += ['-p']
-  qemu_cxxflags += ['-p']
   qemu_objcflags += ['-p']
   qemu_ldflags += ['-p']
 endif
@@ -240,8 +238,33 @@ if get_option('fuzzing')
 endif
 
 add_global_arguments(qemu_cflags, native: false, language: ['c'])
-add_global_arguments(qemu_cxxflags, native: false, language: ['cpp'])
 add_global_arguments(qemu_objcflags, native: false, language: ['objc'])
+
+# Check that the C++ compiler exists and works with the C compiler.
+link_language = 'c'
+linker = cc
+qemu_cxxflags = []
+if add_languages('cpp', required: false, native: false)
+  cxx = meson.get_compiler('cpp')
+  add_global_arguments(['-D__STDC_LIMIT_MACROS', '-D__STDC_CONSTANT_MACROS', '-D__STDC_FORMAT_MACROS'],
+                       native: false, language: 'cpp')
+  foreach k: qemu_cflags
+    if k not in ['-Wstrict-prototypes', '-Wmissing-prototypes', '-Wnested-externs',
+                 '-Wold-style-declaration', '-Wold-style-definition', '-Wredundant-decls']
+      qemu_cxxflags += [k]
+    endif
+  endforeach
+  add_global_arguments(qemu_cxxflags, native: false, language: 'cpp')
+
+  if cxx.links(files('scripts/main.c'), args: qemu_cflags)
+    link_language = 'cpp'
+    linker = cxx
+  else
+    message('C++ compiler does not work with C compiler')
+    message('Disabling C++-specific optional code')
+  endif
+endif
+
 add_global_link_arguments(qemu_ldflags, native: false, language: ['c', 'cpp', 'objc'])
 
 if targetos == 'linux'
@@ -255,14 +278,6 @@ add_project_arguments('-iquote', '.',
                       '-iquote', meson.current_source_dir() / 'include',
                       language: ['c', 'cpp', 'objc'])
 
-link_language = meson.get_external_property('link_language', 'cpp')
-if link_language == 'cpp'
-  add_languages('cpp', required: true, native: false)
-  cxx = meson.get_compiler('cpp')
-  linker = cxx
-else
-  linker = cc
-endif
 if host_machine.system() == 'darwin'
   add_languages('objc', required: false, native: false)
 endif
diff --git a/scripts/main.c b/scripts/main.c
new file mode 100644
index 0000000000..b552c8e4ed
--- /dev/null
+++ b/scripts/main.c
@@ -0,0 +1 @@
+int main(void) {}
-- 
2.37.3



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

* [PATCH 5/5] configure, meson: move linker flag detection to meson
  2022-09-27  9:59 [PATCH 0/5] Small meson updates for QEMU 7.2 Paolo Bonzini
                   ` (3 preceding siblings ...)
  2022-09-27  9:59 ` [PATCH 4/5] configure, meson: move C++ compiler detection to meson.build Paolo Bonzini
@ 2022-09-27  9:59 ` Paolo Bonzini
  2022-09-27 11:02   ` Marc-André Lureau
  4 siblings, 1 reply; 15+ messages in thread
From: Paolo Bonzini @ 2022-09-27  9:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: marcandre.lureau

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure   | 16 ----------------
 meson.build | 13 +++++++++++++
 2 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/configure b/configure
index 0a6f57c371..e5f1eb6213 100755
--- a/configure
+++ b/configure
@@ -1342,12 +1342,10 @@ EOF
 if test "$static" = "yes"; then
   if test "$pie" != "no" && compile_prog "-Werror -fPIE -DPIE" "-static-pie"; then
     CONFIGURE_CFLAGS="-fPIE -DPIE $CONFIGURE_CFLAGS"
-    QEMU_LDFLAGS="-static-pie $QEMU_LDFLAGS"
     pie="yes"
   elif test "$pie" = "yes"; then
     error_exit "-static-pie not available due to missing toolchain support"
   else
-    QEMU_LDFLAGS="-static $QEMU_LDFLAGS"
     pie="no"
   fi
 elif test "$pie" = "no"; then
@@ -1369,12 +1367,6 @@ else
   pie="no"
 fi
 
-# Detect support for PT_GNU_RELRO + DT_BIND_NOW.
-# The combination is known as "full relro", because .got.plt is read-only too.
-if compile_prog "" "-Wl,-z,relro -Wl,-z,now" ; then
-  QEMU_LDFLAGS="-Wl,-z,relro -Wl,-z,now $QEMU_LDFLAGS"
-fi
-
 ##########################################
 # __sync_fetch_and_and requires at least -march=i486. Many toolchains
 # use i686 as default anyway, but for those that don't, an explicit
@@ -2247,14 +2239,6 @@ if test "$have_ubsan" = "yes"; then
 fi
 
 ##########################################
-
-# Exclude --warn-common with TSan to suppress warnings from the TSan libraries.
-if test "$solaris" = "no" && test "$tsan" = "no"; then
-    if $ld --version 2>/dev/null | grep "GNU ld" >/dev/null 2>/dev/null ; then
-        QEMU_LDFLAGS="-Wl,--warn-common $QEMU_LDFLAGS"
-    fi
-fi
-
 # Guest agent Windows MSI package
 
 if test "$QEMU_GA_MANUFACTURER" = ""; then
diff --git a/meson.build b/meson.build
index f57a60ac4c..f8c80a5b00 100644
--- a/meson.build
+++ b/meson.build
@@ -183,6 +183,14 @@ qemu_cflags = config_host['QEMU_CFLAGS'].split()
 qemu_objcflags = config_host['QEMU_OBJCFLAGS'].split()
 qemu_ldflags = config_host['QEMU_LDFLAGS'].split()
 
+if enable_static
+  qemu_ldflags += get_option('b_pie') ? '-static-pie' : '-static'
+endif
+
+# Detect support for PT_GNU_RELRO + DT_BIND_NOW.
+# The combination is known as "full relro", because .got.plt is read-only too.
+qemu_ldflags += cc.get_supported_link_arguments('-Wl,-z,relro', '-Wl,-z,now')
+
 if targetos == 'windows'
   qemu_ldflags += cc.get_supported_link_arguments('-Wl,--no-seh', '-Wl,--nxcompat')
   # Disable ASLR for debug builds to allow debugging with gdb
@@ -265,6 +273,11 @@ if add_languages('cpp', required: false, native: false)
   endif
 endif
 
+# Exclude --warn-common with TSan to suppress warnings from the TSan libraries.
+if targetos != 'sunos' and not config_host.has_key('CONFIG_TSAN')
+  qemu_ldflags += linker.get_supported_link_arguments('-Wl,--warn-common')
+endif
+
 add_global_link_arguments(qemu_ldflags, native: false, language: ['c', 'cpp', 'objc'])
 
 if targetos == 'linux'
-- 
2.37.3



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

* Re: [PATCH 1/5] ui: fix path to dbus-display1.h
  2022-09-27  9:59 ` [PATCH 1/5] ui: fix path to dbus-display1.h Paolo Bonzini
@ 2022-09-27 10:38   ` Marc-André Lureau
  0 siblings, 0 replies; 15+ messages in thread
From: Marc-André Lureau @ 2022-09-27 10:38 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Tue, Sep 27, 2022 at 1:59 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> While the source directory is always included in the include path,
> the corresponding directory in the build tree is not.  Therefore,
> custom_targets (e.g. ui/dbus-display1.h) must be referred to using
> the full path.
>
> This avoids a build failure when ui/dbus-chardev.c is not built as
> a module:
>
> In file included from ../ui/dbus-chardev.c:32:
> ../ui/dbus.h:34:10: fatal error: dbus-display1.h: No such file or directory
>    34 | #include "dbus-display1.h"
>       |          ^~~~~~~~~~~~~~~~~
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

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

> ---
>  tests/qtest/dbus-display-test.c | 2 +-
>  ui/dbus.h                       | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/qtest/dbus-display-test.c b/tests/qtest/dbus-display-test.c
> index 8be5974763..cb1b62d1d1 100644
> --- a/tests/qtest/dbus-display-test.c
> +++ b/tests/qtest/dbus-display-test.c
> @@ -3,7 +3,7 @@
>  #include <gio/gio.h>
>  #include <gio/gunixfdlist.h>
>  #include "libqtest.h"
> -#include "dbus-display1.h"
> +#include "ui/dbus-display1.h"
>
>  static GDBusConnection*
>  test_dbus_p2p_from_fd(int fd)
> diff --git a/ui/dbus.h b/ui/dbus.h
> index c001c11f70..9c149e7b41 100644
> --- a/ui/dbus.h
> +++ b/ui/dbus.h
> @@ -31,7 +31,7 @@
>  #include "ui/console.h"
>  #include "ui/clipboard.h"
>
> -#include "dbus-display1.h"
> +#include "ui/dbus-display1.h"
>
>  typedef struct DBusClipboardRequest {
>      GDBusMethodInvocation *invocation;
> --
> 2.37.3
>



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

* Re: [PATCH 2/5] meson: require 0.61.3
  2022-09-27  9:59 ` [PATCH 2/5] meson: require 0.61.3 Paolo Bonzini
@ 2022-09-27 10:54   ` Marc-André Lureau
  0 siblings, 0 replies; 15+ messages in thread
From: Marc-André Lureau @ 2022-09-27 10:54 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Tue, Sep 27, 2022 at 1:59 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> This removes the dependency of dbus-display on --enable-modules.  It also allows
> cleanups in modinfo collection and allows moving C++ compiler detection to
> meson.build.
>
> Because it is now deprecated to use install_subdir to create an empty directory,
> replace it with install_emptydir.
>
> Updating the Meson submodule to 0.61.5 also removes the message
>
>     WARNING: Broken python installation detected. Python files installed
>     by Meson might not be found by python interpreter.
>
> unless using system meson is forced with --meson.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/873
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/848
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

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



> ---
>  configure       | 2 +-
>  meson           | 2 +-
>  meson.build     | 5 +----
>  qga/meson.build | 2 +-
>  4 files changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/configure b/configure
> index a963e6afb3..680d96d09f 100755
> --- a/configure
> +++ b/configure
> @@ -1114,7 +1114,7 @@ fi
>  python="$python -B"
>
>  if test -z "$meson"; then
> -    if test "$explicit_python" = no && has meson && version_ge "$(meson --version)" 0.59.3; then
> +    if test "$explicit_python" = no && has meson && version_ge "$(meson --version)" 0.61.5; then
>          meson=meson
>      elif test "$git_submodules_action" != 'ignore' ; then
>          meson=git
> diff --git a/meson b/meson
> index 12f9f04ba0..3a9b285a55 160000
> --- a/meson
> +++ b/meson
> @@ -1 +1 @@
> -Subproject commit 12f9f04ba0decfda425dbbf9a501084c153a2d18
> +Subproject commit 3a9b285a55b91b53b2acda987192274352ecb5be
> diff --git a/meson.build b/meson.build
> index 1f6634d4cd..8be01ba1c3 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1,4 +1,4 @@
> -project('qemu', ['c'], meson_version: '>=0.59.3',
> +project('qemu', ['c'], meson_version: '>=0.61.3',
>          default_options: ['warning_level=1', 'c_std=gnu11', 'cpp_std=gnu++11', 'b_colorout=auto',
>                            'b_staticpic=false', 'stdsplit=false', 'optimization=2', 'b_pie=true'],
>          version: files('VERSION'))
> @@ -1669,12 +1669,9 @@ endif
>  have_host_block_device = (targetos != 'darwin' or
>      cc.has_header('IOKit/storage/IOMedia.h'))
>
> -# FIXME enable_modules shouldn't be necessary, but: https://github.com/mesonbuild/meson/issues/8333
>  dbus_display = get_option('dbus_display') \
>    .require(gio.version().version_compare('>=2.64'),
>             error_message: '-display dbus requires glib>=2.64') \
> -  .require(enable_modules,
> -           error_message: '-display dbus requires --enable-modules') \
>    .require(gdbus_codegen.found(),
>             error_message: '-display dbus requires gdbus-codegen') \
>    .require(opengl.found() and gbm.found(),
> diff --git a/qga/meson.build b/qga/meson.build
> index 65c1e93846..a0ffd6d268 100644
> --- a/qga/meson.build
> +++ b/qga/meson.build
> @@ -138,7 +138,7 @@ else
>    if get_option('guest_agent_msi').enabled()
>      error('MSI guest agent package is available only for MinGW Windows cross-compilation')
>    endif
> -  install_subdir('run', install_dir: get_option('localstatedir'))
> +  install_emptydir(get_option('localstatedir') / 'run')
>  endif
>
>  alias_target('qemu-ga', all_qga)
> --
> 2.37.3
>



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

* Re: [PATCH 3/5] meson: multiple names can be passed to dependency()
  2022-09-27  9:59 ` [PATCH 3/5] meson: multiple names can be passed to dependency() Paolo Bonzini
@ 2022-09-27 10:54   ` Marc-André Lureau
  0 siblings, 0 replies; 15+ messages in thread
From: Marc-André Lureau @ 2022-09-27 10:54 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Tue, Sep 27, 2022 at 1:59 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> This is new in Meson 0.60.0.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

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


> ---
>  meson.build | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index 8be01ba1c3..e1700d1d55 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -825,14 +825,10 @@ if have_system and get_option('curses').allowed()
>      }'''
>
>    curses_dep_list = targetos == 'windows' ? ['ncurses', 'ncursesw'] : ['ncursesw']
> -  foreach curses_dep : curses_dep_list
> -    if not curses.found()
> -      curses = dependency(curses_dep,
> -                          required: false,
> -                          method: 'pkg-config',
> -                          kwargs: static_kwargs)
> -    endif
> -  endforeach
> +  curses = dependency(curses_dep_list,
> +                      required: false,
> +                      method: 'pkg-config',
> +                      kwargs: static_kwargs)
>    msg = get_option('curses').enabled() ? 'curses library not found' : ''
>    curses_compile_args = ['-DNCURSES_WIDECHAR=1']
>    if curses.found()
> --
> 2.37.3
>



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

* Re: [PATCH 4/5] configure, meson: move C++ compiler detection to meson.build
  2022-09-27  9:59 ` [PATCH 4/5] configure, meson: move C++ compiler detection to meson.build Paolo Bonzini
@ 2022-09-27 11:00   ` Marc-André Lureau
  2022-09-28 16:25   ` Richard Henderson
  1 sibling, 0 replies; 15+ messages in thread
From: Marc-André Lureau @ 2022-09-27 11:00 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Tue, Sep 27, 2022 at 1:59 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The test is slightly weaker than before, because it does not
> call an extern "C" function from a C source file.  However,
> in practice what we seek to detect is ABI compatibility of the
> various sanitizer flags, and for that it is enough to compile
> anything with CC and link it with CXX.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

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


> ---
>  configure      | 57 --------------------------------------------------
>  meson.build    | 37 ++++++++++++++++++++++----------
>  scripts/main.c |  1 +
>  3 files changed, 27 insertions(+), 68 deletions(-)
>  create mode 100644 scripts/main.c
>
> diff --git a/configure b/configure
> index 680d96d09f..0a6f57c371 100755
> --- a/configure
> +++ b/configure
> @@ -75,7 +75,6 @@ fi
>  TMPB="qemu-conf"
>  TMPC="${TMPDIR1}/${TMPB}.c"
>  TMPO="${TMPDIR1}/${TMPB}.o"
> -TMPCXX="${TMPDIR1}/${TMPB}.cxx"
>  TMPM="${TMPDIR1}/${TMPB}.m"
>  TMPE="${TMPDIR1}/${TMPB}.exe"
>
> @@ -158,10 +157,6 @@ do_cc() {
>      do_compiler_werror "$cc" $CPU_CFLAGS "$@"
>  }
>
> -do_cxx() {
> -    do_compiler_werror "$cxx" $CPU_CFLAGS "$@"
> -}
> -
>  do_objc() {
>      do_compiler_werror "$objcc" $CPU_CFLAGS "$@"
>  }
> @@ -171,24 +166,6 @@ add_to() {
>      eval $1=\${$1:+\"\$$1 \"}\$2
>  }
>
> -update_cxxflags() {
> -    # Set QEMU_CXXFLAGS from QEMU_CFLAGS by filtering out those
> -    # options which some versions of GCC's C++ compiler complain about
> -    # because they only make sense for C programs.
> -    QEMU_CXXFLAGS="-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS"
> -    CONFIGURE_CXXFLAGS=$(echo "$CONFIGURE_CFLAGS" | sed s/-std=gnu11/-std=gnu++11/)
> -    for arg in $QEMU_CFLAGS; do
> -        case $arg in
> -            -Wstrict-prototypes|-Wmissing-prototypes|-Wnested-externs|\
> -            -Wold-style-declaration|-Wold-style-definition|-Wredundant-decls)
> -                ;;
> -            *)
> -                QEMU_CXXFLAGS=${QEMU_CXXFLAGS:+$QEMU_CXXFLAGS }$arg
> -                ;;
> -        esac
> -    done
> -}
> -
>  compile_object() {
>    local_cflags="$1"
>    do_cc $CFLAGS $EXTRA_CFLAGS $CONFIGURE_CFLAGS $QEMU_CFLAGS $local_cflags -c -o $TMPO $TMPC
> @@ -2371,38 +2348,6 @@ fi
>  #######################################
>  # generate config-host.mak
>
> -# Check that the C++ compiler exists and works with the C compiler.
> -# All the QEMU_CXXFLAGS are based on QEMU_CFLAGS. Keep this at the end to don't miss any other that could be added.
> -if has $cxx; then
> -    cat > $TMPC <<EOF
> -int c_function(void);
> -int main(void) { return c_function(); }
> -EOF
> -
> -    compile_object
> -
> -    cat > $TMPCXX <<EOF
> -extern "C" {
> -   int c_function(void);
> -}
> -int c_function(void) { return 42; }
> -EOF
> -
> -    update_cxxflags
> -
> -    if do_cxx $CXXFLAGS $EXTRA_CXXFLAGS $CONFIGURE_CXXFLAGS $QEMU_CXXFLAGS -o $TMPE $TMPCXX $TMPO $QEMU_LDFLAGS; then
> -        # C++ compiler $cxx works ok with C compiler $cc
> -        :
> -    else
> -        echo "C++ compiler $cxx does not work with C compiler $cc"
> -        echo "Disabling C++ specific optional code"
> -        cxx=
> -    fi
> -else
> -    echo "No C++ compiler available; disabling C++ specific optional code"
> -    cxx=
> -fi
> -
>  if ! (GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then
>      exit 1
>  fi
> @@ -2486,7 +2431,6 @@ echo "MESON=$meson" >> $config_host_mak
>  echo "NINJA=$ninja" >> $config_host_mak
>  echo "CC=$cc" >> $config_host_mak
>  echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
> -echo "QEMU_CXXFLAGS=$QEMU_CXXFLAGS" >> $config_host_mak
>  echo "QEMU_OBJCFLAGS=$QEMU_OBJCFLAGS" >> $config_host_mak
>  echo "GLIB_CFLAGS=$glib_cflags" >> $config_host_mak
>  echo "GLIB_LIBS=$glib_libs" >> $config_host_mak
> @@ -2608,7 +2552,6 @@ if test "$skip_meson" = no; then
>        echo "${a}-softmmu = '$c'" >> $cross
>    done
>
> -  test -z "$cxx" && echo "link_language = 'c'" >> $cross
>    echo "[built-in options]" >> $cross
>    echo "c_args = [$(meson_quote $CFLAGS $EXTRA_CFLAGS)]" >> $cross
>    echo "cpp_args = [$(meson_quote $CXXFLAGS $EXTRA_CXXFLAGS)]" >> $cross
> diff --git a/meson.build b/meson.build
> index e1700d1d55..f57a60ac4c 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -180,7 +180,6 @@ endif
>  ##################
>
>  qemu_cflags = config_host['QEMU_CFLAGS'].split()
> -qemu_cxxflags = config_host['QEMU_CXXFLAGS'].split()
>  qemu_objcflags = config_host['QEMU_OBJCFLAGS'].split()
>  qemu_ldflags = config_host['QEMU_LDFLAGS'].split()
>
> @@ -194,7 +193,6 @@ endif
>
>  if get_option('gprof')
>    qemu_cflags += ['-p']
> -  qemu_cxxflags += ['-p']
>    qemu_objcflags += ['-p']
>    qemu_ldflags += ['-p']
>  endif
> @@ -240,8 +238,33 @@ if get_option('fuzzing')
>  endif
>
>  add_global_arguments(qemu_cflags, native: false, language: ['c'])
> -add_global_arguments(qemu_cxxflags, native: false, language: ['cpp'])
>  add_global_arguments(qemu_objcflags, native: false, language: ['objc'])
> +
> +# Check that the C++ compiler exists and works with the C compiler.
> +link_language = 'c'
> +linker = cc
> +qemu_cxxflags = []
> +if add_languages('cpp', required: false, native: false)
> +  cxx = meson.get_compiler('cpp')
> +  add_global_arguments(['-D__STDC_LIMIT_MACROS', '-D__STDC_CONSTANT_MACROS', '-D__STDC_FORMAT_MACROS'],
> +                       native: false, language: 'cpp')
> +  foreach k: qemu_cflags
> +    if k not in ['-Wstrict-prototypes', '-Wmissing-prototypes', '-Wnested-externs',
> +                 '-Wold-style-declaration', '-Wold-style-definition', '-Wredundant-decls']
> +      qemu_cxxflags += [k]
> +    endif
> +  endforeach
> +  add_global_arguments(qemu_cxxflags, native: false, language: 'cpp')
> +
> +  if cxx.links(files('scripts/main.c'), args: qemu_cflags)
> +    link_language = 'cpp'
> +    linker = cxx
> +  else
> +    message('C++ compiler does not work with C compiler')
> +    message('Disabling C++-specific optional code')
> +  endif
> +endif
> +
>  add_global_link_arguments(qemu_ldflags, native: false, language: ['c', 'cpp', 'objc'])
>
>  if targetos == 'linux'
> @@ -255,14 +278,6 @@ add_project_arguments('-iquote', '.',
>                        '-iquote', meson.current_source_dir() / 'include',
>                        language: ['c', 'cpp', 'objc'])
>
> -link_language = meson.get_external_property('link_language', 'cpp')
> -if link_language == 'cpp'
> -  add_languages('cpp', required: true, native: false)
> -  cxx = meson.get_compiler('cpp')
> -  linker = cxx
> -else
> -  linker = cc
> -endif
>  if host_machine.system() == 'darwin'
>    add_languages('objc', required: false, native: false)
>  endif
> diff --git a/scripts/main.c b/scripts/main.c
> new file mode 100644
> index 0000000000..b552c8e4ed
> --- /dev/null
> +++ b/scripts/main.c
> @@ -0,0 +1 @@
> +int main(void) {}
> --
> 2.37.3
>



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

* Re: [PATCH 5/5] configure, meson: move linker flag detection to meson
  2022-09-27  9:59 ` [PATCH 5/5] configure, meson: move linker flag detection to meson Paolo Bonzini
@ 2022-09-27 11:02   ` Marc-André Lureau
  0 siblings, 0 replies; 15+ messages in thread
From: Marc-André Lureau @ 2022-09-27 11:02 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Tue, Sep 27, 2022 at 1:59 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

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


> ---
>  configure   | 16 ----------------
>  meson.build | 13 +++++++++++++
>  2 files changed, 13 insertions(+), 16 deletions(-)
>
> diff --git a/configure b/configure
> index 0a6f57c371..e5f1eb6213 100755
> --- a/configure
> +++ b/configure
> @@ -1342,12 +1342,10 @@ EOF
>  if test "$static" = "yes"; then
>    if test "$pie" != "no" && compile_prog "-Werror -fPIE -DPIE" "-static-pie"; then
>      CONFIGURE_CFLAGS="-fPIE -DPIE $CONFIGURE_CFLAGS"
> -    QEMU_LDFLAGS="-static-pie $QEMU_LDFLAGS"
>      pie="yes"
>    elif test "$pie" = "yes"; then
>      error_exit "-static-pie not available due to missing toolchain support"
>    else
> -    QEMU_LDFLAGS="-static $QEMU_LDFLAGS"
>      pie="no"
>    fi
>  elif test "$pie" = "no"; then
> @@ -1369,12 +1367,6 @@ else
>    pie="no"
>  fi
>
> -# Detect support for PT_GNU_RELRO + DT_BIND_NOW.
> -# The combination is known as "full relro", because .got.plt is read-only too.
> -if compile_prog "" "-Wl,-z,relro -Wl,-z,now" ; then
> -  QEMU_LDFLAGS="-Wl,-z,relro -Wl,-z,now $QEMU_LDFLAGS"
> -fi
> -
>  ##########################################
>  # __sync_fetch_and_and requires at least -march=i486. Many toolchains
>  # use i686 as default anyway, but for those that don't, an explicit
> @@ -2247,14 +2239,6 @@ if test "$have_ubsan" = "yes"; then
>  fi
>
>  ##########################################
> -
> -# Exclude --warn-common with TSan to suppress warnings from the TSan libraries.
> -if test "$solaris" = "no" && test "$tsan" = "no"; then
> -    if $ld --version 2>/dev/null | grep "GNU ld" >/dev/null 2>/dev/null ; then
> -        QEMU_LDFLAGS="-Wl,--warn-common $QEMU_LDFLAGS"
> -    fi
> -fi
> -
>  # Guest agent Windows MSI package
>
>  if test "$QEMU_GA_MANUFACTURER" = ""; then
> diff --git a/meson.build b/meson.build
> index f57a60ac4c..f8c80a5b00 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -183,6 +183,14 @@ qemu_cflags = config_host['QEMU_CFLAGS'].split()
>  qemu_objcflags = config_host['QEMU_OBJCFLAGS'].split()
>  qemu_ldflags = config_host['QEMU_LDFLAGS'].split()
>
> +if enable_static
> +  qemu_ldflags += get_option('b_pie') ? '-static-pie' : '-static'
> +endif
> +
> +# Detect support for PT_GNU_RELRO + DT_BIND_NOW.
> +# The combination is known as "full relro", because .got.plt is read-only too.
> +qemu_ldflags += cc.get_supported_link_arguments('-Wl,-z,relro', '-Wl,-z,now')
> +
>  if targetos == 'windows'
>    qemu_ldflags += cc.get_supported_link_arguments('-Wl,--no-seh', '-Wl,--nxcompat')
>    # Disable ASLR for debug builds to allow debugging with gdb
> @@ -265,6 +273,11 @@ if add_languages('cpp', required: false, native: false)
>    endif
>  endif
>
> +# Exclude --warn-common with TSan to suppress warnings from the TSan libraries.
> +if targetos != 'sunos' and not config_host.has_key('CONFIG_TSAN')
> +  qemu_ldflags += linker.get_supported_link_arguments('-Wl,--warn-common')
> +endif
> +
>  add_global_link_arguments(qemu_ldflags, native: false, language: ['c', 'cpp', 'objc'])
>
>  if targetos == 'linux'
> --
> 2.37.3
>



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

* Re: [PATCH 4/5] configure, meson: move C++ compiler detection to meson.build
  2022-09-27  9:59 ` [PATCH 4/5] configure, meson: move C++ compiler detection to meson.build Paolo Bonzini
  2022-09-27 11:00   ` Marc-André Lureau
@ 2022-09-28 16:25   ` Richard Henderson
  2022-09-28 19:21     ` Paolo Bonzini
  1 sibling, 1 reply; 15+ messages in thread
From: Richard Henderson @ 2022-09-28 16:25 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: marcandre.lureau

On 9/27/22 02:59, Paolo Bonzini wrote:
> The test is slightly weaker than before, because it does not
> call an extern "C" function from a C source file.  However,
> in practice what we seek to detect is ABI compatibility of the
> various sanitizer flags, and for that it is enough to compile
> anything with CC and link it with CXX.

Maybe just wait a moment on this one?
We have patches on list to remove the last use of C++.



r~


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

* Re: [PATCH 4/5] configure, meson: move C++ compiler detection to meson.build
  2022-09-28 16:25   ` Richard Henderson
@ 2022-09-28 19:21     ` Paolo Bonzini
  2022-09-28 21:08       ` Richard Henderson
  0 siblings, 1 reply; 15+ messages in thread
From: Paolo Bonzini @ 2022-09-28 19:21 UTC (permalink / raw)
  To: Richard Henderson; +Cc: qemu-devel, Marc-André Lureau

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

Heh, I wanted to get it in for exactly that reason, so that a future revert
would not introduce the test in configure. But I guess having the patch out
there on the archives may also be enough.

Paolo

Il mer 28 set 2022, 18:25 Richard Henderson <richard.henderson@linaro.org>
ha scritto:

> On 9/27/22 02:59, Paolo Bonzini wrote:
> > The test is slightly weaker than before, because it does not
> > call an extern "C" function from a C source file.  However,
> > in practice what we seek to detect is ABI compatibility of the
> > various sanitizer flags, and for that it is enough to compile
> > anything with CC and link it with CXX.
>
> Maybe just wait a moment on this one?
> We have patches on list to remove the last use of C++.
>
>
>
> r~
>
>

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

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

* Re: [PATCH 4/5] configure, meson: move C++ compiler detection to meson.build
  2022-09-28 19:21     ` Paolo Bonzini
@ 2022-09-28 21:08       ` Richard Henderson
  2022-09-30  7:34         ` Paolo Bonzini
  0 siblings, 1 reply; 15+ messages in thread
From: Richard Henderson @ 2022-09-28 21:08 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, Marc-André Lureau

On 9/28/22 12:21, Paolo Bonzini wrote:
> Heh, I wanted to get it in for exactly that reason, so that a future revert would not 
> introduce the test in configure. But I guess having the patch out there on the archives 
> may also be enough.

Heh.  I suppose that's fair, being wary of reversion.


r~

> 
> Paolo
> 
> Il mer 28 set 2022, 18:25 Richard Henderson <richard.henderson@linaro.org 
> <mailto:richard.henderson@linaro.org>> ha scritto:
> 
>     On 9/27/22 02:59, Paolo Bonzini wrote:
>      > The test is slightly weaker than before, because it does not
>      > call an extern "C" function from a C source file.  However,
>      > in practice what we seek to detect is ABI compatibility of the
>      > various sanitizer flags, and for that it is enough to compile
>      > anything with CC and link it with CXX.
> 
>     Maybe just wait a moment on this one?
>     We have patches on list to remove the last use of C++.
> 
> 
> 
>     r~
> 



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

* Re: [PATCH 4/5] configure, meson: move C++ compiler detection to meson.build
  2022-09-28 21:08       ` Richard Henderson
@ 2022-09-30  7:34         ` Paolo Bonzini
  0 siblings, 0 replies; 15+ messages in thread
From: Paolo Bonzini @ 2022-09-30  7:34 UTC (permalink / raw)
  To: Richard Henderson; +Cc: qemu-devel, Marc-André Lureau

On Wed, Sep 28, 2022 at 11:08 PM Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 9/28/22 12:21, Paolo Bonzini wrote:
> > Heh, I wanted to get it in for exactly that reason, so that a future revert would not
> > introduce the test in configure. But I guess having the patch out there on the archives
> > may also be enough.
>
> Heh.  I suppose that's fair, being wary of reversion.

There's also a bit of C++ in the guest agent:

have_qga_vss = get_option('qga_vss') \
  .require(targetos == 'windows',
           error_message: 'VSS support requires Windows') \
  .require(link_language == 'cpp',
           error_message: 'VSS support requires a C++ compiler') \
...

so I included the patch in the pull request.

Paolo



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

end of thread, other threads:[~2022-09-30  7:36 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-27  9:59 [PATCH 0/5] Small meson updates for QEMU 7.2 Paolo Bonzini
2022-09-27  9:59 ` [PATCH 1/5] ui: fix path to dbus-display1.h Paolo Bonzini
2022-09-27 10:38   ` Marc-André Lureau
2022-09-27  9:59 ` [PATCH 2/5] meson: require 0.61.3 Paolo Bonzini
2022-09-27 10:54   ` Marc-André Lureau
2022-09-27  9:59 ` [PATCH 3/5] meson: multiple names can be passed to dependency() Paolo Bonzini
2022-09-27 10:54   ` Marc-André Lureau
2022-09-27  9:59 ` [PATCH 4/5] configure, meson: move C++ compiler detection to meson.build Paolo Bonzini
2022-09-27 11:00   ` Marc-André Lureau
2022-09-28 16:25   ` Richard Henderson
2022-09-28 19:21     ` Paolo Bonzini
2022-09-28 21:08       ` Richard Henderson
2022-09-30  7:34         ` Paolo Bonzini
2022-09-27  9:59 ` [PATCH 5/5] configure, meson: move linker flag detection to meson Paolo Bonzini
2022-09-27 11:02   ` 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.