Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LbG59-0004jC-8y for qemu-devel@nongnu.org; Sun, 22 Feb 2009 10:17:27 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LbG55-0004in-1B for qemu-devel@nongnu.org; Sun, 22 Feb 2009 10:17:26 -0500 Received: from [199.232.76.173] (port=60368 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LbG54-0004ik-RW for qemu-devel@nongnu.org; Sun, 22 Feb 2009 10:17:22 -0500 Received: from fmmailgate02.web.de ([217.72.192.227]:55124) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LbG54-00072G-BX for qemu-devel@nongnu.org; Sun, 22 Feb 2009 10:17:22 -0500 Message-Id: From: =?ISO-8859-1?Q?Andreas_F=E4rber?= In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v930.3) Subject: [PATCH] [RESEND] Re: [Qemu-devel] [6443] Enabled building of x86_64 code on Mac OS X (Alexander Graf) Date: Sun, 22 Feb 2009 16:16:57 +0100 References: Sender: andreas.faerber@web.de Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori , Alexander Graf Am 01.02.2009 um 13:06 schrieb Andreas F=E4rber: > > Am 26.01.2009 um 16:37 schrieb Anthony Liguori: > >> Revision: 6443 >> http://svn.sv.gnu.org/viewvc/?=20 >> view=3Drev&root=3Dqemu&revision=3D6443 >> 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 >> Signed-off-by: Anthony Liguori >> >> Modified Paths: >> -------------- >> trunk/configure >> >> Modified: trunk/configure >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- 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=3D"yes" >> darwin=3D"yes" >> +# on Leopard most of the system is 32-bit, so we have to ask the =20 >> kernel it if we can run 64-bit userspace code >> +is_x86_64=3D`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 > 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 --- diff --git a/configure b/configure index c3fbbbe..dffed79 100755 --- a/configure +++ b/configure @@ -244,7 +244,7 @@ Darwin) bsd=3D"yes" darwin=3D"yes" # on Leopard most of the system is 32-bit, so we have to ask the =20 kernel it if we can run 64-bit userspace code -is_x86_64=3D`sysctl -n hw.optional.x86_64` +is_x86_64=3D`sysctl -n hw.optional.x86_64 2>/dev/null` if [ "$is_x86_64" =3D "1" ]; then cpu=3Dx86_64 fi