diff options
-rw-r--r-- | Makefile.android | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile.android b/Makefile.android index da06cc6..3e3eb65 100644 --- a/Makefile.android +++ b/Makefile.android @@ -9,6 +9,8 @@ CONFIG_DIRS := \ CONFIG_INCLUDES := $(CONFIG_DIRS:%=-I%) +MY_CC := $(HOST_CC) + MY_OPTIM := -O2 -g -fno-PIC -falign-functions=0 -fomit-frame-pointer ifeq ($(BUILD_DEBUG_EMULATOR),true) MY_OPTIM := -O0 -g @@ -62,9 +64,16 @@ ifeq ($(HOST_OS),darwin) endif MY_CFLAGS += -isysroot $(TIGER_SDK) -mmacosx-version-min=10.4 -DMACOSX_DEPLOYMENT_TARGET=10.4 MY_LDLIBS += -isysroot $(TIGER_SDK) -Wl,-syslibroot,$(TIGER_SDK) -mmacosx-version-min=10.4 + + # Beginning with Snow Leopard, the default compiler is GCC 4.2 + # which is incompatible with the 10.4 SDK, so we must + # specify the use of GCC 4.0. + ifeq ($(filter 10.5 10.5.%,$(DARWIN_VERSION)),) + # We are on Snow Leopard or above + MY_CC := gcc-4.0 + endif endif endif -MY_CC := $(HOST_CC) # BUILD_STANDALONE_EMULATOR is only defined when building with # the android-rebuild.sh script. The script will also provide |