QEMU-Devel Archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 2/4] kconfig: express dependency of individual boards on libfdt
Date: Tue, 7 May 2024 12:25:06 +0200	[thread overview]
Message-ID: <CABgObfYBuUj6fzSEf5XbvY99EVrCMUmPziafwQUNE6t4cpqndg@mail.gmail.com> (raw)
In-Reply-To: <db5af536-718b-48d8-9f82-57dc0ff9e74d@linaro.org>

On Tue, May 7, 2024 at 9:48 AM Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> On 7/5/24 09:19, Paolo Bonzini wrote:
> > Now that boards are enabled by default and the "CONFIG_FOO=y"
> > entries are gone from configs/devices/, there cannot be any more
> > a conflicts between the default contents of configs/devices/
> > and a failed "depends on" clause.
> >
> > With this change, each individual board or target can express
> > whether it needs FDT.  It can also include it in the
> > build via "select DEVICE_TREE", instead of having each hw/*/meson.build
> > file do it by hand, and this will bring in more components
> > such as CONFIG_GUEST_LOADER.
> >
> > This allows building non-microvm x86 emulators without having
> > libfdt available.
> >
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > ---
> >   meson.build               |  1 +
> >   Kconfig.host              |  3 +++
> >   hw/arm/Kconfig            |  5 +++++
> >   hw/arm/meson.build        |  2 +-
> >   hw/core/Kconfig           |  9 ++++++++-
> >   hw/core/meson.build       |  2 +-
> >   hw/i386/Kconfig           |  3 ++-
> >   hw/loongarch/Kconfig      |  3 ++-
> >   hw/loongarch/meson.build  |  2 +-
> >   hw/mips/Kconfig           |  1 +
> >   hw/mips/meson.build       |  2 +-
> >   hw/openrisc/Kconfig       |  2 ++
> >   hw/openrisc/meson.build   |  4 ++--
> >   hw/ppc/Kconfig            | 15 ++++++++-------
> >   hw/ppc/meson.build        |  4 +---
> >   hw/riscv/Kconfig          |  4 ++++
> >   hw/riscv/meson.build      |  2 +-
> >   hw/rx/Kconfig             |  3 ++-
> >   hw/xtensa/Kconfig         |  1 +
> >   system/meson.build        |  2 +-
> >   target/arm/Kconfig        |  2 ++
> >   target/microblaze/Kconfig |  1 +
> >   target/openrisc/Kconfig   |  1 +
> >   target/riscv/Kconfig      |  2 ++
> >   24 files changed, 54 insertions(+), 22 deletions(-)
>
>
> > diff --git a/hw/arm/meson.build b/hw/arm/meson.build
> > index 6808135c1f7..aefde0c69a3 100644
> > --- a/hw/arm/meson.build
> > +++ b/hw/arm/meson.build
> > @@ -1,5 +1,5 @@
> >   arm_ss = ss.source_set()
> > -arm_ss.add(files('boot.c'), fdt)
> > +arm_ss.add(files('boot.c'))
>
> Don't we need to add fdt includes path to CPPFLAGS?

Good catch! I thought it'd be done automatically for all dependencies
included in common_ss (system_ss is included in common_ss and lists
fdt as a dependency), but actually it needs a small tweak:

diff --git a/meson.build b/meson.build
index 24502f4ff6a..342df23269d 100644
--- a/meson.build
+++ b/meson.build
@@ -3898,7 +3898,7 @@ foreach target : target_dirs

   target_common = common_ss.apply(config_target, strict: false)
   objects = common_all.extract_objects(target_common.sources())
-  deps = target_common.dependencies()
+  arch_deps += target_common.dependencies()

   target_specific = specific_ss.apply(config_target, strict: false)
   arch_srcs += target_specific.sources()
@@ -3954,7 +3954,7 @@ foreach target : target_dirs
     emulator = executable(exe_name, exe['sources'],
                install: true,
                c_args: c_args,
-               dependencies: arch_deps + deps + exe['dependencies'],
+               dependencies: arch_deps + exe['dependencies'],
                objects: lib.extract_all_objects(recursive: true),
                link_depends: [block_syms, qemu_syms],
                link_args: link_args,

I'll include it in a v2 once I test it more fully.

Paolo



  reply	other threads:[~2024-05-07 10:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-07  7:19 [PATCH 0/4] express dependency of individual boards on libfdt Paolo Bonzini
2024-05-07  7:19 ` [PATCH 1/4] meson: remove system/internal distinction for libfdt Paolo Bonzini
2024-05-07  7:40   ` Philippe Mathieu-Daudé
2024-05-07  7:19 ` [PATCH 2/4] kconfig: express dependency of individual boards on libfdt Paolo Bonzini
2024-05-07  7:48   ` Philippe Mathieu-Daudé
2024-05-07 10:25     ` Paolo Bonzini [this message]
2024-05-07  7:19 ` [PATCH 3/4] hw/xtensa: require libfdt Paolo Bonzini
2024-05-07  7:34   ` Philippe Mathieu-Daudé
2024-05-07  7:19 ` [PATCH 4/4] configs: disable emulators that require it if libfdt is not found Paolo Bonzini
2024-05-07  7:51   ` Philippe Mathieu-Daudé

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=CABgObfYBuUj6fzSEf5XbvY99EVrCMUmPziafwQUNE6t4cpqndg@mail.gmail.com \
    --to=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).