[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 07/13] meson.build: Fix the check for a usable libfdt
From: |
Thomas Huth |
Subject: |
[PULL 07/13] meson.build: Fix the check for a usable libfdt |
Date: |
Thu, 2 Sep 2021 14:49:05 +0200 |
The check for libfdt currently has a flaw: If there is a system libfdt, the
meson.build code initialized the fdt variable with fdt = cc.find_library(...).
However, if this libfdt is too old and there is no internal dtc module
available, it continues with "fdt" pointing to the old and unusable version.
The check later in the file that tries to detect whether libfdt is necessary
then fails to trigger:
if not fdt.found() and fdt_required.length() > 0
error('fdt not available but required by targets ' + ', '.join(fdt_required))
endif
The build fails then during compilation instead, which is of course bad
since this is quite confusing and already wasted quite some time of the user.
Thus if libfdt is not usable, we should unset the "fdt" variable immediately
again, so that the build already fails during the configuration phase.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/255
Message-Id: <20210827120901.150276-2-thuth@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/meson.build b/meson.build
index bf63784812..6f7177428e 100644
--- a/meson.build
+++ b/meson.build
@@ -1916,6 +1916,7 @@ if have_system
fdt_opt = 'internal'
else
fdt_opt = 'disabled'
+ fdt = not_found
endif
endif
if fdt_opt == 'internal'
--
2.27.0
- [PULL 00/13] Testing, build system and misc patches, Thomas Huth, 2021/09/02
- [PULL 02/13] libqtest: check for g_setenv() failure, Thomas Huth, 2021/09/02
- [PULL 04/13] gitlab-ci: Remove superfluous "dnf install" statement, Thomas Huth, 2021/09/02
- [PULL 03/13] gitlab-ci: Merge "build-disabled" with "build-without-default-features", Thomas Huth, 2021/09/02
- [PULL 01/13] docs: add definitions of terms for CI/testing, Thomas Huth, 2021/09/02
- [PULL 08/13] meson.build: Don't use internal libfdt if the user requested the system libfdt, Thomas Huth, 2021/09/02
- [PULL 06/13] gitlab-ci: Don't try to use the system libfdt in the debian job, Thomas Huth, 2021/09/02
- [PULL 05/13] gitlab-ci: Fix ..._RUNNER_AVAILABLE variables and document them, Thomas Huth, 2021/09/02
- [PULL 07/13] meson.build: Fix the check for a usable libfdt,
Thomas Huth <=
- [PULL 11/13] softmmu/vl: Add a "grab-mod" parameter to the -display sdl option, Thomas Huth, 2021/09/02
- [PULL 12/13] softmmu/vl: Deprecate the old grab options, Thomas Huth, 2021/09/02
- [PULL 09/13] configure / meson: Move the GBM handling to meson.build, Thomas Huth, 2021/09/02
- [PULL 13/13] softmmu/vl: Deprecate the -sdl and -curses option, Thomas Huth, 2021/09/02
- [PULL 10/13] scripts: Remove the "show-fixed-bugs.sh" file, Thomas Huth, 2021/09/02
- Re: [PULL 00/13] Testing, build system and misc patches, Peter Maydell, 2021/09/03