When building with ACPI disabled, we get:
/usr/bin/ld: hw/i386/pc.o: in function `bochs_bios_init':
/source/qemu/hw/i386/pc.c:1017: undefined reference to `acpi_tables_len'
/usr/bin/ld: /source/qemu/hw/i386/pc.c:1017: undefined reference to `acpi_tables'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:204: qemu-system-x86_64] Error 1
These symbols are indeed declared as extern in "hw/acpi/acpi.h".
Add them as stub to satisfy the linker.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
stubs/acpi.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/stubs/acpi.c b/stubs/acpi.c
index 4c9d081ed48..cd0119f9fb1 100644
--- a/stubs/acpi.c
+++ b/stubs/acpi.c
@@ -23,6 +23,10 @@
#include "qapi/qmp/qerror.h"
#include "hw/acpi/acpi.h"
+size_t acpi_tables_len;
+
+char unsigned *acpi_tables;
+
void acpi_table_add(const QemuOpts *opts, Error **errp)
{
error_setg(errp, QERR_UNSUPPORTED);
--
2.20.1