[Qemu-devel] [PATCH] modules-test: ui-spice-app is not built as module

Paolo Bonzini posted 1 patch 4 years, 8 months ago
Test docker-clang@ubuntu passed
Test FreeBSD passed
Test docker-mingw@fedora passed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1566495734-23297-2-git-send-email-pbonzini@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>
tests/modules-test.c | 3 ---
1 file changed, 3 deletions(-)
[Qemu-devel] [PATCH] modules-test: ui-spice-app is not built as module
Posted by Paolo Bonzini 4 years, 8 months ago
$(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


Re: [Qemu-devel] [PATCH] modules-test: ui-spice-app is not built as module
Posted by Miroslav Rezanina 4 years, 8 months ago
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> 

Re: [Qemu-devel] [PATCH] modules-test: ui-spice-app is not built as module
Posted by Peter Maydell 4 years, 8 months ago
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

Re: [Qemu-devel] [PATCH] modules-test: ui-spice-app is not built as module
Posted by Marc-André Lureau 4 years, 8 months ago
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
>
>


-- 
Marc-André Lureau

Re: [Qemu-devel] [PATCH] modules-test: ui-spice-app is not built as module
Posted by Paolo Bonzini 4 years, 8 months ago
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