From a81e1b7fed439d7c1dfdf299ac3bf290f154cb97 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 10 Mar 2016 15:17:09 -0800 Subject: [PATCH] Using stlport_static or c++_static requires libdl. Why? For one, libgcc's unwinder makes use of `dl_iterate_phdr`. Also, libgabi++ (the home grown C++ RT we use for stlport) uses `dlopen` for liblog when reporting fatal errors. The LLVM unwinder which is used by libc++ also uses libdl. Requiring a dependency on libdl seems less objectionable than requiring one on liblog. We could always change libgabi++ to use syslog instead, but that will only reach logcat for newer devices (possibly L+, definitely M+). Requiring libdl seems like the best option here, especially given that libgcc needs it anyway. Change-Id: I4acfaf38145c39fc15a76fbb282a46786e5322f1 --- core/binary.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/binary.mk b/core/binary.mk index dc43463304..06c638585c 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -131,6 +131,7 @@ ifdef LOCAL_SDK_VERSION my_system_shared_libraries += libstdc++ ifeq (stlport_static,$(LOCAL_NDK_STL_VARIANT)) my_ndk_stl_static_lib := $(my_ndk_source_root)/cxx-stl/stlport/libs/$(my_cpu_variant)/libstlport_static.a + my_ldlibs += -ldl else my_ndk_stl_shared_lib_fullpath := $(my_ndk_source_root)/cxx-stl/stlport/libs/$(my_cpu_variant)/libstlport_shared.so my_ndk_stl_shared_lib := -lstlport_shared @@ -142,6 +143,7 @@ ifdef LOCAL_SDK_VERSION $(my_ndk_source_root)/android/support/include ifeq (c++_static,$(LOCAL_NDK_STL_VARIANT)) my_ndk_stl_static_lib := $(my_ndk_source_root)/cxx-stl/llvm-libc++/libs/$(my_cpu_variant)/libc++_static.a + my_ldlibs += -ldl else my_ndk_stl_shared_lib_fullpath := $(my_ndk_source_root)/cxx-stl/llvm-libc++/libs/$(my_cpu_variant)/libc++_shared.so my_ndk_stl_shared_lib := -lc++_shared