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