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
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
$(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