| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1 | // Define the common source files for all the libc instances | 
 | 2 | // ========================================================= | 
 | 3 | libc_common_src_files = [ | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 4 |     "bionic/ether_aton.c", | 
 | 5 |     "bionic/ether_ntoa.c", | 
 | 6 |     "bionic/fts.c", | 
 | 7 |     "bionic/getpriority.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 8 |     "bionic/initgroups.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 9 |     "bionic/isatty.c", | 
 | 10 |     "bionic/memmem.c", | 
 | 11 |     "bionic/pututline.c", | 
 | 12 |     "bionic/sched_cpualloc.c", | 
 | 13 |     "bionic/sched_cpucount.c", | 
 | 14 |     "bionic/sigblock.c", | 
 | 15 |     "bionic/siginterrupt.c", | 
 | 16 |     "bionic/sigsetmask.c", | 
 | 17 |     "bionic/system_properties_compat.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 18 |     "stdio/fread.c", | 
| Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 19 |     "stdio/refill.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 20 |     "stdio/snprintf.c", | 
 | 21 |     "stdio/sprintf.c", | 
| Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 22 |     "stdio/stdio.cpp", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 23 |     "stdio/stdio_ext.cpp", | 
 | 24 |     "stdlib/atexit.c", | 
 | 25 |     "stdlib/exit.c", | 
 | 26 |  | 
 | 27 |     // Fortify implementations of libc functions. | 
 | 28 |     "bionic/__FD_chk.cpp", | 
 | 29 |     "bionic/__fgets_chk.cpp", | 
 | 30 |     "bionic/__fread_chk.cpp", | 
 | 31 |     "bionic/__fwrite_chk.cpp", | 
 | 32 |     "bionic/__getcwd_chk.cpp", | 
 | 33 |     "bionic/__memchr_chk.cpp", | 
 | 34 |     "bionic/__memmove_chk.cpp", | 
 | 35 |     "bionic/__memrchr_chk.cpp", | 
 | 36 |     "bionic/__poll_chk.cpp", | 
 | 37 |     "bionic/__pread64_chk.cpp", | 
 | 38 |     "bionic/__pread_chk.cpp", | 
 | 39 |     "bionic/__pwrite64_chk.cpp", | 
 | 40 |     "bionic/__pwrite_chk.cpp", | 
 | 41 |     "bionic/__read_chk.cpp", | 
 | 42 |     "bionic/__readlink_chk.cpp", | 
 | 43 |     "bionic/__readlinkat_chk.cpp", | 
 | 44 |     "bionic/__recvfrom_chk.cpp", | 
 | 45 |     "bionic/__stpcpy_chk.cpp", | 
 | 46 |     "bionic/__stpncpy_chk.cpp", | 
 | 47 |     "bionic/__strchr_chk.cpp", | 
 | 48 |     "bionic/__strlcat_chk.cpp", | 
 | 49 |     "bionic/__strlcpy_chk.cpp", | 
 | 50 |     "bionic/__strlen_chk.cpp", | 
 | 51 |     "bionic/__strncat_chk.cpp", | 
 | 52 |     "bionic/__strncpy_chk.cpp", | 
 | 53 |     "bionic/__strrchr_chk.cpp", | 
 | 54 |     "bionic/__umask_chk.cpp", | 
 | 55 |     "bionic/__vsnprintf_chk.cpp", | 
 | 56 |     "bionic/__vsprintf_chk.cpp", | 
 | 57 |     "bionic/__write_chk.cpp", | 
 | 58 | ] | 
 | 59 |  | 
 | 60 | // Various kinds of cruft. | 
 | 61 | // ======================================================== | 
 | 62 | libc_common_src_files += [ | 
 | 63 |     "bionic/ndk_cruft.cpp", | 
 | 64 | ] | 
 | 65 |  | 
 | 66 | libc_common_src_files_32 = [ | 
 | 67 |     "bionic/legacy_32_bit_support.cpp", | 
 | 68 |     "bionic/time64.c", | 
 | 69 | ] | 
 | 70 |  | 
 | 71 | // Define some common cflags | 
 | 72 | // ======================================================== | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 73 | cc_defaults { | 
 | 74 |     name: "libc_defaults", | 
 | 75 |     cflags: [ | 
 | 76 |         "-D_LIBC=1", | 
 | 77 |         "-Wall", | 
 | 78 |         "-Wextra", | 
 | 79 |         "-Wunused", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 80 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 81 |         // Try to catch typical 32-bit assumptions that break with 64-bit pointers. | 
 | 82 |         "-Werror=pointer-to-int-cast", | 
 | 83 |         "-Werror=int-to-pointer-cast", | 
 | 84 |         "-Werror=type-limits", | 
 | 85 |         "-Werror", | 
 | 86 |     ], | 
 | 87 |     // TODO: split out the asflags. | 
 | 88 |     asflags: [ | 
 | 89 |         "-D_LIBC=1", | 
 | 90 |         "-Wall", | 
 | 91 |         "-Wextra", | 
 | 92 |         "-Wunused", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 93 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 94 |         // Try to catch typical 32-bit assumptions that break with 64-bit pointers. | 
 | 95 |         "-Werror=pointer-to-int-cast", | 
 | 96 |         "-Werror=int-to-pointer-cast", | 
 | 97 |         "-Werror=type-limits", | 
 | 98 |         "-Werror", | 
 | 99 |     ], | 
 | 100 |     conlyflags: ["-std=gnu99"], | 
 | 101 |     cppflags: [], | 
| Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 102 |     include_dirs: ["external/jemalloc/include"], | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 103 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 104 |     arch: { | 
| Dan Willemsen | e4f486c | 2016-01-13 23:22:22 -0800 | [diff] [blame] | 105 |         // Clang/llvm has incompatible long double (fp128) for x86_64. | 
 | 106 |         // https://llvm.org/bugs/show_bug.cgi?id=23897 | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 107 |         x86_64: { | 
 | 108 |             clang: false, | 
 | 109 |         }, | 
| Dan Willemsen | e4f486c | 2016-01-13 23:22:22 -0800 | [diff] [blame] | 110 |         // b/25291096, Clang/llvm compiled libc.so for mips/mips64 failed to boot. | 
 | 111 |         mips: { | 
 | 112 |             clang: false, | 
 | 113 |         }, | 
 | 114 |         mips64: { | 
 | 115 |             clang: false, | 
 | 116 |         }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 117 |     }, | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 118 |  | 
 | 119 |     stl: "none", | 
 | 120 |     system_shared_libs: [], | 
 | 121 |     sanitize: ["never"], | 
 | 122 |     native_coverage: false, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 123 | } | 
 | 124 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 125 | // ANDROIDMK TRANSLATION ERROR: unsupported directive | 
 | 126 | // ifeq ($(strip $(DEBUG_BIONIC_LIBC)),true) | 
 | 127 | //libc_common_cflags += ["-DDEBUG"] | 
 | 128 | // ANDROIDMK TRANSLATION ERROR: unsupported directive | 
 | 129 | // endif | 
 | 130 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 131 | // ======================================================== | 
 | 132 | // libc_stack_protector.a - stack protector code | 
 | 133 | // ======================================================== | 
 | 134 | // | 
| Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 135 | // Code that implements the stack protector (or that runs | 
 | 136 | // before TLS has been set up) needs to be compiled with | 
 | 137 | // -fno-stack-protector, since it accesses the stack canary | 
 | 138 | // TLS slot. | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 139 |  | 
 | 140 | cc_library_static { | 
 | 141 |  | 
| Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 142 |     srcs: [ | 
 | 143 |         "bionic/__libc_init_main_thread.cpp", | 
 | 144 |         "bionic/__stack_chk_fail.cpp", | 
 | 145 |     ], | 
 | 146 |     arch: { | 
 | 147 |         arm64: { | 
 | 148 |             srcs: ["arch-arm64/bionic/__set_tls.c"], | 
 | 149 |         }, | 
 | 150 |         x86: { | 
| Dan Willemsen | 4031cbe | 2016-01-13 13:36:11 -0800 | [diff] [blame] | 151 |             srcs: ["arch-x86/bionic/__set_tls.c"], | 
| Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 152 |         }, | 
 | 153 |         x86_64: { | 
 | 154 |             srcs: ["arch-x86_64/bionic/__set_tls.c"], | 
 | 155 |         }, | 
 | 156 |     }, | 
 | 157 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 158 |     defaults: ["libc_defaults"], | 
 | 159 |     cflags: ["-fno-stack-protector"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 160 |     name: "libc_stack_protector", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 161 | } | 
 | 162 |  | 
| Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 163 | // libc_init_static.cpp also needs to be built without stack protector, | 
 | 164 | // because it's responsible for setting up TLS for static executables. | 
 | 165 | // This isn't the case for dynamic executables because the dynamic linker | 
 | 166 | // has already set up the main thread's TLS. | 
 | 167 |  | 
 | 168 | cc_library_static { | 
 | 169 |     name: "libc_init_static", | 
 | 170 |     defaults: ["libc_defaults"], | 
 | 171 |     srcs: ["bionic/libc_init_static.cpp"], | 
 | 172 |     cflags: ["-fno-stack-protector"], | 
 | 173 | } | 
 | 174 |  | 
 | 175 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 176 | // ======================================================== | 
 | 177 | // libc_tzcode.a - upstream 'tzcode' code | 
 | 178 | // ======================================================== | 
 | 179 |  | 
 | 180 | cc_library_static { | 
 | 181 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 182 |     defaults: ["libc_defaults"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 183 |     srcs: [ | 
| Dan Willemsen | 9c9aa74 | 2016-01-15 16:00:57 -0800 | [diff] [blame] | 184 |         "tzcode/**/*.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 185 |         "upstream-openbsd/lib/libc/time/wcsftime.c", // tzcode doesn't include wcsftime, so we use the OpenBSD one. | 
 | 186 |     ], | 
 | 187 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 188 |     cflags: [ | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 189 |         "-fvisibility=hidden", | 
| Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 190 |         "-Wno-unused-parameter", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 191 |         // Don't use ridiculous amounts of stack. | 
 | 192 |         "-DALL_STATE", | 
 | 193 |         // Include tzsetwall, timelocal, timegm, time2posix, and posix2time. | 
 | 194 |         "-DSTD_INSPIRED", | 
| Colin Cross | a35d23d | 2015-11-19 13:32:49 -0800 | [diff] [blame] | 195 |         // Obviously, we want to be thread-safe. | 
| Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 196 |         "-DTHREAD_SAFE", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 197 |         // The name of the tm_gmtoff field in our struct tm. | 
 | 198 |         "-DTM_GMTOFF=tm_gmtoff", | 
 | 199 |         // Where we store our tzdata. | 
 | 200 |         "-DTZDIR=\\\"/system/usr/share/zoneinfo\\\"", | 
 | 201 |         // Include timezone and daylight globals. | 
 | 202 |         "-DUSG_COMPAT=1", | 
| Colin Cross | a35d23d | 2015-11-19 13:32:49 -0800 | [diff] [blame] | 203 |         // Use the empty string (instead of "   ") as the timezone abbreviation | 
 | 204 |         // fallback. | 
 | 205 |         "-DWILDABBR=\\\"\\\"", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 206 |         "-DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU", | 
 | 207 |         "-Dlint", | 
 | 208 |     ], | 
 | 209 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 210 |     local_include_dirs: ["tzcode/"], | 
 | 211 |     name: "libc_tzcode", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 212 | } | 
 | 213 |  | 
 | 214 | // ======================================================== | 
 | 215 | // libc_dns.a - modified NetBSD DNS code | 
 | 216 | // ======================================================== | 
 | 217 |  | 
 | 218 | cc_library_static { | 
 | 219 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 220 |     defaults: ["libc_defaults"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 221 |     srcs: [ | 
| Dan Willemsen | 9c9aa74 | 2016-01-15 16:00:57 -0800 | [diff] [blame] | 222 |         "dns/**/*.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 223 |  | 
 | 224 |         "upstream-netbsd/lib/libc/isc/ev_streams.c", | 
 | 225 |         "upstream-netbsd/lib/libc/isc/ev_timers.c", | 
 | 226 |         "upstream-netbsd/lib/libc/resolv/mtctxres.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 227 |     ], | 
 | 228 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 229 |     cflags: [ | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 230 |         "-DANDROID_CHANGES", | 
 | 231 |         "-DINET6", | 
 | 232 |         "-fvisibility=hidden", | 
 | 233 |         "-Wno-unused-parameter", | 
 | 234 |         "-include netbsd-compat.h", | 
 | 235 |     ], | 
 | 236 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 237 |     local_include_dirs: [ | 
 | 238 |         "dns/include", | 
 | 239 |         "private", | 
 | 240 |         "upstream-netbsd/lib/libc/include", | 
 | 241 |         "upstream-netbsd/android/include", | 
 | 242 |     ], | 
 | 243 |  | 
 | 244 |     name: "libc_dns", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 245 | } | 
 | 246 |  | 
 | 247 | // ======================================================== | 
 | 248 | // libc_freebsd.a - upstream FreeBSD C library code | 
 | 249 | // ======================================================== | 
 | 250 | // | 
 | 251 | // These files are built with the freebsd-compat.h header file | 
 | 252 | // automatically included. | 
 | 253 |  | 
 | 254 | cc_library_static { | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 255 |     defaults: ["libc_defaults"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 256 |     srcs: [ | 
 | 257 |         "upstream-freebsd/lib/libc/gen/ldexp.c", | 
 | 258 |         "upstream-freebsd/lib/libc/gen/sleep.c", | 
 | 259 |         "upstream-freebsd/lib/libc/gen/usleep.c", | 
 | 260 |         "upstream-freebsd/lib/libc/stdlib/getopt_long.c", | 
 | 261 |         "upstream-freebsd/lib/libc/stdlib/qsort.c", | 
 | 262 |         "upstream-freebsd/lib/libc/stdlib/quick_exit.c", | 
 | 263 |         "upstream-freebsd/lib/libc/stdlib/realpath.c", | 
 | 264 |         "upstream-freebsd/lib/libc/string/wcpcpy.c", | 
 | 265 |         "upstream-freebsd/lib/libc/string/wcpncpy.c", | 
 | 266 |         "upstream-freebsd/lib/libc/string/wcscasecmp.c", | 
| Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 267 |         "upstream-freebsd/lib/libc/string/wcscat.c", | 
 | 268 |         "upstream-freebsd/lib/libc/string/wcschr.c", | 
 | 269 |         "upstream-freebsd/lib/libc/string/wcscmp.c", | 
 | 270 |         "upstream-freebsd/lib/libc/string/wcscpy.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 271 |         "upstream-freebsd/lib/libc/string/wcscspn.c", | 
 | 272 |         "upstream-freebsd/lib/libc/string/wcsdup.c", | 
 | 273 |         "upstream-freebsd/lib/libc/string/wcslcat.c", | 
| Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 274 |         "upstream-freebsd/lib/libc/string/wcslen.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 275 |         "upstream-freebsd/lib/libc/string/wcsncasecmp.c", | 
 | 276 |         "upstream-freebsd/lib/libc/string/wcsncat.c", | 
 | 277 |         "upstream-freebsd/lib/libc/string/wcsncmp.c", | 
 | 278 |         "upstream-freebsd/lib/libc/string/wcsncpy.c", | 
 | 279 |         "upstream-freebsd/lib/libc/string/wcsnlen.c", | 
 | 280 |         "upstream-freebsd/lib/libc/string/wcspbrk.c", | 
| Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 281 |         "upstream-freebsd/lib/libc/string/wcsrchr.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 282 |         "upstream-freebsd/lib/libc/string/wcsspn.c", | 
 | 283 |         "upstream-freebsd/lib/libc/string/wcstok.c", | 
 | 284 |         "upstream-freebsd/lib/libc/string/wmemchr.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 285 |         "upstream-freebsd/lib/libc/string/wmemcmp.c", | 
 | 286 |         "upstream-freebsd/lib/libc/string/wmemmove.c", | 
| Dan Willemsen | 9c9aa74 | 2016-01-15 16:00:57 -0800 | [diff] [blame] | 287 |         "upstream-freebsd/lib/libc/string/wmemset.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 288 |     ], | 
 | 289 |     arch: { | 
 | 290 |         arm64: { | 
 | 291 |             exclude_srcs: [ | 
 | 292 |                 "upstream-freebsd/lib/libc/string/wmemmove.c", | 
 | 293 |             ], | 
 | 294 |         }, | 
 | 295 |         x86: { | 
 | 296 |             exclude_srcs: [ | 
 | 297 |                 "upstream-freebsd/lib/libc/string/wcschr.c", | 
 | 298 |                 "upstream-freebsd/lib/libc/string/wcscmp.c", | 
 | 299 |                 "upstream-freebsd/lib/libc/string/wcslen.c", | 
 | 300 |                 "upstream-freebsd/lib/libc/string/wcsrchr.c", | 
 | 301 |             ], | 
| Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 302 |             atom: { | 
 | 303 |                 exclude_srcs: [ | 
 | 304 |                     "upstream-freebsd/lib/libc/string/wmemcmp.c", | 
 | 305 |                 ], | 
 | 306 |             }, | 
 | 307 |             ssse3: { | 
 | 308 |                 exclude_srcs: [ | 
 | 309 |                     "upstream-freebsd/lib/libc/string/wcscat.c", | 
 | 310 |                     "upstream-freebsd/lib/libc/string/wcscpy.c", | 
 | 311 |                 ], | 
 | 312 |             }, | 
 | 313 |             sse4: { | 
 | 314 |                 exclude_srcs: [ | 
 | 315 |                     "upstream-freebsd/lib/libc/string/wmemcmp.c", | 
 | 316 |                 ], | 
 | 317 |             }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 318 |         }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 319 |     }, | 
 | 320 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 321 |     cflags: [ | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 322 |         "-Wno-sign-compare", | 
 | 323 |         "-Wno-uninitialized", | 
 | 324 |         "-include freebsd-compat.h", | 
 | 325 |     ], | 
 | 326 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 327 |     local_include_dirs: [ | 
 | 328 |         "upstream-freebsd/android/include", | 
 | 329 |     ], | 
 | 330 |  | 
 | 331 |     name: "libc_freebsd", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 332 | } | 
 | 333 |  | 
 | 334 | // ======================================================== | 
 | 335 | // libc_netbsd.a - upstream NetBSD C library code | 
 | 336 | // ======================================================== | 
 | 337 | // | 
 | 338 | // These files are built with the netbsd-compat.h header file | 
 | 339 | // automatically included. | 
 | 340 |  | 
 | 341 | cc_library_static { | 
 | 342 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 343 |     defaults: ["libc_defaults"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 344 |     srcs: [ | 
 | 345 |         "upstream-netbsd/common/lib/libc/stdlib/random.c", | 
 | 346 |         "upstream-netbsd/lib/libc/gen/ftw.c", | 
 | 347 |         "upstream-netbsd/lib/libc/gen/nftw.c", | 
 | 348 |         "upstream-netbsd/lib/libc/gen/nice.c", | 
 | 349 |         "upstream-netbsd/lib/libc/gen/popen.c", | 
 | 350 |         "upstream-netbsd/lib/libc/gen/psignal.c", | 
 | 351 |         "upstream-netbsd/lib/libc/gen/utime.c", | 
 | 352 |         "upstream-netbsd/lib/libc/gen/utmp.c", | 
 | 353 |         "upstream-netbsd/lib/libc/inet/nsap_addr.c", | 
 | 354 |         "upstream-netbsd/lib/libc/regex/regcomp.c", | 
 | 355 |         "upstream-netbsd/lib/libc/regex/regerror.c", | 
 | 356 |         "upstream-netbsd/lib/libc/regex/regexec.c", | 
 | 357 |         "upstream-netbsd/lib/libc/regex/regfree.c", | 
 | 358 |         "upstream-netbsd/lib/libc/stdlib/bsearch.c", | 
 | 359 |         "upstream-netbsd/lib/libc/stdlib/div.c", | 
 | 360 |         "upstream-netbsd/lib/libc/stdlib/drand48.c", | 
 | 361 |         "upstream-netbsd/lib/libc/stdlib/erand48.c", | 
 | 362 |         "upstream-netbsd/lib/libc/stdlib/jrand48.c", | 
 | 363 |         "upstream-netbsd/lib/libc/stdlib/lcong48.c", | 
 | 364 |         "upstream-netbsd/lib/libc/stdlib/ldiv.c", | 
 | 365 |         "upstream-netbsd/lib/libc/stdlib/lldiv.c", | 
 | 366 |         "upstream-netbsd/lib/libc/stdlib/lrand48.c", | 
 | 367 |         "upstream-netbsd/lib/libc/stdlib/mrand48.c", | 
 | 368 |         "upstream-netbsd/lib/libc/stdlib/nrand48.c", | 
 | 369 |         "upstream-netbsd/lib/libc/stdlib/_rand48.c", | 
 | 370 |         "upstream-netbsd/lib/libc/stdlib/rand_r.c", | 
 | 371 |         "upstream-netbsd/lib/libc/stdlib/reallocarr.c", | 
 | 372 |         "upstream-netbsd/lib/libc/stdlib/seed48.c", | 
 | 373 |         "upstream-netbsd/lib/libc/stdlib/srand48.c", | 
 | 374 |         "upstream-netbsd/lib/libc/string/memccpy.c", | 
 | 375 |         "upstream-netbsd/lib/libc/string/strcasestr.c", | 
 | 376 |         "upstream-netbsd/lib/libc/string/strcoll.c", | 
 | 377 |         "upstream-netbsd/lib/libc/string/strxfrm.c", | 
 | 378 |     ], | 
 | 379 |     multilib: { | 
 | 380 |         lib32: { | 
 | 381 |             // LP32 cruft | 
 | 382 |             srcs: ["upstream-netbsd/common/lib/libc/hash/sha1/sha1.c"], | 
 | 383 |         }, | 
 | 384 |     }, | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 385 |     cflags: [ | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 386 |         "-Wno-sign-compare", | 
 | 387 |         "-Wno-uninitialized", | 
| Colin Cross | 05545f5 | 2016-03-24 13:41:30 -0700 | [diff] [blame] | 388 |         "-Wno-unused-parameter", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 389 |         "-DPOSIX_MISTAKE", | 
 | 390 |         "-include netbsd-compat.h", | 
 | 391 |     ], | 
 | 392 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 393 |     local_include_dirs: [ | 
 | 394 |         "upstream-netbsd/android/include", | 
 | 395 |         "upstream-netbsd/lib/libc/include", | 
 | 396 |     ], | 
 | 397 |  | 
 | 398 |     name: "libc_netbsd", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 399 | } | 
 | 400 |  | 
 | 401 | // ======================================================== | 
 | 402 | // libc_openbsd_ndk.a - upstream OpenBSD C library code | 
 | 403 | // that can be safely included in the libc_ndk.a (doesn't | 
 | 404 | // contain any troublesome global data or constructors). | 
 | 405 | // ======================================================== | 
 | 406 | // | 
 | 407 | // These files are built with the openbsd-compat.h header file | 
 | 408 | // automatically included. | 
 | 409 |  | 
 | 410 | cc_library_static { | 
 | 411 |     name: "libc_openbsd_ndk", | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 412 |     defaults: ["libc_defaults"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 413 |     srcs: [ | 
 | 414 |         "upstream-openbsd/lib/libc/compat-43/killpg.c", | 
 | 415 |         "upstream-openbsd/lib/libc/gen/alarm.c", | 
 | 416 |         "upstream-openbsd/lib/libc/gen/ctype_.c", | 
 | 417 |         "upstream-openbsd/lib/libc/gen/daemon.c", | 
 | 418 |         "upstream-openbsd/lib/libc/gen/err.c", | 
 | 419 |         "upstream-openbsd/lib/libc/gen/errx.c", | 
 | 420 |         "upstream-openbsd/lib/libc/gen/exec.c", | 
 | 421 |         "upstream-openbsd/lib/libc/gen/fnmatch.c", | 
 | 422 |         "upstream-openbsd/lib/libc/gen/ftok.c", | 
 | 423 |         "upstream-openbsd/lib/libc/gen/getprogname.c", | 
 | 424 |         "upstream-openbsd/lib/libc/gen/isctype.c", | 
 | 425 |         "upstream-openbsd/lib/libc/gen/setprogname.c", | 
 | 426 |         "upstream-openbsd/lib/libc/gen/time.c", | 
 | 427 |         "upstream-openbsd/lib/libc/gen/tolower_.c", | 
 | 428 |         "upstream-openbsd/lib/libc/gen/toupper_.c", | 
 | 429 |         "upstream-openbsd/lib/libc/gen/verr.c", | 
 | 430 |         "upstream-openbsd/lib/libc/gen/verrx.c", | 
 | 431 |         "upstream-openbsd/lib/libc/gen/vwarn.c", | 
 | 432 |         "upstream-openbsd/lib/libc/gen/vwarnx.c", | 
 | 433 |         "upstream-openbsd/lib/libc/gen/warn.c", | 
 | 434 |         "upstream-openbsd/lib/libc/gen/warnx.c", | 
 | 435 |         "upstream-openbsd/lib/libc/locale/btowc.c", | 
 | 436 |         "upstream-openbsd/lib/libc/locale/mbrlen.c", | 
 | 437 |         "upstream-openbsd/lib/libc/locale/mbstowcs.c", | 
 | 438 |         "upstream-openbsd/lib/libc/locale/mbtowc.c", | 
 | 439 |         "upstream-openbsd/lib/libc/locale/wcscoll.c", | 
 | 440 |         "upstream-openbsd/lib/libc/locale/wcstod.c", | 
 | 441 |         "upstream-openbsd/lib/libc/locale/wcstof.c", | 
 | 442 |         "upstream-openbsd/lib/libc/locale/wcstoimax.c", | 
 | 443 |         "upstream-openbsd/lib/libc/locale/wcstol.c", | 
 | 444 |         "upstream-openbsd/lib/libc/locale/wcstold.c", | 
 | 445 |         "upstream-openbsd/lib/libc/locale/wcstoll.c", | 
 | 446 |         "upstream-openbsd/lib/libc/locale/wcstombs.c", | 
 | 447 |         "upstream-openbsd/lib/libc/locale/wcstoul.c", | 
 | 448 |         "upstream-openbsd/lib/libc/locale/wcstoull.c", | 
 | 449 |         "upstream-openbsd/lib/libc/locale/wcstoumax.c", | 
 | 450 |         "upstream-openbsd/lib/libc/locale/wcsxfrm.c", | 
 | 451 |         "upstream-openbsd/lib/libc/locale/wctob.c", | 
 | 452 |         "upstream-openbsd/lib/libc/locale/wctomb.c", | 
 | 453 |         "upstream-openbsd/lib/libc/net/htonl.c", | 
 | 454 |         "upstream-openbsd/lib/libc/net/htons.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 455 |         "upstream-openbsd/lib/libc/net/inet_lnaof.c", | 
 | 456 |         "upstream-openbsd/lib/libc/net/inet_makeaddr.c", | 
 | 457 |         "upstream-openbsd/lib/libc/net/inet_netof.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 458 |         "upstream-openbsd/lib/libc/net/inet_ntoa.c", | 
 | 459 |         "upstream-openbsd/lib/libc/net/inet_ntop.c", | 
 | 460 |         "upstream-openbsd/lib/libc/net/inet_pton.c", | 
 | 461 |         "upstream-openbsd/lib/libc/net/ntohl.c", | 
 | 462 |         "upstream-openbsd/lib/libc/net/ntohs.c", | 
| Colin Cross | 8ce38af | 2016-01-19 12:50:20 -0800 | [diff] [blame] | 463 |         "upstream-openbsd/lib/libc/net/res_random.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 464 |         "upstream-openbsd/lib/libc/stdio/asprintf.c", | 
 | 465 |         "upstream-openbsd/lib/libc/stdio/clrerr.c", | 
 | 466 |         "upstream-openbsd/lib/libc/stdio/dprintf.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 467 |         "upstream-openbsd/lib/libc/stdio/feof.c", | 
 | 468 |         "upstream-openbsd/lib/libc/stdio/ferror.c", | 
 | 469 |         "upstream-openbsd/lib/libc/stdio/fflush.c", | 
 | 470 |         "upstream-openbsd/lib/libc/stdio/fgetc.c", | 
 | 471 |         "upstream-openbsd/lib/libc/stdio/fgetln.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 472 |         "upstream-openbsd/lib/libc/stdio/fgets.c", | 
 | 473 |         "upstream-openbsd/lib/libc/stdio/fgetwc.c", | 
 | 474 |         "upstream-openbsd/lib/libc/stdio/fgetws.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 475 |         "upstream-openbsd/lib/libc/stdio/flags.c", | 
 | 476 |         "upstream-openbsd/lib/libc/stdio/fmemopen.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 477 |         "upstream-openbsd/lib/libc/stdio/fprintf.c", | 
 | 478 |         "upstream-openbsd/lib/libc/stdio/fpurge.c", | 
 | 479 |         "upstream-openbsd/lib/libc/stdio/fputc.c", | 
 | 480 |         "upstream-openbsd/lib/libc/stdio/fputs.c", | 
 | 481 |         "upstream-openbsd/lib/libc/stdio/fputwc.c", | 
 | 482 |         "upstream-openbsd/lib/libc/stdio/fputws.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 483 |         "upstream-openbsd/lib/libc/stdio/fscanf.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 484 |         "upstream-openbsd/lib/libc/stdio/fvwrite.c", | 
 | 485 |         "upstream-openbsd/lib/libc/stdio/fwalk.c", | 
 | 486 |         "upstream-openbsd/lib/libc/stdio/fwide.c", | 
 | 487 |         "upstream-openbsd/lib/libc/stdio/fwprintf.c", | 
 | 488 |         "upstream-openbsd/lib/libc/stdio/fwrite.c", | 
 | 489 |         "upstream-openbsd/lib/libc/stdio/fwscanf.c", | 
 | 490 |         "upstream-openbsd/lib/libc/stdio/getc.c", | 
 | 491 |         "upstream-openbsd/lib/libc/stdio/getchar.c", | 
 | 492 |         "upstream-openbsd/lib/libc/stdio/getdelim.c", | 
 | 493 |         "upstream-openbsd/lib/libc/stdio/getline.c", | 
 | 494 |         "upstream-openbsd/lib/libc/stdio/gets.c", | 
 | 495 |         "upstream-openbsd/lib/libc/stdio/getwc.c", | 
 | 496 |         "upstream-openbsd/lib/libc/stdio/getwchar.c", | 
 | 497 |         "upstream-openbsd/lib/libc/stdio/makebuf.c", | 
 | 498 |         "upstream-openbsd/lib/libc/stdio/mktemp.c", | 
 | 499 |         "upstream-openbsd/lib/libc/stdio/open_memstream.c", | 
 | 500 |         "upstream-openbsd/lib/libc/stdio/open_wmemstream.c", | 
 | 501 |         "upstream-openbsd/lib/libc/stdio/perror.c", | 
 | 502 |         "upstream-openbsd/lib/libc/stdio/printf.c", | 
 | 503 |         "upstream-openbsd/lib/libc/stdio/putc.c", | 
 | 504 |         "upstream-openbsd/lib/libc/stdio/putchar.c", | 
 | 505 |         "upstream-openbsd/lib/libc/stdio/puts.c", | 
 | 506 |         "upstream-openbsd/lib/libc/stdio/putwc.c", | 
 | 507 |         "upstream-openbsd/lib/libc/stdio/putwchar.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 508 |         "upstream-openbsd/lib/libc/stdio/remove.c", | 
 | 509 |         "upstream-openbsd/lib/libc/stdio/rewind.c", | 
 | 510 |         "upstream-openbsd/lib/libc/stdio/rget.c", | 
 | 511 |         "upstream-openbsd/lib/libc/stdio/scanf.c", | 
 | 512 |         "upstream-openbsd/lib/libc/stdio/setbuf.c", | 
 | 513 |         "upstream-openbsd/lib/libc/stdio/setbuffer.c", | 
 | 514 |         "upstream-openbsd/lib/libc/stdio/setvbuf.c", | 
 | 515 |         "upstream-openbsd/lib/libc/stdio/sscanf.c", | 
 | 516 |         "upstream-openbsd/lib/libc/stdio/swprintf.c", | 
 | 517 |         "upstream-openbsd/lib/libc/stdio/swscanf.c", | 
 | 518 |         "upstream-openbsd/lib/libc/stdio/tempnam.c", | 
 | 519 |         "upstream-openbsd/lib/libc/stdio/tmpnam.c", | 
 | 520 |         "upstream-openbsd/lib/libc/stdio/ungetc.c", | 
 | 521 |         "upstream-openbsd/lib/libc/stdio/ungetwc.c", | 
 | 522 |         "upstream-openbsd/lib/libc/stdio/vasprintf.c", | 
 | 523 |         "upstream-openbsd/lib/libc/stdio/vdprintf.c", | 
 | 524 |         "upstream-openbsd/lib/libc/stdio/vfprintf.c", | 
 | 525 |         "upstream-openbsd/lib/libc/stdio/vfscanf.c", | 
 | 526 |         "upstream-openbsd/lib/libc/stdio/vfwprintf.c", | 
 | 527 |         "upstream-openbsd/lib/libc/stdio/vfwscanf.c", | 
 | 528 |         "upstream-openbsd/lib/libc/stdio/vprintf.c", | 
 | 529 |         "upstream-openbsd/lib/libc/stdio/vscanf.c", | 
 | 530 |         "upstream-openbsd/lib/libc/stdio/vsnprintf.c", | 
 | 531 |         "upstream-openbsd/lib/libc/stdio/vsprintf.c", | 
 | 532 |         "upstream-openbsd/lib/libc/stdio/vsscanf.c", | 
 | 533 |         "upstream-openbsd/lib/libc/stdio/vswprintf.c", | 
 | 534 |         "upstream-openbsd/lib/libc/stdio/vswscanf.c", | 
 | 535 |         "upstream-openbsd/lib/libc/stdio/vwprintf.c", | 
 | 536 |         "upstream-openbsd/lib/libc/stdio/vwscanf.c", | 
 | 537 |         "upstream-openbsd/lib/libc/stdio/wbuf.c", | 
 | 538 |         "upstream-openbsd/lib/libc/stdio/wprintf.c", | 
 | 539 |         "upstream-openbsd/lib/libc/stdio/wscanf.c", | 
 | 540 |         "upstream-openbsd/lib/libc/stdio/wsetup.c", | 
 | 541 |         "upstream-openbsd/lib/libc/stdlib/abs.c", | 
 | 542 |         "upstream-openbsd/lib/libc/stdlib/atoi.c", | 
 | 543 |         "upstream-openbsd/lib/libc/stdlib/atol.c", | 
 | 544 |         "upstream-openbsd/lib/libc/stdlib/atoll.c", | 
 | 545 |         "upstream-openbsd/lib/libc/stdlib/getenv.c", | 
 | 546 |         "upstream-openbsd/lib/libc/stdlib/insque.c", | 
 | 547 |         "upstream-openbsd/lib/libc/stdlib/imaxabs.c", | 
 | 548 |         "upstream-openbsd/lib/libc/stdlib/imaxdiv.c", | 
 | 549 |         "upstream-openbsd/lib/libc/stdlib/labs.c", | 
 | 550 |         "upstream-openbsd/lib/libc/stdlib/llabs.c", | 
 | 551 |         "upstream-openbsd/lib/libc/stdlib/lsearch.c", | 
 | 552 |         "upstream-openbsd/lib/libc/stdlib/reallocarray.c", | 
 | 553 |         "upstream-openbsd/lib/libc/stdlib/remque.c", | 
 | 554 |         "upstream-openbsd/lib/libc/stdlib/setenv.c", | 
 | 555 |         "upstream-openbsd/lib/libc/stdlib/strtoimax.c", | 
 | 556 |         "upstream-openbsd/lib/libc/stdlib/strtol.c", | 
 | 557 |         "upstream-openbsd/lib/libc/stdlib/strtoll.c", | 
 | 558 |         "upstream-openbsd/lib/libc/stdlib/strtoul.c", | 
 | 559 |         "upstream-openbsd/lib/libc/stdlib/strtoull.c", | 
 | 560 |         "upstream-openbsd/lib/libc/stdlib/strtoumax.c", | 
 | 561 |         "upstream-openbsd/lib/libc/stdlib/system.c", | 
 | 562 |         "upstream-openbsd/lib/libc/stdlib/tfind.c", | 
 | 563 |         "upstream-openbsd/lib/libc/stdlib/tsearch.c", | 
 | 564 |         "upstream-openbsd/lib/libc/string/strcasecmp.c", | 
 | 565 |         "upstream-openbsd/lib/libc/string/strcspn.c", | 
 | 566 |         "upstream-openbsd/lib/libc/string/strdup.c", | 
 | 567 |         "upstream-openbsd/lib/libc/string/strndup.c", | 
 | 568 |         "upstream-openbsd/lib/libc/string/strpbrk.c", | 
 | 569 |         "upstream-openbsd/lib/libc/string/strsep.c", | 
 | 570 |         "upstream-openbsd/lib/libc/string/strspn.c", | 
 | 571 |         "upstream-openbsd/lib/libc/string/strstr.c", | 
 | 572 |         "upstream-openbsd/lib/libc/string/strtok.c", | 
 | 573 |         "upstream-openbsd/lib/libc/string/wmemcpy.c", | 
 | 574 |         "upstream-openbsd/lib/libc/string/wcslcpy.c", | 
 | 575 |         "upstream-openbsd/lib/libc/string/wcsstr.c", | 
 | 576 |         "upstream-openbsd/lib/libc/string/wcswidth.c", | 
 | 577 |     ], | 
 | 578 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 579 |     cflags: [ | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 580 |         "-Wno-sign-compare", | 
 | 581 |         "-Wno-uninitialized", | 
 | 582 |         "-Wno-unused-parameter", | 
 | 583 |         "-include openbsd-compat.h", | 
 | 584 |     ], | 
 | 585 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 586 |     local_include_dirs: [ | 
 | 587 |         "private", | 
 | 588 |         "stdio", | 
 | 589 |         "upstream-openbsd/android/include", | 
 | 590 |         "upstream-openbsd/lib/libc/include", | 
 | 591 |         "upstream-openbsd/lib/libc/gdtoa/", | 
 | 592 |     ], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 593 | } | 
 | 594 |  | 
 | 595 | // ======================================================== | 
 | 596 | // libc_openbsd.a - upstream OpenBSD C library code | 
 | 597 | // ======================================================== | 
 | 598 | // | 
 | 599 | // These files are built with the openbsd-compat.h header file | 
 | 600 | // automatically included. | 
 | 601 | cc_library_static { | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 602 |     defaults: ["libc_defaults"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 603 |     srcs: [ | 
| Dan Willemsen | 35e91a1 | 2015-09-17 15:28:45 -0700 | [diff] [blame] | 604 |         // These two depend on getentropy_linux.c, which isn't in libc_ndk.a. | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 605 |         "upstream-openbsd/lib/libc/crypt/arc4random.c", | 
 | 606 |         "upstream-openbsd/lib/libc/crypt/arc4random_uniform.c", | 
 | 607 |  | 
 | 608 |         // May be overriden by per-arch optimized versions | 
 | 609 |         "upstream-openbsd/lib/libc/string/memchr.c", | 
 | 610 |         "upstream-openbsd/lib/libc/string/memmove.c", | 
 | 611 |         "upstream-openbsd/lib/libc/string/memrchr.c", | 
 | 612 |         "upstream-openbsd/lib/libc/string/stpcpy.c", | 
 | 613 |         "upstream-openbsd/lib/libc/string/stpncpy.c", | 
 | 614 |         "upstream-openbsd/lib/libc/string/strcat.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 615 |         "upstream-openbsd/lib/libc/string/strcpy.c", | 
 | 616 |         "upstream-openbsd/lib/libc/string/strlcat.c", | 
 | 617 |         "upstream-openbsd/lib/libc/string/strlcpy.c", | 
 | 618 |         "upstream-openbsd/lib/libc/string/strncat.c", | 
 | 619 |         "upstream-openbsd/lib/libc/string/strncmp.c", | 
 | 620 |         "upstream-openbsd/lib/libc/string/strncpy.c", | 
 | 621 |     ], | 
 | 622 |     multilib: { | 
 | 623 |         lib32: { | 
 | 624 |             // LP32 cruft | 
 | 625 |             srcs: ["upstream-openbsd/lib/libc/stdio/putw.c"], | 
 | 626 |         }, | 
 | 627 |     }, | 
 | 628 |  | 
 | 629 |     arch: { | 
 | 630 |         arm: { | 
 | 631 |             exclude_srcs: [ | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 632 |                 "upstream-openbsd/lib/libc/string/strcpy.c", | 
 | 633 |             ], | 
| Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 634 |             cortex_a7: { | 
 | 635 |                 exclude_srcs: [ | 
 | 636 |                     "upstream-openbsd/lib/libc/string/memmove.c", | 
 | 637 |                     "upstream-openbsd/lib/libc/string/stpcpy.c", | 
 | 638 |                     "upstream-openbsd/lib/libc/string/strcat.c", | 
 | 639 |                 ], | 
 | 640 |             }, | 
 | 641 |             cortex_a53: { | 
 | 642 |                 exclude_srcs: [ | 
 | 643 |                     "upstream-openbsd/lib/libc/string/memmove.c", | 
 | 644 |                     "upstream-openbsd/lib/libc/string/stpcpy.c", | 
 | 645 |                     "upstream-openbsd/lib/libc/string/strcat.c", | 
 | 646 |                 ], | 
 | 647 |             }, | 
 | 648 |             cortex_a53_a57: { | 
 | 649 |                 exclude_srcs: [ | 
 | 650 |                     "upstream-openbsd/lib/libc/string/memmove.c", | 
 | 651 |                     "upstream-openbsd/lib/libc/string/stpcpy.c", | 
 | 652 |                     "upstream-openbsd/lib/libc/string/strcat.c", | 
 | 653 |                 ], | 
 | 654 |             }, | 
 | 655 |             cortex_a8: { | 
 | 656 |                 exclude_srcs: [ | 
 | 657 |                     "upstream-openbsd/lib/libc/string/memmove.c", | 
 | 658 |                     "upstream-openbsd/lib/libc/string/stpcpy.c", | 
 | 659 |                     "upstream-openbsd/lib/libc/string/strcat.c", | 
 | 660 |                 ], | 
 | 661 |             }, | 
 | 662 |             cortex_a9: { | 
 | 663 |                 exclude_srcs: [ | 
 | 664 |                     "upstream-openbsd/lib/libc/string/memmove.c", | 
 | 665 |                     "upstream-openbsd/lib/libc/string/stpcpy.c", | 
 | 666 |                     "upstream-openbsd/lib/libc/string/strcat.c", | 
 | 667 |                 ], | 
 | 668 |             }, | 
 | 669 |             cortex_a15: { | 
 | 670 |                 exclude_srcs: [ | 
 | 671 |                     "upstream-openbsd/lib/libc/string/memmove.c", | 
 | 672 |                     "upstream-openbsd/lib/libc/string/stpcpy.c", | 
 | 673 |                     "upstream-openbsd/lib/libc/string/strcat.c", | 
 | 674 |                 ], | 
 | 675 |             }, | 
 | 676 |             denver: { | 
 | 677 |                 exclude_srcs: [ | 
 | 678 |                     "upstream-openbsd/lib/libc/string/memmove.c", | 
 | 679 |                     "upstream-openbsd/lib/libc/string/stpcpy.c", | 
 | 680 |                     "upstream-openbsd/lib/libc/string/strcat.c", | 
 | 681 |                 ], | 
 | 682 |             }, | 
 | 683 |             krait: { | 
 | 684 |                 exclude_srcs: [ | 
 | 685 |                     "upstream-openbsd/lib/libc/string/memmove.c", | 
 | 686 |                     "upstream-openbsd/lib/libc/string/stpcpy.c", | 
 | 687 |                     "upstream-openbsd/lib/libc/string/strcat.c", | 
 | 688 |                 ], | 
 | 689 |             }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 690 |         }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 691 |         arm64: { | 
 | 692 |             exclude_srcs: [ | 
 | 693 |                 "upstream-openbsd/lib/libc/string/memchr.c", | 
 | 694 |                 "upstream-openbsd/lib/libc/string/memmove.c", | 
 | 695 |                 "upstream-openbsd/lib/libc/string/stpcpy.c", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 696 |                 "upstream-openbsd/lib/libc/string/strcpy.c", | 
 | 697 |                 "upstream-openbsd/lib/libc/string/strncmp.c", | 
 | 698 |             ], | 
 | 699 |         }, | 
 | 700 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 701 |         x86: { | 
| Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 702 |             exclude_srcs: [ | 
 | 703 |                 "upstream-openbsd/lib/libc/string/memchr.c", | 
 | 704 |                 "upstream-openbsd/lib/libc/string/memmove.c", | 
 | 705 |                 "upstream-openbsd/lib/libc/string/memrchr.c", | 
 | 706 |                 "upstream-openbsd/lib/libc/string/stpcpy.c", | 
 | 707 |                 "upstream-openbsd/lib/libc/string/stpncpy.c", | 
 | 708 |                 "upstream-openbsd/lib/libc/string/strcat.c", | 
 | 709 |                 "upstream-openbsd/lib/libc/string/strcpy.c", | 
 | 710 |                 "upstream-openbsd/lib/libc/string/strncmp.c", | 
 | 711 |                 "upstream-openbsd/lib/libc/string/strncpy.c", | 
 | 712 |             ], | 
 | 713 |             ssse3: { | 
 | 714 |                 exclude_srcs: [ | 
 | 715 |                     "upstream-openbsd/lib/libc/string/strlcat.c", | 
 | 716 |                     "upstream-openbsd/lib/libc/string/strlcpy.c", | 
 | 717 |                     "upstream-openbsd/lib/libc/string/strncat.c", | 
 | 718 |                 ], | 
 | 719 |             }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 720 |         }, | 
 | 721 |  | 
 | 722 |         x86_64: { | 
| Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 723 |             exclude_srcs: [ | 
 | 724 |                 "upstream-openbsd/lib/libc/string/memmove.c", | 
 | 725 |                 "upstream-openbsd/lib/libc/string/stpcpy.c", | 
 | 726 |                 "upstream-openbsd/lib/libc/string/stpncpy.c", | 
 | 727 |                 "upstream-openbsd/lib/libc/string/strcat.c", | 
 | 728 |                 "upstream-openbsd/lib/libc/string/strcpy.c", | 
 | 729 |                 "upstream-openbsd/lib/libc/string/strlcat.c", | 
 | 730 |                 "upstream-openbsd/lib/libc/string/strlcpy.c", | 
 | 731 |                 "upstream-openbsd/lib/libc/string/strncat.c", | 
 | 732 |                 "upstream-openbsd/lib/libc/string/strncmp.c", | 
 | 733 |                 "upstream-openbsd/lib/libc/string/strncpy.c", | 
 | 734 |             ], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 735 |         }, | 
 | 736 |     }, | 
 | 737 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 738 |     cflags: [ | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 739 |         "-Wno-sign-compare", | 
 | 740 |         "-Wno-uninitialized", | 
 | 741 |         "-Wno-unused-parameter", | 
 | 742 |         "-include openbsd-compat.h", | 
 | 743 |     ], | 
 | 744 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 745 |     local_include_dirs: [ | 
 | 746 |         "private", | 
 | 747 |         "stdio", | 
 | 748 |         "upstream-openbsd/android/include", | 
 | 749 |         "upstream-openbsd/lib/libc/include", | 
 | 750 |         "upstream-openbsd/lib/libc/gdtoa/", | 
 | 751 |     ], | 
 | 752 |  | 
 | 753 |     name: "libc_openbsd", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 754 | } | 
 | 755 |  | 
 | 756 | // ======================================================== | 
 | 757 | // libc_gdtoa.a - upstream OpenBSD C library gdtoa code | 
 | 758 | // ======================================================== | 
 | 759 | // | 
 | 760 | // These files are built with the openbsd-compat.h header file | 
 | 761 | // automatically included. | 
 | 762 |  | 
 | 763 | cc_library_static { | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 764 |     defaults: ["libc_defaults"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 765 |     srcs: [ | 
 | 766 |         "upstream-openbsd/android/gdtoa_support.cpp", | 
 | 767 |         "upstream-openbsd/lib/libc/gdtoa/dmisc.c", | 
 | 768 |         "upstream-openbsd/lib/libc/gdtoa/dtoa.c", | 
 | 769 |         "upstream-openbsd/lib/libc/gdtoa/gdtoa.c", | 
 | 770 |         "upstream-openbsd/lib/libc/gdtoa/gethex.c", | 
 | 771 |         "upstream-openbsd/lib/libc/gdtoa/gmisc.c", | 
 | 772 |         "upstream-openbsd/lib/libc/gdtoa/hd_init.c", | 
 | 773 |         "upstream-openbsd/lib/libc/gdtoa/hdtoa.c", | 
 | 774 |         "upstream-openbsd/lib/libc/gdtoa/hexnan.c", | 
 | 775 |         "upstream-openbsd/lib/libc/gdtoa/ldtoa.c", | 
 | 776 |         "upstream-openbsd/lib/libc/gdtoa/misc.c", | 
 | 777 |         "upstream-openbsd/lib/libc/gdtoa/smisc.c", | 
 | 778 |         "upstream-openbsd/lib/libc/gdtoa/strtod.c", | 
 | 779 |         "upstream-openbsd/lib/libc/gdtoa/strtodg.c", | 
 | 780 |         "upstream-openbsd/lib/libc/gdtoa/strtof.c", | 
 | 781 |         "upstream-openbsd/lib/libc/gdtoa/strtord.c", | 
 | 782 |         "upstream-openbsd/lib/libc/gdtoa/sum.c", | 
 | 783 |         "upstream-openbsd/lib/libc/gdtoa/ulp.c", | 
 | 784 |     ], | 
 | 785 |     multilib: { | 
 | 786 |         lib64: { | 
| Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 787 |             srcs: ["upstream-openbsd/lib/libc/gdtoa/strtorQ.c"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 788 |         }, | 
 | 789 |     }, | 
 | 790 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 791 |     cflags: [ | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 792 |         "-Wno-sign-compare", | 
 | 793 |         "-Wno-uninitialized", | 
 | 794 |         "-fvisibility=hidden", | 
 | 795 |         "-include openbsd-compat.h", | 
 | 796 |     ], | 
 | 797 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 798 |     local_include_dirs: [ | 
 | 799 |         "private", | 
 | 800 |         "upstream-openbsd/android/include", | 
 | 801 |         "upstream-openbsd/lib/libc/include", | 
 | 802 |     ], | 
 | 803 |  | 
 | 804 |     name: "libc_gdtoa", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 805 | } | 
 | 806 |  | 
 | 807 | // ======================================================== | 
 | 808 | // libc_bionic.a - home-grown C library code | 
 | 809 | // ======================================================== | 
 | 810 |  | 
 | 811 | cc_library_static { | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 812 |     defaults: ["libc_defaults"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 813 |     srcs: [ | 
| Yabin Cui | 9b687dc | 2015-11-30 14:07:58 -0800 | [diff] [blame] | 814 |         // The following implementations depend on pthread data, so we can't | 
 | 815 |         // include them in libc_ndk.a. | 
 | 816 |         "bionic/__cxa_thread_atexit_impl.cpp", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 817 |         "bionic/fork.cpp", | 
 | 818 |  | 
 | 819 |         // The data that backs getauxval is initialized in the libc init | 
 | 820 |         // functions which are invoked by the linker. If this file is included | 
 | 821 |         // in libc_ndk.a, only one of the copies of the global data will be | 
 | 822 |         // initialized, resulting in nullptr dereferences. | 
 | 823 |         "bionic/getauxval.cpp", | 
 | 824 |  | 
| Dan Willemsen | 35e91a1 | 2015-09-17 15:28:45 -0700 | [diff] [blame] | 825 |         // These four require getauxval, which isn't available on older | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 826 |         // platforms. | 
 | 827 |         "bionic/getentropy_linux.c", | 
 | 828 |         "bionic/sysconf.cpp", | 
 | 829 |         "bionic/vdso.cpp", | 
| Dan Willemsen | 35e91a1 | 2015-09-17 15:28:45 -0700 | [diff] [blame] | 830 |         "bionic/setjmp_cookie.cpp", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 831 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 832 |         "bionic/__memcpy_chk.cpp", | 
 | 833 |         "bionic/__memset_chk.cpp", | 
 | 834 |         "bionic/__strcat_chk.cpp", | 
 | 835 |         "bionic/__strcpy_chk.cpp", | 
 | 836 |         "bionic/strchr.cpp", | 
 | 837 |         "bionic/strnlen.c", | 
 | 838 |         "bionic/strrchr.cpp", | 
 | 839 |     ], | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 840 |     cflags: ["-Wframe-larger-than=2048"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 841 |  | 
 | 842 |     arch: { | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 843 |         arm: { | 
 | 844 |             srcs: [ | 
| Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 845 |                 "arch-arm/generic/bionic/memcmp.S", | 
 | 846 |                 "arch-arm/generic/bionic/memcpy.S", | 
 | 847 |                 "arch-arm/generic/bionic/memset.S", | 
 | 848 |                 "arch-arm/generic/bionic/strcmp.S", | 
 | 849 |                 "arch-arm/generic/bionic/strcpy.S", | 
 | 850 |                 "arch-arm/generic/bionic/strlen.c", | 
 | 851 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 852 |                 "arch-arm/bionic/abort_arm.S", | 
 | 853 |                 "arch-arm/bionic/atomics_arm.c", | 
 | 854 |                 "arch-arm/bionic/__bionic_clone.S", | 
 | 855 |                 "arch-arm/bionic/_exit_with_stack_teardown.S", | 
 | 856 |                 "arch-arm/bionic/libgcc_compat.c", | 
 | 857 |                 "arch-arm/bionic/popcount_tab.c", | 
 | 858 |                 "arch-arm/bionic/__restore.S", | 
 | 859 |                 "arch-arm/bionic/setjmp.S", | 
 | 860 |                 "arch-arm/bionic/syscall.S", | 
 | 861 |                 "arch-arm/bionic/vfork.S", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 862 |             ], | 
 | 863 |             exclude_srcs: [ | 
 | 864 |                 "bionic/__memcpy_chk.cpp", | 
 | 865 |                 "bionic/__memset_chk.cpp", | 
 | 866 |             ], | 
| Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 867 |             cortex_a7: { | 
 | 868 |                 srcs: [ | 
 | 869 |                     "arch-arm/cortex-a7/bionic/memset.S", | 
 | 870 |  | 
 | 871 |                     "arch-arm/cortex-a15/bionic/memcpy.S", | 
 | 872 |                     "arch-arm/cortex-a15/bionic/stpcpy.S", | 
 | 873 |                     "arch-arm/cortex-a15/bionic/strcat.S", | 
 | 874 |                     "arch-arm/cortex-a15/bionic/__strcat_chk.S", | 
 | 875 |                     "arch-arm/cortex-a15/bionic/strcmp.S", | 
 | 876 |                     "arch-arm/cortex-a15/bionic/strcpy.S", | 
 | 877 |                     "arch-arm/cortex-a15/bionic/__strcpy_chk.S", | 
 | 878 |                     "arch-arm/cortex-a15/bionic/strlen.S", | 
 | 879 |  | 
 | 880 |                     "arch-arm/denver/bionic/memmove.S", | 
 | 881 |                 ], | 
 | 882 |                 exclude_srcs: [ | 
 | 883 |                     "arch-arm/generic/bionic/memcpy.S", | 
 | 884 |                     "arch-arm/generic/bionic/memset.S", | 
 | 885 |                     "arch-arm/generic/bionic/strcmp.S", | 
 | 886 |                     "arch-arm/generic/bionic/strcpy.S", | 
 | 887 |                     "arch-arm/generic/bionic/strlen.c", | 
 | 888 |                     "bionic/__strcat_chk.cpp", | 
 | 889 |                     "bionic/__strcpy_chk.cpp", | 
 | 890 |                 ], | 
 | 891 |             }, | 
 | 892 |             cortex_a53: { | 
 | 893 |                 srcs: [ | 
 | 894 |                     "arch-arm/cortex-a53/bionic/memcpy.S", | 
 | 895 |                     "arch-arm/cortex-a53/bionic/__strcat_chk.S", | 
 | 896 |                     "arch-arm/cortex-a53/bionic/__strcpy_chk.S", | 
 | 897 |  | 
 | 898 |                     "arch-arm/cortex-a7/bionic/memset.S", | 
 | 899 |  | 
 | 900 |                     "arch-arm/cortex-a15/bionic/stpcpy.S", | 
 | 901 |                     "arch-arm/cortex-a15/bionic/strcat.S", | 
 | 902 |                     "arch-arm/cortex-a15/bionic/strcmp.S", | 
 | 903 |                     "arch-arm/cortex-a15/bionic/strcpy.S", | 
 | 904 |                     "arch-arm/cortex-a15/bionic/strlen.S", | 
 | 905 |  | 
 | 906 |                     "arch-arm/denver/bionic/memmove.S", | 
 | 907 |                 ], | 
 | 908 |                 exclude_srcs: [ | 
 | 909 |                     "arch-arm/generic/bionic/memcpy.S", | 
 | 910 |                     "arch-arm/generic/bionic/memset.S", | 
 | 911 |                     "arch-arm/generic/bionic/strcmp.S", | 
 | 912 |                     "arch-arm/generic/bionic/strcpy.S", | 
 | 913 |                     "arch-arm/generic/bionic/strlen.c", | 
 | 914 |                     "bionic/__strcat_chk.cpp", | 
 | 915 |                     "bionic/__strcpy_chk.cpp", | 
 | 916 |                 ], | 
 | 917 |             }, | 
 | 918 |             cortex_a53_a57: { | 
 | 919 |                 srcs: [ | 
 | 920 |                     "arch-arm/cortex-a15/bionic/memcpy.S", | 
 | 921 |                     "arch-arm/cortex-a15/bionic/memset.S", | 
 | 922 |                     "arch-arm/cortex-a15/bionic/stpcpy.S", | 
 | 923 |                     "arch-arm/cortex-a15/bionic/strcat.S", | 
 | 924 |                     "arch-arm/cortex-a15/bionic/__strcat_chk.S", | 
 | 925 |                     "arch-arm/cortex-a15/bionic/strcmp.S", | 
 | 926 |                     "arch-arm/cortex-a15/bionic/strcpy.S", | 
 | 927 |                     "arch-arm/cortex-a15/bionic/__strcpy_chk.S", | 
 | 928 |                     "arch-arm/cortex-a15/bionic/strlen.S", | 
 | 929 |  | 
 | 930 |                     "arch-arm/denver/bionic/memmove.S", | 
 | 931 |                 ], | 
 | 932 |                 exclude_srcs: [ | 
 | 933 |                     "arch-arm/generic/bionic/memcpy.S", | 
 | 934 |                     "arch-arm/generic/bionic/memset.S", | 
 | 935 |                     "arch-arm/generic/bionic/strcmp.S", | 
 | 936 |                     "arch-arm/generic/bionic/strcpy.S", | 
 | 937 |                     "arch-arm/generic/bionic/strlen.c", | 
 | 938 |                     "bionic/__strcat_chk.cpp", | 
 | 939 |                     "bionic/__strcpy_chk.cpp", | 
 | 940 |                 ], | 
 | 941 |             }, | 
 | 942 |             cortex_a8: { | 
 | 943 |                 srcs: [ | 
 | 944 |                     "arch-arm/cortex-a15/bionic/memcpy.S", | 
 | 945 |                     "arch-arm/cortex-a15/bionic/memset.S", | 
 | 946 |                     "arch-arm/cortex-a15/bionic/stpcpy.S", | 
 | 947 |                     "arch-arm/cortex-a15/bionic/strcat.S", | 
 | 948 |                     "arch-arm/cortex-a15/bionic/__strcat_chk.S", | 
 | 949 |                     "arch-arm/cortex-a15/bionic/strcmp.S", | 
 | 950 |                     "arch-arm/cortex-a15/bionic/strcpy.S", | 
 | 951 |                     "arch-arm/cortex-a15/bionic/__strcpy_chk.S", | 
 | 952 |                     "arch-arm/cortex-a15/bionic/strlen.S", | 
 | 953 |  | 
 | 954 |                     "arch-arm/denver/bionic/memmove.S", | 
 | 955 |                 ], | 
 | 956 |                 exclude_srcs: [ | 
 | 957 |                     "arch-arm/generic/bionic/memcpy.S", | 
 | 958 |                     "arch-arm/generic/bionic/memset.S", | 
 | 959 |                     "arch-arm/generic/bionic/strcmp.S", | 
 | 960 |                     "arch-arm/generic/bionic/strcpy.S", | 
 | 961 |                     "arch-arm/generic/bionic/strlen.c", | 
 | 962 |                     "bionic/__strcat_chk.cpp", | 
 | 963 |                     "bionic/__strcpy_chk.cpp", | 
 | 964 |                 ], | 
 | 965 |             }, | 
 | 966 |             cortex_a9: { | 
 | 967 |                 srcs: [ | 
 | 968 |                     "arch-arm/cortex-a9/bionic/memcpy.S", | 
 | 969 |                     "arch-arm/cortex-a9/bionic/memset.S", | 
 | 970 |                     "arch-arm/cortex-a9/bionic/stpcpy.S", | 
 | 971 |                     "arch-arm/cortex-a9/bionic/strcat.S", | 
 | 972 |                     "arch-arm/cortex-a9/bionic/__strcat_chk.S", | 
 | 973 |                     "arch-arm/cortex-a9/bionic/strcmp.S", | 
 | 974 |                     "arch-arm/cortex-a9/bionic/strcpy.S", | 
 | 975 |                     "arch-arm/cortex-a9/bionic/__strcpy_chk.S", | 
 | 976 |                     "arch-arm/cortex-a9/bionic/strlen.S", | 
 | 977 |  | 
 | 978 |                     "arch-arm/denver/bionic/memmove.S", | 
 | 979 |                 ], | 
 | 980 |                 exclude_srcs: [ | 
 | 981 |                     "arch-arm/generic/bionic/memcpy.S", | 
 | 982 |                     "arch-arm/generic/bionic/memset.S", | 
 | 983 |                     "arch-arm/generic/bionic/strcmp.S", | 
 | 984 |                     "arch-arm/generic/bionic/strcpy.S", | 
 | 985 |                     "arch-arm/generic/bionic/strlen.c", | 
 | 986 |                     "bionic/__strcat_chk.cpp", | 
 | 987 |                     "bionic/__strcpy_chk.cpp", | 
 | 988 |                 ], | 
 | 989 |             }, | 
 | 990 |             cortex_a15: { | 
 | 991 |                 srcs: [ | 
 | 992 |                     "arch-arm/cortex-a15/bionic/memcpy.S", | 
 | 993 |                     "arch-arm/cortex-a15/bionic/memset.S", | 
 | 994 |                     "arch-arm/cortex-a15/bionic/stpcpy.S", | 
 | 995 |                     "arch-arm/cortex-a15/bionic/strcat.S", | 
 | 996 |                     "arch-arm/cortex-a15/bionic/__strcat_chk.S", | 
 | 997 |                     "arch-arm/cortex-a15/bionic/strcmp.S", | 
 | 998 |                     "arch-arm/cortex-a15/bionic/strcpy.S", | 
 | 999 |                     "arch-arm/cortex-a15/bionic/__strcpy_chk.S", | 
 | 1000 |                     "arch-arm/cortex-a15/bionic/strlen.S", | 
 | 1001 |  | 
 | 1002 |                     "arch-arm/denver/bionic/memmove.S", | 
 | 1003 |                 ], | 
 | 1004 |                 exclude_srcs: [ | 
 | 1005 |                     "arch-arm/generic/bionic/memcpy.S", | 
 | 1006 |                     "arch-arm/generic/bionic/memset.S", | 
 | 1007 |                     "arch-arm/generic/bionic/strcmp.S", | 
 | 1008 |                     "arch-arm/generic/bionic/strcpy.S", | 
 | 1009 |                     "arch-arm/generic/bionic/strlen.c", | 
 | 1010 |                     "bionic/__strcat_chk.cpp", | 
 | 1011 |                     "bionic/__strcpy_chk.cpp", | 
 | 1012 |                 ], | 
 | 1013 |             }, | 
 | 1014 |             denver: { | 
 | 1015 |                 srcs: [ | 
 | 1016 |                     "arch-arm/denver/bionic/memcpy.S", | 
 | 1017 |                     "arch-arm/denver/bionic/memmove.S", | 
 | 1018 |                     "arch-arm/denver/bionic/memset.S", | 
 | 1019 |                     "arch-arm/denver/bionic/__strcat_chk.S", | 
 | 1020 |                     "arch-arm/denver/bionic/__strcpy_chk.S", | 
 | 1021 |  | 
 | 1022 |                     // Use cortex-a15 versions of strcat/strcpy/strlen. | 
 | 1023 |                     "arch-arm/cortex-a15/bionic/stpcpy.S", | 
 | 1024 |                     "arch-arm/cortex-a15/bionic/strcat.S", | 
 | 1025 |                     "arch-arm/cortex-a15/bionic/strcmp.S", | 
 | 1026 |                     "arch-arm/cortex-a15/bionic/strcpy.S", | 
 | 1027 |                     "arch-arm/cortex-a15/bionic/strlen.S", | 
 | 1028 |                 ], | 
 | 1029 |                 exclude_srcs: [ | 
 | 1030 |                     "arch-arm/generic/bionic/memcpy.S", | 
 | 1031 |                     "arch-arm/generic/bionic/memset.S", | 
 | 1032 |                     "arch-arm/generic/bionic/strcmp.S", | 
 | 1033 |                     "arch-arm/generic/bionic/strcpy.S", | 
 | 1034 |                     "arch-arm/generic/bionic/strlen.c", | 
 | 1035 |                     "bionic/__strcat_chk.cpp", | 
 | 1036 |                     "bionic/__strcpy_chk.cpp", | 
 | 1037 |                 ], | 
 | 1038 |             }, | 
 | 1039 |             krait: { | 
 | 1040 |                 srcs: [ | 
 | 1041 |                     "arch-arm/krait/bionic/memcpy.S", | 
 | 1042 |                     "arch-arm/krait/bionic/memset.S", | 
 | 1043 |                     "arch-arm/krait/bionic/strcmp.S", | 
 | 1044 |                     "arch-arm/krait/bionic/__strcat_chk.S", | 
 | 1045 |                     "arch-arm/krait/bionic/__strcpy_chk.S", | 
 | 1046 |  | 
 | 1047 |                     // Use cortex-a15 versions of strcat/strcpy/strlen. | 
 | 1048 |                     "arch-arm/cortex-a15/bionic/stpcpy.S", | 
 | 1049 |                     "arch-arm/cortex-a15/bionic/strcat.S", | 
 | 1050 |                     "arch-arm/cortex-a15/bionic/strcpy.S", | 
 | 1051 |                     "arch-arm/cortex-a15/bionic/strlen.S", | 
 | 1052 |  | 
 | 1053 |                     "arch-arm/denver/bionic/memmove.S", | 
 | 1054 |                 ], | 
 | 1055 |                 exclude_srcs: [ | 
 | 1056 |                     "arch-arm/generic/bionic/memcpy.S", | 
 | 1057 |                     "arch-arm/generic/bionic/memset.S", | 
 | 1058 |                     "arch-arm/generic/bionic/strcmp.S", | 
 | 1059 |                     "arch-arm/generic/bionic/strcpy.S", | 
 | 1060 |                     "arch-arm/generic/bionic/strlen.c", | 
 | 1061 |                     "bionic/__strcat_chk.cpp", | 
 | 1062 |                     "bionic/__strcpy_chk.cpp", | 
 | 1063 |                 ], | 
 | 1064 |             }, | 
 | 1065 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1066 |         }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1067 |         arm64: { | 
 | 1068 |             srcs: [ | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1069 |                 "arch-arm64/generic/bionic/memchr.S", | 
 | 1070 |                 "arch-arm64/generic/bionic/memcmp.S", | 
 | 1071 |                 "arch-arm64/generic/bionic/memcpy.S", | 
 | 1072 |                 "arch-arm64/generic/bionic/memmove.S", | 
 | 1073 |                 "arch-arm64/generic/bionic/memset.S", | 
 | 1074 |                 "arch-arm64/generic/bionic/stpcpy.S", | 
 | 1075 |                 "arch-arm64/generic/bionic/strchr.S", | 
 | 1076 |                 "arch-arm64/generic/bionic/strcmp.S", | 
 | 1077 |                 "arch-arm64/generic/bionic/strcpy.S", | 
 | 1078 |                 "arch-arm64/generic/bionic/strlen.S", | 
 | 1079 |                 "arch-arm64/generic/bionic/strncmp.S", | 
 | 1080 |                 "arch-arm64/generic/bionic/strnlen.S", | 
 | 1081 |                 "arch-arm64/generic/bionic/wmemmove.S", | 
| Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1082 |  | 
 | 1083 |                 "arch-arm64/bionic/__bionic_clone.S", | 
 | 1084 |                 "arch-arm64/bionic/_exit_with_stack_teardown.S", | 
 | 1085 |                 "arch-arm64/bionic/setjmp.S", | 
 | 1086 |                 "arch-arm64/bionic/syscall.S", | 
 | 1087 |                 "arch-arm64/bionic/vfork.S", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1088 |             ], | 
 | 1089 |             exclude_srcs: [ | 
 | 1090 |                 "bionic/__memcpy_chk.cpp", | 
 | 1091 |                 "bionic/strchr.cpp", | 
 | 1092 |                 "bionic/strnlen.c", | 
 | 1093 |             ], | 
| Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1094 |             denver64: { | 
 | 1095 |                 srcs: [ | 
 | 1096 |                     "arch-arm64/denver64/bionic/memcpy.S", | 
 | 1097 |                     "arch-arm64/denver64/bionic/memset.S", | 
 | 1098 |                 ], | 
 | 1099 |                 exclude_srcs: [ | 
 | 1100 |                     "arch-arm64/generic/bionic/memcpy.S", | 
 | 1101 |                     "arch-arm64/generic/bionic/memset.S", | 
 | 1102 |                 ], | 
 | 1103 |             }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1104 |         }, | 
 | 1105 |  | 
 | 1106 |         mips: { | 
 | 1107 |             srcs: [ | 
| Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1108 |                 "arch-mips/string/memcmp.c", | 
 | 1109 |                 "arch-mips/string/memcpy.S", | 
 | 1110 |                 "arch-mips/string/memset.S", | 
 | 1111 |                 "arch-mips/string/strcmp.S", | 
 | 1112 |                 "arch-mips/string/strlen.c", | 
 | 1113 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1114 |                 "arch-mips/bionic/__bionic_clone.S", | 
 | 1115 |                 "arch-mips/bionic/bzero.S", | 
 | 1116 |                 "arch-mips/bionic/cacheflush.cpp", | 
 | 1117 |                 "arch-mips/bionic/_exit_with_stack_teardown.S", | 
 | 1118 |                 "arch-mips/bionic/setjmp.S", | 
 | 1119 |                 "arch-mips/bionic/syscall.S", | 
 | 1120 |                 "arch-mips/bionic/vfork.S", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1121 |             ], | 
| Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1122 |             rev6: { | 
 | 1123 |                 srcs: [ | 
 | 1124 |                     "arch-mips/string/mips_strlen.c", | 
 | 1125 |                 ], | 
 | 1126 |                 exclude_srcs: [ | 
 | 1127 |                     "arch-mips/string/strlen.c", | 
 | 1128 |                 ], | 
 | 1129 |             }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1130 |         }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1131 |         mips64: { | 
 | 1132 |             srcs: [ | 
| Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1133 |                 "arch-mips/string/memcmp.c", | 
 | 1134 |                 "arch-mips/string/memcpy.S", | 
 | 1135 |                 "arch-mips/string/memset.S", | 
 | 1136 |                 "arch-mips/string/strcmp.S", | 
 | 1137 |                 "arch-mips/string/strlen.c", | 
 | 1138 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1139 |                 "arch-mips64/bionic/__bionic_clone.S", | 
 | 1140 |                 "arch-mips64/bionic/_exit_with_stack_teardown.S", | 
 | 1141 |                 "arch-mips64/bionic/setjmp.S", | 
 | 1142 |                 "arch-mips64/bionic/syscall.S", | 
 | 1143 |                 "arch-mips64/bionic/vfork.S", | 
 | 1144 |                 "arch-mips64/bionic/stat.cpp", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1145 |             ], | 
 | 1146 |         }, | 
 | 1147 |  | 
 | 1148 |         x86: { | 
 | 1149 |             srcs: [ | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1150 |                 "arch-x86/generic/string/memcmp.S", | 
 | 1151 |                 "arch-x86/generic/string/strcmp.S", | 
 | 1152 |                 "arch-x86/generic/string/strncmp.S", | 
 | 1153 |                 "arch-x86/generic/string/strcat.S", | 
 | 1154 |                 "arch-x86/atom/string/sse2-memchr-atom.S", | 
 | 1155 |                 "arch-x86/atom/string/sse2-memrchr-atom.S", | 
 | 1156 |                 "arch-x86/atom/string/sse2-strchr-atom.S", | 
 | 1157 |                 "arch-x86/atom/string/sse2-strnlen-atom.S", | 
 | 1158 |                 "arch-x86/atom/string/sse2-strrchr-atom.S", | 
 | 1159 |                 "arch-x86/atom/string/sse2-wcschr-atom.S", | 
 | 1160 |                 "arch-x86/atom/string/sse2-wcsrchr-atom.S", | 
 | 1161 |                 "arch-x86/atom/string/sse2-wcslen-atom.S", | 
 | 1162 |                 "arch-x86/atom/string/sse2-wcscmp-atom.S", | 
 | 1163 |                 "arch-x86/silvermont/string/sse2-bcopy-slm.S", | 
 | 1164 |                 "arch-x86/silvermont/string/sse2-bzero-slm.S", | 
 | 1165 |                 "arch-x86/silvermont/string/sse2-memcpy-slm.S", | 
 | 1166 |                 "arch-x86/silvermont/string/sse2-memmove-slm.S", | 
 | 1167 |                 "arch-x86/silvermont/string/sse2-memset-slm.S", | 
 | 1168 |                 "arch-x86/silvermont/string/sse2-stpcpy-slm.S", | 
 | 1169 |                 "arch-x86/silvermont/string/sse2-stpncpy-slm.S", | 
 | 1170 |                 "arch-x86/silvermont/string/sse2-strcpy-slm.S", | 
 | 1171 |                 "arch-x86/silvermont/string/sse2-strlen-slm.S", | 
 | 1172 |                 "arch-x86/silvermont/string/sse2-strncpy-slm.S", | 
| Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1173 |  | 
 | 1174 |                 "arch-x86/bionic/__bionic_clone.S", | 
 | 1175 |                 "arch-x86/bionic/_exit_with_stack_teardown.S", | 
 | 1176 |                 "arch-x86/bionic/libgcc_compat.c", | 
 | 1177 |                 "arch-x86/bionic/__restore.S", | 
 | 1178 |                 "arch-x86/bionic/setjmp.S", | 
 | 1179 |                 "arch-x86/bionic/syscall.S", | 
 | 1180 |                 "arch-x86/bionic/vfork.S", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1181 |             ], | 
| Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1182 |  | 
 | 1183 |             exclude_srcs: [ | 
 | 1184 |                 "bionic/strchr.cpp", | 
 | 1185 |                 "bionic/strnlen.c", | 
 | 1186 |                 "bionic/strrchr.cpp", | 
 | 1187 |             ], | 
| Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1188 |             atom: { | 
 | 1189 |                 srcs: [ | 
 | 1190 |                     "arch-x86/atom/string/sse2-bzero-atom.S", | 
 | 1191 |                     "arch-x86/atom/string/sse2-memset-atom.S", | 
 | 1192 |                     "arch-x86/atom/string/sse2-strlen-atom.S", | 
 | 1193 |                     "arch-x86/atom/string/ssse3-bcopy-atom.S", | 
 | 1194 |                     "arch-x86/atom/string/ssse3-memcmp-atom.S", | 
| Dan Willemsen | 701b545 | 2016-01-12 19:35:40 -0800 | [diff] [blame] | 1195 |                     "arch-x86/atom/string/ssse3-memcpy-atom.S", | 
| Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1196 |                     "arch-x86/atom/string/ssse3-memmove-atom.S", | 
| Dan Willemsen | 701b545 | 2016-01-12 19:35:40 -0800 | [diff] [blame] | 1197 |                     "arch-x86/atom/string/ssse3-strcpy-atom.S", | 
| Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1198 |                     "arch-x86/atom/string/ssse3-strncpy-atom.S", | 
 | 1199 |                     "arch-x86/atom/string/ssse3-wmemcmp-atom.S", | 
 | 1200 |                 ], | 
 | 1201 |                 exclude_srcs: [ | 
 | 1202 |                     "arch-x86/generic/string/memcmp.S", | 
 | 1203 |                     "arch-x86/silvermont/string/sse2-bcopy-slm.S", | 
 | 1204 |                     "arch-x86/silvermont/string/sse2-bzero-slm.S", | 
 | 1205 |                     "arch-x86/silvermont/string/sse2-memcpy-slm.S", | 
 | 1206 |                     "arch-x86/silvermont/string/sse2-memmove-slm.S", | 
 | 1207 |                     "arch-x86/silvermont/string/sse2-memset-slm.S", | 
 | 1208 |                     "arch-x86/silvermont/string/sse2-strcpy-slm.S", | 
 | 1209 |                     "arch-x86/silvermont/string/sse2-strlen-slm.S", | 
 | 1210 |                     "arch-x86/silvermont/string/sse2-strncpy-slm.S", | 
 | 1211 |                 ], | 
 | 1212 |             }, | 
 | 1213 |             ssse3: { | 
 | 1214 |                 srcs: [ | 
 | 1215 |                     "arch-x86/atom/string/ssse3-strncat-atom.S", | 
 | 1216 |                     "arch-x86/atom/string/ssse3-strlcat-atom.S", | 
 | 1217 |                     "arch-x86/atom/string/ssse3-strlcpy-atom.S", | 
 | 1218 |                     "arch-x86/atom/string/ssse3-strcat-atom.S", | 
 | 1219 |                     "arch-x86/atom/string/ssse3-strcmp-atom.S", | 
 | 1220 |                     "arch-x86/atom/string/ssse3-strncmp-atom.S", | 
 | 1221 |                     "arch-x86/atom/string/ssse3-wcscat-atom.S", | 
 | 1222 |                     "arch-x86/atom/string/ssse3-wcscpy-atom.S", | 
 | 1223 |                 ], | 
 | 1224 |                 exclude_srcs: [ | 
 | 1225 |                     "arch-x86/generic/string/strcmp.S", | 
 | 1226 |                     "arch-x86/generic/string/strncmp.S", | 
 | 1227 |                     "arch-x86/generic/string/strcat.S", | 
 | 1228 |                 ], | 
 | 1229 |             }, | 
 | 1230 |             sse4: { | 
 | 1231 |                 srcs: [ | 
 | 1232 |                     "arch-x86/silvermont/string/sse4-memcmp-slm.S", | 
 | 1233 |                     "arch-x86/silvermont/string/sse4-wmemcmp-slm.S", | 
 | 1234 |                 ], | 
 | 1235 |                 exclude_srcs: [ | 
 | 1236 |                     "arch-x86/generic/string/memcmp.S", | 
 | 1237 |                 ], | 
 | 1238 |             }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1239 |         }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1240 |         x86_64: { | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1241 |             srcs: [ | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1242 |                 "arch-x86_64/string/sse2-memcpy-slm.S", | 
 | 1243 |                 "arch-x86_64/string/sse2-memmove-slm.S", | 
 | 1244 |                 "arch-x86_64/string/sse2-memset-slm.S", | 
 | 1245 |                 "arch-x86_64/string/sse2-stpcpy-slm.S", | 
 | 1246 |                 "arch-x86_64/string/sse2-stpncpy-slm.S", | 
 | 1247 |                 "arch-x86_64/string/sse2-strcat-slm.S", | 
 | 1248 |                 "arch-x86_64/string/sse2-strcpy-slm.S", | 
 | 1249 |                 "arch-x86_64/string/sse2-strlcat-slm.S", | 
 | 1250 |                 "arch-x86_64/string/sse2-strlcpy-slm.S", | 
 | 1251 |                 "arch-x86_64/string/sse2-strlen-slm.S", | 
 | 1252 |                 "arch-x86_64/string/sse2-strncat-slm.S", | 
 | 1253 |                 "arch-x86_64/string/sse2-strncpy-slm.S", | 
 | 1254 |                 "arch-x86_64/string/sse4-memcmp-slm.S", | 
 | 1255 |                 "arch-x86_64/string/ssse3-strcmp-slm.S", | 
 | 1256 |                 "arch-x86_64/string/ssse3-strncmp-slm.S", | 
| Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1257 |  | 
 | 1258 |                 "arch-x86_64/bionic/__bionic_clone.S", | 
 | 1259 |                 "arch-x86_64/bionic/_exit_with_stack_teardown.S", | 
 | 1260 |                 "arch-x86_64/bionic/__restore_rt.S", | 
 | 1261 |                 "arch-x86_64/bionic/setjmp.S", | 
 | 1262 |                 "arch-x86_64/bionic/syscall.S", | 
 | 1263 |                 "arch-x86_64/bionic/vfork.S", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1264 |             ], | 
 | 1265 |         }, | 
| Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1266 |     }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1267 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1268 |     cppflags: ["-Wold-style-cast"], | 
| Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1269 |     include_dirs: ["bionic/libstdc++/include"], | 
 | 1270 |     name: "libc_bionic", | 
| Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1271 | } | 
 | 1272 |  | 
 | 1273 | // ======================================================== | 
 | 1274 | // libc_bionic_ndk.a- The portions of libc_bionic that can | 
 | 1275 | // be safely used in libc_ndk.a (no troublesome global data | 
 | 1276 | // or constructors). | 
 | 1277 | // ======================================================== | 
 | 1278 | cc_library_static { | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1279 |     defaults: ["libc_defaults"], | 
| Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1280 |     srcs: [ | 
 | 1281 |         "bionic/abort.cpp", | 
 | 1282 |         "bionic/accept.cpp", | 
 | 1283 |         "bionic/accept4.cpp", | 
 | 1284 |         "bionic/access.cpp", | 
 | 1285 |         "bionic/arpa_inet.cpp", | 
 | 1286 |         "bionic/assert.cpp", | 
 | 1287 |         "bionic/atof.cpp", | 
| Colin Cross | 8ce38af | 2016-01-19 12:50:20 -0800 | [diff] [blame] | 1288 |         "bionic/bionic_netlink.cpp", | 
| Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1289 |         "bionic/bionic_systrace.cpp", | 
 | 1290 |         "bionic/bionic_time_conversions.cpp", | 
 | 1291 |         "bionic/brk.cpp", | 
 | 1292 |         "bionic/c16rtomb.cpp", | 
 | 1293 |         "bionic/c32rtomb.cpp", | 
 | 1294 |         "bionic/chmod.cpp", | 
 | 1295 |         "bionic/chown.cpp", | 
 | 1296 |         "bionic/clearenv.cpp", | 
 | 1297 |         "bionic/clock.cpp", | 
 | 1298 |         "bionic/clock_getcpuclockid.cpp", | 
 | 1299 |         "bionic/clock_nanosleep.cpp", | 
 | 1300 |         "bionic/clone.cpp", | 
 | 1301 |         "bionic/close.cpp", | 
 | 1302 |         "bionic/__cmsg_nxthdr.cpp", | 
 | 1303 |         "bionic/connect.cpp", | 
 | 1304 |         "bionic/ctype.cpp", | 
 | 1305 |         "bionic/dirent.cpp", | 
 | 1306 |         "bionic/dup2.cpp", | 
 | 1307 |         "bionic/epoll_create.cpp", | 
 | 1308 |         "bionic/epoll_pwait.cpp", | 
 | 1309 |         "bionic/epoll_wait.cpp", | 
 | 1310 |         "bionic/__errno.cpp", | 
 | 1311 |         "bionic/error.cpp", | 
 | 1312 |         "bionic/eventfd_read.cpp", | 
 | 1313 |         "bionic/eventfd_write.cpp", | 
 | 1314 |         "bionic/faccessat.cpp", | 
 | 1315 |         "bionic/fchmod.cpp", | 
 | 1316 |         "bionic/fchmodat.cpp", | 
 | 1317 |         "bionic/ffs.cpp", | 
 | 1318 |         "bionic/fgetxattr.cpp", | 
 | 1319 |         "bionic/flistxattr.cpp", | 
 | 1320 |         "bionic/flockfile.cpp", | 
 | 1321 |         "bionic/fpclassify.cpp", | 
 | 1322 |         "bionic/fsetxattr.cpp", | 
 | 1323 |         "bionic/ftruncate.cpp", | 
 | 1324 |         "bionic/futimens.cpp", | 
 | 1325 |         "bionic/getcwd.cpp", | 
 | 1326 |         "bionic/gethostname.cpp", | 
 | 1327 |         "bionic/getpgrp.cpp", | 
 | 1328 |         "bionic/getpid.cpp", | 
 | 1329 |         "bionic/gettid.cpp", | 
 | 1330 |         "bionic/__gnu_basename.cpp", | 
| Dan Willemsen | 9b59acc | 2016-01-05 14:32:06 -0800 | [diff] [blame] | 1331 |         "bionic/ifaddrs.cpp", | 
| Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1332 |         "bionic/inotify_init.cpp", | 
| Dan Willemsen | dc6b0a7 | 2015-11-09 14:03:46 -0800 | [diff] [blame] | 1333 |         "bionic/ioctl.cpp", | 
| Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1334 |         "bionic/lchown.cpp", | 
 | 1335 |         "bionic/lfs64_support.cpp", | 
 | 1336 |         "bionic/__libc_current_sigrtmax.cpp", | 
 | 1337 |         "bionic/__libc_current_sigrtmin.cpp", | 
 | 1338 |         "bionic/libc_init_common.cpp", | 
 | 1339 |         "bionic/libc_logging.cpp", | 
 | 1340 |         "bionic/libgen.cpp", | 
 | 1341 |         "bionic/link.cpp", | 
 | 1342 |         "bionic/locale.cpp", | 
| Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1343 |         "bionic/lockf.cpp", | 
| Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1344 |         "bionic/lstat.cpp", | 
 | 1345 |         "bionic/malloc_info.cpp", | 
 | 1346 |         "bionic/mbrtoc16.cpp", | 
 | 1347 |         "bionic/mbrtoc32.cpp", | 
 | 1348 |         "bionic/mbstate.cpp", | 
 | 1349 |         "bionic/mempcpy.cpp", | 
 | 1350 |         "bionic/mkdir.cpp", | 
 | 1351 |         "bionic/mkfifo.cpp", | 
 | 1352 |         "bionic/mknod.cpp", | 
 | 1353 |         "bionic/mntent.cpp", | 
| Dan Willemsen | dc6b0a7 | 2015-11-09 14:03:46 -0800 | [diff] [blame] | 1354 |         "bionic/mremap.cpp", | 
| Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1355 |         "bionic/NetdClientDispatch.cpp", | 
| Colin Cross | 8ce38af | 2016-01-19 12:50:20 -0800 | [diff] [blame] | 1356 |         "bionic/net_if.cpp", | 
| Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1357 |         "bionic/netinet_in.cpp", | 
| Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1358 |         "bionic/open.cpp", | 
 | 1359 |         "bionic/pathconf.cpp", | 
 | 1360 |         "bionic/pause.cpp", | 
 | 1361 |         "bionic/pipe.cpp", | 
 | 1362 |         "bionic/poll.cpp", | 
 | 1363 |         "bionic/posix_fadvise.cpp", | 
 | 1364 |         "bionic/posix_fallocate.cpp", | 
 | 1365 |         "bionic/posix_madvise.cpp", | 
 | 1366 |         "bionic/posix_timers.cpp", | 
 | 1367 |         "bionic/ptrace.cpp", | 
 | 1368 |         "bionic/pty.cpp", | 
 | 1369 |         "bionic/raise.cpp", | 
 | 1370 |         "bionic/rand.cpp", | 
 | 1371 |         "bionic/readlink.cpp", | 
 | 1372 |         "bionic/reboot.cpp", | 
 | 1373 |         "bionic/recv.cpp", | 
 | 1374 |         "bionic/rename.cpp", | 
 | 1375 |         "bionic/rmdir.cpp", | 
 | 1376 |         "bionic/scandir.cpp", | 
 | 1377 |         "bionic/sched_getaffinity.cpp", | 
 | 1378 |         "bionic/sched_getcpu.cpp", | 
 | 1379 |         "bionic/semaphore.cpp", | 
 | 1380 |         "bionic/send.cpp", | 
 | 1381 |         "bionic/setegid.cpp", | 
 | 1382 |         "bionic/__set_errno.cpp", | 
 | 1383 |         "bionic/seteuid.cpp", | 
 | 1384 |         "bionic/setpgrp.cpp", | 
 | 1385 |         "bionic/sigaction.cpp", | 
 | 1386 |         "bionic/sigaddset.cpp", | 
 | 1387 |         "bionic/sigdelset.cpp", | 
 | 1388 |         "bionic/sigemptyset.cpp", | 
 | 1389 |         "bionic/sigfillset.cpp", | 
 | 1390 |         "bionic/sigismember.cpp", | 
 | 1391 |         "bionic/signal.cpp", | 
 | 1392 |         "bionic/signalfd.cpp", | 
 | 1393 |         "bionic/sigpending.cpp", | 
 | 1394 |         "bionic/sigprocmask.cpp", | 
 | 1395 |         "bionic/sigqueue.cpp", | 
 | 1396 |         "bionic/sigsuspend.cpp", | 
 | 1397 |         "bionic/sigtimedwait.cpp", | 
 | 1398 |         "bionic/sigwait.cpp", | 
 | 1399 |         "bionic/sigwaitinfo.cpp", | 
 | 1400 |         "bionic/socket.cpp", | 
 | 1401 |         "bionic/stat.cpp", | 
 | 1402 |         "bionic/statvfs.cpp", | 
 | 1403 |         "bionic/strchrnul.cpp", | 
 | 1404 |         "bionic/strerror.cpp", | 
 | 1405 |         "bionic/strerror_r.cpp", | 
 | 1406 |         "bionic/strsignal.cpp", | 
 | 1407 |         "bionic/strtold.cpp", | 
 | 1408 |         "bionic/stubs.cpp", | 
 | 1409 |         "bionic/symlink.cpp", | 
 | 1410 |         "bionic/sysinfo.cpp", | 
 | 1411 |         "bionic/syslog.cpp", | 
 | 1412 |         "bionic/sys_siglist.c", | 
 | 1413 |         "bionic/sys_signame.c", | 
 | 1414 |         "bionic/system_properties.cpp", | 
 | 1415 |         "bionic/tdestroy.cpp", | 
 | 1416 |         "bionic/termios.cpp", | 
 | 1417 |         "bionic/thread_private.cpp", | 
 | 1418 |         "bionic/tmpfile.cpp", | 
 | 1419 |         "bionic/umount.cpp", | 
 | 1420 |         "bionic/unlink.cpp", | 
 | 1421 |         "bionic/utimes.cpp", | 
 | 1422 |         "bionic/wait.cpp", | 
 | 1423 |         "bionic/wchar.cpp", | 
 | 1424 |         "bionic/wctype.cpp", | 
 | 1425 |         "bionic/wmempcpy.cpp", | 
 | 1426 |     ], | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1427 |     cflags: ["-Wframe-larger-than=2048"], | 
| Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1428 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1429 |     multilib: { | 
 | 1430 |         lib32: { | 
 | 1431 |             // LP32 cruft | 
| Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1432 |             srcs: ["bionic/mmap.cpp"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1433 |         }, | 
 | 1434 |     }, | 
 | 1435 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1436 |     cppflags: ["-Wold-style-cast"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1437 |     local_include_dirs: ["stdio"], | 
 | 1438 |     include_dirs: ["bionic/libstdc++/include"], | 
 | 1439 |     name: "libc_bionic_ndk", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1440 | } | 
 | 1441 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1442 | // ======================================================== | 
 | 1443 | // libc_pthread.a - pthreads parts that previously lived in | 
 | 1444 | // libc_bionic.a. Relocated to their own library because | 
 | 1445 | // they can't be included in libc_ndk.a (as they layout of | 
 | 1446 | // pthread_t has changed over the years and has ABI | 
 | 1447 | // compatibility issues). | 
 | 1448 | // ======================================================== | 
 | 1449 |  | 
 | 1450 | cc_library_static { | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1451 |     defaults: ["libc_defaults"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1452 |     srcs: [ | 
 | 1453 |         "bionic/pthread_atfork.cpp", | 
 | 1454 |         "bionic/pthread_attr.cpp", | 
| Colin Cross | a35d23d | 2015-11-19 13:32:49 -0800 | [diff] [blame] | 1455 |         "bionic/pthread_barrier.cpp", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1456 |         "bionic/pthread_cond.cpp", | 
 | 1457 |         "bionic/pthread_create.cpp", | 
 | 1458 |         "bionic/pthread_detach.cpp", | 
 | 1459 |         "bionic/pthread_equal.cpp", | 
 | 1460 |         "bionic/pthread_exit.cpp", | 
 | 1461 |         "bionic/pthread_getcpuclockid.cpp", | 
 | 1462 |         "bionic/pthread_getschedparam.cpp", | 
 | 1463 |         "bionic/pthread_gettid_np.cpp", | 
 | 1464 |         "bionic/pthread_internal.cpp", | 
 | 1465 |         "bionic/pthread_join.cpp", | 
 | 1466 |         "bionic/pthread_key.cpp", | 
 | 1467 |         "bionic/pthread_kill.cpp", | 
 | 1468 |         "bionic/pthread_mutex.cpp", | 
 | 1469 |         "bionic/pthread_once.cpp", | 
 | 1470 |         "bionic/pthread_rwlock.cpp", | 
 | 1471 |         "bionic/pthread_self.cpp", | 
 | 1472 |         "bionic/pthread_setname_np.cpp", | 
 | 1473 |         "bionic/pthread_setschedparam.cpp", | 
 | 1474 |         "bionic/pthread_sigmask.cpp", | 
| Colin Cross | a35d23d | 2015-11-19 13:32:49 -0800 | [diff] [blame] | 1475 |         "bionic/pthread_spinlock.cpp", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1476 |     ], | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1477 |     cflags: ["-Wframe-larger-than=2048"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1478 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1479 |     cppflags: ["-Wold-style-cast"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1480 |     include_dirs: ["bionic/libstdc++/include"], | 
 | 1481 |     name: "libc_pthread", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1482 | } | 
 | 1483 |  | 
 | 1484 | // ======================================================== | 
 | 1485 | // libc_cxa.a - Things traditionally in libstdc++ | 
 | 1486 | // ======================================================== | 
 | 1487 |  | 
 | 1488 | cc_library_static { | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1489 |     defaults: ["libc_defaults"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1490 |     srcs: [ | 
 | 1491 |         "bionic/__cxa_guard.cpp", | 
 | 1492 |         "bionic/__cxa_pure_virtual.cpp", | 
 | 1493 |         "bionic/new.cpp", | 
 | 1494 |     ], | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1495 |     cflags: ["-fvisibility=hidden"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1496 |     include_dirs: ["bionic/libstdc++/include"], | 
 | 1497 |     name: "libc_cxa", | 
 | 1498 |     clang: true, // GCC refuses to hide new/delete | 
 | 1499 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1500 |     // b/17574078: Need to disable coverage until we have a prebuilt libprofile_rt. | 
 | 1501 |     // Since this is a static library built with clang, it needs to link | 
 | 1502 |     // libprofile_rt when it is linked into the final binary. Since the final binary | 
 | 1503 |     // is built with GCC, it won't link libprofile_rt. We can't very easily just add | 
 | 1504 |     // libprofile_rt to all link lines the way we've done for libgcov because | 
 | 1505 |     // libprofile_rt isn't prebuilt, and it would be tricky to write a rule that | 
 | 1506 |     // would make sure libprofile_rt is built. | 
 | 1507 |     native_coverage: false, | 
 | 1508 | } | 
 | 1509 |  | 
 | 1510 | // ======================================================== | 
 | 1511 | // libc_syscalls.a | 
 | 1512 | // ======================================================== | 
 | 1513 |  | 
 | 1514 | cc_library_static { | 
 | 1515 |     arch: { | 
 | 1516 |         arm: { | 
 | 1517 |             srcs: ["arch-arm/syscalls/**/*.S"], | 
 | 1518 |         }, | 
 | 1519 |         arm64: { | 
 | 1520 |             srcs: ["arch-arm64/syscalls/**/*.S"], | 
 | 1521 |         }, | 
 | 1522 |         mips: { | 
 | 1523 |             srcs: ["arch-mips/syscalls/**/*.S"], | 
 | 1524 |         }, | 
 | 1525 |         mips64: { | 
 | 1526 |             srcs: ["arch-mips64/syscalls/**/*.S"], | 
 | 1527 |         }, | 
 | 1528 |         x86: { | 
 | 1529 |             srcs: ["arch-x86/syscalls/**/*.S"], | 
 | 1530 |         }, | 
 | 1531 |         x86_64: { | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1532 |             srcs: ["arch-x86_64/syscalls/**/*.S"], | 
 | 1533 |         }, | 
 | 1534 |     }, | 
 | 1535 |     name: "libc_syscalls", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1536 | } | 
 | 1537 |  | 
 | 1538 | // ======================================================== | 
 | 1539 | // libc_aeabi.a | 
 | 1540 | // This is an LP32 ARM-only library that needs to be built with -fno-builtin | 
 | 1541 | // to avoid infinite recursion. For the other architectures we just build an | 
 | 1542 | // empty library to keep this makefile simple. | 
 | 1543 | // ======================================================== | 
 | 1544 |  | 
 | 1545 | cc_library_static { | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1546 |     defaults: ["libc_defaults"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1547 |     arch: { | 
 | 1548 |         arm: { | 
 | 1549 |             srcs: ["arch-arm/bionic/__aeabi.c"], | 
 | 1550 |         }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1551 |     }, | 
 | 1552 |     name: "libc_aeabi", | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1553 |     cflags: ["-fno-builtin"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1554 | } | 
 | 1555 |  | 
 | 1556 | // ======================================================== | 
 | 1557 | // libc_ndk.a | 
 | 1558 | // Compatibility library for the NDK. This library contains | 
 | 1559 | // all the parts of libc that are safe to statically link. | 
 | 1560 | // We can't safely statically link things that can only run | 
 | 1561 | // on a certain version of the OS. Examples include | 
 | 1562 | // anything that talks to netd (a large portion of the DNS | 
 | 1563 | // code) and anything that is dependent on the layout of a | 
 | 1564 | // data structure that has changed across releases (such as | 
 | 1565 | // pthread_t). | 
 | 1566 | // ======================================================== | 
 | 1567 |  | 
 | 1568 | cc_library_static { | 
 | 1569 |     name: "libc_ndk", | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1570 |     defaults: ["libc_defaults"], | 
| Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1571 |     srcs: libc_common_src_files + ["bionic/malloc_common.cpp"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1572 |     multilib: { | 
 | 1573 |         lib32: { | 
 | 1574 |             srcs: libc_common_src_files_32, | 
 | 1575 |         }, | 
 | 1576 |     }, | 
 | 1577 |     arch: { | 
 | 1578 |         arm: { | 
 | 1579 |             srcs: [ | 
 | 1580 |                 "arch-arm/bionic/exidx_dynamic.c", | 
 | 1581 |                 "arch-common/bionic/crtbegin_so.c", | 
 | 1582 |                 "arch-arm/bionic/atexit_legacy.c", | 
 | 1583 |                 "arch-common/bionic/crtend_so.S", | 
 | 1584 |             ], | 
 | 1585 |             whole_static_libs: ["libc_aeabi"], | 
 | 1586 |         }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1587 |     }, | 
 | 1588 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1589 |     cflags: [ | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1590 |         "-fvisibility=hidden", | 
 | 1591 |         "-DLIBC_STATIC", | 
 | 1592 |     ], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1593 |  | 
 | 1594 |     whole_static_libs: [ | 
 | 1595 |         "libc_bionic_ndk", | 
 | 1596 |         "libc_cxa", | 
 | 1597 |         "libc_freebsd", | 
 | 1598 |         "libc_gdtoa", | 
 | 1599 |         "libc_malloc", | 
 | 1600 |         "libc_netbsd", | 
 | 1601 |         "libc_openbsd_ndk", | 
 | 1602 |         "libc_stack_protector", | 
 | 1603 |         "libc_syscalls", | 
 | 1604 |         "libc_tzcode", | 
 | 1605 |         "libm", | 
| Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1606 |         "libjemalloc", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1607 |     ], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1608 | } | 
 | 1609 |  | 
 | 1610 | // ======================================================== | 
 | 1611 | // libc_common.a | 
 | 1612 | // ======================================================== | 
 | 1613 |  | 
 | 1614 | cc_library_static { | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1615 |     defaults: ["libc_defaults"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1616 |     srcs: libc_common_src_files, | 
 | 1617 |     multilib: { | 
 | 1618 |         lib32: { | 
 | 1619 |             srcs: libc_common_src_files_32, | 
 | 1620 |         }, | 
 | 1621 |     }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1622 |     name: "libc_common", | 
 | 1623 |  | 
 | 1624 |     whole_static_libs: [ | 
 | 1625 |         "libc_bionic", | 
 | 1626 |         "libc_bionic_ndk", | 
 | 1627 |         "libc_cxa", | 
 | 1628 |         "libc_dns", | 
 | 1629 |         "libc_freebsd", | 
 | 1630 |         "libc_gdtoa", | 
 | 1631 |         "libc_malloc", | 
 | 1632 |         "libc_netbsd", | 
 | 1633 |         "libc_openbsd", | 
 | 1634 |         "libc_openbsd_ndk", | 
 | 1635 |         "libc_pthread", | 
 | 1636 |         "libc_stack_protector", | 
 | 1637 |         "libc_syscalls", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1638 |         "libc_tzcode", | 
 | 1639 |     ], | 
 | 1640 |  | 
 | 1641 |     arch: { | 
 | 1642 |         arm: { | 
 | 1643 |             whole_static_libs: ["libc_aeabi"], | 
 | 1644 |         }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1645 |     }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1646 | } | 
 | 1647 |  | 
 | 1648 | // ======================================================== | 
 | 1649 | // libc_nomalloc.a | 
 | 1650 | // ======================================================== | 
 | 1651 | // | 
 | 1652 | // This is a version of the static C library that does not | 
 | 1653 | // include malloc. It's useful in situations when the user wants | 
 | 1654 | // to provide their own malloc implementation, or wants to | 
 | 1655 | // explicitly disallow the use of malloc, such as in the | 
 | 1656 | // dynamic linker. | 
 | 1657 |  | 
 | 1658 | cc_library_static { | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1659 |     defaults: ["libc_defaults"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1660 |     srcs: [ | 
 | 1661 |         "bionic/dl_iterate_phdr_static.cpp", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1662 |     ], | 
 | 1663 |  | 
 | 1664 |     arch: { | 
 | 1665 |         arm: { | 
 | 1666 |             srcs: ["arch-arm/bionic/exidx_static.c"], | 
 | 1667 |         }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1668 |     }, | 
 | 1669 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1670 |     cflags: ["-DLIBC_STATIC"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1671 |  | 
 | 1672 |     name: "libc_nomalloc", | 
 | 1673 |  | 
| Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 1674 |     whole_static_libs: [ | 
 | 1675 |         "libc_common", | 
 | 1676 |         "libc_init_static", | 
 | 1677 |     ], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1678 | } | 
 | 1679 |  | 
 | 1680 | // ======================================================== | 
 | 1681 | // libc_malloc.a: the _prefixed_ malloc functions (like dlcalloc). | 
 | 1682 | // ======================================================== | 
 | 1683 | cc_library_static { | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1684 |     defaults: ["libc_defaults"], | 
| Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1685 |     srcs: ["bionic/jemalloc_wrapper.cpp"], | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1686 |     cflags: ["-fvisibility=hidden"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1687 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1688 |     name: "libc_malloc", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1689 | } | 
 | 1690 |  | 
 | 1691 | // ======================================================== | 
 | 1692 | // libc.a + libc.so | 
 | 1693 | // ======================================================== | 
 | 1694 | cc_library { | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1695 |     defaults: ["libc_defaults"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1696 |     name: "libc", | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1697 |     product_variables: { | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1698 |         platform_sdk_version: { | 
 | 1699 |             asflags: ["-DPLATFORM_SDK_VERSION=%d"], | 
 | 1700 |         }, | 
 | 1701 |     }, | 
| Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1702 |     srcs: ["bionic/malloc_common.cpp"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1703 |     static: { | 
 | 1704 |         srcs: [ | 
 | 1705 |             "bionic/dl_iterate_phdr_static.cpp", | 
| Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1706 |             "bionic/libc_init_static.cpp", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1707 |         ], | 
 | 1708 |         cflags: ["-DLIBC_STATIC"], | 
| Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 1709 |         whole_static_libs: ["libc_init_static"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1710 |     }, | 
 | 1711 |     shared: { | 
 | 1712 |         srcs: [ | 
 | 1713 |             "arch-common/bionic/crtbegin_so.c", | 
 | 1714 |             "arch-common/bionic/crtbrand.S", | 
 | 1715 |             "bionic/libc_init_dynamic.cpp", | 
 | 1716 |             "bionic/NetdClient.cpp", | 
 | 1717 |             "arch-common/bionic/crtend_so.S", | 
 | 1718 |         ], | 
 | 1719 |     }, | 
 | 1720 |  | 
 | 1721 |     required: ["tzdata"], | 
 | 1722 |  | 
 | 1723 |     // Leave the symbols in the shared library so that stack unwinders can produce | 
 | 1724 |     // meaningful name resolution. | 
 | 1725 |     strip: "keep_symbols", | 
 | 1726 |  | 
 | 1727 |     // WARNING: The only library libc.so should depend on is libdl.so!  If you add other libraries, | 
 | 1728 |     // make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries.  This | 
 | 1729 |     // ensures that symbols that are pulled into those new libraries from libgcc.a are not declared | 
 | 1730 |     // external; if that were the case, then libc would not pull those symbols from libgcc.a as it | 
 | 1731 |     // should, instead relying on the external symbols from the dependent libraries.  That would | 
 | 1732 |     // create a "cloaked" dependency on libgcc.a in libc though the libraries, which is not what | 
 | 1733 |     // you wanted! | 
 | 1734 |  | 
 | 1735 |     shared_libs: ["libdl"], | 
| Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1736 |     whole_static_libs: ["libc_common", "libjemalloc"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1737 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1738 |     // We'd really like to do this for all architectures, but since this wasn't done | 
 | 1739 |     // before, these symbols must continue to be exported on LP32 for binary | 
 | 1740 |     // compatibility. | 
 | 1741 |     multilib: { | 
 | 1742 |         lib64: { | 
 | 1743 |             ldflags: ["-Wl,--exclude-libs,libgcc.a"], | 
 | 1744 |         }, | 
 | 1745 |     }, | 
 | 1746 |  | 
 | 1747 |     nocrt: true, | 
 | 1748 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1749 |     arch: { | 
 | 1750 |         arm: { | 
| Dmitriy Ivanov | 280d546 | 2015-09-28 10:14:17 -0700 | [diff] [blame] | 1751 |             //TODO: This is to work around b/24465209. Remove after root cause is fixed | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1752 |             ldflags: ["-Wl,--hash-style=both"], | 
 | 1753 |  | 
| Dan Willemsen | 9e6f98f | 2015-11-03 14:30:57 -0800 | [diff] [blame] | 1754 |             // Don't re-export new/delete and friends, even if the compiler really wants to. | 
 | 1755 |             version_script: "libc.arm.map", | 
| Dan Willemsen | 9b59acc | 2016-01-05 14:32:06 -0800 | [diff] [blame] | 1756 |             product_variables: { | 
 | 1757 |                 brillo: { | 
 | 1758 |                     version_script: "libc.arm.brillo.map", | 
 | 1759 |                 }, | 
 | 1760 |             }, | 
| Dan Willemsen | 9e6f98f | 2015-11-03 14:30:57 -0800 | [diff] [blame] | 1761 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1762 |             shared: { | 
 | 1763 |                 srcs: ["arch-arm/bionic/exidx_dynamic.c"], | 
 | 1764 |             }, | 
 | 1765 |             static: { | 
 | 1766 |                 srcs: ["arch-arm/bionic/exidx_static.c"], | 
 | 1767 |             }, | 
| Dan Willemsen | 9b59acc | 2016-01-05 14:32:06 -0800 | [diff] [blame] | 1768 |  | 
 | 1769 |             // special for arm | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1770 |             cflags: ["-DCRT_LEGACY_WORKAROUND"], | 
 | 1771 |             srcs: [ | 
 | 1772 |                 "arch-arm/bionic/atexit_legacy.c", | 
 | 1773 |             ], | 
 | 1774 |         }, | 
| Dan Willemsen | 9e6f98f | 2015-11-03 14:30:57 -0800 | [diff] [blame] | 1775 |         arm64: { | 
 | 1776 |             // Don't re-export new/delete and friends, even if the compiler really wants to. | 
 | 1777 |             version_script: "libc.arm64.map", | 
 | 1778 |         }, | 
 | 1779 |         mips: { | 
 | 1780 |             // Don't re-export new/delete and friends, even if the compiler really wants to. | 
 | 1781 |             version_script: "libc.mips.map", | 
| Dan Willemsen | 9b59acc | 2016-01-05 14:32:06 -0800 | [diff] [blame] | 1782 |             product_variables: { | 
 | 1783 |                 brillo: { | 
 | 1784 |                     version_script: "libc.mips.brillo.map", | 
 | 1785 |                 }, | 
 | 1786 |             }, | 
| Dan Willemsen | 9e6f98f | 2015-11-03 14:30:57 -0800 | [diff] [blame] | 1787 |         }, | 
 | 1788 |         mips64: { | 
 | 1789 |             // Don't re-export new/delete and friends, even if the compiler really wants to. | 
 | 1790 |             version_script: "libc.mips64.map", | 
 | 1791 |         }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1792 |         x86: { | 
| Dmitriy Ivanov | 280d546 | 2015-09-28 10:14:17 -0700 | [diff] [blame] | 1793 |             //TODO: This is to work around b/24465209. Remove after root cause is fixed | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1794 |             ldflags: ["-Wl,--hash-style=both"], | 
| Dan Willemsen | 9e6f98f | 2015-11-03 14:30:57 -0800 | [diff] [blame] | 1795 |  | 
 | 1796 |             // Don't re-export new/delete and friends, even if the compiler really wants to. | 
 | 1797 |             version_script: "libc.x86.map", | 
| Dan Willemsen | 9b59acc | 2016-01-05 14:32:06 -0800 | [diff] [blame] | 1798 |             product_variables: { | 
 | 1799 |                 brillo: { | 
 | 1800 |                     version_script: "libc.x86.brillo.map", | 
 | 1801 |                 }, | 
 | 1802 |             }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1803 |         }, | 
 | 1804 |         x86_64: { | 
| Dan Willemsen | 9e6f98f | 2015-11-03 14:30:57 -0800 | [diff] [blame] | 1805 |             // Don't re-export new/delete and friends, even if the compiler really wants to. | 
 | 1806 |             version_script: "libc.x86_64.map", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1807 |         }, | 
 | 1808 |     }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1809 | } | 
 | 1810 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1811 | // ======================================================== | 
| Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1812 | // libc_logging.a | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1813 | // ======================================================== | 
| Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1814 | cc_library_static { | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1815 |     defaults: ["libc_defaults"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1816 |  | 
 | 1817 |     srcs: [ | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1818 |         "bionic/libc_logging.cpp", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1819 |     ], | 
 | 1820 |  | 
| Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1821 |     name: "libc_logging", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1822 | } | 
 | 1823 |  | 
 | 1824 | // ======================================================== | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1825 | // libstdc++.so + libstdc++.a | 
 | 1826 | // ======================================================== | 
 | 1827 | cc_library { | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1828 |     defaults: ["libc_defaults"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1829 |     include_dirs: ["bionic/libstdc++/include"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1830 |     srcs: [ | 
 | 1831 |         "bionic/__cxa_guard.cpp", | 
 | 1832 |         "bionic/__cxa_pure_virtual.cpp", | 
 | 1833 |         "bionic/new.cpp", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1834 |     ], | 
 | 1835 |     name: "libstdc++", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1836 |     system_shared_libs: ["libc"], | 
| Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1837 |     shared: { | 
 | 1838 |         static_libs: ["libc_logging"], | 
 | 1839 |     }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1840 |  | 
| Dmitriy Ivanov | 280d546 | 2015-09-28 10:14:17 -0700 | [diff] [blame] | 1841 |     //TODO: This is to work around b/24465209. Remove after root cause is fixed | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1842 |     arch: { | 
 | 1843 |         arm: { | 
 | 1844 |             ldflags: ["-Wl,--hash-style=both"], | 
 | 1845 |         }, | 
 | 1846 |         x86: { | 
 | 1847 |             ldflags: ["-Wl,--hash-style=both"], | 
 | 1848 |         }, | 
 | 1849 |     }, | 
 | 1850 | } | 
 | 1851 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1852 | cc_defaults { | 
 | 1853 |     name: "crt_defaults", | 
 | 1854 |  | 
 | 1855 |     no_default_compiler_flags: true, | 
 | 1856 |  | 
 | 1857 |     arch: { | 
 | 1858 |         arm: { | 
 | 1859 |             local_include_dirs: ["arch-arm/include"], | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1860 |         }, | 
 | 1861 |         arm64: { | 
 | 1862 |             local_include_dirs: ["arch-arm64/include"], | 
 | 1863 |         }, | 
 | 1864 |         mips: { | 
 | 1865 |             local_include_dirs: ["arch-mips/include"], | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1866 |         }, | 
 | 1867 |         mips64: { | 
 | 1868 |             local_include_dirs: ["arch-mips64/include"], | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1869 |         }, | 
 | 1870 |         x86: { | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1871 |             local_include_dirs: ["arch-x86/include"], | 
 | 1872 |         }, | 
 | 1873 |         x86_64: { | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1874 |             local_include_dirs: ["arch-x86_64/include"], | 
 | 1875 |         }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1876 |     }, | 
| Colin Cross | bff87d1 | 2015-11-23 14:12:19 -0800 | [diff] [blame] | 1877 |     clang: false, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1878 | } | 
 | 1879 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1880 | cc_defaults { | 
 | 1881 |     name: "crt_so_defaults", | 
 | 1882 |  | 
 | 1883 |     arch: { | 
 | 1884 |         mips: { | 
 | 1885 |             cflags: ["-fPIC"], | 
 | 1886 |         }, | 
 | 1887 |         mips64: { | 
 | 1888 |             cflags: ["-fPIC"], | 
 | 1889 |         }, | 
 | 1890 |         x86: { | 
 | 1891 |             cflags: ["-fPIC"], | 
 | 1892 |         }, | 
 | 1893 |         x86_64: { | 
 | 1894 |             cflags: ["-fPIC"], | 
 | 1895 |         }, | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1896 |     }, | 
 | 1897 | } | 
 | 1898 |  | 
 | 1899 | // Android.mk:start | 
 | 1900 | // # crt obj files | 
 | 1901 | // # ======================================================== | 
 | 1902 | // # crtbrand.c needs <stdint.h> and a #define for the platform SDK version. | 
 | 1903 | // libc_crt_target_cflags := \ | 
 | 1904 | //    -I$(LOCAL_PATH)/include \ | 
 | 1905 | //    -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) \ | 
 | 1906 | // | 
 | 1907 | // my_2nd_arch_prefix := | 
 | 1908 | // include $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk | 
 | 1909 | // include $(LOCAL_PATH)/crt.mk | 
 | 1910 | // ifdef TARGET_2ND_ARCH | 
 | 1911 | // my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) | 
 | 1912 | // include $(LOCAL_PATH)/arch-$(TARGET_2ND_ARCH)/$(TARGET_2ND_ARCH).mk | 
 | 1913 | // include $(LOCAL_PATH)/crt.mk | 
 | 1914 | // my_2nd_arch_prefix := | 
 | 1915 | // endif | 
 | 1916 | // | 
 | 1917 | // include $(call all-makefiles-under,$(LOCAL_PATH)) | 
 | 1918 | // Android.mk:end | 
 | 1919 | cc_object { | 
 | 1920 |     name: "crtbrand", | 
 | 1921 |     local_include_dirs: ["include"], | 
 | 1922 |     product_variables: { | 
 | 1923 |         platform_sdk_version: { | 
 | 1924 |             asflags: ["-DPLATFORM_SDK_VERSION=%d"], | 
 | 1925 |         }, | 
 | 1926 |     }, | 
 | 1927 |     srcs: ["arch-common/bionic/crtbrand.S"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1928 |  | 
| Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1929 |     defaults: [ | 
 | 1930 |         "crt_defaults", | 
 | 1931 |         "crt_so_defaults", | 
 | 1932 |     ], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1933 | } | 
 | 1934 |  | 
 | 1935 | // Android.mk:ignore | 
 | 1936 | cc_object { | 
 | 1937 |     name: "crtbegin_so1", | 
 | 1938 |     local_include_dirs: ["include"], | 
 | 1939 |     srcs: ["arch-common/bionic/crtbegin_so.c"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1940 |  | 
| Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1941 |     defaults: [ | 
 | 1942 |         "crt_defaults", | 
 | 1943 |         "crt_so_defaults", | 
 | 1944 |     ], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1945 | } | 
 | 1946 |  | 
 | 1947 | // Android.mk:ignore | 
 | 1948 | cc_object { | 
 | 1949 |     name: "crtbegin_so", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1950 |  | 
| Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1951 |     defaults: [ | 
 | 1952 |         "crt_defaults", | 
 | 1953 |         "crt_so_defaults", | 
 | 1954 |     ], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1955 |     deps: [ | 
 | 1956 |         "crtbegin_so1", | 
 | 1957 |         "crtbrand", | 
 | 1958 |     ], | 
 | 1959 | } | 
 | 1960 |  | 
 | 1961 | // Android.mk:ignore | 
 | 1962 | cc_object { | 
 | 1963 |     name: "crtend_so", | 
 | 1964 |     local_include_dirs: ["include"], | 
 | 1965 |     srcs: ["arch-common/bionic/crtend_so.S"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1966 |  | 
| Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1967 |     defaults: [ | 
 | 1968 |         "crt_defaults", | 
 | 1969 |         "crt_so_defaults", | 
 | 1970 |     ], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1971 | } | 
 | 1972 |  | 
 | 1973 | // Android.mk:ignore | 
 | 1974 | cc_object { | 
 | 1975 |     name: "crtbegin_static1", | 
 | 1976 |     local_include_dirs: ["include"], | 
 | 1977 |     srcs: ["arch-common/bionic/crtbegin.c"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1978 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1979 |     arch: { | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1980 |         arm64: { | 
 | 1981 |             srcs: [ | 
 | 1982 |                 "arch-arm64/bionic/crtbegin.c", | 
 | 1983 |             ], | 
 | 1984 |             exclude_srcs: [ | 
 | 1985 |                 "arch-common/bionic/crtbegin.c", | 
 | 1986 |             ], | 
 | 1987 |         }, | 
 | 1988 |         mips: { | 
 | 1989 |             srcs: [ | 
 | 1990 |                 "arch-mips/bionic/crtbegin.c", | 
 | 1991 |             ], | 
 | 1992 |             exclude_srcs: [ | 
 | 1993 |                 "arch-common/bionic/crtbegin.c", | 
 | 1994 |             ], | 
 | 1995 |         }, | 
 | 1996 |         mips64: { | 
 | 1997 |             srcs: [ | 
 | 1998 |                 "arch-mips64/bionic/crtbegin.c", | 
 | 1999 |             ], | 
 | 2000 |             exclude_srcs: [ | 
 | 2001 |                 "arch-common/bionic/crtbegin.c", | 
 | 2002 |             ], | 
 | 2003 |         }, | 
 | 2004 |     }, | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 2005 |  | 
 | 2006 |     defaults: ["crt_defaults"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2007 | } | 
 | 2008 |  | 
 | 2009 | // Android.mk:ignore | 
 | 2010 | cc_object { | 
 | 2011 |     name: "crtbegin_static", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2012 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2013 |     deps: [ | 
 | 2014 |         "crtbegin_static1", | 
 | 2015 |         "crtbrand", | 
 | 2016 |     ], | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 2017 |     defaults: ["crt_defaults"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2018 | } | 
 | 2019 |  | 
 | 2020 | // Android.mk:ignore | 
 | 2021 | cc_object { | 
 | 2022 |     name: "crtbegin_dynamic1", | 
 | 2023 |     local_include_dirs: ["include"], | 
 | 2024 |     srcs: ["arch-common/bionic/crtbegin.c"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2025 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 2026 |     arch: { | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2027 |         arm64: { | 
 | 2028 |             srcs: [ | 
 | 2029 |                 "arch-arm64/bionic/crtbegin.c", | 
 | 2030 |             ], | 
 | 2031 |             exclude_srcs: [ | 
 | 2032 |                 "arch-common/bionic/crtbegin.c", | 
 | 2033 |             ], | 
 | 2034 |         }, | 
 | 2035 |         mips: { | 
 | 2036 |             srcs: [ | 
 | 2037 |                 "arch-mips/bionic/crtbegin.c", | 
 | 2038 |             ], | 
 | 2039 |             exclude_srcs: [ | 
 | 2040 |                 "arch-common/bionic/crtbegin.c", | 
 | 2041 |             ], | 
 | 2042 |         }, | 
 | 2043 |         mips64: { | 
 | 2044 |             srcs: [ | 
 | 2045 |                 "arch-mips64/bionic/crtbegin.c", | 
 | 2046 |             ], | 
 | 2047 |             exclude_srcs: [ | 
 | 2048 |                 "arch-common/bionic/crtbegin.c", | 
 | 2049 |             ], | 
 | 2050 |         }, | 
 | 2051 |     }, | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 2052 |     defaults: ["crt_defaults"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2053 | } | 
 | 2054 |  | 
 | 2055 | // Android.mk:ignore | 
 | 2056 | cc_object { | 
 | 2057 |     name: "crtbegin_dynamic", | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2058 |  | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2059 |     deps: [ | 
 | 2060 |         "crtbegin_dynamic1", | 
 | 2061 |         "crtbrand", | 
 | 2062 |     ], | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 2063 |     defaults: ["crt_defaults"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2064 | } | 
 | 2065 |  | 
 | 2066 | // Android.mk:ignore | 
 | 2067 | cc_object { | 
 | 2068 |     // We rename crtend.o to crtend_android.o to avoid a | 
 | 2069 |     // name clash between gcc and bionic. | 
 | 2070 |     name: "crtend_android", | 
 | 2071 |     local_include_dirs: ["include"], | 
 | 2072 |     srcs: ["arch-common/bionic/crtend.S"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2073 |  | 
| Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 2074 |     defaults: ["crt_defaults"], | 
| Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2075 | } |