configs: disable emulators that require it if libfdt is not found

Since boards can express their dependency on libfdt and
system/device_tree.c, only leave TARGET_NEED_FDT if the target has a
hard dependency.

Those emulators will be skipped if libfdt is disabled, or if it
is "auto" and not found and --disable-download is passed; unless
the target is mentioned explicitly in --target-list, in which case
the build will fail.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2024-05-08 09:25:48 +02:00
parent 47771d6756
commit 9b089d254a
16 changed files with 19 additions and 9 deletions

View file

@ -3058,7 +3058,11 @@ foreach target : target_dirs
config_target += { 'TARGET_' + config_target['TARGET_ARCH'].to_upper(): 'y' }
if 'TARGET_NEED_FDT' in config_target and not fdt.found()
fdt_required += target
if default_targets
warning('Disabling ' + target + ' due to missing libfdt')
else
fdt_required += target
endif
continue
endif