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