am e442c136: Merge "Add NDK crtbegin_so.o and crtend_so.o if they exist."
* commit 'e442c1361a9066d7a394c080273d5f93d77979e4':
Add NDK crtbegin_so.o and crtend_so.o if they exist.
diff --git a/core/shared_library.mk b/core/shared_library.mk
index 77d253f..0393d17 100644
--- a/core/shared_library.mk
+++ b/core/shared_library.mk
@@ -35,11 +35,8 @@
my_target_crtend_so_o := $(TARGET_CRTEND_SO_O)
ifdef LOCAL_NDK_VERSION
my_target_global_ld_dirs += -L$(my_ndk_version_root)/usr/lib
-# The latest ndk does NOT support TARGET_CRTBEGIN_SO_O and TARGET_CRTEND_SO_O yet.
-# my_target_crtbegin_so_o := $(my_ndk_version_root)/usr/lib/crtbegin_so.o
-# my_target_crtend_so_o := $(my_ndk_version_root)/usr/lib/crtend_so.o
-my_target_crtbegin_so_o :=
-my_target_crtend_so_o :=
+my_target_crtbegin_so_o := $(wildcard $(my_ndk_version_root)/usr/lib/crtbegin_so.o)
+my_target_crtend_so_o := $(wildcard $(my_ndk_version_root)/usr/lib/crtend_so.o)
endif
$(linked_module): PRIVATE_TARGET_GLOBAL_LD_DIRS := $(my_target_global_ld_dirs)
$(linked_module): PRIVATE_TARGET_GLOBAL_LDFLAGS := $(my_target_global_ldflags)