diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2019-04-27 16:40:24 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-05-17 15:19:24 +0200 |
commit | 81c48dd79655296f5bf94823e8ac95902a8ac3e4 (patch) | |
tree | 0f90cb8335d6468d7da9bb64fb17d915f29fbfb6 /include | |
parent | f5e0a8f42fbc5c7c2b8c0720ee657aba6cc122fd (diff) | |
download | qemu-81c48dd79655296f5bf94823e8ac95902a8ac3e4.zip |
hw/i386/acpi: Add object_resolve_type_unambiguous to improve modularity
When building with CONFIG_Q35=n, we get:
LINK x86_64-softmmu/qemu-system-x86_64
/usr/bin/ld: hw/i386/acpi-build.o: in function `acpi_get_misc_info':
/source/qemu/hw/i386/acpi-build.c:243: undefined reference to `ich9_lpc_find'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:204: qemu-system-x86_64] Error 1
This is due to a dependency in acpi-build.c on the ICH9_LPC
(via ich9_lpc_find) and PIIX4_PM (via piix4_pm_find) devices.
To allow better modularity (compile acpi-build.c with only
Q35/ICH9 or ISAPC/PIIX4), refactor the similar helper as
object_resolve_type_unambiguous(). This way we relax the
linker dependencies and can build the x86 targets with a
selection of machines (instead of all of them).
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190427144025.22880-3-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/acpi/piix4.h | 2 | ||||
-rw-r--r-- | include/hw/i386/ich9.h | 2 |
2 files changed, 0 insertions, 4 deletions
diff --git a/include/hw/acpi/piix4.h b/include/hw/acpi/piix4.h index 57d7e1cda2..028bb53e3d 100644 --- a/include/hw/acpi/piix4.h +++ b/include/hw/acpi/piix4.h @@ -3,6 +3,4 @@ #define TYPE_PIIX4_PM "PIIX4_PM" -Object *piix4_pm_find(void); - #endif diff --git a/include/hw/i386/ich9.h b/include/hw/i386/ich9.h index 673d13d28f..046bcf33be 100644 --- a/include/hw/i386/ich9.h +++ b/include/hw/i386/ich9.h @@ -81,8 +81,6 @@ typedef struct ICH9LPCState { qemu_irq gsi[GSI_NUM_PINS]; } ICH9LPCState; -Object *ich9_lpc_find(void); - #define Q35_MASK(bit, ms_bit, ls_bit) \ ((uint##bit##_t)(((1ULL << ((ms_bit) + 1)) - 1) & ~((1ULL << ls_bit) - 1))) |