diff mbox series

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

Message ID 1566495734-23297-2-git-send-email-pbonzini@redhat.com (mailing list archive)
State New, archived
Headers show
Series modules-test: ui-spice-app is not built as module | expand

Commit Message

Paolo Bonzini Aug. 22, 2019, 5:42 p.m. UTC
$(call land, $(CONFIG_SPICE), $(CONFIG_GIO)) will never return "m" so
ui-spice-app is always linked into QEMU.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 tests/modules-test.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Marc-André Lureau Aug. 23, 2019, 7:32 a.m. UTC | #1
On Thu, Aug 22, 2019 at 9:43 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> $(call land, $(CONFIG_SPICE), $(CONFIG_GIO)) will never return "m" so
> ui-spice-app is always linked into QEMU.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

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



> ---
>  tests/modules-test.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/tests/modules-test.c b/tests/modules-test.c
> index a8118e9..f9de3af 100644
> --- a/tests/modules-test.c
> +++ b/tests/modules-test.c
> @@ -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
>
>
Paolo Bonzini Aug. 23, 2019, 12:03 p.m. UTC | #2
On 23/08/19 09:32, Marc-André Lureau wrote:
> On Thu, Aug 22, 2019 at 9:43 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>>
>> $(call land, $(CONFIG_SPICE), $(CONFIG_GIO)) will never return "m" so
>> ui-spice-app is always linked into QEMU.
>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> 
> 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

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

Paolo
Miroslav Rezanina Aug. 23, 2019, 12:32 p.m. UTC | #3
On Thu, Aug 22, 2019 at 07:42:14PM +0200, Paolo Bonzini wrote:
> $(call land, $(CONFIG_SPICE), $(CONFIG_GIO)) will never return "m" so
> ui-spice-app is always linked into QEMU.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  tests/modules-test.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/tests/modules-test.c b/tests/modules-test.c
> index a8118e9..f9de3af 100644
> --- a/tests/modules-test.c
> +++ b/tests/modules-test.c
> @@ -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
> 
>

Making make check pass again for me.

Reviewed-by: Miroslav Rezanina <mrezanin@redhat.com>
Peter Maydell Aug. 23, 2019, 2:13 p.m. UTC | #4
On Thu, 22 Aug 2019 at 18:42, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> $(call land, $(CONFIG_SPICE), $(CONFIG_GIO)) will never return "m" so
> ui-spice-app is always linked into QEMU.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  tests/modules-test.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/tests/modules-test.c b/tests/modules-test.c
> index a8118e9..f9de3af 100644
> --- a/tests/modules-test.c
> +++ b/tests/modules-test.c
> @@ -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
diff mbox series

Patch

diff --git a/tests/modules-test.c b/tests/modules-test.c
index a8118e9..f9de3af 100644
--- a/tests/modules-test.c
+++ b/tests/modules-test.c
@@ -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;