From: Alexey Kardashevskiy <a...@ozlabs.ru> When configured with --enable-debug, the makefile does not use any optimization and compilation of hw/ppce500_mpc8544ds.c fails because gcc does not remove the never called without kvm function mpc8544_copy_soc_cell(), which will fail to link without the kvm code.
Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> Signed-off-by: David Gibson <da...@gibson.dropbear.id.au> --- hw/ppce500_mpc8544ds.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index b7670ae..33ded44 100644 --- a/hw/ppce500_mpc8544ds.c +++ b/hw/ppce500_mpc8544ds.c @@ -50,7 +50,7 @@ #define MPC8544_PCI_IO 0xE1000000 #define MPC8544_PCI_IOLEN 0x10000 -#ifdef CONFIG_FDT +#if defined(CONFIG_FDT) && defined(CONFIG_KVM) static int mpc8544_copy_soc_cell(void *fdt, const char *node, const char *prop) { uint32_t cell; @@ -81,7 +81,7 @@ static int mpc8544_load_device_tree(target_phys_addr_t addr, const char *kernel_cmdline) { int ret = -1; -#ifdef CONFIG_FDT +#if defined(CONFIG_FDT) && defined(CONFIG_KVM) uint32_t mem_reg_property[] = {0, ramsize}; char *filename; int fdt_size; -- 1.7.1