From c2f0b96c7bdc3f043c9950662d81a50a352038d1 Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Thu, 9 Aug 2012 18:21:33 +0800 Subject: Fix Mac Build with MacOSX SDK10.6+ Function "__dyld_func_lookup" required by SDL_dlcompat.c is no longer provided in SDK 10.6+. Dynamic library lookup symbols are instead resolved at runtime. Change-Id: I6605f049a4f7641c197a44118da13a016f23633c --- Makefile.android | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile.android b/Makefile.android index 0c083c0..435b295 100644 --- a/Makefile.android +++ b/Makefile.android @@ -80,6 +80,7 @@ ifeq ($(HOST_OS),darwin) MY_CFLAGS += -isysroot $(mac_sdk_root) -mmacosx-version-min=$(mac_sdk_version) -DMACOSX_DEPLOYMENT_TARGET=$(mac_sdk_version) MY_LDLIBS += -isysroot $(mac_sdk_root) -Wl,-syslibroot,$(mac_sdk_root) -mmacosx-version-min=$(mac_sdk_version) + endif # BUILD_STANDALONE_EMULATOR is only defined when building with @@ -202,10 +203,12 @@ endif ifeq ($(HOST_OS),darwin) QEMU_SYSTEM_LDLIBS += -Wl,-framework,Cocoa,-framework,QTKit,-framework,CoreVideo - ifneq ($(filter 10.7 10.7.% 10.8 10.8.%,$(build_mac_version)),) - # 10.7+ with XCode4 needs to be explicitly told the dynamic library - # lookup symbols in the precompiled libSDL are resolved at - # runtime + + # SDK 10.6+ doesn't have __dyld_func_lookup anymore. Dynamic library lookup symbols + # are instead resolved at runtime + OSX_VERSION_MAJOR := $(shell echo $(mac_sdk_version) | cut -d . -f 2) + OSX_VERSION_MAJOR_GREATER_THAN_OR_EQUAL_TO_6 := $(shell [ $(OSX_VERSION_MAJOR) -ge 6 ] && echo true) + ifeq ($(OSX_VERSION_MAJOR_GREATER_THAN_OR_EQUAL_TO_6),true) QEMU_SYSTEM_LDLIBS += -undefined dynamic_lookup endif endif -- cgit v1.1