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