diff options
author | Ying Wang <wangying@google.com> | 2010-08-24 18:33:22 -0700 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2010-08-24 18:34:44 -0700 |
commit | d6683f08c9ad0a924db663621844a6527164b99f (patch) | |
tree | 9ab990c05157205755dbf481f187748bb889e7a7 /core/combo | |
parent | ee4bad51bc7ff49c37c9a105ad68dddf0a3b0d51 (diff) | |
download | build-d6683f08c9ad0a924db663621844a6527164b99f.zip build-d6683f08c9ad0a924db663621844a6527164b99f.tar.gz build-d6683f08c9ad0a924db663621844a6527164b99f.tar.bz2 |
Link against Mac OSX 10.5 SDK if building on 10.6.
So that tools built on Snow Leopard (10.6) can be used on Leopard (10.5).
Change-Id: I99745ecbe2ad11feaae31d5be31c34c2e0ad7cc5
Diffstat (limited to 'core/combo')
-rw-r--r-- | core/combo/HOST_darwin-x86.mk | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/core/combo/HOST_darwin-x86.mk b/core/combo/HOST_darwin-x86.mk index 306ba1a..093ecbe 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 |