am e534e2eb: am 47450542: Merge "Use Mac OS X SDK 10.6."

* commit 'e534e2eb2b5e79facf24c31eb2f60b8a0ee1f5b7':
  Use Mac OS X SDK 10.6.
This commit is contained in:
Ying Wang 2012-06-05 15:25:39 -07:00 committed by Android Git Automerger
commit 9f4d00b94b
2 changed files with 9 additions and 10 deletions

View File

@ -122,6 +122,9 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
# Changing where ro.carrier value is instantiated for system/build.prop
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
# Now we switched to build against Mac OS X SDK 10.6
$(call add-clean-step, rm -rf $(OUT_DIR)/host/darwin-x86/obj)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************

View File

@ -29,21 +29,17 @@ HOST_GLOBAL_CFLAGS += -m32
HOST_GLOBAL_LDFLAGS += -m32
endif # BUILD_HOST_64bit
# 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)),)
mac_sdk_version := 10.6
mac_sdk_root := /Developer/SDKs/MacOSX$(mac_sdk_version).sdk
ifeq ($(wildcard $(mac_sdk_root)),)
$(warning *****************************************************)
$(warning * You are building on Mac OSX 10.6.)
$(warning * Can not find SDK 10.5 at $(sdk_105_root))
$(warning * Can not find SDK $(mac_sdk_version) at $(mac_sdk_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 += -isysroot $(mac_sdk_root) -mmacosx-version-min=$(mac_sdk_version)
HOST_GLOBAL_LDFLAGS += -isysroot $(mac_sdk_root) -mmacosx-version-min=$(mac_sdk_version)
HOST_GLOBAL_CFLAGS += -fPIC
HOST_NO_UNDEFINED_LDFLAGS := -Wl,-undefined,error