Skip to contentSkip to conversation

modules-test: ui-spice-app is not built as module

PATCH In review Paolo Bonzini 4 participants 5 messages Aug 22, 2019 – Aug 23, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 modules-test: ui-spice-app is not built as module

$(call land, $(CONFIG_SPICE), $(CONFIG_GIO)) will never return "m" so ui-spice-app is always linked into QEMU.

---
 tests/modules-test.c | 3 ---
 1 file changed, 3 deletions(-)
tests/modules-test.c +0 -3
index a8118e9..f9de3af 100644
@@ -53,9 +53,6 @@ int main(int argc, char *argv[])
 #ifdef CONFIG_SDL
         "ui-", "sdl",
 #endif
-#if defined(CONFIG_SPICE) && defined(CONFIG_GIO)
-        "ui-", "spice-app",
-#endif
     };
     int i;
 
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 5 lines · Paolo Bonzini

$(call land, $(CONFIG_SPICE), $(CONFIG_GIO)) will never return "m" so ui-spice-app is always linked into QEMU.

I would rather build the module:
-common-obj-$(call land,$(CONFIG_SPICE),$(CONFIG_GIO)) += spice-app.mo +ifeq ($(CONFIG_GIO)$(CONFIG_SPICE),yy)
+common-obj-$(if $(CONFIG_MODULES),m,y) += spice-app.mo +endif

Quoted 22 lines
---
 tests/modules-test.c | 3 ---
 1 file changed, 3 deletions(-)
tests/modules-test.c +0 -4
index a8118e9..f9de3af 100644
@@ -53,9 +53,6 @@ int main(int argc, char *argv[])
 #ifdef CONFIG_SDL
         "ui-", "sdl",
 #endif
-#if defined(CONFIG_SPICE) && defined(CONFIG_GIO)
-        "ui-", "spice-app",
-#endif
     };
     int i;
 
--

1.8.3.1

Signature · 1 line
Marc-André Lureau
#2 lore raw

Review

Quoted 12 lines · Marc-André Lureau
Quoted 5 lines · Paolo Bonzini

$(call land, $(CONFIG_SPICE), $(CONFIG_GIO)) will never return "m" so ui-spice-app is always linked into QEMU.

I would rather build the module:

(quoted diff) +3 -1
-common-obj-$(call land,$(CONFIG_SPICE),$(CONFIG_GIO)) += spice-app.mo
+ifeq ($(CONFIG_GIO)$(CONFIG_SPICE),yy)
+common-obj-$(if $(CONFIG_MODULES),m,y) += spice-app.mo
+endif

That would not be a quick patch that Peter can apply to fix the build...

Paolo

Reviewed-by on v1 1/1
#3 lore raw
In reply to Paolo Bonzini
Quoted 26 lines · Paolo Bonzini

$(call land, $(CONFIG_SPICE), $(CONFIG_GIO)) will never return "m" so ui-spice-app is always linked into QEMU.

---
 tests/modules-test.c | 3 ---
 1 file changed, 3 deletions(-)
tests/modules-test.c +0 -3
index a8118e9..f9de3af 100644
@@ -53,9 +53,6 @@ int main(int argc, char *argv[])
 #ifdef CONFIG_SDL
         "ui-", "sdl",
 #endif
-#if defined(CONFIG_SPICE) && defined(CONFIG_GIO)
-        "ui-", "spice-app",
-#endif
     };
     int i;
 
Signature · 1 line
1.8.3.1

Making make check pass again for me.

#4 lore raw
In reply to Paolo Bonzini
Quoted 14 lines · Paolo Bonzini

$(call land, $(CONFIG_SPICE), $(CONFIG_GIO)) will never return "m" so ui-spice-app is always linked into QEMU.

---
 tests/modules-test.c | 3 ---
 1 file changed, 3 deletions(-)
tests/modules-test.c +0 -0
index a8118e9..f9de3af 100644

tests/modules-test.c int main(int argc, char *argv[]) · line 57

Quoted 8 lines
tests/modules-test.c +0 -3
@@ -53,9 +53,6 @@ int main(int argc, char *argv[])
 #ifdef CONFIG_SDL
         "ui-", "sdl",
 #endif
-#if defined(CONFIG_SPICE) && defined(CONFIG_GIO)
-        "ui-", "spice-app",
-#endif
     };
     int i;

I've applied this to master as a build fix for the moment, thanks. We can properly build the module and revert this bit as the longer-term fix.

thanks
-- PMM