Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2012 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
| 17 | LOCAL_PATH := $(call my-dir) |
| 18 | TEST_PATH := $(LOCAL_PATH)/.. |
| 19 | |
Dmitriy Ivanov | 4571f31 | 2014-08-15 14:22:07 -0700 | [diff] [blame] | 20 | common_cppflags += -std=gnu++11 |
Dmitriy Ivanov | 4a9e193 | 2014-10-17 11:47:18 -0700 | [diff] [blame] | 21 | common_additional_dependencies := \ |
| 22 | $(LOCAL_PATH)/Android.mk \ |
| 23 | $(LOCAL_PATH)/Android.build.dlext_testzip.mk \ |
Dmitriy Ivanov | ab972b9 | 2014-11-29 13:57:41 -0800 | [diff] [blame] | 24 | $(LOCAL_PATH)/Android.build.dlopen_2_parents_reloc.mk \ |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 25 | $(LOCAL_PATH)/Android.build.dlopen_check_order_dlsym.mk \ |
| 26 | $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_siblings.mk \ |
| 27 | $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_main_executable.mk \ |
Dmitriy Ivanov | 4a9e193 | 2014-10-17 11:47:18 -0700 | [diff] [blame] | 28 | $(LOCAL_PATH)/Android.build.testlib.mk \ |
Dmitriy Ivanov | 2a81536 | 2015-04-09 13:42:33 -0700 | [diff] [blame] | 29 | $(LOCAL_PATH)/Android.build.versioned_lib.mk \ |
Dmitriy Ivanov | 4a9e193 | 2014-10-17 11:47:18 -0700 | [diff] [blame] | 30 | $(TEST_PATH)/Android.build.mk |
| 31 | |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 32 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | b335677 | 2014-11-14 11:19:22 -0800 | [diff] [blame] | 33 | # Library to test gnu-styled hash |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 34 | # ----------------------------------------------------------------------------- |
| 35 | ifneq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),mips mips64)) |
Dmitriy Ivanov | ec18ce0 | 2014-11-09 19:27:20 -0800 | [diff] [blame] | 36 | libgnu-hash-table-library_src_files := \ |
| 37 | dlext_test_library.cpp \ |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 38 | |
Dmitriy Ivanov | ec18ce0 | 2014-11-09 19:27:20 -0800 | [diff] [blame] | 39 | libgnu-hash-table-library_ldflags := \ |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 40 | -Wl,--hash-style=gnu \ |
| 41 | |
Dmitriy Ivanov | ec18ce0 | 2014-11-09 19:27:20 -0800 | [diff] [blame] | 42 | module := libgnu-hash-table-library |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 43 | module_tag := optional |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 44 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 45 | endif |
| 46 | |
| 47 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | b335677 | 2014-11-14 11:19:22 -0800 | [diff] [blame] | 48 | # Library to test sysv-styled hash |
| 49 | # ----------------------------------------------------------------------------- |
| 50 | libsysv-hash-table-library_src_files := \ |
| 51 | dlext_test_library.cpp \ |
| 52 | |
| 53 | libsysv-hash-table-library_ldflags := \ |
| 54 | -Wl,--hash-style=sysv \ |
| 55 | |
| 56 | module := libsysv-hash-table-library |
| 57 | module_tag := optional |
| 58 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 59 | |
| 60 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 61 | # Library used by dlext tests - with GNU RELRO program header |
| 62 | # ----------------------------------------------------------------------------- |
| 63 | libdlext_test_src_files := \ |
| 64 | dlext_test_library.cpp \ |
| 65 | |
| 66 | libdlext_test_ldflags := \ |
| 67 | -Wl,-z,relro \ |
| 68 | |
| 69 | module := libdlext_test |
| 70 | module_tag := optional |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 71 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 72 | |
| 73 | # ----------------------------------------------------------------------------- |
| 74 | # create symlink to libdlext_test.so for symlink test |
| 75 | # ----------------------------------------------------------------------------- |
| 76 | # Use = instead of := to defer the evaluation of $@ |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 77 | $(TARGET_OUT)/lib/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \ |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 78 | $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so |
| 79 | |
| 80 | ifneq ($(TARGET_2ND_ARCH),) |
| 81 | # link 64 bit .so |
| 82 | $(TARGET_OUT)/lib64/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \ |
| 83 | $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so |
| 84 | endif |
| 85 | |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 86 | # host symlinks |
| 87 | $(HOST_OUT)/lib64/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \ |
| 88 | $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so |
| 89 | |
| 90 | $(HOST_OUT)/lib/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \ |
| 91 | $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so |
| 92 | |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 93 | # ----------------------------------------------------------------------------- |
| 94 | # Library used by dlext tests - without GNU RELRO program header |
| 95 | # ----------------------------------------------------------------------------- |
| 96 | libdlext_test_norelro_src_files := \ |
| 97 | dlext_test_library.cpp \ |
| 98 | |
| 99 | libdlext_test_norelro_ldflags := \ |
| 100 | -Wl,-z,norelro \ |
| 101 | |
| 102 | module := libdlext_test_norelro |
| 103 | module_tag := optional |
| 104 | build_type := target |
| 105 | build_target := SHARED_LIBRARY |
| 106 | include $(TEST_PATH)/Android.build.mk |
| 107 | |
| 108 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 04dc91a | 2014-07-01 14:10:16 -0700 | [diff] [blame] | 109 | # Library used by dlext tests - different name non-default location |
| 110 | # ----------------------------------------------------------------------------- |
| 111 | libdlext_test_fd_src_files := \ |
| 112 | dlext_test_library.cpp \ |
| 113 | |
| 114 | libdlext_test_fd_install_to_out_data := true |
| 115 | module := libdlext_test_fd |
| 116 | module_tag := optional |
| 117 | build_type := target |
| 118 | build_target := SHARED_LIBRARY |
| 119 | include $(TEST_PATH)/Android.build.mk |
| 120 | |
Dmitriy Ivanov | 618f1a3 | 2015-03-17 20:06:36 -0700 | [diff] [blame] | 121 | # ---------------------------------------------------------------------------- |
| 122 | # Library with soname which does not match filename |
| 123 | # ---------------------------------------------------------------------------- |
| 124 | libdlext_test_different_soname_src_files := \ |
| 125 | dlext_test_library.cpp \ |
| 126 | |
| 127 | module := libdlext_test_different_soname |
| 128 | module_tag := optional |
| 129 | libdlext_test_different_soname_ldflags := -Wl,-soname=libdlext_test_soname.so |
| 130 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 131 | |
Dmitriy Ivanov | 04dc91a | 2014-07-01 14:10:16 -0700 | [diff] [blame] | 132 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 07e5bc1 | 2014-10-03 17:52:44 -0700 | [diff] [blame] | 133 | # Library used by dlext tests - zipped and aligned |
| 134 | # ----------------------------------------------------------------------------- |
| 135 | include $(CLEAR_VARS) |
Dmitriy Ivanov | 75d66dd | 2014-10-07 09:46:46 -0700 | [diff] [blame] | 136 | bionic_2nd_arch_prefix := |
Dmitriy Ivanov | 07e5bc1 | 2014-10-03 17:52:44 -0700 | [diff] [blame] | 137 | include $(LOCAL_PATH)/Android.build.dlext_testzip.mk |
| 138 | ifneq ($(TARGET_2ND_ARCH),) |
Dmitriy Ivanov | 75d66dd | 2014-10-07 09:46:46 -0700 | [diff] [blame] | 139 | bionic_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) |
Dmitriy Ivanov | 07e5bc1 | 2014-10-03 17:52:44 -0700 | [diff] [blame] | 140 | include $(LOCAL_PATH)/Android.build.dlext_testzip.mk |
| 141 | endif |
| 142 | |
| 143 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 144 | # Library used by dlfcn tests |
| 145 | # ----------------------------------------------------------------------------- |
| 146 | libtest_simple_src_files := \ |
| 147 | dlopen_testlib_simple.cpp |
| 148 | |
| 149 | module := libtest_simple |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 150 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 151 | |
Dmitriy Ivanov | d97e9f5 | 2014-06-29 12:28:37 -0700 | [diff] [blame] | 152 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 1b20daf | 2014-05-19 15:06:58 -0700 | [diff] [blame] | 153 | # Library used by dlfcn nodelete tests |
| 154 | # ----------------------------------------------------------------------------- |
| 155 | libtest_nodelete_1_src_files := \ |
| 156 | dlopen_nodelete_1.cpp |
| 157 | |
| 158 | module := libtest_nodelete_1 |
| 159 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 160 | |
| 161 | # ----------------------------------------------------------------------------- |
| 162 | # Library used by dlfcn nodelete tests |
| 163 | # ----------------------------------------------------------------------------- |
| 164 | libtest_nodelete_2_src_files := \ |
| 165 | dlopen_nodelete_2.cpp |
| 166 | |
| 167 | module := libtest_nodelete_2 |
| 168 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 169 | |
| 170 | # ----------------------------------------------------------------------------- |
| 171 | # Library used by dlfcn nodelete tests |
| 172 | # ----------------------------------------------------------------------------- |
| 173 | libtest_nodelete_dt_flags_1_src_files := \ |
| 174 | dlopen_nodelete_dt_flags_1.cpp |
| 175 | |
| 176 | libtest_nodelete_dt_flags_1_ldflags := -Wl,-z,nodelete |
| 177 | |
| 178 | module := libtest_nodelete_dt_flags_1 |
| 179 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 180 | |
| 181 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | ab972b9 | 2014-11-29 13:57:41 -0800 | [diff] [blame] | 182 | # Build library with two parents |
| 183 | # ----------------------------------------------------------------------------- |
| 184 | include $(LOCAL_PATH)/Android.build.dlopen_2_parents_reloc.mk |
| 185 | |
| 186 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 187 | # Build libtest_check_order_dlsym.so with its dependencies. |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 188 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 189 | include $(LOCAL_PATH)/Android.build.dlopen_check_order_dlsym.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 190 | |
| 191 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 192 | # Build libtest_check_order_siblings.so with its dependencies. |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 193 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 194 | include $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_siblings.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 195 | |
| 196 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 197 | # Build libtest_check_order_root.so with its dependencies. |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 198 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 199 | include $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_main_executable.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 200 | |
| 201 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 2a81536 | 2015-04-09 13:42:33 -0700 | [diff] [blame] | 202 | # Build libtest_versioned_lib.so with its dependencies. |
| 203 | # ----------------------------------------------------------------------------- |
| 204 | include $(LOCAL_PATH)/Android.build.versioned_lib.mk |
| 205 | |
| 206 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 207 | # Library with dependency loop used by dlfcn tests |
| 208 | # |
| 209 | # libtest_with_dependency_loop -> a -> b -> c -> a |
| 210 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | ab972b9 | 2014-11-29 13:57:41 -0800 | [diff] [blame] | 211 | libtest_with_dependency_loop_src_files := dlopen_testlib_loopy_root.cpp |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 212 | |
| 213 | libtest_with_dependency_loop_shared_libraries := \ |
| 214 | libtest_with_dependency_loop_a |
| 215 | |
| 216 | module := libtest_with_dependency_loop |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 217 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 218 | |
| 219 | # ----------------------------------------------------------------------------- |
| 220 | # libtest_with_dependency_loop_a.so |
| 221 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | ab972b9 | 2014-11-29 13:57:41 -0800 | [diff] [blame] | 222 | libtest_with_dependency_loop_a_src_files := dlopen_testlib_loopy_a.cpp |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 223 | |
| 224 | libtest_with_dependency_loop_a_shared_libraries := \ |
| 225 | libtest_with_dependency_loop_b_tmp |
| 226 | |
| 227 | module := libtest_with_dependency_loop_a |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 228 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 229 | |
| 230 | # ----------------------------------------------------------------------------- |
| 231 | # libtest_with_dependency_loop_b.so |
| 232 | # |
| 233 | # this is temporary placeholder - will be removed |
| 234 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | ab972b9 | 2014-11-29 13:57:41 -0800 | [diff] [blame] | 235 | libtest_with_dependency_loop_b_tmp_src_files := dlopen_testlib_loopy_invalid.cpp |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 236 | libtest_with_dependency_loop_b_tmp_ldflags := -Wl,-soname=libtest_with_dependency_loop_b.so |
| 237 | |
| 238 | module := libtest_with_dependency_loop_b_tmp |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 239 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 240 | |
| 241 | # ----------------------------------------------------------------------------- |
| 242 | # libtest_with_dependency_loop_b.so |
| 243 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | ab972b9 | 2014-11-29 13:57:41 -0800 | [diff] [blame] | 244 | libtest_with_dependency_loop_b_src_files := dlopen_testlib_loopy_b.cpp |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 245 | libtest_with_dependency_loop_b_shared_libraries := libtest_with_dependency_loop_c |
| 246 | |
| 247 | module := libtest_with_dependency_loop_b |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 248 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 249 | |
| 250 | # ----------------------------------------------------------------------------- |
| 251 | # libtest_with_dependency_loop_c.so |
| 252 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | ab972b9 | 2014-11-29 13:57:41 -0800 | [diff] [blame] | 253 | libtest_with_dependency_loop_c_src_files := dlopen_testlib_loopy_c.cpp |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 254 | |
| 255 | libtest_with_dependency_loop_c_shared_libraries := \ |
| 256 | libtest_with_dependency_loop_a |
| 257 | |
| 258 | module := libtest_with_dependency_loop_c |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 259 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 260 | |
| 261 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | b2a30ee | 2014-09-04 18:23:00 -0700 | [diff] [blame] | 262 | # libtest_relo_check_dt_needed_order.so |
| 263 | # | |
| 264 | # +-> libtest_relo_check_dt_needed_order_1.so |
| 265 | # | |
| 266 | # +-> libtest_relo_check_dt_needed_order_2.so |
| 267 | # ----------------------------------------------------------------------------- |
| 268 | libtest_relo_check_dt_needed_order_shared_libraries := \ |
| 269 | libtest_relo_check_dt_needed_order_1 libtest_relo_check_dt_needed_order_2 |
| 270 | |
| 271 | libtest_relo_check_dt_needed_order_src_files := dlopen_testlib_relo_check_dt_needed_order.cpp |
| 272 | libtest_relo_check_dt_needed_order_1_src_files := dlopen_testlib_relo_check_dt_needed_order_1.cpp |
| 273 | libtest_relo_check_dt_needed_order_2_src_files := dlopen_testlib_relo_check_dt_needed_order_2.cpp |
Dmitriy Ivanov | b2a30ee | 2014-09-04 18:23:00 -0700 | [diff] [blame] | 274 | |
| 275 | module := libtest_relo_check_dt_needed_order |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 276 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | b2a30ee | 2014-09-04 18:23:00 -0700 | [diff] [blame] | 277 | module := libtest_relo_check_dt_needed_order_1 |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 278 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | b2a30ee | 2014-09-04 18:23:00 -0700 | [diff] [blame] | 279 | module := libtest_relo_check_dt_needed_order_2 |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 280 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | b2a30ee | 2014-09-04 18:23:00 -0700 | [diff] [blame] | 281 | |
| 282 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | aa0f2bd | 2014-07-28 17:32:20 -0700 | [diff] [blame] | 283 | # Library with dependency used by dlfcn tests |
| 284 | # ----------------------------------------------------------------------------- |
| 285 | libtest_with_dependency_src_files := \ |
| 286 | dlopen_testlib_simple.cpp |
| 287 | |
| 288 | libtest_with_dependency_shared_libraries := libdlext_test |
| 289 | |
| 290 | module := libtest_with_dependency |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 291 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | aa0f2bd | 2014-07-28 17:32:20 -0700 | [diff] [blame] | 292 | |
| 293 | # ----------------------------------------------------------------------------- |
Brigid Smith | c5a13ef | 2014-07-23 11:22:25 -0700 | [diff] [blame] | 294 | # Library used by ifunc tests |
| 295 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 296 | libtest_ifunc_src_files := \ |
| 297 | dlopen_testlib_ifunc.c |
| 298 | |
| 299 | libtest_ifunc_clang_host := false |
| 300 | module := libtest_ifunc |
| 301 | build_target := SHARED_LIBRARY |
| 302 | |
| 303 | build_type := host |
| 304 | include $(TEST_PATH)/Android.build.mk |
| 305 | |
Dmitriy Ivanov | 9aea164 | 2014-09-11 15:16:03 -0700 | [diff] [blame] | 306 | ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm64 x86 x86_64)) |
Dmitriy Ivanov | 9aea164 | 2014-09-11 15:16:03 -0700 | [diff] [blame] | 307 | ifeq ($(TARGET_ARCH),arm64) |
| 308 | libtest_ifunc_multilib := 64 |
| 309 | # TODO: This is a workaround - remove it once gcc |
| 310 | # removes its Android ifunc checks |
| 311 | libtest_ifunc_cflags := -mglibc |
| 312 | endif |
| 313 | |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 314 | build_type := target |
Chih-Hung Hsieh | b086298 | 2014-10-24 11:04:51 -0700 | [diff] [blame] | 315 | libtest_ifunc_clang_target := false |
Brigid Smith | c5a13ef | 2014-07-23 11:22:25 -0700 | [diff] [blame] | 316 | include $(TEST_PATH)/Android.build.mk |
| 317 | endif |
| 318 | |
| 319 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 320 | # Library used by atexit tests |
| 321 | # ----------------------------------------------------------------------------- |
| 322 | |
| 323 | libtest_atexit_src_files := \ |
| 324 | atexit_testlib.cpp |
| 325 | |
| 326 | module := libtest_atexit |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 327 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 328 | |
Dmitriy Ivanov | ce44166 | 2014-06-17 15:56:38 -0700 | [diff] [blame] | 329 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | d225a5e | 2014-08-28 14:12:12 -0700 | [diff] [blame] | 330 | # This library is used by dl_load test to check symbol preempting |
| 331 | # by main executable |
| 332 | # ----------------------------------------------------------------------------- |
| 333 | libdl_preempt_test_1_src_files := dl_preempt_library_1.cpp |
| 334 | |
| 335 | module := libdl_preempt_test_1 |
| 336 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 337 | |
| 338 | # ----------------------------------------------------------------------------- |
| 339 | # This library is used by dl_load test to check symbol preempting |
| 340 | # by libdl_preempt_test_1.so |
| 341 | # ----------------------------------------------------------------------------- |
| 342 | libdl_preempt_test_2_src_files := dl_preempt_library_2.cpp |
| 343 | |
| 344 | module := libdl_preempt_test_2 |
| 345 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 346 | |
| 347 | # ----------------------------------------------------------------------------- |
| 348 | # Library with DF_1_GLOBAL |
| 349 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | d225a5e | 2014-08-28 14:12:12 -0700 | [diff] [blame] | 350 | libdl_test_df_1_global_src_files := dl_df_1_global.cpp |
Dmitriy Ivanov | 6612d7a | 2015-04-24 16:26:03 -0700 | [diff] [blame^] | 351 | libdl_test_df_1_global_ldflags := -Wl,-z,global |
| 352 | # TODO (dimitry): host ld.gold does not yet support -z global |
| 353 | # remove this line once it is updated. |
| 354 | libdl_test_df_1_global_ldflags_host := -fuse-ld=bfd |
| 355 | |
Dmitriy Ivanov | d225a5e | 2014-08-28 14:12:12 -0700 | [diff] [blame] | 356 | module := libdl_test_df_1_global |
| 357 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | d225a5e | 2014-08-28 14:12:12 -0700 | [diff] [blame] | 358 | |
| 359 | # ----------------------------------------------------------------------------- |
| 360 | # Library using symbol from libdl_test_df_1_global |
| 361 | # ----------------------------------------------------------------------------- |
| 362 | libtest_dlsym_df_1_global_src_files := dl_df_1_use_global.cpp |
| 363 | module := libtest_dlsym_df_1_global |
| 364 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 365 | |
| 366 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | ce44166 | 2014-06-17 15:56:38 -0700 | [diff] [blame] | 367 | # Library with weak function |
| 368 | # ----------------------------------------------------------------------------- |
| 369 | libtest_dlsym_weak_func_src_files := \ |
| 370 | dlsym_weak_function.cpp |
| 371 | |
| 372 | module := libtest_dlsym_weak_func |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 373 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | bfa88bc | 2014-12-16 11:40:46 -0800 | [diff] [blame] | 374 | |
| 375 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 76ac1ac | 2015-04-01 14:45:10 -0700 | [diff] [blame] | 376 | # Library to check RTLD_LOCAL with dlsym in 'this' |
| 377 | # ----------------------------------------------------------------------------- |
| 378 | libtest_dlsym_from_this_src_files := dlsym_from_this.cpp |
| 379 | |
| 380 | module := libtest_dlsym_from_this |
Dmitriy Ivanov | 45c5713 | 2015-04-03 15:17:52 -0700 | [diff] [blame] | 381 | libtest_dlsym_from_this_shared_libraries_target := libdl |
Dmitriy Ivanov | 76ac1ac | 2015-04-01 14:45:10 -0700 | [diff] [blame] | 382 | |
| 383 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 384 | |
| 385 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | bfa88bc | 2014-12-16 11:40:46 -0800 | [diff] [blame] | 386 | # Library with weak undefined function |
| 387 | # ----------------------------------------------------------------------------- |
| 388 | libtest_dlopen_weak_undefined_func_src_files := \ |
| 389 | dlopen_weak_undefined.cpp |
| 390 | |
| 391 | module := libtest_dlopen_weak_undefined_func |
| 392 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 279a22f | 2015-01-23 12:03:53 -0800 | [diff] [blame] | 393 | |
| 394 | # ----------------------------------------------------------------------------- |
| 395 | # Library with constructor that calls dlopen() b/7941716 |
| 396 | # ----------------------------------------------------------------------------- |
| 397 | libtest_dlopen_from_ctor_src_files := \ |
| 398 | dlopen_testlib_dlopen_from_ctor.cpp |
| 399 | |
| 400 | module := libtest_dlopen_from_ctor |
| 401 | |
Dmitriy Ivanov | 45c5713 | 2015-04-03 15:17:52 -0700 | [diff] [blame] | 402 | libtest_dlopen_from_ctor_shared_libraries_target := libdl |
Dmitriy Ivanov | 279a22f | 2015-01-23 12:03:53 -0800 | [diff] [blame] | 403 | |
Dmitriy Ivanov | 45c5713 | 2015-04-03 15:17:52 -0700 | [diff] [blame] | 404 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 279a22f | 2015-01-23 12:03:53 -0800 | [diff] [blame] | 405 | |
| 406 | # ----------------------------------------------------------------------------- |
| 407 | # Library that depends on the library with constructor that calls dlopen() b/7941716 |
| 408 | # ----------------------------------------------------------------------------- |
| 409 | |
| 410 | libtest_dlopen_from_ctor_main_src_files := empty.cpp |
| 411 | libtest_dlopen_from_ctor_main_shared_libraries := libtest_dlopen_from_ctor |
| 412 | |
| 413 | module := libtest_dlopen_from_ctor_main |
| 414 | include $(LOCAL_PATH)/Android.build.testlib.mk |