On 22.02.2009, at 16:16, Andreas Färber wrote:
Am 01.02.2009 um 13:06 schrieb Andreas Färber:
Am 26.01.2009 um 16:37 schrieb Anthony Liguori:
Revision: 6443
http://svn.sv.gnu.org/viewvc/?
view=rev&root=qemu&revision=6443
Author: aliguori
Date: 2009-01-26 15:37:40 +0000 (Mon, 26 Jan 2009)
Log Message:
-----------
Enabled building of x86_64 code on Mac OS X (Alexander Graf)
Mac OS X 10.5 supports 64-bit userspace on an x86_64 kernel and
by default uses 32-bit userspace applications, so the detection for
the host architecture fails.
This patch enabled building of x86_64 code on x86_64 capable CPUS
with Mac OS X.
Signed-off-by: Alexander Graf <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Modified Paths:
--------------
trunk/configure
Modified: trunk/configure
===================================================================
--- trunk/configure 2009-01-26 15:37:35 UTC (rev 6442)
+++ trunk/configure 2009-01-26 15:37:40 UTC (rev 6443)
@@ -243,11 +243,21 @@
Darwin)
bsd="yes"
darwin="yes"
+# on Leopard most of the system is 32-bit, so we have to ask the
kernel it if we can run 64-bit userspace code
+is_x86_64=`sysctl -n hw.optional.x86_64`
This results in an error message on OSX/ppc:
second level name optional in hw.optional.x86_64 is invalid
The attached patch silences this error output.
Andreas
<qemu-x64-ppc.diff>
My patch still applies cleanly against r6638. Please apply.
It's trivial, but in any case:
Silence x64 check on OSX/ppc.
The check for x86_64 on Mac OS X results in an error message on ppc:
second level name optional in hw.optional.x86_64 is invalid
Suppress this message by redirecting error output.
Signed-off-by: Andreas Faerber <address@hidden>
Acked-by: Alexander Graf <address@hidden>
I haven't compile tested it, but it looks pretty obvious :-).
Alex
---
diff --git a/configure b/configure
index c3fbbbe..dffed79 100755
--- a/configure
+++ b/configure
@@ -244,7 +244,7 @@ Darwin)
bsd="yes"
darwin="yes"
# on Leopard most of the system is 32-bit, so we have to ask the
kernel it if we can run 64-bit userspace code
-is_x86_64=`sysctl -n hw.optional.x86_64`
+is_x86_64=`sysctl -n hw.optional.x86_64 2>/dev/null`
if [ "$is_x86_64" = "1" ]; then
cpu=x86_64
fi