From: Pierrick Bouvier Date: Thu, 22 Jan 2026 19:58:46 +0000 (-0800) Subject: meson: fix build of qemu-system-microblaze with --enable-modules X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8eff45dfe93b34b1a027bd22fd8dffe6424f480d;p=thirdparty%2Fqemu.git 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é 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 --- diff --git a/meson.build b/meson.build index 668f1aa919..cc0dfed066 100644 --- a/meson.build +++ b/meson.build @@ -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