qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>, qemu-devel@nongnu.org
Cc: Thomas Huth <thuth@redhat.com>,
	Alexey Kardashevskiy <aik@ozlabs.ru>, Greg Kurz <groug@kaod.org>,
	qemu-ppc@nongnu.org,
	John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [RFC PATCH 5/5] meson: Do not use internal fdt library if user asked for the system one
Date: Wed, 12 May 2021 09:32:39 +0200	[thread overview]
Message-ID: <977f3fb8-3835-0cb3-aa73-bf4147a8ca58@redhat.com> (raw)
In-Reply-To: <20210511155354.3069141-6-philmd@redhat.com>

On 11/05/21 17:53, Philippe Mathieu-Daudé wrote:
> diff --git a/meson.build b/meson.build
> index 0b41ff41188..1ffb4bccdb2 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1612,7 +1612,7 @@
>          int main(void) { fdt_check_full(NULL, 0); return 0; }''',
>            dependencies: fdt)
>         fdt_opt = 'system'
> -    elif have_internal
> +    elif have_internal and fdt_opt in ['enabled', 'auto']
>         fdt_opt = 'internal'
>       else

This will disable FDT silently for --enable-fdt=system instead of failing
the build.  What about:

diff --git a/meson.build b/meson.build
index 60040cd7cf..efb38ca780 100644
--- a/meson.build
+++ b/meson.build
@@ -1610,11 +1610,18 @@ if have_system
      fdt = cc.find_library('fdt', kwargs: static_kwargs,
                            required: fdt_opt == 'system' or
                                      fdt_opt == 'enabled' and not have_internal)
-    if fdt.found() and cc.links('''
+    if fdt.found() and not cc.links('''
         #include <libfdt.h>
         #include <libfdt_env.h>
         int main(void) { fdt_check_full(NULL, 0); return 0; }''',
           dependencies: fdt)
+      if fdt_opt == 'system' or
+         fdt_opt == 'enabled' and not have_internal then
+        error('libfdt is too old, version 1.5.1 required')
+      endif
+      fdt = not_found
+    endif
+    if fdt.found()
        fdt_opt = 'system'
      elif have_internal
        fdt_opt = 'internal'


Paolo



  reply	other threads:[~2021-05-12  7:34 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 15:53 [RFC PATCH 0/5] buildsys: Do not use internal fdt library when asked for the system one Philippe Mathieu-Daudé
2021-05-11 15:53 ` [RFC PATCH 1/5] hw/mem/nvdimm: Use Kconfig 'imply' instead of 'depends on' Philippe Mathieu-Daudé
2021-05-12  2:24   ` David Gibson
2021-05-12  3:57     ` Philippe Mathieu-Daudé
2021-05-12  4:53       ` Thomas Huth
2021-05-12  5:08         ` Philippe Mathieu-Daudé
2021-05-12  5:30           ` Thomas Huth
2021-05-12  7:02         ` David Gibson
2021-05-13 15:20           ` Paolo Bonzini
2021-05-13 23:33             ` David Gibson
2021-05-12  8:02   ` Paolo Bonzini
2021-05-11 15:53 ` [RFC PATCH 2/5] Kconfig: Declare 'FDT' host symbol Philippe Mathieu-Daudé
2021-05-12  7:37   ` Paolo Bonzini
2021-05-11 15:53 ` [RFC PATCH 3/5] hw/ppc: Have pSeries depends on libfdt (via host Kconfig FDT symbol) Philippe Mathieu-Daudé
2021-05-12  2:27   ` David Gibson
2021-05-12  8:01     ` Paolo Bonzini
2021-05-13  3:46       ` David Gibson
2021-05-12  7:45   ` Paolo Bonzini
2021-05-12  8:27     ` Philippe Mathieu-Daudé
2021-05-11 15:53 ` [RFC PATCH 4/5] hw/ppc/fdt: Drop dependency on libfdt Philippe Mathieu-Daudé
2021-05-12  2:30   ` David Gibson
2021-05-12  7:59     ` Paolo Bonzini
2021-05-13  3:46       ` David Gibson
2021-05-13 15:26         ` Paolo Bonzini
2021-05-13 23:35           ` David Gibson
2021-05-14  5:29             ` Paolo Bonzini
2021-05-14  8:22               ` Philippe Mathieu-Daudé
2021-05-11 15:53 ` [RFC PATCH 5/5] meson: Do not use internal fdt library if user asked for the system one Philippe Mathieu-Daudé
2021-05-12  7:32   ` Paolo Bonzini [this message]
2021-05-11 15:57 ` [RFC PATCH 0/5] buildsys: Do not use internal fdt library when " Philippe Mathieu-Daudé
2021-05-12  3:56   ` Philippe Mathieu-Daudé
2021-05-12  7:34     ` Paolo Bonzini

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=977f3fb8-3835-0cb3-aa73-bf4147a8ca58@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aik@ozlabs.ru \
    --cc=david@gibson.dropbear.id.au \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=groug@kaod.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=thuth@redhat.com \
    /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 NNTP newsgroup(s).