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