Skip to contentSkip to conversation

hw/core: fix link error with --disable-fdt

PATCH In review Anthoine Bourgeois 2 participants 2 messages Mar 16, 2021 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/core: fix link error with --disable-fdt

The link error appends only with x86_64-softmmu as the only target.

Fixes a33ff6d2c6bd480fbab3bc9f748655a9269881eb ("hw/core: implement a

guest-loader to support static hypervisor guests")

---
 hw/core/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/core/meson.build +1 -1
index 9cd72edf51..5e61347779 100644
@@ -37,7 +37,7 @@ softmmu_ss.add(files(
   'clock-vmstate.c',
 ))
 
-softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('guest-loader.c'))
+softmmu_ss.add(when: ['CONFIG_TCG', 'CONFIG_FDT'], if_true: files('guest-loader.c'))
 
 specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files(
   'machine-qmp-cmds.c',
Signature · 1 line
2.27.0
#1 lore raw

Hi Anthoine,

Quoted 15 lines · Anthoine Bourgeois

The link error appends only with x86_64-softmmu as the only target.

Fixes a33ff6d2c6bd480fbab3bc9f748655a9269881eb ("hw/core: implement a

guest-loader to support static hypervisor guests")

---
 hw/core/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/core/meson.build +0 -0
index 9cd72edf51..5e61347779 100644

hw/core/meson.build softmmu_ss.add(files( · line 43

Quoted 8 lines
hw/core/meson.build +1 -1
@@ -37,7 +37,7 @@ softmmu_ss.add(files(
   'clock-vmstate.c',
 ))
 
-softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('guest-loader.c'))
+softmmu_ss.add(when: ['CONFIG_TCG', 'CONFIG_FDT'], if_true: files('guest-loader.c'))
 
 specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files(
   'machine-qmp-cmds.c',

I suggested this change first, but then figured it would be better to declare a Kconfig entry for guest-loader:
https://www.mail-archive.com/[email protected]/msg791755.html

Do you mind reviewing or testing it?

Thanks,

Phil.