Commit 1b0f9cc26bf2ebc13067a42a4caed84833f72a7c
1 parent
deb54399
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> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6443 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
11 additions
and
1 deletions
configure
... | ... | @@ -243,11 +243,21 @@ oss_lib="-lossaudio" |
243 | 243 | Darwin) |
244 | 244 | bsd="yes" |
245 | 245 | darwin="yes" |
246 | +# 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 | |
247 | +is_x86_64=`sysctl -n hw.optional.x86_64` | |
248 | +if [ "$is_x86_64" = "1" ]; then | |
249 | + cpu=x86_64 | |
250 | +fi | |
251 | +if [ "$cpu" = "x86_64" ] ; then | |
252 | + OS_CFLAGS="-arch x86_64" | |
253 | + LDFLAGS="-arch x86_64" | |
254 | +else | |
255 | + OS_CFLAGS="-mdynamic-no-pic" | |
256 | +fi | |
246 | 257 | darwin_user="yes" |
247 | 258 | cocoa="yes" |
248 | 259 | audio_drv_list="coreaudio" |
249 | 260 | audio_possible_drivers="coreaudio sdl fmod" |
250 | -OS_CFLAGS="-mdynamic-no-pic" | |
251 | 261 | OS_LDFLAGS="-framework CoreFoundation -framework IOKit" |
252 | 262 | ;; |
253 | 263 | SunOS) | ... | ... |