From 1dcca61869ed1291879332e13771b13805ec4475 Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Fri, 9 Nov 2012 02:06:33 -0800 Subject: [PATCH] Revise checks for MacOSX to build emulator 1. Check $(HOST_CC) instead of gcc for llvm-gcc. 2. Remvoe Mac SDK 10.4 check because emulator uses the same SDK version as the rest of framework Change-Id: I4071fd45dc09a18c5341ad79e6a85e61df060fb4 --- core/main.mk | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/core/main.mk b/core/main.mk index 5cbaeaa6d..4425117e8 100644 --- a/core/main.mk +++ b/core/main.mk @@ -158,7 +158,7 @@ $(error stop) endif ifeq (darwin,$(HOST_OS)) -GCC_REALPATH = $(realpath $(shell which gcc)) +GCC_REALPATH = $(realpath $(shell which $(HOST_CC))) ifneq ($(findstring llvm-gcc,$(GCC_REALPATH)),) # Using LLVM GCC results in a non functional emulator due to it # not honouring global register variables @@ -170,23 +170,6 @@ ifneq ($(findstring llvm-gcc,$(GCC_REALPATH)),) else BUILD_EMULATOR := true endif -# When building on Leopard or above, we need to use the 10.4 SDK -# or the generated binary will not run on Tiger. -darwin_version := $(strip $(shell sw_vers -productVersion)) -ifneq ($(filter 10.1 10.2 10.3 10.1.% 10.2.% 10.3.% 10.4 10.4.%,$(darwin_version)),) - $(error Building the Android emulator requires OS X 10.5 or above) -endif -ifneq ($(filter 10.5 10.5.% 10.6 10.6.%,$(darwin_version)),) - # We are on Leopard or Snow Leopard - MSDK=10.5 -else - # We are on Lion or beyond, and 10.6 SDK is the minimum in Xcode 4.x - MSDK=10.6 -endif -MACOSX_SDK := /Developer/SDKs/MacOSX$(MSDK).sdk -ifeq ($(strip $(wildcard $(MACOSX_SDK))),) - BUILD_EMULATOR := false -endif else # HOST_OS is not darwin BUILD_EMULATOR := true endif # HOST_OS is darwin