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 | |
| 21 | # A leaf library in a non-standard directory. |
| 22 | libtest_dt_runpath_a_src_files := \ |
| 23 | empty.cpp |
| 24 | |
| 25 | libtest_dt_runpath_a_relative_path := dt_runpath_a |
| 26 | module := libtest_dt_runpath_a |
| 27 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 28 | |
| 29 | # Depends on library A with a DT_RUNPATH |
| 30 | libtest_dt_runpath_b_src_files := \ |
| 31 | empty.cpp |
| 32 | |
| 33 | libtest_dt_runpath_b_shared_libraries := libtest_dt_runpath_a |
| 34 | libtest_dt_runpath_b_ldflags := -Wl,--rpath,\$${ORIGIN}/../dt_runpath_a |
| 35 | libtest_dt_runpath_b_relative_path := dt_runpath_b_c_x |
| 36 | module := libtest_dt_runpath_b |
| 37 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 38 | |
| 39 | # Depends on library A with an incorrect DT_RUNPATH. This does not matter |
| 40 | # because B is the first in the D (below) dependency order, and library A |
| 41 | # is already loaded using the correct DT_RUNPATH from library B. |
| 42 | libtest_dt_runpath_c_src_files := \ |
| 43 | empty.cpp |
| 44 | |
| 45 | libtest_dt_runpath_c_shared_libraries := libtest_dt_runpath_a |
| 46 | libtest_dt_runpath_c_ldflags := -Wl,--rpath,\$${ORIGIN}/invalid_dt_runpath |
| 47 | libtest_dt_runpath_c_relative_path := dt_runpath_b_c_x |
| 48 | module := libtest_dt_runpath_c |
| 49 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 50 | |
| 51 | # D depends on B and C with DT_RUNPATH. |
| 52 | libtest_dt_runpath_d_src_files := \ |
| 53 | dlopen_b.cpp |
| 54 | |
| 55 | libtest_dt_runpath_d_shared_libraries := libtest_dt_runpath_b libtest_dt_runpath_c |
| 56 | libtest_dt_runpath_d_ldflags := -Wl,--rpath,\$${ORIGIN}/dt_runpath_b_c_x |
| 57 | module := libtest_dt_runpath_d |
| 58 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 59 | |
| 60 | # A leaf library in a directory library D has DT_RUNPATH for. |
| 61 | libtest_dt_runpath_x_src_files := \ |
| 62 | empty.cpp |
| 63 | |
| 64 | libtest_dt_runpath_x_relative_path := dt_runpath_b_c_x |
| 65 | module := libtest_dt_runpath_x |
| 66 | include $(LOCAL_PATH)/Android.build.testlib.mk |