From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:48189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPgD6-0005TT-0s for qemu-devel@nongnu.org; Thu, 26 May 2011 15:27:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QPgD5-00057S-3c for qemu-devel@nongnu.org; Thu, 26 May 2011 15:27:07 -0400 Received: from e9.ny.us.ibm.com ([32.97.182.139]:47302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPgD5-00057N-17 for qemu-devel@nongnu.org; Thu, 26 May 2011 15:27:07 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e9.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p4QIvGqf020492 for ; Thu, 26 May 2011 14:57:16 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p4QJR6Cr097626 for ; Thu, 26 May 2011 15:27:06 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p4QJR48B006539 for ; Thu, 26 May 2011 15:27:05 -0400 Message-ID: <4DDEA987.4030400@linux.vnet.ibm.com> Date: Thu, 26 May 2011 15:27:03 -0400 From: Stefan Berger MIME-Version: 1.0 References: <4DDEA34C.4040304@linux.vnet.ibm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: malc Cc: agraf@suse.de, qemu-devel@nongnu.org On 05/26/2011 03:14 PM, malc wrote: > 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) > Is it possible to change my ppc64 gcc compiler to produce 32bit binaries by default -- how? I'd like to test this case because for me not passing any parameters via --extra-cflags defaults to the ppc64 case above - obviously it will produce 64 bit binaries by default. -m32 then ends up in the ppc) case, -m64 again in the ppc64) case. Stefan