Android.mk revision fcac8ff97f6b6cced6546e0096cadc1039b68b5e
1LOCAL_PATH := $(call my-dir) 2 3# Make everything depend on any changes to included makefiles. 4libc_common_additional_dependencies := $(LOCAL_PATH)/Android.mk 5 6# Load config for TARGET_ARCH 7my_2nd_arch_prefix := 8include $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk 9libc_common_additional_dependencies += \ 10 $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk 11 12 13ifdef TARGET_2ND_ARCH 14# Load config for TARGET_2ND_ARCH 15my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) 16include $(LOCAL_PATH)/arch-$(TARGET_2ND_ARCH)/$(TARGET_2ND_ARCH).mk 17my_2nd_arch_prefix := 18libc_common_additional_dependencies += \ 19 $(LOCAL_PATH)/arch-$(TARGET_2ND_ARCH)/$(TARGET_2ND_ARCH).mk 20endif 21 22# crt obj files 23# ======================================================== 24# crtbrand.c needs <stdint.h> and a #define for the platform SDK version. 25libc_crt_target_cflags := \ 26 -I$(LOCAL_PATH)/include \ 27 -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) \ 28 29my_2nd_arch_prefix := 30include $(LOCAL_PATH)/crt.mk 31ifdef TARGET_2ND_ARCH 32my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) 33include $(LOCAL_PATH)/crt.mk 34my_2nd_arch_prefix := 35endif 36 37# Define the common source files for all the libc instances 38# ========================================================= 39libc_common_src_files := \ 40 bionic/arc4random.c \ 41 bionic/bindresvport.c \ 42 bionic/daemon.c \ 43 bionic/err.c \ 44 bionic/ether_aton.c \ 45 bionic/ether_ntoa.c \ 46 bionic/ftime.c \ 47 bionic/fts.c \ 48 bionic/getdtablesize.c \ 49 bionic/gethostname.c \ 50 bionic/getpriority.c \ 51 bionic/getpt.c \ 52 bionic/if_indextoname.c \ 53 bionic/if_nametoindex.c \ 54 bionic/initgroups.c \ 55 bionic/ioctl.c \ 56 bionic/isatty.c \ 57 bionic/issetugid.c \ 58 bionic/md5.c \ 59 bionic/memmem.c \ 60 bionic/pathconf.c \ 61 bionic/ptsname.c \ 62 bionic/ptsname_r.c \ 63 bionic/pututline.c \ 64 bionic/sched_cpualloc.c \ 65 bionic/sched_cpucount.c \ 66 bionic/semaphore.c \ 67 bionic/sigblock.c \ 68 bionic/siginterrupt.c \ 69 bionic/sigsetmask.c \ 70 bionic/system_properties_compat.c \ 71 bionic/unlockpt.c \ 72 stdio/snprintf.c\ 73 stdio/sprintf.c \ 74 stdlib/atexit.c \ 75 unistd/syslog.c \ 76 77# Fortify implementations of libc functions. 78libc_common_src_files += \ 79 bionic/__FD_chk.cpp \ 80 bionic/__fgets_chk.cpp \ 81 bionic/__memmove_chk.cpp \ 82 bionic/__read_chk.cpp \ 83 bionic/__recvfrom_chk.cpp \ 84 bionic/__stpcpy_chk.cpp \ 85 bionic/__stpncpy_chk.cpp \ 86 bionic/__strchr_chk.cpp \ 87 bionic/__strlcat_chk.cpp \ 88 bionic/__strlcpy_chk.cpp \ 89 bionic/__strlen_chk.cpp \ 90 bionic/__strncat_chk.cpp \ 91 bionic/__strncpy_chk.cpp \ 92 bionic/__strrchr_chk.cpp \ 93 bionic/__umask_chk.cpp \ 94 bionic/__vsnprintf_chk.cpp \ 95 bionic/__vsprintf_chk.cpp \ 96 97libc_bionic_src_files := \ 98 bionic/abort.cpp \ 99 bionic/accept.cpp \ 100 bionic/accept4.cpp \ 101 bionic/access.cpp \ 102 bionic/assert.cpp \ 103 bionic/atof.cpp \ 104 bionic/__bionic_name_mem.cpp \ 105 bionic/bionic_time_conversions.cpp \ 106 bionic/brk.cpp \ 107 bionic/chmod.cpp \ 108 bionic/chown.cpp \ 109 bionic/clearenv.cpp \ 110 bionic/clock.cpp \ 111 bionic/clone.cpp \ 112 bionic/cmsg_nxthdr.cpp \ 113 bionic/connect.cpp \ 114 bionic/__cxa_guard.cpp \ 115 bionic/__cxa_pure_virtual.cpp \ 116 bionic/dirent.cpp \ 117 bionic/dup2.cpp \ 118 bionic/epoll_create.cpp \ 119 bionic/epoll_pwait.cpp \ 120 bionic/epoll_wait.cpp \ 121 bionic/__errno.cpp \ 122 bionic/eventfd_read.cpp \ 123 bionic/eventfd_write.cpp \ 124 bionic/ffs.cpp \ 125 bionic/flockfile.cpp \ 126 bionic/fork.cpp \ 127 bionic/fpclassify.cpp \ 128 bionic/futimens.cpp \ 129 bionic/getauxval.cpp \ 130 bionic/getcwd.cpp \ 131 bionic/getpgrp.cpp \ 132 bionic/inotify_init.cpp \ 133 bionic/lchown.cpp \ 134 bionic/lfs64_support.cpp \ 135 bionic/__libc_current_sigrtmax.cpp \ 136 bionic/__libc_current_sigrtmin.cpp \ 137 bionic/libc_init_common.cpp \ 138 bionic/libc_logging.cpp \ 139 bionic/libgen.cpp \ 140 bionic/link.cpp \ 141 bionic/locale.cpp \ 142 bionic/lstat.cpp \ 143 bionic/mkdir.cpp \ 144 bionic/mkfifo.cpp \ 145 bionic/mknod.cpp \ 146 bionic/mntent.cpp \ 147 bionic/NetdClientDispatch.cpp \ 148 bionic/new.cpp \ 149 bionic/open.cpp \ 150 bionic/pause.cpp \ 151 bionic/pipe.cpp \ 152 bionic/poll.cpp \ 153 bionic/posix_fallocate.cpp \ 154 bionic/posix_timers.cpp \ 155 bionic/pthread_atfork.cpp \ 156 bionic/pthread_attr.cpp \ 157 bionic/pthread_cond.cpp \ 158 bionic/pthread_create.cpp \ 159 bionic/pthread_detach.cpp \ 160 bionic/pthread_equal.cpp \ 161 bionic/pthread_exit.cpp \ 162 bionic/pthread_getcpuclockid.cpp \ 163 bionic/pthread_getschedparam.cpp \ 164 bionic/pthread_internals.cpp \ 165 bionic/pthread_join.cpp \ 166 bionic/pthread_key.cpp \ 167 bionic/pthread_kill.cpp \ 168 bionic/pthread_mutex.cpp \ 169 bionic/pthread_once.cpp \ 170 bionic/pthread_rwlock.cpp \ 171 bionic/pthread_self.cpp \ 172 bionic/pthread_setname_np.cpp \ 173 bionic/pthread_setschedparam.cpp \ 174 bionic/pthread_sigmask.cpp \ 175 bionic/ptrace.cpp \ 176 bionic/raise.cpp \ 177 bionic/readlink.cpp \ 178 bionic/reboot.cpp \ 179 bionic/recv.cpp \ 180 bionic/rename.cpp \ 181 bionic/rmdir.cpp \ 182 bionic/scandir.cpp \ 183 bionic/sched_getaffinity.cpp \ 184 bionic/sched_getcpu.cpp \ 185 bionic/send.cpp \ 186 bionic/setegid.cpp \ 187 bionic/__set_errno.cpp \ 188 bionic/seteuid.cpp \ 189 bionic/setpgrp.cpp \ 190 bionic/sigaction.cpp \ 191 bionic/sigaddset.cpp \ 192 bionic/sigdelset.cpp \ 193 bionic/sigemptyset.cpp \ 194 bionic/sigfillset.cpp \ 195 bionic/sigismember.cpp \ 196 bionic/signal.cpp \ 197 bionic/signalfd.cpp \ 198 bionic/sigpending.cpp \ 199 bionic/sigprocmask.cpp \ 200 bionic/sigsuspend.cpp \ 201 bionic/sigwait.cpp \ 202 bionic/socket.cpp \ 203 bionic/stat.cpp \ 204 bionic/statvfs.cpp \ 205 bionic/strerror.cpp \ 206 bionic/strerror_r.cpp \ 207 bionic/strsignal.cpp \ 208 bionic/strtold.cpp \ 209 bionic/stubs.cpp \ 210 bionic/symlink.cpp \ 211 bionic/sysconf.cpp \ 212 bionic/sys_siglist.c \ 213 bionic/sys_signame.c \ 214 bionic/system_properties.cpp \ 215 bionic/tdestroy.cpp \ 216 bionic/termios.cpp \ 217 bionic/thread_atexit.cpp \ 218 bionic/tmpfile.cpp \ 219 bionic/umount.cpp \ 220 bionic/unlink.cpp \ 221 bionic/utimes.cpp \ 222 bionic/wait.cpp \ 223 bionic/wchar.cpp \ 224 bionic/wctype.cpp \ 225 226libc_upstream_freebsd_src_files := \ 227 upstream-freebsd/lib/libc/gen/ldexp.c \ 228 upstream-freebsd/lib/libc/gen/sleep.c \ 229 upstream-freebsd/lib/libc/gen/usleep.c \ 230 upstream-freebsd/lib/libc/stdio/fclose.c \ 231 upstream-freebsd/lib/libc/stdio/flags.c \ 232 upstream-freebsd/lib/libc/stdio/fopen.c \ 233 upstream-freebsd/lib/libc/stdio/mktemp.c \ 234 upstream-freebsd/lib/libc/stdlib/abs.c \ 235 upstream-freebsd/lib/libc/stdlib/getopt_long.c \ 236 upstream-freebsd/lib/libc/stdlib/imaxabs.c \ 237 upstream-freebsd/lib/libc/stdlib/imaxdiv.c \ 238 upstream-freebsd/lib/libc/stdlib/labs.c \ 239 upstream-freebsd/lib/libc/stdlib/llabs.c \ 240 upstream-freebsd/lib/libc/stdlib/qsort.c \ 241 upstream-freebsd/lib/libc/stdlib/quick_exit.c \ 242 upstream-freebsd/lib/libc/stdlib/realpath.c \ 243 upstream-freebsd/lib/libc/string/wcpcpy.c \ 244 upstream-freebsd/lib/libc/string/wcpncpy.c \ 245 upstream-freebsd/lib/libc/string/wcscasecmp.c \ 246 upstream-freebsd/lib/libc/string/wcscspn.c \ 247 upstream-freebsd/lib/libc/string/wcsdup.c \ 248 upstream-freebsd/lib/libc/string/wcslcat.c \ 249 upstream-freebsd/lib/libc/string/wcsncasecmp.c \ 250 upstream-freebsd/lib/libc/string/wcsncat.c \ 251 upstream-freebsd/lib/libc/string/wcsncmp.c \ 252 upstream-freebsd/lib/libc/string/wcsncpy.c \ 253 upstream-freebsd/lib/libc/string/wcsnlen.c \ 254 upstream-freebsd/lib/libc/string/wcspbrk.c \ 255 upstream-freebsd/lib/libc/string/wcsspn.c \ 256 upstream-freebsd/lib/libc/string/wcstok.c \ 257 upstream-freebsd/lib/libc/string/wmemchr.c \ 258 upstream-freebsd/lib/libc/string/wmemcpy.c \ 259 upstream-freebsd/lib/libc/string/wmemmove.c \ 260 upstream-freebsd/lib/libc/string/wmemset.c \ 261 262libc_upstream_netbsd_src_files := \ 263 upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \ 264 upstream-netbsd/lib/libc/gen/ftw.c \ 265 upstream-netbsd/lib/libc/gen/nftw.c \ 266 upstream-netbsd/lib/libc/gen/nice.c \ 267 upstream-netbsd/lib/libc/gen/popen.c \ 268 upstream-netbsd/lib/libc/gen/psignal.c \ 269 upstream-netbsd/lib/libc/gen/setjmperr.c \ 270 upstream-netbsd/lib/libc/gen/utime.c \ 271 upstream-netbsd/lib/libc/gen/utmp.c \ 272 upstream-netbsd/lib/libc/isc/ev_streams.c \ 273 upstream-netbsd/lib/libc/isc/ev_timers.c \ 274 upstream-netbsd/lib/libc/regex/regcomp.c \ 275 upstream-netbsd/lib/libc/regex/regerror.c \ 276 upstream-netbsd/lib/libc/regex/regexec.c \ 277 upstream-netbsd/lib/libc/regex/regfree.c \ 278 upstream-netbsd/lib/libc/stdlib/bsearch.c \ 279 upstream-netbsd/lib/libc/stdlib/div.c \ 280 upstream-netbsd/lib/libc/stdlib/drand48.c \ 281 upstream-netbsd/lib/libc/stdlib/erand48.c \ 282 upstream-netbsd/lib/libc/stdlib/jrand48.c \ 283 upstream-netbsd/lib/libc/stdlib/ldiv.c \ 284 upstream-netbsd/lib/libc/stdlib/lldiv.c \ 285 upstream-netbsd/lib/libc/stdlib/lrand48.c \ 286 upstream-netbsd/lib/libc/stdlib/lsearch.c \ 287 upstream-netbsd/lib/libc/stdlib/mrand48.c \ 288 upstream-netbsd/lib/libc/stdlib/nrand48.c \ 289 upstream-netbsd/lib/libc/stdlib/_rand48.c \ 290 upstream-netbsd/lib/libc/stdlib/seed48.c \ 291 upstream-netbsd/lib/libc/stdlib/srand48.c \ 292 upstream-netbsd/lib/libc/stdlib/tdelete.c \ 293 upstream-netbsd/lib/libc/stdlib/tfind.c \ 294 upstream-netbsd/lib/libc/stdlib/tsearch.c \ 295 upstream-netbsd/lib/libc/string/memccpy.c \ 296 upstream-netbsd/lib/libc/string/strcasestr.c \ 297 upstream-netbsd/lib/libc/string/strcoll.c \ 298 upstream-netbsd/lib/libc/string/strxfrm.c \ 299 upstream-netbsd/lib/libc/thread-stub/__isthreaded.c \ 300 upstream-netbsd/lib/libc/unistd/killpg.c \ 301 302libc_upstream_openbsd_gdtoa_src_files := \ 303 upstream-openbsd/android/gdtoa_support.cpp \ 304 upstream-openbsd/lib/libc/gdtoa/dmisc.c \ 305 upstream-openbsd/lib/libc/gdtoa/dtoa.c \ 306 upstream-openbsd/lib/libc/gdtoa/gdtoa.c \ 307 upstream-openbsd/lib/libc/gdtoa/gethex.c \ 308 upstream-openbsd/lib/libc/gdtoa/gmisc.c \ 309 upstream-openbsd/lib/libc/gdtoa/hd_init.c \ 310 upstream-openbsd/lib/libc/gdtoa/hdtoa.c \ 311 upstream-openbsd/lib/libc/gdtoa/hexnan.c \ 312 upstream-openbsd/lib/libc/gdtoa/ldtoa.c \ 313 upstream-openbsd/lib/libc/gdtoa/misc.c \ 314 upstream-openbsd/lib/libc/gdtoa/smisc.c \ 315 upstream-openbsd/lib/libc/gdtoa/strtod.c \ 316 upstream-openbsd/lib/libc/gdtoa/strtodg.c \ 317 upstream-openbsd/lib/libc/gdtoa/strtof.c \ 318 upstream-openbsd/lib/libc/gdtoa/strtord.c \ 319 upstream-openbsd/lib/libc/gdtoa/sum.c \ 320 upstream-openbsd/lib/libc/gdtoa/ulp.c \ 321 322libc_upstream_openbsd_gdtoa_src_files_32 := \ 323 $(libc_upstream_openbsd_gdtoa_src_files) \ 324 325libc_upstream_openbsd_gdtoa_src_files_64 := \ 326 $(libc_upstream_openbsd_gdtoa_src_files) \ 327 upstream-openbsd/lib/libc/gdtoa/strtorQ.c \ 328 329libc_upstream_openbsd_src_files := \ 330 upstream-openbsd/lib/libc/gen/alarm.c \ 331 upstream-openbsd/lib/libc/gen/ctype_.c \ 332 upstream-openbsd/lib/libc/gen/exec.c \ 333 upstream-openbsd/lib/libc/gen/fnmatch.c \ 334 upstream-openbsd/lib/libc/gen/ftok.c \ 335 upstream-openbsd/lib/libc/gen/getprogname.c \ 336 upstream-openbsd/lib/libc/gen/isctype.c \ 337 upstream-openbsd/lib/libc/gen/setprogname.c \ 338 upstream-openbsd/lib/libc/gen/time.c \ 339 upstream-openbsd/lib/libc/gen/tolower_.c \ 340 upstream-openbsd/lib/libc/gen/toupper_.c \ 341 upstream-openbsd/lib/libc/locale/btowc.c \ 342 upstream-openbsd/lib/libc/locale/mbrlen.c \ 343 upstream-openbsd/lib/libc/locale/mbstowcs.c \ 344 upstream-openbsd/lib/libc/locale/mbtowc.c \ 345 upstream-openbsd/lib/libc/locale/wcscoll.c \ 346 upstream-openbsd/lib/libc/locale/wcstod.c \ 347 upstream-openbsd/lib/libc/locale/wcstof.c \ 348 upstream-openbsd/lib/libc/locale/wcstoimax.c \ 349 upstream-openbsd/lib/libc/locale/wcstol.c \ 350 upstream-openbsd/lib/libc/locale/wcstold.c \ 351 upstream-openbsd/lib/libc/locale/wcstoll.c \ 352 upstream-openbsd/lib/libc/locale/wcstombs.c \ 353 upstream-openbsd/lib/libc/locale/wcstoul.c \ 354 upstream-openbsd/lib/libc/locale/wcstoull.c \ 355 upstream-openbsd/lib/libc/locale/wcstoumax.c \ 356 upstream-openbsd/lib/libc/locale/wcsxfrm.c \ 357 upstream-openbsd/lib/libc/locale/wctob.c \ 358 upstream-openbsd/lib/libc/locale/wctomb.c \ 359 upstream-openbsd/lib/libc/net/htonl.c \ 360 upstream-openbsd/lib/libc/net/htons.c \ 361 upstream-openbsd/lib/libc/net/inet_addr.c \ 362 upstream-openbsd/lib/libc/net/inet_lnaof.c \ 363 upstream-openbsd/lib/libc/net/inet_makeaddr.c \ 364 upstream-openbsd/lib/libc/net/inet_netof.c \ 365 upstream-openbsd/lib/libc/net/inet_network.c \ 366 upstream-openbsd/lib/libc/net/inet_ntoa.c \ 367 upstream-openbsd/lib/libc/net/inet_ntop.c \ 368 upstream-openbsd/lib/libc/net/inet_pton.c \ 369 upstream-openbsd/lib/libc/net/ntohl.c \ 370 upstream-openbsd/lib/libc/net/ntohs.c \ 371 upstream-openbsd/lib/libc/stdio/asprintf.c \ 372 upstream-openbsd/lib/libc/stdio/clrerr.c \ 373 upstream-openbsd/lib/libc/stdio/dprintf.c \ 374 upstream-openbsd/lib/libc/stdio/fdopen.c \ 375 upstream-openbsd/lib/libc/stdio/feof.c \ 376 upstream-openbsd/lib/libc/stdio/ferror.c \ 377 upstream-openbsd/lib/libc/stdio/fflush.c \ 378 upstream-openbsd/lib/libc/stdio/fgetc.c \ 379 upstream-openbsd/lib/libc/stdio/fgetln.c \ 380 upstream-openbsd/lib/libc/stdio/fgetpos.c \ 381 upstream-openbsd/lib/libc/stdio/fgets.c \ 382 upstream-openbsd/lib/libc/stdio/fgetwc.c \ 383 upstream-openbsd/lib/libc/stdio/fgetws.c \ 384 upstream-openbsd/lib/libc/stdio/fileno.c \ 385 upstream-openbsd/lib/libc/stdio/findfp.c \ 386 upstream-openbsd/lib/libc/stdio/fprintf.c \ 387 upstream-openbsd/lib/libc/stdio/fpurge.c \ 388 upstream-openbsd/lib/libc/stdio/fputc.c \ 389 upstream-openbsd/lib/libc/stdio/fputs.c \ 390 upstream-openbsd/lib/libc/stdio/fputwc.c \ 391 upstream-openbsd/lib/libc/stdio/fputws.c \ 392 upstream-openbsd/lib/libc/stdio/fread.c \ 393 upstream-openbsd/lib/libc/stdio/freopen.c \ 394 upstream-openbsd/lib/libc/stdio/fscanf.c \ 395 upstream-openbsd/lib/libc/stdio/fseek.c \ 396 upstream-openbsd/lib/libc/stdio/fsetpos.c \ 397 upstream-openbsd/lib/libc/stdio/ftell.c \ 398 upstream-openbsd/lib/libc/stdio/funopen.c \ 399 upstream-openbsd/lib/libc/stdio/fvwrite.c \ 400 upstream-openbsd/lib/libc/stdio/fwalk.c \ 401 upstream-openbsd/lib/libc/stdio/fwide.c \ 402 upstream-openbsd/lib/libc/stdio/fwprintf.c \ 403 upstream-openbsd/lib/libc/stdio/fwrite.c \ 404 upstream-openbsd/lib/libc/stdio/fwscanf.c \ 405 upstream-openbsd/lib/libc/stdio/getc.c \ 406 upstream-openbsd/lib/libc/stdio/getchar.c \ 407 upstream-openbsd/lib/libc/stdio/getdelim.c \ 408 upstream-openbsd/lib/libc/stdio/getline.c \ 409 upstream-openbsd/lib/libc/stdio/gets.c \ 410 upstream-openbsd/lib/libc/stdio/getwc.c \ 411 upstream-openbsd/lib/libc/stdio/getwchar.c \ 412 upstream-openbsd/lib/libc/stdio/makebuf.c \ 413 upstream-openbsd/lib/libc/stdio/perror.c \ 414 upstream-openbsd/lib/libc/stdio/printf.c \ 415 upstream-openbsd/lib/libc/stdio/putc.c \ 416 upstream-openbsd/lib/libc/stdio/putchar.c \ 417 upstream-openbsd/lib/libc/stdio/puts.c \ 418 upstream-openbsd/lib/libc/stdio/putw.c \ 419 upstream-openbsd/lib/libc/stdio/putwc.c \ 420 upstream-openbsd/lib/libc/stdio/putwchar.c \ 421 upstream-openbsd/lib/libc/stdio/refill.c \ 422 upstream-openbsd/lib/libc/stdio/remove.c \ 423 upstream-openbsd/lib/libc/stdio/rewind.c \ 424 upstream-openbsd/lib/libc/stdio/rget.c \ 425 upstream-openbsd/lib/libc/stdio/scanf.c \ 426 upstream-openbsd/lib/libc/stdio/setbuf.c \ 427 upstream-openbsd/lib/libc/stdio/setbuffer.c \ 428 upstream-openbsd/lib/libc/stdio/setvbuf.c \ 429 upstream-openbsd/lib/libc/stdio/sscanf.c \ 430 upstream-openbsd/lib/libc/stdio/stdio.c \ 431 upstream-openbsd/lib/libc/stdio/swprintf.c \ 432 upstream-openbsd/lib/libc/stdio/swscanf.c \ 433 upstream-openbsd/lib/libc/stdio/tempnam.c \ 434 upstream-openbsd/lib/libc/stdio/tmpnam.c \ 435 upstream-openbsd/lib/libc/stdio/ungetc.c \ 436 upstream-openbsd/lib/libc/stdio/ungetwc.c \ 437 upstream-openbsd/lib/libc/stdio/vasprintf.c \ 438 upstream-openbsd/lib/libc/stdio/vdprintf.c \ 439 upstream-openbsd/lib/libc/stdio/vfprintf.c \ 440 upstream-openbsd/lib/libc/stdio/vfscanf.c \ 441 upstream-openbsd/lib/libc/stdio/vfwprintf.c \ 442 upstream-openbsd/lib/libc/stdio/vfwscanf.c \ 443 upstream-openbsd/lib/libc/stdio/vprintf.c \ 444 upstream-openbsd/lib/libc/stdio/vscanf.c \ 445 upstream-openbsd/lib/libc/stdio/vsnprintf.c \ 446 upstream-openbsd/lib/libc/stdio/vsprintf.c \ 447 upstream-openbsd/lib/libc/stdio/vsscanf.c \ 448 upstream-openbsd/lib/libc/stdio/vswprintf.c \ 449 upstream-openbsd/lib/libc/stdio/vswscanf.c \ 450 upstream-openbsd/lib/libc/stdio/vwprintf.c \ 451 upstream-openbsd/lib/libc/stdio/vwscanf.c \ 452 upstream-openbsd/lib/libc/stdio/wbuf.c \ 453 upstream-openbsd/lib/libc/stdio/wprintf.c \ 454 upstream-openbsd/lib/libc/stdio/wscanf.c \ 455 upstream-openbsd/lib/libc/stdio/wsetup.c \ 456 upstream-openbsd/lib/libc/stdlib/atoi.c \ 457 upstream-openbsd/lib/libc/stdlib/atol.c \ 458 upstream-openbsd/lib/libc/stdlib/atoll.c \ 459 upstream-openbsd/lib/libc/stdlib/exit.c \ 460 upstream-openbsd/lib/libc/stdlib/getenv.c \ 461 upstream-openbsd/lib/libc/stdlib/setenv.c \ 462 upstream-openbsd/lib/libc/stdlib/strtoimax.c \ 463 upstream-openbsd/lib/libc/stdlib/strtol.c \ 464 upstream-openbsd/lib/libc/stdlib/strtoll.c \ 465 upstream-openbsd/lib/libc/stdlib/strtoul.c \ 466 upstream-openbsd/lib/libc/stdlib/strtoull.c \ 467 upstream-openbsd/lib/libc/stdlib/strtoumax.c \ 468 upstream-openbsd/lib/libc/stdlib/system.c \ 469 upstream-openbsd/lib/libc/string/strcasecmp.c \ 470 upstream-openbsd/lib/libc/string/strcspn.c \ 471 upstream-openbsd/lib/libc/string/strdup.c \ 472 upstream-openbsd/lib/libc/string/strndup.c \ 473 upstream-openbsd/lib/libc/string/strpbrk.c \ 474 upstream-openbsd/lib/libc/string/strsep.c \ 475 upstream-openbsd/lib/libc/string/strspn.c \ 476 upstream-openbsd/lib/libc/string/strstr.c \ 477 upstream-openbsd/lib/libc/string/strtok.c \ 478 upstream-openbsd/lib/libc/string/wcslcpy.c \ 479 upstream-openbsd/lib/libc/string/wcsstr.c \ 480 upstream-openbsd/lib/libc/string/wcswcs.c \ 481 upstream-openbsd/lib/libc/string/wcswidth.c \ 482 483libc_arch_static_src_files := \ 484 bionic/dl_iterate_phdr_static.cpp \ 485 486# Define some common cflags 487# ======================================================== 488libc_common_cflags := \ 489 -D_LIBC=1 \ 490 -Wall -Wextra \ 491 492# Try to catch typical 32-bit assumptions that break with 64-bit pointers. 493libc_common_cflags += \ 494 -Werror=pointer-to-int-cast \ 495 -Werror=int-to-pointer-cast \ 496 -Werror=type-limits \ 497 498ifeq ($(strip $(DEBUG_BIONIC_LIBC)),true) 499 libc_common_cflags += -DDEBUG 500endif 501 502# To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in 503# the appropriate BoardConfig.mk file. 504# 505ifneq ($(BOARD_MALLOC_ALIGNMENT),) 506 libc_common_cflags += -DMALLOC_ALIGNMENT=$(BOARD_MALLOC_ALIGNMENT) 507endif 508 509# Define ANDROID_SMP appropriately. 510ifeq ($(TARGET_CPU_SMP),true) 511 libc_common_cflags += -DANDROID_SMP=1 512else 513 libc_common_cflags += -DANDROID_SMP=0 514endif 515 516# Define some common conlyflags 517libc_common_conlyflags := \ 518 -std=gnu99 519 520# Define some common cppflags 521libc_common_cppflags := \ 522 -std=gnu++11 523 524# Define some common includes 525# ======================================================== 526libc_common_c_includes := \ 527 $(LOCAL_PATH)/stdlib \ 528 $(LOCAL_PATH)/stdio \ 529 530# ======================================================== 531# Add in the arch-specific flags. 532# Must be called with $(eval). 533# $(1): the LOCAL_ variable name 534# $(2): the bionic variable name to pull in 535define patch-up-arch-specific-flags 536$(1)_$(TARGET_ARCH) += $($(2)_$(TARGET_ARCH)) 537ifdef TARGET_2ND_ARCH 538$(1)_$(TARGET_2ND_ARCH) += $($(2)_$(TARGET_2ND_ARCH)) 539endif 540endef 541 542 543# ======================================================== 544# libc_stack_protector.a - stack protector code 545# ======================================================== 546# 547# The stack protector code needs to be compiled 548# with -fno-stack-protector, since it modifies the 549# stack canary. 550 551include $(CLEAR_VARS) 552 553LOCAL_SRC_FILES := bionic/__stack_chk_fail.cpp 554LOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector -Werror 555LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 556LOCAL_CPPFLAGS := $(libc_common_cppflags) 557LOCAL_C_INCLUDES := $(libc_common_c_includes) 558LOCAL_MODULE := libc_stack_protector 559LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 560LOCAL_SYSTEM_SHARED_LIBRARIES := 561 562$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 563include $(BUILD_STATIC_LIBRARY) 564 565 566# ======================================================== 567# libc_tzcode.a - upstream 'tzcode' code 568# ======================================================== 569 570include $(CLEAR_VARS) 571 572LOCAL_SRC_FILES := $(call all-c-files-under,tzcode) 573# tzcode doesn't include wcsftime, so we use the OpenBSD one. 574LOCAL_SRC_FILES += upstream-openbsd/lib/libc/time/wcsftime.c 575 576LOCAL_CFLAGS := $(libc_common_cflags) 577# Don't use ridiculous amounts of stack. 578LOCAL_CFLAGS += -DALL_STATE 579# Include tzsetwall, timelocal, timegm, time2posix, and posix2time. 580LOCAL_CFLAGS += -DSTD_INSPIRED 581# The name of the tm_gmtoff field in our struct tm. 582LOCAL_CFLAGS += -DTM_GMTOFF=tm_gmtoff 583# Where we store our tzdata. 584LOCAL_CFLAGS += -DTZDIR=\"/system/usr/share/zoneinfo\" 585# Include timezone and daylight globals. 586LOCAL_CFLAGS += -DUSG_COMPAT=1 587LOCAL_CFLAGS += -DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU 588 589LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 590LOCAL_CPPFLAGS := $(libc_common_cppflags) 591LOCAL_C_INCLUDES := $(libc_common_c_includes) $(LOCAL_PATH)/tzcode/ 592LOCAL_MODULE := libc_tzcode 593LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 594LOCAL_SYSTEM_SHARED_LIBRARIES := 595 596$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 597include $(BUILD_STATIC_LIBRARY) 598 599 600# ======================================================== 601# libc_dns.a - modified NetBSD DNS code 602# ======================================================== 603 604include $(CLEAR_VARS) 605 606LOCAL_SRC_FILES := $(call all-c-files-under,dns) 607LOCAL_CFLAGS := \ 608 $(libc_common_cflags) \ 609 -DANDROID_CHANGES \ 610 -DINET6 \ 611 -I$(LOCAL_PATH)/dns/include \ 612 -I$(LOCAL_PATH)/private \ 613 -I$(LOCAL_PATH)/upstream-netbsd/lib/libc/include \ 614 -include upstream-netbsd/android/include/netbsd-compat.h \ 615# -Werror \ 616 617LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 618LOCAL_CPPFLAGS := $(libc_common_cppflags) 619LOCAL_C_INCLUDES := $(libc_common_c_includes) 620LOCAL_MODULE := libc_dns 621LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 622LOCAL_SYSTEM_SHARED_LIBRARIES := 623 624$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 625include $(BUILD_STATIC_LIBRARY) 626 627 628# ======================================================== 629# libc_freebsd.a - upstream FreeBSD C library code 630# ======================================================== 631# 632# These files are built with the freebsd-compat.h header file 633# automatically included. 634 635include $(CLEAR_VARS) 636 637LOCAL_SRC_FILES := $(libc_upstream_freebsd_src_files) 638LOCAL_CFLAGS := \ 639 $(libc_common_cflags) \ 640 -Wno-sign-compare -Wno-uninitialized \ 641 -I$(LOCAL_PATH)/upstream-freebsd/android/include \ 642 -I$(LOCAL_PATH)/upstream-freebsd/lib/libc/include \ 643 -include freebsd-compat.h \ 644# -Werror \ 645 646LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 647LOCAL_CPPFLAGS := $(libc_common_cppflags) 648LOCAL_C_INCLUDES := $(libc_common_c_includes) 649LOCAL_MODULE := libc_freebsd 650LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 651LOCAL_SYSTEM_SHARED_LIBRARIES := 652 653$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 654include $(BUILD_STATIC_LIBRARY) 655 656 657# ======================================================== 658# libc_netbsd.a - upstream NetBSD C library code 659# ======================================================== 660# 661# These files are built with the netbsd-compat.h header file 662# automatically included. 663 664include $(CLEAR_VARS) 665 666LOCAL_SRC_FILES := $(libc_upstream_netbsd_src_files) 667LOCAL_CFLAGS := \ 668 $(libc_common_cflags) \ 669 -Wno-sign-compare -Wno-uninitialized \ 670 -Werror \ 671 -DPOSIX_MISTAKE \ 672 -I$(LOCAL_PATH)/upstream-netbsd/android/include \ 673 -I$(LOCAL_PATH)/upstream-netbsd/lib/libc/include \ 674 -include netbsd-compat.h \ 675 676LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 677LOCAL_CPPFLAGS := $(libc_common_cppflags) 678LOCAL_C_INCLUDES := $(libc_common_c_includes) 679LOCAL_MODULE := libc_netbsd 680LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 681LOCAL_SYSTEM_SHARED_LIBRARIES := 682 683$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 684include $(BUILD_STATIC_LIBRARY) 685 686 687# ======================================================== 688# libc_openbsd.a - upstream OpenBSD C library code 689# ======================================================== 690# 691# These files are built with the openbsd-compat.h header file 692# automatically included. 693 694include $(CLEAR_VARS) 695 696LOCAL_SRC_FILES := $(libc_upstream_openbsd_src_files) 697LOCAL_CFLAGS := \ 698 $(libc_common_cflags) \ 699 -Wno-sign-compare -Wno-uninitialized \ 700 -Werror \ 701 -I$(LOCAL_PATH)/upstream-openbsd/android/include \ 702 -I$(LOCAL_PATH)/upstream-openbsd/lib/libc/include \ 703 -I$(LOCAL_PATH)/upstream-openbsd/lib/libc/gdtoa/ \ 704 -include openbsd-compat.h \ 705 706LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 707LOCAL_CPPFLAGS := $(libc_common_cppflags) 708LOCAL_C_INCLUDES := $(libc_common_c_includes) 709LOCAL_MODULE := libc_openbsd 710LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 711LOCAL_SYSTEM_SHARED_LIBRARIES := 712 713$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 714include $(BUILD_STATIC_LIBRARY) 715 716 717# ======================================================== 718# libc_gdtoa.a - upstream OpenBSD C library gdtoa code 719# ======================================================== 720# 721# These files are built with the openbsd-compat.h header file 722# automatically included. 723 724include $(CLEAR_VARS) 725 726LOCAL_SRC_FILES_32 := $(libc_upstream_openbsd_gdtoa_src_files_32) 727LOCAL_SRC_FILES_64 := $(libc_upstream_openbsd_gdtoa_src_files_64) 728LOCAL_CFLAGS := \ 729 $(libc_common_cflags) \ 730 -Wno-sign-compare -Wno-uninitialized \ 731 -Werror \ 732 -fvisibility=hidden \ 733 -I$(LOCAL_PATH)/upstream-openbsd/android/include \ 734 -I$(LOCAL_PATH)/upstream-openbsd/lib/libc/include \ 735 -include openbsd-compat.h \ 736 737LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 738LOCAL_CPPFLAGS := $(libc_common_cppflags) 739LOCAL_C_INCLUDES := $(libc_common_c_includes) 740LOCAL_MODULE := libc_gdtoa 741LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 742LOCAL_SYSTEM_SHARED_LIBRARIES := 743 744$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 745include $(BUILD_STATIC_LIBRARY) 746 747 748# ======================================================== 749# libc_bionic.a - home-grown C library code 750# ======================================================== 751 752include $(CLEAR_VARS) 753 754LOCAL_SRC_FILES := $(libc_bionic_src_files) 755LOCAL_CFLAGS := $(libc_common_cflags) \ 756 -Werror \ 757 -Wframe-larger-than=2048 \ 758 759LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 760LOCAL_CPPFLAGS := $(libc_common_cppflags) 761LOCAL_C_INCLUDES := $(libc_common_c_includes) 762LOCAL_MODULE := libc_bionic 763LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 764LOCAL_SYSTEM_SHARED_LIBRARIES := 765 766ifneq ($(TARGET_USES_LOGD),false) 767LOCAL_CFLAGS += -DTARGET_USES_LOGD 768endif 769 770$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 771$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_bionic_src_files)) 772include $(BUILD_STATIC_LIBRARY) 773 774 775# ======================================================== 776# libc_syscalls.a 777# ======================================================== 778 779include $(CLEAR_VARS) 780 781LOCAL_SRC_FILES_$(TARGET_ARCH) := $(call all-S-files-under,arch-$(TARGET_ARCH)/syscalls) 782ifdef TARGET_2ND_ARCH 783LOCAL_SRC_FILES_$(TARGET_2ND_ARCH) := $(call all-S-files-under,arch-$(TARGET_2ND_ARCH)/syscalls) 784endif 785LOCAL_MODULE := libc_syscalls 786LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 787LOCAL_SYSTEM_SHARED_LIBRARIES := 788 789include $(BUILD_STATIC_LIBRARY) 790 791 792# ======================================================== 793# libc_common.a 794# ======================================================== 795 796include $(CLEAR_VARS) 797 798LOCAL_SRC_FILES := $(libc_common_src_files) 799LOCAL_CFLAGS := $(libc_common_cflags) 800LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 801LOCAL_CPPFLAGS := $(libc_common_cppflags) 802LOCAL_C_INCLUDES := $(libc_common_c_includes) 803LOCAL_MODULE := libc_common 804LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 805LOCAL_WHOLE_STATIC_LIBRARIES := \ 806 libc_bionic \ 807 libc_dns \ 808 libc_freebsd \ 809 libc_gdtoa \ 810 libc_netbsd \ 811 libc_openbsd \ 812 libc_stack_protector \ 813 libc_syscalls \ 814 libc_tzcode \ 815 816LOCAL_SYSTEM_SHARED_LIBRARIES := 817 818# TODO: split out the asflags. 819LOCAL_ASFLAGS := $(LOCAL_CFLAGS) 820 821$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 822$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_common_src_files)) 823$(eval $(call patch-up-arch-specific-flags,LOCAL_ASFLAGS,LOCAL_CFLAGS)) 824include $(BUILD_STATIC_LIBRARY) 825 826 827# ======================================================== 828# libc_nomalloc.a 829# ======================================================== 830# 831# This is a version of the static C library that does not 832# include malloc. It's useful in situations when the user wants 833# to provide their own malloc implementation, or wants to 834# explicitly disallow the use of malloc, such as in the 835# dynamic linker. 836 837include $(CLEAR_VARS) 838 839LOCAL_SRC_FILES := \ 840 $(libc_arch_static_src_files) \ 841 $(libc_static_common_src_files) \ 842 bionic/libc_init_static.cpp 843 844LOCAL_C_INCLUDES := $(libc_common_c_includes) 845LOCAL_CFLAGS := $(libc_common_cflags) \ 846 -DLIBC_STATIC \ 847 -Werror \ 848 849LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 850LOCAL_CPPFLAGS := $(libc_common_cppflags) 851 852LOCAL_MODULE := libc_nomalloc 853LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 854LOCAL_WHOLE_STATIC_LIBRARIES := libc_common 855LOCAL_SYSTEM_SHARED_LIBRARIES := 856 857$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 858$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_static_src_files)) 859include $(BUILD_STATIC_LIBRARY) 860 861 862# ======================================================== 863# libc.a 864# ======================================================== 865include $(CLEAR_VARS) 866 867LOCAL_SRC_FILES := \ 868 $(libc_arch_static_src_files) \ 869 $(libc_static_common_src_files) \ 870 bionic/dlmalloc.c \ 871 bionic/malloc_debug_common.cpp \ 872 bionic/libc_init_static.cpp \ 873 874LOCAL_CFLAGS := $(libc_common_cflags) \ 875 -DLIBC_STATIC \ 876 -Werror \ 877 878LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 879LOCAL_CPPFLAGS := $(libc_common_cppflags) 880LOCAL_C_INCLUDES := $(libc_common_c_includes) 881LOCAL_MODULE := libc 882LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 883LOCAL_WHOLE_STATIC_LIBRARIES := libc_common 884LOCAL_SYSTEM_SHARED_LIBRARIES := 885 886$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 887$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_static_src_files)) 888include $(BUILD_STATIC_LIBRARY) 889 890 891# ======================================================== 892# libc.so 893# ======================================================== 894include $(CLEAR_VARS) 895 896LOCAL_CFLAGS := $(libc_common_cflags) -Werror 897LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 898LOCAL_CPPFLAGS := $(libc_common_cppflags) 899LOCAL_C_INCLUDES := $(libc_common_c_includes) 900 901LOCAL_SRC_FILES := \ 902 $(libc_arch_dynamic_src_files) \ 903 $(libc_static_common_src_files) \ 904 bionic/dlmalloc.c \ 905 bionic/malloc_debug_common.cpp \ 906 bionic/debug_mapinfo.cpp \ 907 bionic/debug_stacktrace.cpp \ 908 bionic/libc_init_dynamic.cpp \ 909 bionic/NetdClient.cpp \ 910 911LOCAL_MODULE := libc 912LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 913LOCAL_REQUIRED_MODULES := tzdata 914 915# Leave the symbols in the shared library so that stack unwinders can produce 916# meaningful name resolution. 917LOCAL_STRIP_MODULE := keep_symbols 918 919# WARNING: The only library libc.so should depend on is libdl.so! If you add other libraries, 920# make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries. This 921# ensures that symbols that are pulled into those new libraries from libgcc.a are not declared 922# external; if that were the case, then libc would not pull those symbols from libgcc.a as it 923# should, instead relying on the external symbols from the dependent libraries. That would 924# create a "cloaked" dependency on libgcc.a in libc though the libraries, which is not what 925# you wanted! 926 927LOCAL_SHARED_LIBRARIES := libdl 928LOCAL_WHOLE_STATIC_LIBRARIES := libc_common 929LOCAL_SYSTEM_SHARED_LIBRARIES := 930 931$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 932$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_dynamic_src_files)) 933$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_static_common_src_files)) 934# special for arm 935LOCAL_NO_CRT_arm := true 936LOCAL_CFLAGS_arm += -DCRT_LEGACY_WORKAROUND 937LOCAL_SRC_FILES_arm += \ 938 arch-common/bionic/crtbegin_so.c \ 939 arch-arm/bionic/atexit_legacy.c \ 940 arch-common/bionic/crtend_so.S 941 942include $(BUILD_SHARED_LIBRARY) 943 944 945# For all builds, except for the -user build we will enable memory 946# allocation checking (including memory leaks, buffer overwrites, etc.) 947# Note that all these checks are also controlled by env. settings 948# that can enable, or disable specific checks. Note also that some of 949# the checks are available only in emulator and are implemeted in 950# libc_malloc_qemu_instrumented.so. 951ifneq ($(TARGET_BUILD_VARIANT),user) 952 953# ======================================================== 954# libc_malloc_debug_leak.so 955# ======================================================== 956include $(CLEAR_VARS) 957 958LOCAL_CFLAGS := \ 959 $(libc_common_cflags) \ 960 -DMALLOC_LEAK_CHECK \ 961 -Werror \ 962 963LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 964LOCAL_CPPFLAGS := $(libc_common_cppflags) 965 966LOCAL_C_INCLUDES := $(libc_common_c_includes) 967 968LOCAL_SRC_FILES := \ 969 bionic/debug_mapinfo.cpp \ 970 bionic/debug_stacktrace.cpp \ 971 bionic/malloc_debug_leak.cpp \ 972 bionic/malloc_debug_check.cpp \ 973 974LOCAL_MODULE := libc_malloc_debug_leak 975LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 976 977LOCAL_SHARED_LIBRARIES := libc libdl 978LOCAL_WHOLE_STATIC_LIBRARIES := libc_common 979LOCAL_SYSTEM_SHARED_LIBRARIES := 980LOCAL_ALLOW_UNDEFINED_SYMBOLS := true 981 982# Don't install on release build 983LOCAL_MODULE_TAGS := eng debug 984 985$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 986include $(BUILD_SHARED_LIBRARY) 987 988 989# ======================================================== 990# libc_malloc_debug_qemu.so 991# ======================================================== 992include $(CLEAR_VARS) 993 994LOCAL_CFLAGS := \ 995 $(libc_common_cflags) \ 996 -DMALLOC_QEMU_INSTRUMENT \ 997 -Werror \ 998 999LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 1000LOCAL_CPPFLAGS := $(libc_common_cppflags) 1001 1002LOCAL_C_INCLUDES := $(libc_common_c_includes) 1003 1004LOCAL_SRC_FILES := \ 1005 bionic/malloc_debug_qemu.cpp 1006 1007LOCAL_MODULE := libc_malloc_debug_qemu 1008LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 1009 1010LOCAL_SHARED_LIBRARIES := libc libdl 1011LOCAL_WHOLE_STATIC_LIBRARIES := libc_common 1012LOCAL_SYSTEM_SHARED_LIBRARIES := 1013 1014# Don't install on release build 1015LOCAL_MODULE_TAGS := eng debug 1016 1017$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 1018include $(BUILD_SHARED_LIBRARY) 1019 1020endif #!user 1021 1022 1023# ======================================================== 1024include $(call all-makefiles-under,$(LOCAL_PATH)) 1025