qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 5/5] meson: Do not use internal fdt library if user asked


From: Paolo Bonzini
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

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 via email to

[Prev in Thread] Current Thread [Next in Thread]