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