Received: from eggs.gnu.org ([140.186.70.92]:33128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPg16-0001KR-AW for qemu-devel@nongnu.org; Thu, 26 May 2011 15:14:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QPg15-0002aa-Ik for qemu-devel@nongnu.org; Thu, 26 May 2011 15:14:44 -0400 Received: from fe01x03-cgp.akado.ru ([77.232.31.164]:62227 helo=akado.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPg15-0002aU-Bb for qemu-devel@nongnu.org; Thu, 26 May 2011 15:14:43 -0400 Date: Thu, 26 May 2011 23:14:40 +0400 (MSD) From: malc In-Reply-To: <4DDEA34C.4040304@linux.vnet.ibm.com> Message-ID: References: <4DDEA34C.4040304@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [Qemu-devel] [PATCH] host-pcc: enable building with -m32 or -m64 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Berger Cc: agraf@suse.de, qemu-devel@nongnu.org On Thu, 26 May 2011, Stefan Berger wrote: > With the below patch I can build either ppc (-m32) or ppc64 (-m64) versions of > Qemu (on a ppc64 host) when passing these compiler flags via 'configure ... > --extra-cflags="-m32"'. > > Signed-off-by: Stefan Berger > > --- > configure | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > Index: qemu-git/configure > =================================================================== > --- qemu-git.orig/configure > +++ qemu-git/configure > @@ -807,7 +807,14 @@ case "$cpu" in > arm*) > host_guest_base="yes" > ;; > - ppc*) > + ppc) > + QEMU_CFLAGS="-m32 $QEMU_CFLAGS" > + LDFLAGS="-m32 $LDFLAGS" > + host_guest_base="yes" > + ;; > + ppc64) > + QEMU_CFLAGS="-m64 $QEMU_CFLAGS" > + LDFLAGS="-m64 $LDFLAGS" > host_guest_base="yes" > ;; > mips*) > This isn't right, if one has particular toolchain and wants to build something that defaults to a different bitlength he should be able to do that, this patch attempts to outsmart the defaults and furthermore prevents one from overriding the settings. P.S. host-pcc... pcc? P.P.S. On the ppc64 machine i have, gcc defaults to 32bit and for a good reason - 64bit code is quite a bit slower when running typical workloads (64bit guest not being one of them though) -- mailto:av1474@comtv.ru