From 095cd0f6046e2693021fd74e1276c7f6033bedce Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Sat, 19 Sep 2009 18:32:44 -0500 Subject: Force gcc-4.0 for qemu build on Mac OS X The Android build of qemu forces SDK 10.4, but doesn't specify a GCC version. This works fine for Mac OS X 10.4 - 10.5, but fails for 10.6. Change-Id: Id241a12ddc3fbf100cd15a0e93e6d61b4aecb3fd --- Makefile.android | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Makefile.android') diff --git a/Makefile.android b/Makefile.android index 982c0cd..fcb6534 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 -- cgit v1.1