OSDN Git Service

Enable ifunc test for arm
authorDimitry Ivanov <dimitry@google.com>
Wed, 30 Mar 2016 23:44:48 +0000 (16:44 -0700)
committerDimitry Ivanov <dimitry@google.com>
Mon, 4 Apr 2016 18:28:41 +0000 (11:28 -0700)
Bug: http://b/27930475
Change-Id: I1f9e7c5b9ffabfd77ae6ebd534938aef39ec7987

tests/dlfcn_test.cpp
tests/libs/Android.mk

index 81479d5..1123163 100644 (file)
@@ -211,8 +211,6 @@ TEST(dlfcn, dlopen_by_soname) {
   dlclose(handle);
 }
 
-// ifuncs are only supported on intel and arm64 for now
-#if defined (__aarch64__) || defined(__i386__) || defined(__x86_64__)
 TEST(dlfcn, ifunc) {
   typedef const char* (*fn_ptr)();
 
@@ -256,7 +254,6 @@ TEST(dlfcn, ifunc_ctor_call) {
   ASSERT_STREQ("true", is_ctor_called());
   dlclose(handle);
 }
-#endif
 
 TEST(dlfcn, dlopen_check_relocation_dt_needed_order) {
   // This is the structure of the test library and
index 506d6f2..a903732 100644 (file)
@@ -346,25 +346,14 @@ include $(LOCAL_PATH)/Android.build.testlib.mk
 libtest_ifunc_src_files := \
     dlopen_testlib_ifunc.c
 
+# TODO(dimitry): clang does not support ifunc attribute
 libtest_ifunc_clang_host := false
+libtest_ifunc_clang_target := false
+
 module := libtest_ifunc
 build_target := SHARED_LIBRARY
 
-build_type := host
-include $(TEST_PATH)/Android.build.mk
-
-ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm64 x86 x86_64))
-    ifeq ($(TARGET_ARCH),arm64)
-      libtest_ifunc_multilib := 64
-      # TODO: This is a workaround - remove it once gcc
-      # removes its Android ifunc checks
-      libtest_ifunc_cflags := -mglibc
-    endif
-
-    build_type := target
-    libtest_ifunc_clang_target := false
-    include $(TEST_PATH)/Android.build.mk
-endif
+include $(LOCAL_PATH)/Android.build.testlib.mk
 
 # -----------------------------------------------------------------------------
 # Library used by atexit tests