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 | |
Dan Albert | 5341691 | 2015-08-10 16:40:06 -0700 | [diff] [blame] | 20 | common_cppflags := |
Dmitriy Ivanov | 4a9e193 | 2014-10-17 11:47:18 -0700 | [diff] [blame] | 21 | common_additional_dependencies := \ |
| 22 | $(LOCAL_PATH)/Android.mk \ |
Evgenii Stepanov | 6865082 | 2015-06-10 13:38:39 -0700 | [diff] [blame] | 23 | $(LOCAL_PATH)/Android.build.dt_runpath.mk \ |
Dmitriy Ivanov | 4a9e193 | 2014-10-17 11:47:18 -0700 | [diff] [blame] | 24 | $(LOCAL_PATH)/Android.build.dlext_testzip.mk \ |
Dmitriy Ivanov | ab972b9 | 2014-11-29 13:57:41 -0800 | [diff] [blame] | 25 | $(LOCAL_PATH)/Android.build.dlopen_2_parents_reloc.mk \ |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 26 | $(LOCAL_PATH)/Android.build.dlopen_check_order_dlsym.mk \ |
| 27 | $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_siblings.mk \ |
| 28 | $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_main_executable.mk \ |
Dmitriy Ivanov | 42d5fcb | 2015-10-29 17:01:24 -0700 | [diff] [blame] | 29 | $(LOCAL_PATH)/Android.build.linker_namespaces.mk \ |
Dmitriy Ivanov | ea295f6 | 2014-11-20 20:47:02 -0800 | [diff] [blame] | 30 | $(LOCAL_PATH)/Android.build.pthread_atfork.mk \ |
Dmitriy Ivanov | 4a9e193 | 2014-10-17 11:47:18 -0700 | [diff] [blame] | 31 | $(LOCAL_PATH)/Android.build.testlib.mk \ |
Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame^] | 32 | $(LOCAL_PATH)/Android.build.testlib.target.mk \ |
Dmitriy Ivanov | 2a81536 | 2015-04-09 13:42:33 -0700 | [diff] [blame] | 33 | $(LOCAL_PATH)/Android.build.versioned_lib.mk \ |
Dmitriy Ivanov | 4a9e193 | 2014-10-17 11:47:18 -0700 | [diff] [blame] | 34 | $(TEST_PATH)/Android.build.mk |
| 35 | |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 36 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 37 | # Library used by dlext tests - with GNU RELRO program header |
| 38 | # ----------------------------------------------------------------------------- |
| 39 | libdlext_test_src_files := \ |
| 40 | dlext_test_library.cpp \ |
| 41 | |
| 42 | libdlext_test_ldflags := \ |
| 43 | -Wl,-z,relro \ |
| 44 | |
Dmitriy Ivanov | edfc9f6 | 2015-09-02 16:32:02 -0700 | [diff] [blame] | 45 | libdlext_test_shared_libraries := libtest_simple |
| 46 | |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 47 | module := libdlext_test |
| 48 | module_tag := optional |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 49 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 50 | |
| 51 | # ----------------------------------------------------------------------------- |
| 52 | # create symlink to libdlext_test.so for symlink test |
| 53 | # ----------------------------------------------------------------------------- |
| 54 | # Use = instead of := to defer the evaluation of $@ |
Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame^] | 55 | $(TARGET_OUT_DATA_NATIVE_TESTS)/bionic-loader-test-libs/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \ |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 56 | $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so |
| 57 | |
| 58 | ifneq ($(TARGET_2ND_ARCH),) |
| 59 | # link 64 bit .so |
Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame^] | 60 | $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS)/bionic-loader-test-libs/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \ |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 61 | $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so |
| 62 | endif |
| 63 | |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 64 | # host symlinks |
| 65 | $(HOST_OUT)/lib64/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \ |
| 66 | $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so |
| 67 | |
| 68 | $(HOST_OUT)/lib/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \ |
| 69 | $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so |
| 70 | |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 71 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 04dc91a | 2014-07-01 14:10:16 -0700 | [diff] [blame] | 72 | # Library used by dlext tests - different name non-default location |
| 73 | # ----------------------------------------------------------------------------- |
Dimitry Ivanov | b16e443 | 2016-08-29 13:15:38 -0700 | [diff] [blame] | 74 | module := libdlext_test_fd |
| 75 | |
Dmitriy Ivanov | 04dc91a | 2014-07-01 14:10:16 -0700 | [diff] [blame] | 76 | libdlext_test_fd_src_files := \ |
| 77 | dlext_test_library.cpp \ |
| 78 | |
Dmitriy Ivanov | edfc9f6 | 2015-09-02 16:32:02 -0700 | [diff] [blame] | 79 | libdlext_test_fd_shared_libraries := libtest_simple |
| 80 | |
Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame^] | 81 | libdlext_test_fd_relative_install_path := $(module) |
| 82 | |
| 83 | libdlext_test_fd_ldflags := -Wl,--rpath,\$${ORIGIN}/.. -Wl,--enable-new-dtags |
| 84 | |
Dmitriy Ivanov | 04dc91a | 2014-07-01 14:10:16 -0700 | [diff] [blame] | 85 | module_tag := optional |
Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame^] | 86 | include $(LOCAL_PATH)/Android.build.testlib.target.mk |
Dmitriy Ivanov | 04dc91a | 2014-07-01 14:10:16 -0700 | [diff] [blame] | 87 | |
Dmitriy Ivanov | b482750 | 2015-09-28 16:38:31 -0700 | [diff] [blame] | 88 | |
| 89 | # ----------------------------------------------------------------------------- |
| 90 | # Libraries used by dlext tests for open from a zip-file |
| 91 | # ----------------------------------------------------------------------------- |
Dimitry Ivanov | b16e443 | 2016-08-29 13:15:38 -0700 | [diff] [blame] | 92 | module := libdlext_test_zip |
| 93 | |
Dmitriy Ivanov | b482750 | 2015-09-28 16:38:31 -0700 | [diff] [blame] | 94 | libdlext_test_zip_src_files := \ |
| 95 | dlext_test_library.cpp \ |
| 96 | |
| 97 | libdlext_test_zip_shared_libraries := libatest_simple_zip |
| 98 | |
Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame^] | 99 | libdlext_test_zip_relative_install_path := $(module) |
Dmitriy Ivanov | b482750 | 2015-09-28 16:38:31 -0700 | [diff] [blame] | 100 | module_tag := optional |
Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame^] | 101 | include $(LOCAL_PATH)/Android.build.testlib.target.mk |
Dmitriy Ivanov | b482750 | 2015-09-28 16:38:31 -0700 | [diff] [blame] | 102 | |
Dimitry Ivanov | b16e443 | 2016-08-29 13:15:38 -0700 | [diff] [blame] | 103 | module := libatest_simple_zip |
| 104 | |
Dmitriy Ivanov | b482750 | 2015-09-28 16:38:31 -0700 | [diff] [blame] | 105 | libatest_simple_zip_src_files := \ |
| 106 | dlopen_testlib_simple.cpp |
| 107 | |
Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame^] | 108 | libatest_simple_zip_relative_install_path := $(module) |
Dmitriy Ivanov | b482750 | 2015-09-28 16:38:31 -0700 | [diff] [blame] | 109 | module_tag := optional |
Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame^] | 110 | include $(LOCAL_PATH)/Android.build.testlib.target.mk |
Dmitriy Ivanov | b482750 | 2015-09-28 16:38:31 -0700 | [diff] [blame] | 111 | |
Dmitriy Ivanov | 618f1a3 | 2015-03-17 20:06:36 -0700 | [diff] [blame] | 112 | # ---------------------------------------------------------------------------- |
| 113 | # Library with soname which does not match filename |
| 114 | # ---------------------------------------------------------------------------- |
| 115 | libdlext_test_different_soname_src_files := \ |
| 116 | dlext_test_library.cpp \ |
| 117 | |
| 118 | module := libdlext_test_different_soname |
| 119 | module_tag := optional |
| 120 | libdlext_test_different_soname_ldflags := -Wl,-soname=libdlext_test_soname.so |
| 121 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 122 | |
Dmitriy Ivanov | 04dc91a | 2014-07-01 14:10:16 -0700 | [diff] [blame] | 123 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 07e5bc1 | 2014-10-03 17:52:44 -0700 | [diff] [blame] | 124 | # Library used by dlext tests - zipped and aligned |
| 125 | # ----------------------------------------------------------------------------- |
| 126 | include $(CLEAR_VARS) |
Dmitriy Ivanov | 75d66dd | 2014-10-07 09:46:46 -0700 | [diff] [blame] | 127 | bionic_2nd_arch_prefix := |
Dmitriy Ivanov | 07e5bc1 | 2014-10-03 17:52:44 -0700 | [diff] [blame] | 128 | include $(LOCAL_PATH)/Android.build.dlext_testzip.mk |
| 129 | ifneq ($(TARGET_2ND_ARCH),) |
Dmitriy Ivanov | 75d66dd | 2014-10-07 09:46:46 -0700 | [diff] [blame] | 130 | bionic_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) |
Dmitriy Ivanov | 07e5bc1 | 2014-10-03 17:52:44 -0700 | [diff] [blame] | 131 | include $(LOCAL_PATH)/Android.build.dlext_testzip.mk |
| 132 | endif |
| 133 | |
| 134 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 42d5fcb | 2015-10-29 17:01:24 -0700 | [diff] [blame] | 135 | # Build test helper libraries for linker namespaces |
| 136 | # ----------------------------------------------------------------------------- |
| 137 | include $(LOCAL_PATH)/Android.build.linker_namespaces.mk |
| 138 | |
| 139 | # ----------------------------------------------------------------------------- |
Evgenii Stepanov | 6865082 | 2015-06-10 13:38:39 -0700 | [diff] [blame] | 140 | # Build DT_RUNPATH test helper libraries |
| 141 | # ----------------------------------------------------------------------------- |
| 142 | include $(LOCAL_PATH)/Android.build.dt_runpath.mk |
| 143 | |
| 144 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | ab972b9 | 2014-11-29 13:57:41 -0800 | [diff] [blame] | 145 | # Build library with two parents |
| 146 | # ----------------------------------------------------------------------------- |
| 147 | include $(LOCAL_PATH)/Android.build.dlopen_2_parents_reloc.mk |
| 148 | |
| 149 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 150 | # Build libtest_check_order_dlsym.so with its dependencies. |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 151 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 152 | include $(LOCAL_PATH)/Android.build.dlopen_check_order_dlsym.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 153 | |
| 154 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 155 | # Build libtest_check_order_siblings.so with its dependencies. |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 156 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 157 | include $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_siblings.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 158 | |
| 159 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 160 | # Build libtest_check_order_root.so with its dependencies. |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 161 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 162 | include $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_main_executable.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 163 | |
| 164 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 2a81536 | 2015-04-09 13:42:33 -0700 | [diff] [blame] | 165 | # Build libtest_versioned_lib.so with its dependencies. |
| 166 | # ----------------------------------------------------------------------------- |
| 167 | include $(LOCAL_PATH)/Android.build.versioned_lib.mk |
| 168 | |
| 169 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | ea295f6 | 2014-11-20 20:47:02 -0800 | [diff] [blame] | 170 | # Build libraries needed by pthread_atfork tests |
| 171 | # ----------------------------------------------------------------------------- |
| 172 | include $(LOCAL_PATH)/Android.build.pthread_atfork.mk |
| 173 | |
| 174 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | aa0f2bd | 2014-07-28 17:32:20 -0700 | [diff] [blame] | 175 | # Library with dependency used by dlfcn tests |
| 176 | # ----------------------------------------------------------------------------- |
| 177 | libtest_with_dependency_src_files := \ |
| 178 | dlopen_testlib_simple.cpp |
| 179 | |
| 180 | libtest_with_dependency_shared_libraries := libdlext_test |
| 181 | |
| 182 | module := libtest_with_dependency |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 183 | include $(LOCAL_PATH)/Android.build.testlib.mk |