Received: from [140.186.70.92] (port=52297 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7kwt-0005tF-Sn for qemu-devel@nongnu.org; Thu, 07 Apr 2011 04:52:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7kwr-00064a-LP for qemu-devel@nongnu.org; Thu, 07 Apr 2011 04:52:18 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:34467) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7kwr-00063P-EV for qemu-devel@nongnu.org; Thu, 07 Apr 2011 04:52:17 -0400 Received: by pzk36 with SMTP id 36so1076358pzk.4 for ; Thu, 07 Apr 2011 01:52:15 -0700 (PDT) Message-ID: <4D9D7B39.7030003@ozlabs.ru> Date: Thu, 07 Apr 2011 18:52:09 +1000 From: Alexey Kardashevskiy MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/5] ppce500_mpc8544ds: Fix compile with --enable-debug and --disable-kvm References: <1302145325-4634-1-git-send-email-david@gibson.dropbear.id.au> <1302145325-4634-2-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: qemu-devel@nongnu.org, David Gibson On 07.04.2011 18:42, Alexander Graf wrote: > On 07.04.2011, at 05:02, David Gibson wrote: > >> From: Alexey Kardashevskiy >> >> 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. alexey.