qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [6443] Enabled building of x86_64 code on Mac OS X (Alexander Graf)
@ 2009-01-26 15:37 Anthony Liguori
  2009-02-01 12:06 ` [PATCH] " Andreas Färber
  0 siblings, 1 reply; 10+ messages in thread
From: Anthony Liguori @ 2009-01-26 15:37 UTC (permalink / raw)
  To: qemu-devel

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 <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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`
+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)

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-02-22 19:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-26 15:37 [Qemu-devel] [6443] Enabled building of x86_64 code on Mac OS X (Alexander Graf) Anthony Liguori
2009-02-01 12:06 ` [PATCH] " Andreas Färber
2009-02-22 15:16   ` [PATCH] [RESEND] " Andreas Färber
2009-02-22 15:21     ` Alexander Graf
2009-02-22 15:50       ` Natalia Portillo
2009-02-22 18:48         ` Andreas Färber
2009-02-22 19:43           ` Alexander Graf
2009-02-22 18:52       ` Andreas Färber
2009-02-22 19:15     ` malc
2009-02-22 19:24       ` Alexander Graf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).