When ACPI is disabled, no ACPI code depends on IPMI,
so we don't need the stubs.
We need them when IPMI is enabled and ACPI disabled,
otherwise when using '--without-default-devices' we
get:
Undefined symbols for architecture arm64:
"_build_ipmi_dev_aml", referenced from:
_isa_ipmi_bt_class_init in hw_ipmi_isa_ipmi_bt.c.o
ld: symbol(s) not found for architecture arm64
Split the source set list to avoid a too long line.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/acpi/meson.build | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/hw/acpi/meson.build b/hw/acpi/meson.build
index 73f02b96912..76948cdd00d 100644
--- a/hw/acpi/meson.build
+++ b/hw/acpi/meson.build
@@ -26,12 +26,18 @@ acpi_ss.add(when: 'CONFIG_ACPI_PCIHP', if_false: files('acpi-pci-hotplug-stub.c'
acpi_ss.add(when: 'CONFIG_ACPI_VIOT', if_true: files('viot.c'))
acpi_ss.add(when: 'CONFIG_ACPI_ICH9', if_true: files('ich9.c', 'ich9_tco.c', 'ich9_timer.c'))
acpi_ss.add(when: 'CONFIG_ACPI_ERST', if_true: files('erst.c'))
-acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'), if_false: files('ipmi-stub.c'))
+acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'))
acpi_ss.add(when: 'CONFIG_PC', if_false: files('acpi-x86-stub.c'))
if have_tpm
acpi_ss.add(files('tpm.c'))
endif
-system_ss.add(when: 'CONFIG_ACPI', if_false: files('acpi-stub.c', 'aml-build-stub.c', 'ghes-stub.c', 'acpi_interface.c'))
+system_ss.add(when: 'CONFIG_ACPI', if_false: files(
+ 'acpi-stub.c',
+ 'acpi_interface.c',
+ 'aml-build-stub.c',
+ 'ghes-stub.c',
+ 'ipmi-stub.c',
+))
system_ss.add(when: 'CONFIG_ACPI_PCI_BRIDGE', if_false: files('pci-bridge-stub.c'))
system_ss.add_all(when: 'CONFIG_ACPI', if_true: acpi_ss)
system_ss.add(files('acpi-qmp-cmds.c'))
--
2.47.1
On 26/05/2025 13.23, Philippe Mathieu-Daudé wrote:
> When ACPI is disabled, no ACPI code depends on IPMI,
> so we don't need the stubs.
>
> We need them when IPMI is enabled and ACPI disabled,
> otherwise when using '--without-default-devices' we
> get:
>
> Undefined symbols for architecture arm64:
> "_build_ipmi_dev_aml", referenced from:
> _isa_ipmi_bt_class_init in hw_ipmi_isa_ipmi_bt.c.o
> ld: symbol(s) not found for architecture arm64
>
> Split the source set list to avoid a too long line.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/acpi/meson.build | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/hw/acpi/meson.build b/hw/acpi/meson.build
> index 73f02b96912..76948cdd00d 100644
> --- a/hw/acpi/meson.build
> +++ b/hw/acpi/meson.build
> @@ -26,12 +26,18 @@ acpi_ss.add(when: 'CONFIG_ACPI_PCIHP', if_false: files('acpi-pci-hotplug-stub.c'
> acpi_ss.add(when: 'CONFIG_ACPI_VIOT', if_true: files('viot.c'))
> acpi_ss.add(when: 'CONFIG_ACPI_ICH9', if_true: files('ich9.c', 'ich9_tco.c', 'ich9_timer.c'))
> acpi_ss.add(when: 'CONFIG_ACPI_ERST', if_true: files('erst.c'))
> -acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'), if_false: files('ipmi-stub.c'))
> +acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'))
> acpi_ss.add(when: 'CONFIG_PC', if_false: files('acpi-x86-stub.c'))
> if have_tpm
> acpi_ss.add(files('tpm.c'))
> endif
> -system_ss.add(when: 'CONFIG_ACPI', if_false: files('acpi-stub.c', 'aml-build-stub.c', 'ghes-stub.c', 'acpi_interface.c'))
> +system_ss.add(when: 'CONFIG_ACPI', if_false: files(
> + 'acpi-stub.c',
> + 'acpi_interface.c',
While you're at it, I think acpi_interface.c is always needed (it's also
added earlier in this file already when CONFIG_ACPI is enabled), so I think
this should rather go to a separate "system_ss.add(...)" line?
Thomas
> + 'aml-build-stub.c',
> + 'ghes-stub.c',
> + 'ipmi-stub.c',
> +))
> system_ss.add(when: 'CONFIG_ACPI_PCI_BRIDGE', if_false: files('pci-bridge-stub.c'))
> system_ss.add_all(when: 'CONFIG_ACPI', if_true: acpi_ss)
> system_ss.add(files('acpi-qmp-cmds.c'))
On 26/05/2025 13.55, Thomas Huth wrote:
> On 26/05/2025 13.23, Philippe Mathieu-Daudé wrote:
>> When ACPI is disabled, no ACPI code depends on IPMI,
>> so we don't need the stubs.
>>
>> We need them when IPMI is enabled and ACPI disabled,
>> otherwise when using '--without-default-devices' we
>> get:
>>
>> Undefined symbols for architecture arm64:
>> "_build_ipmi_dev_aml", referenced from:
>> _isa_ipmi_bt_class_init in hw_ipmi_isa_ipmi_bt.c.o
>> ld: symbol(s) not found for architecture arm64
>>
>> Split the source set list to avoid a too long line.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>> hw/acpi/meson.build | 10 ++++++++--
>> 1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/acpi/meson.build b/hw/acpi/meson.build
>> index 73f02b96912..76948cdd00d 100644
>> --- a/hw/acpi/meson.build
>> +++ b/hw/acpi/meson.build
>> @@ -26,12 +26,18 @@ acpi_ss.add(when: 'CONFIG_ACPI_PCIHP', if_false:
>> files('acpi-pci-hotplug-stub.c'
>> acpi_ss.add(when: 'CONFIG_ACPI_VIOT', if_true: files('viot.c'))
>> acpi_ss.add(when: 'CONFIG_ACPI_ICH9', if_true: files('ich9.c',
>> 'ich9_tco.c', 'ich9_timer.c'))
>> acpi_ss.add(when: 'CONFIG_ACPI_ERST', if_true: files('erst.c'))
>> -acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'), if_false:
>> files('ipmi-stub.c'))
>> +acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'))
>> acpi_ss.add(when: 'CONFIG_PC', if_false: files('acpi-x86-stub.c'))
>> if have_tpm
>> acpi_ss.add(files('tpm.c'))
>> endif
>> -system_ss.add(when: 'CONFIG_ACPI', if_false: files('acpi-stub.c', 'aml-
>> build-stub.c', 'ghes-stub.c', 'acpi_interface.c'))
>> +system_ss.add(when: 'CONFIG_ACPI', if_false: files(
>> + 'acpi-stub.c',
>> + 'acpi_interface.c',
>
> While you're at it, I think acpi_interface.c is always needed (it's also
> added earlier in this file already when CONFIG_ACPI is enabled), so I think
> this should rather go to a separate "system_ss.add(...)" line?
Or maybe it could rather get removed from the list here? ... it does not
look like it's really needed for the build at a quick glance...
Thomas
© 2016 - 2025 Red Hat, Inc.