qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/5] ppce500_mpc8544ds: Fix compile with --enabl


From: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH 1/5] ppce500_mpc8544ds: Fix compile with --enable-debug and --disable-kvm
Date: Thu, 7 Apr 2011 11:06:19 +0200

On 07.04.2011, at 10:52, Alexey Kardashevskiy wrote:

> On 07.04.2011 18:42, Alexander Graf wrote:
>> On 07.04.2011, at 05:02, David Gibson wrote:
>> 
>>> From: Alexey Kardashevskiy<address@hidden>
>>> 
>>> 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.
>> I'm not sure I can follow. So the problem is that we call 
>> kvmppc_read_host_property and don't provide a stub wrapper for it? Let's 
>> provide a wrapper then instead of crippling the target code :)
> 
> The problems exists only with --disable-kvm and --enable-debug. Without 
> --enable-debug, qemu is compiled with -O2, gcc detects that kvm_enabled() 
> always returns false and optimizes out mpc8544_copy_soc_cell calls which will 
> not be called anyway. With --enable-debug, the linker cannot find symbols 
> which it won't call anyway.

Ah, there is the kvm_enabled path. I would still find it a superior approach to 
provide a stub function for the missing call. Potentially, the target should be 
built without knowledge of config options.


Alex




reply via email to

[Prev in Thread] Current Thread [Next in Thread]