aboutsummaryrefslogtreecommitdiffstats
path: root/emulator/opengl
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2012-08-10 14:59:26 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2012-08-10 15:36:05 +0800
commita65ebe4f6f6e38d7d6a7681373971a16d2ef0f34 (patch)
tree7b7649e93d09de542daf9f797fc8de4fb345e9ae /emulator/opengl
parentb70e8f65809f2987cb991aa852b69cec491cd46a (diff)
downloadsdk-a65ebe4f6f6e38d7d6a7681373971a16d2ef0f34.zip
sdk-a65ebe4f6f6e38d7d6a7681373971a16d2ef0f34.tar.gz
sdk-a65ebe4f6f6e38d7d6a7681373971a16d2ef0f34.tar.bz2
Fixed "Bus error" running tests triangleV2 and triangleCM
Function __dyld_func_lookup is deprecated and invisible in Mac SDK 10.6+. Instruct linker to resolve it at run-time. Related CL https://android-review.googlesource.com/#/c/37355/ fix the build, but cause run-time "Bus error". Change-Id: Icf3ea7a0b8ac29c69482e372f34e0b2e364472d8
Diffstat (limited to 'emulator/opengl')
-rw-r--r--emulator/opengl/tests/translator_tests/GLES_CM/Android.mk10
-rw-r--r--emulator/opengl/tests/translator_tests/GLES_V2/Android.mk10
2 files changed, 14 insertions, 6 deletions
diff --git a/emulator/opengl/tests/translator_tests/GLES_CM/Android.mk b/emulator/opengl/tests/translator_tests/GLES_CM/Android.mk
index bce56e3..a66207e 100644
--- a/emulator/opengl/tests/translator_tests/GLES_CM/Android.mk
+++ b/emulator/opengl/tests/translator_tests/GLES_CM/Android.mk
@@ -9,9 +9,13 @@ LOCAL_SDL_CFLAGS := $(shell $(LOCAL_SDL_CONFIG) --cflags)
LOCAL_SDL_LDLIBS := $(filter-out %.a %.lib,$(shell $(LOCAL_SDL_CONFIG) --static-libs))
ifeq ($(HOST_OS),darwin)
- # OS X 10.6+ needs to be forced to link dylib to avoid problems
- # with the dynamic function lookups in SDL 1.2
- LOCAL_SDL_LDLIBS += /usr/lib/dylib1.o
+ # SDK 10.6+ deprecates __dyld_func_lookup required by dlcompat_init_func
+ # in SDL_dlcompat.o this module depends. Instruct linker to resolved it 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)
+ LOCAL_SDL_LDLIBS += -Wl,-undefined,dynamic_lookup
+ endif
endif
LOCAL_SRC_FILES:= \
diff --git a/emulator/opengl/tests/translator_tests/GLES_V2/Android.mk b/emulator/opengl/tests/translator_tests/GLES_V2/Android.mk
index 504530f..e72da96 100644
--- a/emulator/opengl/tests/translator_tests/GLES_V2/Android.mk
+++ b/emulator/opengl/tests/translator_tests/GLES_V2/Android.mk
@@ -17,9 +17,13 @@ LOCAL_LDLIBS += $(LOCAL_SDL_LDLIBS)
LOCAL_STATIC_LIBRARIES += libSDL libSDLmain
ifeq ($(HOST_OS),darwin)
- # OS X 10.6+ needs to be forced to link dylib to avoid problems
- # with the dynamic function lookups in SDL 1.2
- LOCAL_LDLIBS += /usr/lib/dylib1.o
+ # SDK 10.6+ deprecates __dyld_func_lookup required by dlcompat_init_func
+ # in SDL_dlcompat.o this module depends. Instruct linker to resolved it 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)
+ LOCAL_LDLIBS += -Wl,-undefined,dynamic_lookup
+ endif
$(call emugl-import,libMac_view)
endif