[PATCH 01/14] Makefile: Only build virtiofsd if system-mode is enabled

Philippe Mathieu-Daudé posted 14 patches 5 years, 11 months ago
Maintainers: Cornelia Huck <cohuck@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, David Hildenbrand <david@redhat.com>, Alistair Francis <Alistair.Francis@wdc.com>, Palmer Dabbelt <palmer@dabbelt.com>, Peter Maydell <peter.maydell@linaro.org>, Bastian Koppelmann <kbastian@mail.uni-paderborn.de>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <rth@twiddle.net>, David Gibson <david@gibson.dropbear.id.au>, Sagar Karandikar <sagark@eecs.berkeley.edu>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
There is a newer version of this series
[PATCH 01/14] Makefile: Only build virtiofsd if system-mode is enabled
Posted by Philippe Mathieu-Daudé 5 years, 11 months ago
Do not build the virtiofsd helper when configured with
--disable-system.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 7df22fcc5d..ed77b6e50b 100644
--- a/Makefile
+++ b/Makefile
@@ -346,8 +346,8 @@ vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json
 endif
 
 ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy)
-HELPERS-y += virtiofsd$(EXESUF)
-vhost-user-json-y += tools/virtiofsd/50-qemu-virtiofsd.json
+HELPERS-$(CONFIG_SOFTMMU) += virtiofsd$(EXESUF)
+vhost-user-json-$(CONFIG_SOFTMMU) += tools/virtiofsd/50-qemu-virtiofsd.json
 endif
 
 # Sphinx does not allow building manuals into the same directory as
-- 
2.21.1


Re: [PATCH 01/14] Makefile: Only build virtiofsd if system-mode is enabled
Posted by Laurent Vivier 5 years, 11 months ago
Le 13/03/2020 à 19:36, Philippe Mathieu-Daudé a écrit :
> Do not build the virtiofsd helper when configured with
> --disable-system.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 7df22fcc5d..ed77b6e50b 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -346,8 +346,8 @@ vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json
>  endif
>  
>  ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy)
> -HELPERS-y += virtiofsd$(EXESUF)
> -vhost-user-json-y += tools/virtiofsd/50-qemu-virtiofsd.json
> +HELPERS-$(CONFIG_SOFTMMU) += virtiofsd$(EXESUF)
> +vhost-user-json-$(CONFIG_SOFTMMU) += tools/virtiofsd/50-qemu-virtiofsd.json
>  endif
>  
>  # Sphinx does not allow building manuals into the same directory as
> 

Why don't you do that instead?

  ifeq
($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG)$(CONFIG_SOFTMMU),yyyy)

Thanks,
Laurent

Re: [PATCH 01/14] Makefile: Only build virtiofsd if system-mode is enabled
Posted by Richard Henderson 5 years, 10 months ago
On 3/13/20 3:28 PM, Laurent Vivier wrote:
>>  ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy)
>> -HELPERS-y += virtiofsd$(EXESUF)
>> -vhost-user-json-y += tools/virtiofsd/50-qemu-virtiofsd.json
>> +HELPERS-$(CONFIG_SOFTMMU) += virtiofsd$(EXESUF)
>> +vhost-user-json-$(CONFIG_SOFTMMU) += tools/virtiofsd/50-qemu-virtiofsd.json
...
> 
> Why don't you do that instead?
> 
>   ifeq
> ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG)$(CONFIG_SOFTMMU),yyyy)

Seconded.

r~

Re: [PATCH 01/14] Makefile: Only build virtiofsd if system-mode is enabled
Posted by Philippe Mathieu-Daudé 5 years, 10 months ago
On 3/15/20 8:40 PM, Richard Henderson wrote:
> On 3/13/20 3:28 PM, Laurent Vivier wrote:
>>>   ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy)
>>> -HELPERS-y += virtiofsd$(EXESUF)
>>> -vhost-user-json-y += tools/virtiofsd/50-qemu-virtiofsd.json
>>> +HELPERS-$(CONFIG_SOFTMMU) += virtiofsd$(EXESUF)
>>> +vhost-user-json-$(CONFIG_SOFTMMU) += tools/virtiofsd/50-qemu-virtiofsd.json
> ...
>>
>> Why don't you do that instead?
>>
>>    ifeq
>> ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG)$(CONFIG_SOFTMMU),yyyy)

This was my first option but checkpatch complained because it is 80 
chars long...

I also tried:

ifeq \
($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG)$(CONFIG_SOFTMMU),yyyy)

which is uglier and still too long.

Following qemu-bridge-helper syntax I also tried:

ifeq ($(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yy)
HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) += virtiofsd$(EXESUF)

which is also too long ¯\_(ツ)_/¯

If you accept checkpatch complain I can use the form you prefer :)

> 
> Seconded.
> 
> r~
> 


Re: [PATCH 01/14] Makefile: Only build virtiofsd if system-mode is enabled
Posted by Richard Henderson 5 years, 10 months ago
On 3/15/20 3:16 PM, Philippe Mathieu-Daudé wrote:
> On 3/15/20 8:40 PM, Richard Henderson wrote:
>> On 3/13/20 3:28 PM, Laurent Vivier wrote:
>>>>   ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy)
>>>> -HELPERS-y += virtiofsd$(EXESUF)
>>>> -vhost-user-json-y += tools/virtiofsd/50-qemu-virtiofsd.json
>>>> +HELPERS-$(CONFIG_SOFTMMU) += virtiofsd$(EXESUF)
>>>> +vhost-user-json-$(CONFIG_SOFTMMU) += tools/virtiofsd/50-qemu-virtiofsd.json
>> ...
>>>
>>> Why don't you do that instead?
>>>
>>>    ifeq
>>> ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG)$(CONFIG_SOFTMMU),yyyy)
> 
> This was my first option but checkpatch complained because it is 80 chars long...
> 
> I also tried:
> 
> ifeq \
> ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG)$(CONFIG_SOFTMMU),yyyy)
> 
> which is uglier and still too long.
> 
> Following qemu-bridge-helper syntax I also tried:
> 
> ifeq ($(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yy)
> HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) += virtiofsd$(EXESUF)
> 
> which is also too long ¯\_(ツ)_/¯
> 
> If you accept checkpatch complain I can use the form you prefer :)

Hmph.  Of the choices, I prefer the 80+ char line.


r~