All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org,
	Kyle Evans <kevans@freebsd.org>,
	Richard Henderson <richard.henderson@linaro.org>,
	Laurent Vivier <laurent@vivier.eu>,
	Paolo Bonzini <pbonzini@redhat.com>, Warner Losh <imp@bsdimp.com>
Subject: Re: [PATCH 1/2] bsd-user: Only process meson rules on BSD host
Date: Mon, 27 Sep 2021 10:52:31 +0100	[thread overview]
Message-ID: <YVGUX6FZlFBhhgwn@redhat.com> (raw)
In-Reply-To: <20210926220103.1721355-2-f4bug@amsat.org>

On Mon, Sep 27, 2021 at 12:01:02AM +0200, Philippe Mathieu-Daudé wrote:
> Reported-by: Warner Losh <imp@bsdimp.com>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  bsd-user/meson.build | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/bsd-user/meson.build b/bsd-user/meson.build
> index 03695493408..a7607e1c884 100644
> --- a/bsd-user/meson.build
> +++ b/bsd-user/meson.build
> @@ -1,3 +1,7 @@
> +if not config_host.has_key('CONFIG_BSD')
> +  subdir_done()
> +endif
> +
>  bsd_user_ss.add(files(
>    'bsdload.c',
>    'elfload.c',

If we look at the big picture across the root meson.build, and this
meson.build we have


  bsd_user_ss = ss.source_set()

  ...

  bsd_user_ss.add(files(
    'bsdload.c',
    'elfload.c',
    'main.c',
    'mmap.c',
    'signal.c',
    'strace.c',
    'syscall.c',
    'uaccess.c',
  ))

  ...

  bsd_user_ss.add(files('gdbstub.c'))
  specific_ss.add_all(when: 'CONFIG_BSD_USER', if_true: bsd_user_ss)


So without this change, we're already correctly dropping bsd_user_ss
in its entirity, when not on BSD.

With this change, we're dropping some, but not all, of bsd_user_ss
files - gdbstub.c remains.

So this change on its own doesn't make a whole lot of sense.

If we look at linux-user/meson.build though things are more complex.
There we have alot of sub-dirs, and meson.biuld in those dirs adds
generators for various files. So conceivably skipping linux-user
will mean we won't auto-generate files we don't need on non-Linux.

With that in mind, I think it makes conceptual sense to have this
bsd-user/meson.build change, for the purpose of design consistency,
even if it doesn't have any real world benefit for bsd-user today.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



WARNING: multiple messages have this Message-ID (diff)
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: qemu-trivial@nongnu.org, Kyle Evans <kevans@freebsd.org>,
	Richard Henderson <richard.henderson@linaro.org>,
	qemu-devel@nongnu.org, Laurent Vivier <laurent@vivier.eu>,
	Paolo Bonzini <pbonzini@redhat.com>, Warner Losh <imp@bsdimp.com>
Subject: Re: [PATCH 1/2] bsd-user: Only process meson rules on BSD host
Date: Mon, 27 Sep 2021 10:52:31 +0100	[thread overview]
Message-ID: <YVGUX6FZlFBhhgwn@redhat.com> (raw)
In-Reply-To: <20210926220103.1721355-2-f4bug@amsat.org>

On Mon, Sep 27, 2021 at 12:01:02AM +0200, Philippe Mathieu-Daudé wrote:
> Reported-by: Warner Losh <imp@bsdimp.com>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  bsd-user/meson.build | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/bsd-user/meson.build b/bsd-user/meson.build
> index 03695493408..a7607e1c884 100644
> --- a/bsd-user/meson.build
> +++ b/bsd-user/meson.build
> @@ -1,3 +1,7 @@
> +if not config_host.has_key('CONFIG_BSD')
> +  subdir_done()
> +endif
> +
>  bsd_user_ss.add(files(
>    'bsdload.c',
>    'elfload.c',

If we look at the big picture across the root meson.build, and this
meson.build we have


  bsd_user_ss = ss.source_set()

  ...

  bsd_user_ss.add(files(
    'bsdload.c',
    'elfload.c',
    'main.c',
    'mmap.c',
    'signal.c',
    'strace.c',
    'syscall.c',
    'uaccess.c',
  ))

  ...

  bsd_user_ss.add(files('gdbstub.c'))
  specific_ss.add_all(when: 'CONFIG_BSD_USER', if_true: bsd_user_ss)


So without this change, we're already correctly dropping bsd_user_ss
in its entirity, when not on BSD.

With this change, we're dropping some, but not all, of bsd_user_ss
files - gdbstub.c remains.

So this change on its own doesn't make a whole lot of sense.

If we look at linux-user/meson.build though things are more complex.
There we have alot of sub-dirs, and meson.biuld in those dirs adds
generators for various files. So conceivably skipping linux-user
will mean we won't auto-generate files we don't need on non-Linux.

With that in mind, I think it makes conceptual sense to have this
bsd-user/meson.build change, for the purpose of design consistency,
even if it doesn't have any real world benefit for bsd-user today.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  parent reply	other threads:[~2021-09-27  9:52 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-26 22:01 [PATCH 0/2] user-mode: Avoid processing unnecessary meson rules Philippe Mathieu-Daudé
2021-09-26 22:01 ` Philippe Mathieu-Daudé
2021-09-26 22:01 ` [PATCH 1/2] bsd-user: Only process meson rules on BSD host Philippe Mathieu-Daudé
2021-09-26 22:01   ` Philippe Mathieu-Daudé
2021-09-26 23:08   ` Richard Henderson
2021-09-26 23:08     ` Richard Henderson
2021-09-26 23:31     ` Warner Losh
2021-09-26 23:31       ` Warner Losh
2021-09-27  5:24     ` Philippe Mathieu-Daudé
2021-09-27  5:24       ` Philippe Mathieu-Daudé
2021-10-05 19:16       ` Paolo Bonzini
2021-09-27  2:42   ` WANG Xuerui
2021-09-27  2:59     ` WANG Xuerui
2021-09-27  9:14   ` Peter Maydell
2021-09-27  9:14     ` Peter Maydell
2021-09-27  9:40     ` Philippe Mathieu-Daudé
2021-09-27  9:40       ` Philippe Mathieu-Daudé
2021-09-27  9:54       ` Peter Maydell
2021-09-27  9:54         ` Peter Maydell
2021-10-05 19:23         ` Paolo Bonzini
2021-10-05 18:28       ` Alex Bennée
2021-10-05 18:28         ` Alex Bennée
2021-09-27  9:52   ` Daniel P. Berrangé [this message]
2021-09-27  9:52     ` Daniel P. Berrangé
2021-09-27 10:07     ` Peter Maydell
2021-09-27 10:07       ` Peter Maydell
2021-09-27 10:53       ` Warner Losh
2021-09-27 10:53         ` Warner Losh
2021-10-05 19:26     ` Paolo Bonzini
2021-10-05 20:41       ` Laurent Vivier
2021-10-05 20:46         ` Warner Losh
2021-10-05 20:46           ` Warner Losh
2021-10-06  6:02           ` Laurent Vivier
2021-10-06  6:02             ` Laurent Vivier
2021-09-26 22:01 ` [PATCH 2/2] linux-user: Only process meson rules on Linux host Philippe Mathieu-Daudé
2021-09-26 22:01   ` Philippe Mathieu-Daudé
2021-09-27  2:42   ` WANG Xuerui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YVGUX6FZlFBhhgwn@redhat.com \
    --to=berrange@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=imp@bsdimp.com \
    --cc=kevans@freebsd.org \
    --cc=laurent@vivier.eu \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.