Evgenii Stepanov | 6865082 | 2015-06-10 13:38:39 -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 | # ----------------------------------------------------------------------------- |
| 18 | # Libraries used by dt_runpath tests. |
| 19 | # ----------------------------------------------------------------------------- |
| 20 | |
Dmitriy Ivanov | a1feb11 | 2015-10-01 18:41:57 -0700 | [diff] [blame] | 21 | # |
| 22 | # Dependencies |
| 23 | # |
| 24 | # libtest_dt_runpath_d.so runpath: ${ORIGIN}/dt_runpath_b_c_x |
| 25 | # |-> dt_runpath_b_c_x/libtest_dt_runpath_b.so runpath: ${ORIGIN}/../dt_runpath_a |
| 26 | # | |-> dt_runpath_a/libtest_dt_runpath_a.so |
| 27 | # |-> dt_runpath_b_c_x/libtest_dt_runpath_c.so runpath: ${ORIGIN}/invalid_dt_runpath |
| 28 | # | |-> libtest_dt_runpath_a.so (soname) |
| 29 | # |
| 30 | # This one is used to test dlopen |
| 31 | # dt_runpath_b_c_x/libtest_dt_runpath_x.so |
| 32 | # |
| 33 | |
Evgenii Stepanov | 6865082 | 2015-06-10 13:38:39 -0700 | [diff] [blame] | 34 | # A leaf library in a non-standard directory. |
| 35 | libtest_dt_runpath_a_src_files := \ |
| 36 | empty.cpp |
| 37 | |
| 38 | libtest_dt_runpath_a_relative_path := dt_runpath_a |
| 39 | module := libtest_dt_runpath_a |
| 40 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 41 | |
| 42 | # Depends on library A with a DT_RUNPATH |
| 43 | libtest_dt_runpath_b_src_files := \ |
| 44 | empty.cpp |
| 45 | |
| 46 | libtest_dt_runpath_b_shared_libraries := libtest_dt_runpath_a |
Dmitriy Ivanov | 3fef96f | 2015-07-20 10:47:49 -0700 | [diff] [blame] | 47 | libtest_dt_runpath_b_ldflags := -Wl,--rpath,\$${ORIGIN}/../dt_runpath_a -Wl,--enable-new-dtags |
Evgenii Stepanov | 6865082 | 2015-06-10 13:38:39 -0700 | [diff] [blame] | 48 | libtest_dt_runpath_b_relative_path := dt_runpath_b_c_x |
| 49 | module := libtest_dt_runpath_b |
| 50 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 51 | |
| 52 | # Depends on library A with an incorrect DT_RUNPATH. This does not matter |
| 53 | # because B is the first in the D (below) dependency order, and library A |
| 54 | # is already loaded using the correct DT_RUNPATH from library B. |
| 55 | libtest_dt_runpath_c_src_files := \ |
| 56 | empty.cpp |
| 57 | |
| 58 | libtest_dt_runpath_c_shared_libraries := libtest_dt_runpath_a |
Dmitriy Ivanov | 3fef96f | 2015-07-20 10:47:49 -0700 | [diff] [blame] | 59 | libtest_dt_runpath_c_ldflags := -Wl,--rpath,\$${ORIGIN}/invalid_dt_runpath -Wl,--enable-new-dtags |
Evgenii Stepanov | 6865082 | 2015-06-10 13:38:39 -0700 | [diff] [blame] | 60 | libtest_dt_runpath_c_relative_path := dt_runpath_b_c_x |
| 61 | module := libtest_dt_runpath_c |
| 62 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 63 | |
| 64 | # D depends on B and C with DT_RUNPATH. |
| 65 | libtest_dt_runpath_d_src_files := \ |
| 66 | dlopen_b.cpp |
| 67 | |
| 68 | libtest_dt_runpath_d_shared_libraries := libtest_dt_runpath_b libtest_dt_runpath_c |
Dmitriy Ivanov | 3fef96f | 2015-07-20 10:47:49 -0700 | [diff] [blame] | 69 | libtest_dt_runpath_d_ldflags := -Wl,--rpath,\$${ORIGIN}/dt_runpath_b_c_x -Wl,--enable-new-dtags |
Colin Cross | d0ba52e | 2016-10-20 10:39:50 -0700 | [diff] [blame] | 70 | libtest_dt_runpath_d_ldlibs := -ldl |
Evgenii Stepanov | 6865082 | 2015-06-10 13:38:39 -0700 | [diff] [blame] | 71 | module := libtest_dt_runpath_d |
| 72 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 73 | |
Dmitriy Ivanov | a1feb11 | 2015-10-01 18:41:57 -0700 | [diff] [blame] | 74 | # D version for open-from-zip test with runpath |
Dimitry Ivanov | b16e443 | 2016-08-29 13:15:38 -0700 | [diff] [blame] | 75 | module := libtest_dt_runpath_d_zip |
| 76 | |
Dmitriy Ivanov | a1feb11 | 2015-10-01 18:41:57 -0700 | [diff] [blame] | 77 | libtest_dt_runpath_d_zip_src_files := \ |
| 78 | dlopen_b.cpp |
| 79 | |
| 80 | libtest_dt_runpath_d_zip_shared_libraries := libtest_dt_runpath_b libtest_dt_runpath_c |
| 81 | libtest_dt_runpath_d_zip_ldflags := -Wl,--rpath,\$${ORIGIN}/dt_runpath_b_c_x -Wl,--enable-new-dtags |
Colin Cross | d0ba52e | 2016-10-20 10:39:50 -0700 | [diff] [blame] | 82 | libtest_dt_runpath_d_zip_ldlibs := -ldl |
Kevin Brodsky | ee2952e | 2016-12-09 09:54:42 +0000 | [diff] [blame] | 83 | libtest_dt_runpath_d_zip_install_to_native_tests_dir := $(module) |
Dimitry Ivanov | b16e443 | 2016-08-29 13:15:38 -0700 | [diff] [blame] | 84 | |
Dmitriy Ivanov | a1feb11 | 2015-10-01 18:41:57 -0700 | [diff] [blame] | 85 | module_tag := optional |
| 86 | build_type := target |
| 87 | build_target := SHARED_LIBRARY |
| 88 | include $(TEST_PATH)/Android.build.mk |
| 89 | |
| 90 | |
Evgenii Stepanov | 6865082 | 2015-06-10 13:38:39 -0700 | [diff] [blame] | 91 | # A leaf library in a directory library D has DT_RUNPATH for. |
| 92 | libtest_dt_runpath_x_src_files := \ |
| 93 | empty.cpp |
| 94 | |
| 95 | libtest_dt_runpath_x_relative_path := dt_runpath_b_c_x |
| 96 | module := libtest_dt_runpath_x |
| 97 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | a1feb11 | 2015-10-01 18:41:57 -0700 | [diff] [blame] | 98 | |