Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LTb6W-0003pz-H1 for qemu-devel@nongnu.org; Sun, 01 Feb 2009 07:07:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LTb6U-0003oS-RK for qemu-devel@nongnu.org; Sun, 01 Feb 2009 07:07:12 -0500 Received: from [199.232.76.173] (port=53910 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LTb6U-0003oG-J7 for qemu-devel@nongnu.org; Sun, 01 Feb 2009 07:07:10 -0500 Received: from fmmailgate03.web.de ([217.72.192.234]:37883) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LTb6T-00086q-T1 for qemu-devel@nongnu.org; Sun, 01 Feb 2009 07:07:10 -0500 Received: from smtp08.web.de (fmsmtp08.dlan.cinetic.de [172.20.5.216]) by fmmailgate03.web.de (Postfix) with ESMTP id 8767BF753972 for ; Sun, 1 Feb 2009 13:07:03 +0100 (CET) Received: from [82.113.121.1] (helo=[10.42.118.210]) by smtp08.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.110 #277) id 1LTb6M-0005DD-00 for qemu-devel@nongnu.org; Sun, 01 Feb 2009 13:07:03 +0100 Message-Id: From: =?ISO-8859-1?Q?Andreas_F=E4rber?= In-Reply-To: Content-Type: multipart/mixed; boundary=Apple-Mail-23--367738665 Mime-Version: 1.0 (Apple Message framework v930.3) Subject: [PATCH] Re: [Qemu-devel] [6443] Enabled building of x86_64 code on Mac OS X (Alexander Graf) Date: Sun, 1 Feb 2009 13:06:55 +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 --Apple-Mail-23--367738665 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit 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 > Signed-off-by: Anthony Liguori > > 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 --Apple-Mail-23--367738665 Content-Disposition: attachment; filename=qemu-x64-ppc.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="qemu-x64-ppc.diff" Content-Transfer-Encoding: 7bit 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 --Apple-Mail-23--367738665 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit > > +if [ "$is_x86_64" = "1" ]; then > + cpu=x86_64 > +fi > +if [ "$cpu" = "x86_64" ] ; then > + OS_CFLAGS="-arch x86_64" > + LDFLAGS="-arch x86_64" > +else > + OS_CFLAGS="-mdynamic-no-pic" > +fi > darwin_user="yes" > cocoa="yes" > audio_drv_list="coreaudio" > audio_possible_drivers="coreaudio sdl fmod" > -OS_CFLAGS="-mdynamic-no-pic" > OS_LDFLAGS="-framework CoreFoundation -framework IOKit" > ;; > SunOS) > > > > --Apple-Mail-23--367738665--