adb: Link to libdl manually to avoid build failure on android-build
An outdated build environment results in a host adb build failure
because libcrypto needs libdl, but libdl isn't linked explicitly:
out/host/linux-x86/obj/STATIC_LIBRARIES/libcrypto_static_intermediates/libcrypto_static.a(dso_dlfcn.o):
In function `dlfcn_globallookup':
/mnt/jenkins/workspace/linaro-android_galaxynexus-jb-gcc47-aosp-blob/build/external/openssl/crypto/dso/dso_dlfcn.c:474:
undefined reference to `dlopen'
/mnt/jenkins/workspace/linaro-android_galaxynexus-jb-gcc47-aosp-blob/build/external/openssl/crypto/dso/dso_dlfcn.c:478:
undefined reference to `dlsym'
/mnt/jenkins/workspace/linaro-android_galaxynexus-jb-gcc47-aosp-blob/build/external/openssl/crypto/dso/dso_dlfcn.c:479:
undefined reference to `dlclose'
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
diff --git a/adb/Android.mk b/adb/Android.mk
index 1b18a41..e002d40 100644
--- a/adb/Android.mk
+++ b/adb/Android.mk
@@ -90,6 +90,7 @@
LOCAL_MODULE_TAGS := debug
LOCAL_STATIC_LIBRARIES := libzipfile libunz libcrypto_static $(EXTRA_STATIC_LIBS)
+LOCAL_LDLIBS += -ldl
ifeq ($(USE_SYSDEPS_WIN32),)
LOCAL_STATIC_LIBRARIES += libcutils
endif