Christopher Ferris | fe6ff00 | 2014-01-30 01:04:29 -0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2014 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 | |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 17 | LOCAL_PATH := $(call my-dir) |
| 18 | |
Christopher Ferris | fe6ff00 | 2014-01-30 01:04:29 -0800 | [diff] [blame] | 19 | build_host := false |
| 20 | ifeq ($(HOST_OS),linux) |
| 21 | ifeq ($(HOST_ARCH),$(filter $(HOST_ARCH),x86 x86_64)) |
| 22 | build_host := true |
Ying Wang | 57c68a3 | 2014-02-21 15:53:33 -0800 | [diff] [blame] | 23 | my_host_arch := $(HOST_ARCH) |
Christopher Ferris | 3fa4997 | 2014-01-31 15:07:26 -0800 | [diff] [blame] | 24 | ifneq ($(strip $(BUILD_HOST_64bit)),) |
Ying Wang | 57c68a3 | 2014-02-21 15:53:33 -0800 | [diff] [blame] | 25 | my_host_arch := x86_64 |
Christopher Ferris | 3fa4997 | 2014-01-31 15:07:26 -0800 | [diff] [blame] | 26 | endif |
Christopher Ferris | fe6ff00 | 2014-01-30 01:04:29 -0800 | [diff] [blame] | 27 | endif |
| 28 | endif |
| 29 | |
Christopher Ferris | 76dbee5 | 2014-02-12 21:12:09 -0800 | [diff] [blame] | 30 | # Set to true to enable a debug build of the libraries. |
| 31 | # To control what is logged, set the environment variable UNW_DEBUG_LEVEL=x, |
| 32 | # where x controls the verbosity (from 1 to 20). |
| 33 | debug := false |
| 34 | |
Christopher Ferris | 2319e0f | 2014-04-29 10:23:55 -0700 | [diff] [blame] | 35 | common_conlyflags := \ |
| 36 | -Wno-old-style-declaration \ |
Christopher Ferris | d1c383c | 2014-04-09 16:48:26 -0700 | [diff] [blame] | 37 | |
Christopher Ferris | fe6ff00 | 2014-01-30 01:04:29 -0800 | [diff] [blame] | 38 | common_cflags := \ |
Christopher Ferris | d1c383c | 2014-04-09 16:48:26 -0700 | [diff] [blame] | 39 | -Wno-unused-parameter \ |
| 40 | -Werror \ |
| 41 | |
| 42 | # gcc 4.8 appears to be overeager declaring that a variable is uninitialized, |
| 43 | # under certain circumstances. Turn off this warning only for target so that |
| 44 | # coverage is still present for the host code. When the entire build system |
| 45 | # is switched to 4.9, then this can be removed. |
| 46 | common_cflags_target := \ |
| 47 | -Wno-maybe-uninitialized \ |
| 48 | |
Bernhard Rosenkraenzer | 25a2f1e | 2014-05-13 21:31:55 +0200 | [diff] [blame^] | 49 | ifeq ($(LOCAL_CLANG),true) |
| 50 | # src/mi/backtrace.c is misdetected as a bogus header guard by clang 3.5 |
| 51 | common_cflags += -Wno-header-guard |
| 52 | endif |
| 53 | |
Christopher Ferris | d1c383c | 2014-04-09 16:48:26 -0700 | [diff] [blame] | 54 | ifneq ($(debug),true) |
| 55 | common_cflags += \ |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 56 | -DHAVE_CONFIG_H \ |
| 57 | -DNDEBUG \ |
| 58 | -D_GNU_SOURCE \ |
Christopher Ferris | 9fc75e8 | 2014-01-26 21:39:06 -0800 | [diff] [blame] | 59 | |
Christopher Ferris | 76dbee5 | 2014-02-12 21:12:09 -0800 | [diff] [blame] | 60 | else |
Christopher Ferris | d1c383c | 2014-04-09 16:48:26 -0700 | [diff] [blame] | 61 | common_cflags += \ |
Christopher Ferris | 76dbee5 | 2014-02-12 21:12:09 -0800 | [diff] [blame] | 62 | -DHAVE_CONFIG_H \ |
| 63 | -DDEBUG \ |
| 64 | -D_GNU_SOURCE \ |
| 65 | -U_FORTIFY_SOURCE \ |
| 66 | |
| 67 | endif |
Pavel Chupin | f1f90e7 | 2013-12-04 13:29:29 +0400 | [diff] [blame] | 68 | |
Christopher Ferris | fe6ff00 | 2014-01-30 01:04:29 -0800 | [diff] [blame] | 69 | common_c_includes := \ |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 70 | $(LOCAL_PATH)/src \ |
| 71 | $(LOCAL_PATH)/include \ |
Colin Cross | 26183d2 | 2014-01-24 15:59:56 -0800 | [diff] [blame] | 72 | |
Pavel Chupin | f1f90e7 | 2013-12-04 13:29:29 +0400 | [diff] [blame] | 73 | libunwind_arches := arm arm64 mips x86 x86_64 |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 74 | |
Colin Cross | 26183d2 | 2014-01-24 15:59:56 -0800 | [diff] [blame] | 75 | $(foreach arch,$(libunwind_arches), \ |
Christopher Ferris | fe6ff00 | 2014-01-30 01:04:29 -0800 | [diff] [blame] | 76 | $(eval common_c_includes_$(arch) := $(LOCAL_PATH)/include/tdep-$(arch))) |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 77 | |
Christopher Ferris | fe6ff00 | 2014-01-30 01:04:29 -0800 | [diff] [blame] | 78 | #----------------------------------------------------------------------- |
| 79 | # libunwind shared library |
| 80 | #----------------------------------------------------------------------- |
| 81 | libunwind_src_files := \ |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 82 | src/mi/init.c \ |
| 83 | src/mi/flush_cache.c \ |
| 84 | src/mi/mempool.c \ |
| 85 | src/mi/strerror.c \ |
| 86 | src/mi/backtrace.c \ |
| 87 | src/mi/dyn-cancel.c \ |
| 88 | src/mi/dyn-info-list.c \ |
| 89 | src/mi/dyn-register.c \ |
Christopher Ferris | f4a8df5 | 2014-03-07 19:40:06 -0800 | [diff] [blame] | 90 | src/mi/map.c \ |
| 91 | src/mi/Lmap.c \ |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 92 | src/mi/Ldyn-extract.c \ |
| 93 | src/mi/Lfind_dynamic_proc_info.c \ |
| 94 | src/mi/Lget_proc_info_by_ip.c \ |
| 95 | src/mi/Lget_proc_name.c \ |
| 96 | src/mi/Lput_dynamic_unwind_info.c \ |
| 97 | src/mi/Ldestroy_addr_space.c \ |
| 98 | src/mi/Lget_reg.c \ |
| 99 | src/mi/Lset_reg.c \ |
| 100 | src/mi/Lget_fpreg.c \ |
| 101 | src/mi/Lset_fpreg.c \ |
| 102 | src/mi/Lset_caching_policy.c \ |
| 103 | src/mi/Gdyn-extract.c \ |
| 104 | src/mi/Gdyn-remote.c \ |
| 105 | src/mi/Gfind_dynamic_proc_info.c \ |
| 106 | src/mi/Gget_accessors.c \ |
| 107 | src/mi/Gget_proc_info_by_ip.c \ |
| 108 | src/mi/Gget_proc_name.c \ |
| 109 | src/mi/Gput_dynamic_unwind_info.c \ |
| 110 | src/mi/Gdestroy_addr_space.c \ |
| 111 | src/mi/Gget_reg.c \ |
| 112 | src/mi/Gset_reg.c \ |
| 113 | src/mi/Gget_fpreg.c \ |
| 114 | src/mi/Gset_fpreg.c \ |
| 115 | src/mi/Gset_caching_policy.c \ |
| 116 | src/dwarf/Lexpr.c \ |
| 117 | src/dwarf/Lfde.c \ |
| 118 | src/dwarf/Lparser.c \ |
| 119 | src/dwarf/Lpe.c \ |
| 120 | src/dwarf/Lstep.c \ |
| 121 | src/dwarf/Lfind_proc_info-lsb.c \ |
| 122 | src/dwarf/Lfind_unwind_table.c \ |
| 123 | src/dwarf/Gexpr.c \ |
| 124 | src/dwarf/Gfde.c \ |
| 125 | src/dwarf/Gfind_proc_info-lsb.c \ |
| 126 | src/dwarf/Gfind_unwind_table.c \ |
| 127 | src/dwarf/Gparser.c \ |
| 128 | src/dwarf/Gpe.c \ |
| 129 | src/dwarf/Gstep.c \ |
| 130 | src/dwarf/global.c \ |
Christopher Ferris | f4a8df5 | 2014-03-07 19:40:06 -0800 | [diff] [blame] | 131 | src/os-common.c \ |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 132 | src/os-linux.c \ |
Christopher Ferris | f4a8df5 | 2014-03-07 19:40:06 -0800 | [diff] [blame] | 133 | src/Los-common.c \ |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 134 | |
Christopher Ferris | 9fc75e8 | 2014-01-26 21:39:06 -0800 | [diff] [blame] | 135 | # Arch specific source files. |
Colin Cross | 26183d2 | 2014-01-24 15:59:56 -0800 | [diff] [blame] | 136 | $(foreach arch,$(libunwind_arches), \ |
Christopher Ferris | fe6ff00 | 2014-01-30 01:04:29 -0800 | [diff] [blame] | 137 | $(eval libunwind_src_files_$(arch) += \ |
| 138 | src/$(arch)/is_fpreg.c \ |
| 139 | src/$(arch)/regname.c \ |
| 140 | src/$(arch)/Gcreate_addr_space.c \ |
| 141 | src/$(arch)/Gget_proc_info.c \ |
| 142 | src/$(arch)/Gget_save_loc.c \ |
| 143 | src/$(arch)/Gglobal.c \ |
| 144 | src/$(arch)/Ginit.c \ |
| 145 | src/$(arch)/Ginit_local.c \ |
| 146 | src/$(arch)/Ginit_remote.c \ |
| 147 | src/$(arch)/Gregs.c \ |
| 148 | src/$(arch)/Gresume.c \ |
| 149 | src/$(arch)/Gstep.c \ |
| 150 | src/$(arch)/Lcreate_addr_space.c \ |
| 151 | src/$(arch)/Lget_proc_info.c \ |
| 152 | src/$(arch)/Lget_save_loc.c \ |
| 153 | src/$(arch)/Lglobal.c \ |
| 154 | src/$(arch)/Linit.c \ |
| 155 | src/$(arch)/Linit_local.c \ |
| 156 | src/$(arch)/Linit_remote.c \ |
| 157 | src/$(arch)/Lregs.c \ |
| 158 | src/$(arch)/Lresume.c \ |
| 159 | src/$(arch)/Lstep.c \ |
Colin Cross | 26183d2 | 2014-01-24 15:59:56 -0800 | [diff] [blame] | 160 | )) |
Christopher Ferris | 9fc75e8 | 2014-01-26 21:39:06 -0800 | [diff] [blame] | 161 | |
Christopher Ferris | fe6ff00 | 2014-01-30 01:04:29 -0800 | [diff] [blame] | 162 | # 64-bit architectures |
| 163 | libunwind_src_files_arm64 += src/elf64.c |
| 164 | libunwind_src_files_x86_64 += src/elf64.c |
| 165 | |
| 166 | # 32-bit architectures |
| 167 | libunwind_src_files_arm += src/elf32.c |
| 168 | libunwind_src_files_mips += src/elf32.c |
| 169 | libunwind_src_files_x86 += src/elf32.c |
| 170 | |
| 171 | libunwind_src_files_arm += \ |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 172 | src/arm/getcontext.S \ |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 173 | src/arm/Gis_signal_frame.c \ |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 174 | src/arm/Gex_tables.c \ |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 175 | src/arm/Lis_signal_frame.c \ |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 176 | src/arm/Lex_tables.c \ |
| 177 | |
Christopher Ferris | fe6ff00 | 2014-01-30 01:04:29 -0800 | [diff] [blame] | 178 | libunwind_src_files_arm64 += \ |
Christopher Ferris | 9fc75e8 | 2014-01-26 21:39:06 -0800 | [diff] [blame] | 179 | src/aarch64/Gis_signal_frame.c \ |
| 180 | src/aarch64/Lis_signal_frame.c \ |
| 181 | |
Christopher Ferris | fe6ff00 | 2014-01-30 01:04:29 -0800 | [diff] [blame] | 182 | libunwind_src_files_mips += \ |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 183 | src/mips/getcontext-android.S \ |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 184 | src/mips/Gis_signal_frame.c \ |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 185 | src/mips/Lis_signal_frame.c \ |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 186 | |
Christopher Ferris | fe6ff00 | 2014-01-30 01:04:29 -0800 | [diff] [blame] | 187 | libunwind_src_files_x86 += \ |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 188 | src/x86/getcontext-linux.S \ |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 189 | src/x86/Gos-linux.c \ |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 190 | src/x86/Los-linux.c \ |
| 191 | |
Christopher Ferris | fe6ff00 | 2014-01-30 01:04:29 -0800 | [diff] [blame] | 192 | libunwind_src_files_x86_64 += \ |
Pavel Chupin | f1f90e7 | 2013-12-04 13:29:29 +0400 | [diff] [blame] | 193 | src/x86_64/getcontext.S \ |
| 194 | src/x86_64/Gstash_frame.c \ |
| 195 | src/x86_64/Gtrace.c \ |
| 196 | src/x86_64/Gos-linux.c \ |
| 197 | src/x86_64/Lstash_frame.c \ |
| 198 | src/x86_64/Ltrace.c \ |
| 199 | src/x86_64/Los-linux.c \ |
| 200 | src/x86_64/setcontext.S \ |
| 201 | |
Christopher Ferris | 2319e0f | 2014-04-29 10:23:55 -0700 | [diff] [blame] | 202 | libunwind_src_files += \ |
| 203 | src/unwind/Backtrace.c \ |
| 204 | src/unwind/DeleteException.c \ |
| 205 | src/unwind/FindEnclosingFunction.c \ |
| 206 | src/unwind/ForcedUnwind.c \ |
| 207 | src/unwind/GetBSP.c \ |
| 208 | src/unwind/GetCFA.c \ |
| 209 | src/unwind/GetDataRelBase.c \ |
| 210 | src/unwind/GetGR.c \ |
| 211 | src/unwind/GetIP.c \ |
| 212 | src/unwind/GetIPInfo.c \ |
| 213 | src/unwind/GetLanguageSpecificData.c \ |
| 214 | src/unwind/GetRegionStart.c \ |
| 215 | src/unwind/GetTextRelBase.c \ |
| 216 | src/unwind/RaiseException.c \ |
| 217 | src/unwind/Resume.c \ |
| 218 | src/unwind/Resume_or_Rethrow.c \ |
| 219 | src/unwind/SetGR.c \ |
| 220 | src/unwind/SetIP.c \ |
| 221 | |
Christopher Ferris | fe6ff00 | 2014-01-30 01:04:29 -0800 | [diff] [blame] | 222 | libunwind_shared_libraries_target := \ |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 223 | libdl \ |
| 224 | |
Dan Albert | 162c8cb | 2014-05-09 10:19:20 -0700 | [diff] [blame] | 225 | libunwind_ldflags_host := \ |
| 226 | -nostdlib |
| 227 | |
Christopher Ferris | f4a8df5 | 2014-03-07 19:40:06 -0800 | [diff] [blame] | 228 | libunwind_ldlibs_host := \ |
Dan Albert | 162c8cb | 2014-05-09 10:19:20 -0700 | [diff] [blame] | 229 | -lc \ |
Christopher Ferris | f4a8df5 | 2014-03-07 19:40:06 -0800 | [diff] [blame] | 230 | -lpthread \ |
| 231 | |
Christopher Ferris | 76dbee5 | 2014-02-12 21:12:09 -0800 | [diff] [blame] | 232 | ifeq ($(debug),true) |
| 233 | libunwind_shared_libraries += \ |
| 234 | liblog \ |
| 235 | |
| 236 | endif |
| 237 | |
Christopher Ferris | fe6ff00 | 2014-01-30 01:04:29 -0800 | [diff] [blame] | 238 | module := libunwind |
| 239 | module_tag := optional |
| 240 | build_type := target |
| 241 | build_target := SHARED_LIBRARY |
| 242 | include $(LOCAL_PATH)/Android.build.mk |
| 243 | build_type := host |
| 244 | include $(LOCAL_PATH)/Android.build.mk |
Christopher Ferris | 836d915 | 2013-12-02 12:27:30 -0800 | [diff] [blame] | 245 | |
Dan Albert | 76728fb | 2014-05-09 13:51:35 -0700 | [diff] [blame] | 246 | build_type := target |
| 247 | build_target := STATIC_LIBRARY |
| 248 | include $(LOCAL_PATH)/Android.build.mk |
| 249 | build_type := host |
| 250 | include $(LOCAL_PATH)/Android.build.mk |
| 251 | |
Christopher Ferris | fe6ff00 | 2014-01-30 01:04:29 -0800 | [diff] [blame] | 252 | #----------------------------------------------------------------------- |
| 253 | # libunwind-ptrace shared library |
| 254 | #----------------------------------------------------------------------- |
| 255 | libunwind-ptrace_src_files := \ |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 256 | src/ptrace/_UPT_elf.c \ |
| 257 | src/ptrace/_UPT_accessors.c \ |
| 258 | src/ptrace/_UPT_access_fpreg.c \ |
| 259 | src/ptrace/_UPT_access_mem.c \ |
| 260 | src/ptrace/_UPT_access_reg.c \ |
| 261 | src/ptrace/_UPT_create.c \ |
| 262 | src/ptrace/_UPT_destroy.c \ |
| 263 | src/ptrace/_UPT_find_proc_info.c \ |
| 264 | src/ptrace/_UPT_get_dyn_info_list_addr.c \ |
| 265 | src/ptrace/_UPT_put_unwind_info.c \ |
| 266 | src/ptrace/_UPT_get_proc_name.c \ |
| 267 | src/ptrace/_UPT_reg_offset.c \ |
| 268 | src/ptrace/_UPT_resume.c \ |
| 269 | |
Christopher Ferris | fe6ff00 | 2014-01-30 01:04:29 -0800 | [diff] [blame] | 270 | libunwind-ptrace_shared_libraries := \ |
Christopher Ferris | 1c82a52 | 2013-10-01 12:38:42 -0700 | [diff] [blame] | 271 | libunwind \ |
| 272 | |
Dan Albert | 162c8cb | 2014-05-09 10:19:20 -0700 | [diff] [blame] | 273 | libunwind-ptrace_ldflags_host := \ |
| 274 | -nostdlib |
| 275 | |
| 276 | libunwind-ptrace_ldlibs_host := \ |
| 277 | -lc \ |
Christopher Ferris | f4a8df5 | 2014-03-07 19:40:06 -0800 | [diff] [blame] | 278 | -lpthread \ |
| 279 | |
Christopher Ferris | 76dbee5 | 2014-02-12 21:12:09 -0800 | [diff] [blame] | 280 | ifeq ($(debug),true) |
| 281 | libunwind-ptrace_shared_libraries += \ |
| 282 | liblog \ |
| 283 | |
| 284 | endif |
| 285 | |
Christopher Ferris | fe6ff00 | 2014-01-30 01:04:29 -0800 | [diff] [blame] | 286 | module := libunwind-ptrace |
| 287 | module_tag := optional |
| 288 | build_type := target |
| 289 | build_target := SHARED_LIBRARY |
| 290 | include $(LOCAL_PATH)/Android.build.mk |
| 291 | build_type := host |
| 292 | include $(LOCAL_PATH)/Android.build.mk |
Christopher Ferris | 7c04242 | 2014-04-25 13:21:40 -0700 | [diff] [blame] | 293 | |
| 294 | #----------------------------------------------------------------------- |
| 295 | # libunwind testing |
| 296 | #----------------------------------------------------------------------- |
| 297 | libunwind-unit-tests_cflags := \ |
| 298 | -fno-builtin \ |
| 299 | -O0 \ |
| 300 | -g \ |
| 301 | |
| 302 | libunwind-unit-tests_c_includes := \ |
| 303 | $(LOCAL_PATH)/include \ |
| 304 | |
| 305 | libunwind-unit-tests_src_files := \ |
| 306 | android/tests/local_test.cpp \ |
| 307 | |
| 308 | libunwind-unit-tests_shared_libraries := \ |
| 309 | libunwind \ |
| 310 | |
| 311 | libunwind-unit-tests_multilib := both |
| 312 | module := libunwind-unit-tests |
| 313 | module_tag := optional |
| 314 | build_type := target |
| 315 | build_target := NATIVE_TEST |
| 316 | include $(LOCAL_PATH)/Android.build.mk |
| 317 | build_type := host |
| 318 | include $(LOCAL_PATH)/Android.build.mk |
| 319 | |
| 320 | # Run the unit tests built for x86 or x86_64. |
| 321 | ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64)) |
| 322 | ifneq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86)) |
| 323 | LINKER = linker64 |
| 324 | TEST_SUFFIX = 64 |
| 325 | else |
| 326 | LINKER = linker |
| 327 | TEST_SUFFIX = 32 |
| 328 | endif |
| 329 | |
| 330 | libunwind-unit-tests-run-on-host: libunwind-unit-tests $(TARGET_OUT_EXECUTABLES)/$(LINKER) $(TARGET_OUT_EXECUTABLES)/sh |
| 331 | if [ ! -d /system -o ! -d /system/bin ]; then \ |
| 332 | echo "Attempting to create /system/bin"; \ |
| 333 | sudo mkdir -p -m 0777 /system/bin; \ |
| 334 | fi |
| 335 | mkdir -p $(TARGET_OUT_DATA)/local/tmp |
| 336 | cp $(TARGET_OUT_EXECUTABLES)/$(LINKER) /system/bin |
| 337 | cp $(TARGET_OUT_EXECUTABLES)/sh /system/bin |
| 338 | ANDROID_DATA=$(TARGET_OUT_DATA) \ |
| 339 | ANDROID_ROOT=$(TARGET_OUT) \ |
| 340 | LD_LIBRARY_PATH=$(TARGET_OUT_SHARED_LIBRARIES) \ |
| 341 | $(TARGET_OUT_DATA_NATIVE_TESTS)/libunwind-unit-tests/libunwind-unit-tests$(TEST_SUFFIX) $(LIBUNWIND_TEST_FLAGS) |
| 342 | endif |