qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] host-pcc: enable building with -m32 or -m64


From: Stefan Berger
Subject: Re: [Qemu-devel] [PATCH] host-pcc: enable building with -m32 or -m64
Date: Thu, 26 May 2011 15:27:03 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.10

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<address@hidden>

---
  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





reply via email to

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