summaryrefslogtreecommitdiffstats
path: root/core/combo
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2010-08-25 10:12:58 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-08-25 10:12:58 -0700
commit30ac7bce5418d15842897a7218c3cd4585383224 (patch)
tree49eea630282fba3740c8670e7857ea10d76dd89d /core/combo
parentd7312f4f63dd203bd70a3266c019679bb2147b9d (diff)
parentf3a142b8d5b4db7299b706653f4fd2952f4e5d8c (diff)
downloadbuild-30ac7bce5418d15842897a7218c3cd4585383224.zip
build-30ac7bce5418d15842897a7218c3cd4585383224.tar.gz
build-30ac7bce5418d15842897a7218c3cd4585383224.tar.bz2
am f3a142b8: am 7eaa4dc2: Merge "Link against Mac OSX 10.5 SDK if building on 10.6." into gingerbread
Merge commit 'f3a142b8d5b4db7299b706653f4fd2952f4e5d8c' * commit 'f3a142b8d5b4db7299b706653f4fd2952f4e5d8c': Link against Mac OSX 10.5 SDK if building on 10.6.
Diffstat (limited to 'core/combo')
-rw-r--r--core/combo/HOST_darwin-x86.mk15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/combo/HOST_darwin-x86.mk b/core/combo/HOST_darwin-x86.mk
index 0aa27b1..121f89b 100644
--- a/core/combo/HOST_darwin-x86.mk
+++ b/core/combo/HOST_darwin-x86.mk
@@ -23,6 +23,21 @@
HOST_GLOBAL_CFLAGS += -m32
HOST_GLOBAL_LDFLAGS += -m32
+# Use the Mac OSX SDK 10.5 if the build host is 10.6
+build_mac_version := $(shell sw_vers -productVersion)
+ifneq ($(filter 10.6.%, $(build_mac_version)),)
+sdk_105_root := /Developer/SDKs/MacOSX10.5.sdk
+ifeq ($(wildcard $(sdk_105_root)),)
+$(warning *****************************************************)
+$(warning * You are building on Mac OSX 10.6.)
+$(warning * Can not find SDK 10.5 at $(sdk_105_root))
+$(warning *****************************************************)
+$(error Stop.)
+endif
+
+HOST_GLOBAL_CFLAGS += -isysroot $(sdk_105_root) -mmacosx-version-min=10.5
+HOST_GLOBAL_LDFLAGS += -isysroot $(sdk_105_root) -mmacosx-version-min=10.5
+endif # build_mac_version is 10.6
HOST_GLOBAL_CFLAGS += -fPIC
HOST_NO_UNDEFINED_LDFLAGS := -Wl,-undefined,error