From: Alexander Graf <agraf@suse.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Enabled building of x86_64 code on Mac OS X
Date: Sat, 24 Jan 2009 20:44:47 +0100 [thread overview]
Message-ID: <1232826287-18542-1-git-send-email-agraf@suse.de> (raw)
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>
---
configure | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/configure b/configure
index 3c9d832..c3fbbbe 100755
--- a/configure
+++ b/configure
@@ -243,11 +243,21 @@ oss_lib="-lossaudio"
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)
--
1.6.0.2
next reply other threads:[~2009-01-24 19:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-24 19:44 Alexander Graf [this message]
2009-01-26 15:40 ` [Qemu-devel] [PATCH] Enabled building of x86_64 code on Mac OS X Anthony Liguori
2009-01-27 0:34 ` Paul Brook
2009-01-27 0:42 ` Jamie Lokier
2009-01-27 0:59 ` Paul Brook
2009-01-27 1:22 ` Anthony Liguori
2009-01-27 9:21 ` Alexander Graf
2009-01-27 14:37 ` Jamie Lokier
2009-01-27 15:00 ` Laurent Desnogues
[not found] ` <BCD74E09-BC4C-4FC6-B814-D0276B763A9C@hotmail.com>
2009-01-27 0:40 ` C.W. Betts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1232826287-18542-1-git-send-email-agraf@suse.de \
--to=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).