qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/4] qom: Remove user-creatable objects from user emulation


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 3/4] qom: Remove user-creatable objects from user emulation
Date: Fri, 4 Feb 2022 17:14:47 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.5.1

On 4/2/22 16:56, Thomas Huth wrote:
On 04/02/2022 16.29, Philippe Mathieu-Daudé wrote:
user-mode don't use user-creatable objects. Restrict it to
sysemu / tools.

Add a stub to avoid a link failure with the global callback:

   /usr/bin/ld: libqom.fa(qom_object.c.o): in function `object_initialize_child_with_propsv':
   ../qom/object.c:578: undefined reference to `user_creatable_complete'
   /usr/bin/ld: libqom.fa(qom_object.c.o): in function `object_new_with_propv':
   ../qom/object.c:801: undefined reference to `user_creatable_complete'
   collect2: error: ld returned 1 exit status

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
  qom/meson.build           | 7 ++++++-
  qom/user_creatable-stub.c | 8 ++++++++
  tests/unit/meson.build    | 2 +-
  3 files changed, 15 insertions(+), 2 deletions(-)
  create mode 100644 qom/user_creatable-stub.c

diff --git a/qom/meson.build b/qom/meson.build
index 062a3789d8..afc60cc19d 100644
--- a/qom/meson.build
+++ b/qom/meson.build
@@ -2,9 +2,14 @@ qom_ss.add(genh)
  qom_ss.add(files(
    'container.c',
    'object.c',
-  'object_interfaces.c',
    'qom-qobject.c',
  ))
+if have_system or have_tools
+  qom_ss.add(files('object_interfaces.c'))
+else
+  qom_ss.add(files('user_creatable-stub.c'))
+endif

Could you please name the new file object_interfaces_stub.c, so that it is clear that they belong together?

Sure!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]