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
This commit is contained in:
Dan Albert 2016-03-10 15:17:09 -08:00
parent 6d41f7e123
commit a81e1b7fed

View file

@ -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