Skip to contentSkip to conversation

meson: fix build of qemu-system-microblaze with --enable-modules

PATCH New Pierrick Bouvier 1 participant 1 message Jan 22 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

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.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3280

Fixes e8efe5ff4 (meson: Do not try to build module for empty per-target hw/ directory)
---
 meson.build | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
meson.build +5 -4
index a84f14258b0..ca33b0f2ce1 100644
@@ -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