aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2012-08-09 12:07:15 -0700
committerandroid code review <noreply-gerritcodereview@google.com>2012-08-09 12:07:15 -0700
commitaa78146bc1a718d66d44795a9e9e62deb284670a (patch)
tree30d5caf90cc61cfba40dc4ccb3ac48081b524b03
parent0f8b30e91eff6aa8c5b808628e81d173611eb141 (diff)
parentc2f0b96c7bdc3f043c9950662d81a50a352038d1 (diff)
downloadexternal_qemu-aa78146bc1a718d66d44795a9e9e62deb284670a.zip
external_qemu-aa78146bc1a718d66d44795a9e9e62deb284670a.tar.gz
external_qemu-aa78146bc1a718d66d44795a9e9e62deb284670a.tar.bz2
Merge "Fix Mac Build with MacOSX SDK10.6+"
-rw-r--r--Makefile.android11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile.android b/Makefile.android
index 0c083c0..435b295 100644
--- a/Makefile.android
+++ b/Makefile.android
@@ -80,6 +80,7 @@ ifeq ($(HOST_OS),darwin)
MY_CFLAGS += -isysroot $(mac_sdk_root) -mmacosx-version-min=$(mac_sdk_version) -DMACOSX_DEPLOYMENT_TARGET=$(mac_sdk_version)
MY_LDLIBS += -isysroot $(mac_sdk_root) -Wl,-syslibroot,$(mac_sdk_root) -mmacosx-version-min=$(mac_sdk_version)
+
endif
# BUILD_STANDALONE_EMULATOR is only defined when building with
@@ -202,10 +203,12 @@ endif
ifeq ($(HOST_OS),darwin)
QEMU_SYSTEM_LDLIBS += -Wl,-framework,Cocoa,-framework,QTKit,-framework,CoreVideo
- ifneq ($(filter 10.7 10.7.% 10.8 10.8.%,$(build_mac_version)),)
- # 10.7+ with XCode4 needs to be explicitly told the dynamic library
- # lookup symbols in the precompiled libSDL are resolved at
- # runtime
+
+ # SDK 10.6+ doesn't have __dyld_func_lookup anymore. Dynamic library lookup symbols
+ # are instead resolved at runtime
+ OSX_VERSION_MAJOR := $(shell echo $(mac_sdk_version) | cut -d . -f 2)
+ OSX_VERSION_MAJOR_GREATER_THAN_OR_EQUAL_TO_6 := $(shell [ $(OSX_VERSION_MAJOR) -ge 6 ] && echo true)
+ ifeq ($(OSX_VERSION_MAJOR_GREATER_THAN_OR_EQUAL_TO_6),true)
QEMU_SYSTEM_LDLIBS += -undefined dynamic_lookup
endif
endif