qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] [RESEND] Re: [Qemu-devel] [6443] Enabled building of x86_64


From: Alexander Graf
Subject: Re: [PATCH] [RESEND] Re: [Qemu-devel] [6443] Enabled building of x86_64 code on Mac OS X (Alexander Graf)
Date: Sun, 22 Feb 2009 20:24:20 +0100


On 22.02.2009, at 20:15, malc wrote:

On Sun, 22 Feb 2009, Andreas F?rber wrote:

[..snip..]

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

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



It does silence it, but it will also silence any useful warning/error
messages should there be any, perhaps there's some other way?

There shouldn't be any useful warning/error messages from sysctl. It's always there and can be run by any user. IMHO this approach is the easiest you can get. Of course, you could try and check uname for i386 and only then decide if you want to go for x86_64, but I don't see any reason to make things more complicated than they have to be.

Alex





reply via email to

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