meson: fix build of qemu-system-microblaze with --enable-modules
PATCH 1/1 meson: fix build of qemu-system-microblaze with --enable-modules
A previous commit wrongly skipped including the generated modinfo in case hw_arch dictionary ends up being empty.
Fix that by adding an empty source set in dictionary in this case.
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3280
Fixes e8efe5ff4 (meson: Do not try to build module for empty per-target hw/ directory)
Signed-off-by Pierrick Bouvier <[email protected]>
--- meson.build | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
meson.build +5 -4
@@ -3958,10 +3958,6 @@ if enable_modules if target.endswith('-softmmu') config_target = config_target_mak[target] arch = config_target['TARGET_NAME'] == 'sparc64' ? 'sparc64' : config_target['TARGET_BASE_ARCH'] - if not hw_arch.has_key(arch) - continue - endif - config_devices_mak = target + '-config-devices.mak' modinfo_src = custom_target('modinfo-' + target + '.c', output: 'modinfo-' + target + '.c',
@@ -3971,6 +3967,11 @@ if enable_modules modinfo_lib = static_library('modinfo-' + target + '.c', modinfo_src) modinfo_dep = declare_dependency(link_with: modinfo_lib) + + if not hw_arch.has_key(arch) + hw_arch += {arch: ss.source_set()} + endif + hw_arch[arch].add(modinfo_dep) endif endforeach
Signature · 1 line
2.47.3