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