]> git.proxmox.com Git - qemu.git/commitdiff
ppce500_mpc8544ds: Fix compile with --enable-debug and --disable-kvm
authorDavid Gibson <david@gibson.dropbear.id.au>
Fri, 8 Apr 2011 10:08:25 +0000 (20:08 +1000)
committerAlexander Graf <agraf@suse.de>
Fri, 8 Apr 2011 10:20:08 +0000 (12:20 +0200)
When configured with --enable-debug, we compile without optimization.
This means that the function mpc8544_copy_soc_cell() in ppce500_mpc8544ds.c
is not optimized out, even though it is never called without kvm.  That in
turn causes a link failure, because it calls the function
kvmppc_read_host_property() which is in kvm_ppc.o and therefore not
included in a --disable-kvm build.

This patch fixes the problem by providing a dummy stub for
kvmppc_read_host_property() in kvm_ppc.h when !CONFIG_KVM.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
target-ppc/kvm_ppc.h

index 5afb308477ae22eb521b528abf126ebe2284f209..45a1373b28130aa1f15ee256d862b82a0c2aa985 100644 (file)
 
 void kvmppc_init(void);
 void kvmppc_fdt_update(void *fdt);
+#ifndef CONFIG_KVM
+static inline int kvmppc_read_host_property(const char *node_path, const char *prop,
+                                            void *val, size_t len)
+{
+    assert(0);
+    return -ENOSYS;
+}
+#else
 int kvmppc_read_host_property(const char *node_path, const char *prop,
                                      void *val, size_t len);
+#endif
 
 uint32_t kvmppc_get_tbfreq(void);
 int kvmppc_get_hypercall(CPUState *env, uint8_t *buf, int buf_len);