summaryrefslogtreecommitdiffstats
path: root/build/Android.executable.mk
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2014-04-01 11:52:01 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2014-04-01 12:53:18 +0800
commitcae10f73bdad63774a3a8bc67d568b131f9bd591 (patch)
treeef22215b492817ad0ed8eae0ac180b5cd418c67d /build/Android.executable.mk
parent81ed34e686532cebc1e17a273110decf0dd24e81 (diff)
downloadart-cae10f73bdad63774a3a8bc67d568b131f9bd591.zip
art-cae10f73bdad63774a3a8bc67d568b131f9bd591.tar.gz
art-cae10f73bdad63774a3a8bc67d568b131f9bd591.tar.bz2
Add -lpthread -ldl to link executable/tests
The new binutils-2.23 based linker in prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6 no longer implicity adds dependencies on *so an executable needs. eg. ld -o barrier_test barrier_test.o common_runtime_test.o ... -lartd produces error messages read art/runtime/thread-inl.h:43: error: undefined reference to 'pthread_getspecific' art/runtime/common_runtime_test.h:219: error: undefined reference to 'dlsym' external/gtest/src/../include/gtest/internal/gtest-port.h:1482: error: undefined reference to 'pthread_getspecific' because libartd.so DT_NEEDED libdl.so and libpthread.so, and new linker no longer implicitly add both to dependencies. Explicitly add -lpthread -ldl to fix the issue Change-Id: Ic29c68480b2ed55d282be949640b9158411f213d
Diffstat (limited to 'build/Android.executable.mk')
-rw-r--r--build/Android.executable.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/build/Android.executable.mk b/build/Android.executable.mk
index ba54e04..551b03c 100644
--- a/build/Android.executable.mk
+++ b/build/Android.executable.mk
@@ -84,6 +84,7 @@ define build-art-executable
else
LOCAL_CFLAGS += $(ART_HOST_NON_DEBUG_CFLAGS)
endif
+ LOCAL_LDLIBS += -lpthread
endif
ifeq ($$(art_ndebug_or_debug),ndebug)