Android.mk revision 4c2da039baa6c621c78afa47ead85ec9e028f56d
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/fdprintf.c \ 47 bionic/ftime.c \ 48 bionic/fts.c \ 49 bionic/getdtablesize.c \ 50 bionic/gethostname.c \ 51 bionic/getpriority.c \ 52 bionic/getpt.c \ 53 bionic/if_indextoname.c \ 54 bionic/if_nametoindex.c \ 55 bionic/initgroups.c \ 56 bionic/ioctl.c \ 57 bionic/isatty.c \ 58 bionic/issetugid.c \ 59 bionic/md5.c \ 60 bionic/memmem.c \ 61 bionic/pathconf.c \ 62 bionic/ptsname.c \ 63 bionic/ptsname_r.c \ 64 bionic/pututline.c \ 65 bionic/sched_cpualloc.c \ 66 bionic/sched_cpucount.c \ 67 bionic/semaphore.c \ 68 bionic/sigblock.c \ 69 bionic/siginterrupt.c \ 70 bionic/sigsetmask.c \ 71 bionic/system_properties_compat.c \ 72 bionic/unlockpt.c \ 73 stdio/snprintf.c\ 74 stdio/sprintf.c \ 75 stdlib/atexit.c \ 76 unistd/syslog.c \ 77 78# Fortify implementations of libc functions. 79libc_common_src_files += \ 80 bionic/__FD_chk.cpp \ 81 bionic/__fgets_chk.cpp \ 82 bionic/__memmove_chk.cpp \ 83 bionic/__read_chk.cpp \ 84 bionic/__recvfrom_chk.cpp \ 85 bionic/__stpcpy_chk.cpp \ 86 bionic/__stpncpy_chk.cpp \ 87 bionic/__strchr_chk.cpp \ 88 bionic/__strlcat_chk.cpp \ 89 bionic/__strlcpy_chk.cpp \ 90 bionic/__strlen_chk.cpp \ 91 bionic/__strncat_chk.cpp \ 92 bionic/__strncpy_chk.cpp \ 93 bionic/__strrchr_chk.cpp \ 94 bionic/__umask_chk.cpp \ 95 bionic/__vsnprintf_chk.cpp \ 96 bionic/__vsprintf_chk.cpp \ 97 98libc_bionic_src_files := \ 99 bionic/abort.cpp \ 100 bionic/accept.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/stat.cpp \ 203 bionic/statvfs.cpp \ 204 bionic/strerror.cpp \ 205 bionic/strerror_r.cpp \ 206 bionic/strsignal.cpp \ 207 bionic/strtold.cpp \ 208 bionic/stubs.cpp \ 209 bionic/symlink.cpp \ 210 bionic/sysconf.cpp \ 211 bionic/sys_siglist.c \ 212 bionic/sys_signame.c \ 213 bionic/system_properties.cpp \ 214 bionic/tdestroy.cpp \ 215 bionic/termios.cpp \ 216 bionic/thread_atexit.cpp \ 217 bionic/tmpfile.cpp \ 218 bionic/typeinfo.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/inet/inet_ntop.c \ 273 upstream-netbsd/lib/libc/isc/ev_streams.c \ 274 upstream-netbsd/lib/libc/isc/ev_timers.c \ 275 upstream-netbsd/lib/libc/regex/regcomp.c \ 276 upstream-netbsd/lib/libc/regex/regerror.c \ 277 upstream-netbsd/lib/libc/regex/regexec.c \ 278 upstream-netbsd/lib/libc/regex/regfree.c \ 279 upstream-netbsd/lib/libc/stdlib/bsearch.c \ 280 upstream-netbsd/lib/libc/stdlib/div.c \ 281 upstream-netbsd/lib/libc/stdlib/drand48.c \ 282 upstream-netbsd/lib/libc/stdlib/erand48.c \ 283 upstream-netbsd/lib/libc/stdlib/jrand48.c \ 284 upstream-netbsd/lib/libc/stdlib/ldiv.c \ 285 upstream-netbsd/lib/libc/stdlib/lldiv.c \ 286 upstream-netbsd/lib/libc/stdlib/lrand48.c \ 287 upstream-netbsd/lib/libc/stdlib/lsearch.c \ 288 upstream-netbsd/lib/libc/stdlib/mrand48.c \ 289 upstream-netbsd/lib/libc/stdlib/nrand48.c \ 290 upstream-netbsd/lib/libc/stdlib/_rand48.c \ 291 upstream-netbsd/lib/libc/stdlib/seed48.c \ 292 upstream-netbsd/lib/libc/stdlib/srand48.c \ 293 upstream-netbsd/lib/libc/stdlib/tdelete.c \ 294 upstream-netbsd/lib/libc/stdlib/tfind.c \ 295 upstream-netbsd/lib/libc/stdlib/tsearch.c \ 296 upstream-netbsd/lib/libc/string/memccpy.c \ 297 upstream-netbsd/lib/libc/string/strcasestr.c \ 298 upstream-netbsd/lib/libc/string/strcoll.c \ 299 upstream-netbsd/lib/libc/string/strxfrm.c \ 300 upstream-netbsd/lib/libc/thread-stub/__isthreaded.c \ 301 upstream-netbsd/lib/libc/unistd/killpg.c \ 302 303libc_upstream_openbsd_gdtoa_src_files := \ 304 upstream-openbsd/android/gdtoa_support.cpp \ 305 upstream-openbsd/lib/libc/gdtoa/dmisc.c \ 306 upstream-openbsd/lib/libc/gdtoa/dtoa.c \ 307 upstream-openbsd/lib/libc/gdtoa/gdtoa.c \ 308 upstream-openbsd/lib/libc/gdtoa/gethex.c \ 309 upstream-openbsd/lib/libc/gdtoa/gmisc.c \ 310 upstream-openbsd/lib/libc/gdtoa/hd_init.c \ 311 upstream-openbsd/lib/libc/gdtoa/hdtoa.c \ 312 upstream-openbsd/lib/libc/gdtoa/hexnan.c \ 313 upstream-openbsd/lib/libc/gdtoa/ldtoa.c \ 314 upstream-openbsd/lib/libc/gdtoa/misc.c \ 315 upstream-openbsd/lib/libc/gdtoa/smisc.c \ 316 upstream-openbsd/lib/libc/gdtoa/strtod.c \ 317 upstream-openbsd/lib/libc/gdtoa/strtodg.c \ 318 upstream-openbsd/lib/libc/gdtoa/strtof.c \ 319 upstream-openbsd/lib/libc/gdtoa/strtord.c \ 320 upstream-openbsd/lib/libc/gdtoa/sum.c \ 321 upstream-openbsd/lib/libc/gdtoa/ulp.c \ 322 323libc_upstream_openbsd_gdtoa_src_files_32 := \ 324 $(libc_upstream_openbsd_gdtoa_src_files) \ 325 326libc_upstream_openbsd_gdtoa_src_files_64 := \ 327 $(libc_upstream_openbsd_gdtoa_src_files) \ 328 upstream-openbsd/lib/libc/gdtoa/strtorQ.c \ 329 330libc_upstream_openbsd_src_files := \ 331 upstream-openbsd/lib/libc/gen/alarm.c \ 332 upstream-openbsd/lib/libc/gen/ctype_.c \ 333 upstream-openbsd/lib/libc/gen/exec.c \ 334 upstream-openbsd/lib/libc/gen/fnmatch.c \ 335 upstream-openbsd/lib/libc/gen/ftok.c \ 336 upstream-openbsd/lib/libc/gen/getprogname.c \ 337 upstream-openbsd/lib/libc/gen/isctype.c \ 338 upstream-openbsd/lib/libc/gen/setprogname.c \ 339 upstream-openbsd/lib/libc/gen/time.c \ 340 upstream-openbsd/lib/libc/gen/tolower_.c \ 341 upstream-openbsd/lib/libc/gen/toupper_.c \ 342 upstream-openbsd/lib/libc/locale/btowc.c \ 343 upstream-openbsd/lib/libc/locale/mbrlen.c \ 344 upstream-openbsd/lib/libc/locale/mbstowcs.c \ 345 upstream-openbsd/lib/libc/locale/mbtowc.c \ 346 upstream-openbsd/lib/libc/locale/wcscoll.c \ 347 upstream-openbsd/lib/libc/locale/wcstod.c \ 348 upstream-openbsd/lib/libc/locale/wcstof.c \ 349 upstream-openbsd/lib/libc/locale/wcstoimax.c \ 350 upstream-openbsd/lib/libc/locale/wcstol.c \ 351 upstream-openbsd/lib/libc/locale/wcstold.c \ 352 upstream-openbsd/lib/libc/locale/wcstoll.c \ 353 upstream-openbsd/lib/libc/locale/wcstombs.c \ 354 upstream-openbsd/lib/libc/locale/wcstoul.c \ 355 upstream-openbsd/lib/libc/locale/wcstoull.c \ 356 upstream-openbsd/lib/libc/locale/wcstoumax.c \ 357 upstream-openbsd/lib/libc/locale/wcsxfrm.c \ 358 upstream-openbsd/lib/libc/locale/wctob.c \ 359 upstream-openbsd/lib/libc/locale/wctomb.c \ 360 upstream-openbsd/lib/libc/net/htonl.c \ 361 upstream-openbsd/lib/libc/net/htons.c \ 362 upstream-openbsd/lib/libc/net/inet_addr.c \ 363 upstream-openbsd/lib/libc/net/inet_lnaof.c \ 364 upstream-openbsd/lib/libc/net/inet_makeaddr.c \ 365 upstream-openbsd/lib/libc/net/inet_netof.c \ 366 upstream-openbsd/lib/libc/net/inet_network.c \ 367 upstream-openbsd/lib/libc/net/inet_ntoa.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/fdopen.c \ 374 upstream-openbsd/lib/libc/stdio/feof.c \ 375 upstream-openbsd/lib/libc/stdio/ferror.c \ 376 upstream-openbsd/lib/libc/stdio/fflush.c \ 377 upstream-openbsd/lib/libc/stdio/fgetc.c \ 378 upstream-openbsd/lib/libc/stdio/fgetln.c \ 379 upstream-openbsd/lib/libc/stdio/fgetpos.c \ 380 upstream-openbsd/lib/libc/stdio/fgets.c \ 381 upstream-openbsd/lib/libc/stdio/fgetwc.c \ 382 upstream-openbsd/lib/libc/stdio/fgetws.c \ 383 upstream-openbsd/lib/libc/stdio/fileno.c \ 384 upstream-openbsd/lib/libc/stdio/findfp.c \ 385 upstream-openbsd/lib/libc/stdio/fprintf.c \ 386 upstream-openbsd/lib/libc/stdio/fpurge.c \ 387 upstream-openbsd/lib/libc/stdio/fputc.c \ 388 upstream-openbsd/lib/libc/stdio/fputs.c \ 389 upstream-openbsd/lib/libc/stdio/fputwc.c \ 390 upstream-openbsd/lib/libc/stdio/fputws.c \ 391 upstream-openbsd/lib/libc/stdio/fread.c \ 392 upstream-openbsd/lib/libc/stdio/freopen.c \ 393 upstream-openbsd/lib/libc/stdio/fscanf.c \ 394 upstream-openbsd/lib/libc/stdio/fseek.c \ 395 upstream-openbsd/lib/libc/stdio/fsetpos.c \ 396 upstream-openbsd/lib/libc/stdio/ftell.c \ 397 upstream-openbsd/lib/libc/stdio/funopen.c \ 398 upstream-openbsd/lib/libc/stdio/fvwrite.c \ 399 upstream-openbsd/lib/libc/stdio/fwalk.c \ 400 upstream-openbsd/lib/libc/stdio/fwide.c \ 401 upstream-openbsd/lib/libc/stdio/fwprintf.c \ 402 upstream-openbsd/lib/libc/stdio/fwrite.c \ 403 upstream-openbsd/lib/libc/stdio/fwscanf.c \ 404 upstream-openbsd/lib/libc/stdio/getc.c \ 405 upstream-openbsd/lib/libc/stdio/getchar.c \ 406 upstream-openbsd/lib/libc/stdio/getdelim.c \ 407 upstream-openbsd/lib/libc/stdio/getline.c \ 408 upstream-openbsd/lib/libc/stdio/gets.c \ 409 upstream-openbsd/lib/libc/stdio/getwc.c \ 410 upstream-openbsd/lib/libc/stdio/getwchar.c \ 411 upstream-openbsd/lib/libc/stdio/makebuf.c \ 412 upstream-openbsd/lib/libc/stdio/perror.c \ 413 upstream-openbsd/lib/libc/stdio/printf.c \ 414 upstream-openbsd/lib/libc/stdio/putc.c \ 415 upstream-openbsd/lib/libc/stdio/putchar.c \ 416 upstream-openbsd/lib/libc/stdio/puts.c \ 417 upstream-openbsd/lib/libc/stdio/putw.c \ 418 upstream-openbsd/lib/libc/stdio/putwc.c \ 419 upstream-openbsd/lib/libc/stdio/putwchar.c \ 420 upstream-openbsd/lib/libc/stdio/refill.c \ 421 upstream-openbsd/lib/libc/stdio/remove.c \ 422 upstream-openbsd/lib/libc/stdio/rewind.c \ 423 upstream-openbsd/lib/libc/stdio/rget.c \ 424 upstream-openbsd/lib/libc/stdio/scanf.c \ 425 upstream-openbsd/lib/libc/stdio/setbuf.c \ 426 upstream-openbsd/lib/libc/stdio/setbuffer.c \ 427 upstream-openbsd/lib/libc/stdio/setvbuf.c \ 428 upstream-openbsd/lib/libc/stdio/sscanf.c \ 429 upstream-openbsd/lib/libc/stdio/stdio.c \ 430 upstream-openbsd/lib/libc/stdio/swprintf.c \ 431 upstream-openbsd/lib/libc/stdio/swscanf.c \ 432 upstream-openbsd/lib/libc/stdio/tempnam.c \ 433 upstream-openbsd/lib/libc/stdio/tmpnam.c \ 434 upstream-openbsd/lib/libc/stdio/ungetc.c \ 435 upstream-openbsd/lib/libc/stdio/ungetwc.c \ 436 upstream-openbsd/lib/libc/stdio/vasprintf.c \ 437 upstream-openbsd/lib/libc/stdio/vfprintf.c \ 438 upstream-openbsd/lib/libc/stdio/vfscanf.c \ 439 upstream-openbsd/lib/libc/stdio/vfwprintf.c \ 440 upstream-openbsd/lib/libc/stdio/vfwscanf.c \ 441 upstream-openbsd/lib/libc/stdio/vprintf.c \ 442 upstream-openbsd/lib/libc/stdio/vscanf.c \ 443 upstream-openbsd/lib/libc/stdio/vsnprintf.c \ 444 upstream-openbsd/lib/libc/stdio/vsprintf.c \ 445 upstream-openbsd/lib/libc/stdio/vsscanf.c \ 446 upstream-openbsd/lib/libc/stdio/vswprintf.c \ 447 upstream-openbsd/lib/libc/stdio/vswscanf.c \ 448 upstream-openbsd/lib/libc/stdio/vwprintf.c \ 449 upstream-openbsd/lib/libc/stdio/vwscanf.c \ 450 upstream-openbsd/lib/libc/stdio/wbuf.c \ 451 upstream-openbsd/lib/libc/stdio/wprintf.c \ 452 upstream-openbsd/lib/libc/stdio/wscanf.c \ 453 upstream-openbsd/lib/libc/stdio/wsetup.c \ 454 upstream-openbsd/lib/libc/stdlib/atoi.c \ 455 upstream-openbsd/lib/libc/stdlib/atol.c \ 456 upstream-openbsd/lib/libc/stdlib/atoll.c \ 457 upstream-openbsd/lib/libc/stdlib/exit.c \ 458 upstream-openbsd/lib/libc/stdlib/getenv.c \ 459 upstream-openbsd/lib/libc/stdlib/setenv.c \ 460 upstream-openbsd/lib/libc/stdlib/strtoimax.c \ 461 upstream-openbsd/lib/libc/stdlib/strtol.c \ 462 upstream-openbsd/lib/libc/stdlib/strtoll.c \ 463 upstream-openbsd/lib/libc/stdlib/strtoul.c \ 464 upstream-openbsd/lib/libc/stdlib/strtoull.c \ 465 upstream-openbsd/lib/libc/stdlib/strtoumax.c \ 466 upstream-openbsd/lib/libc/stdlib/system.c \ 467 upstream-openbsd/lib/libc/string/strcasecmp.c \ 468 upstream-openbsd/lib/libc/string/strcspn.c \ 469 upstream-openbsd/lib/libc/string/strdup.c \ 470 upstream-openbsd/lib/libc/string/strndup.c \ 471 upstream-openbsd/lib/libc/string/strpbrk.c \ 472 upstream-openbsd/lib/libc/string/strsep.c \ 473 upstream-openbsd/lib/libc/string/strspn.c \ 474 upstream-openbsd/lib/libc/string/strstr.c \ 475 upstream-openbsd/lib/libc/string/strtok.c \ 476 upstream-openbsd/lib/libc/string/wcslcpy.c \ 477 upstream-openbsd/lib/libc/string/wcsstr.c \ 478 upstream-openbsd/lib/libc/string/wcswcs.c \ 479 upstream-openbsd/lib/libc/string/wcswidth.c \ 480 481libc_arch_static_src_files := \ 482 bionic/dl_iterate_phdr_static.cpp \ 483 484# Define some common cflags 485# ======================================================== 486libc_common_cflags := \ 487 -D_LIBC=1 \ 488 -Wall -Wextra \ 489 490# Try to catch typical 32-bit assumptions that break with 64-bit pointers. 491libc_common_cflags += \ 492 -Werror=pointer-to-int-cast \ 493 -Werror=int-to-pointer-cast \ 494 -Werror=type-limits \ 495 496ifeq ($(strip $(DEBUG_BIONIC_LIBC)),true) 497 libc_common_cflags += -DDEBUG 498endif 499 500# To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in 501# the appropriate BoardConfig.mk file. 502# 503ifneq ($(BOARD_MALLOC_ALIGNMENT),) 504 libc_common_cflags += -DMALLOC_ALIGNMENT=$(BOARD_MALLOC_ALIGNMENT) 505endif 506 507# Define ANDROID_SMP appropriately. 508ifeq ($(TARGET_CPU_SMP),true) 509 libc_common_cflags += -DANDROID_SMP=1 510else 511 libc_common_cflags += -DANDROID_SMP=0 512endif 513 514# Define some common conlyflags 515libc_common_conlyflags := \ 516 -std=gnu99 517 518# Define some common cppflags 519libc_common_cppflags := \ 520 -std=gnu++11 521 522# Define some common includes 523# ======================================================== 524libc_common_c_includes := \ 525 $(LOCAL_PATH)/stdlib \ 526 $(LOCAL_PATH)/stdio \ 527 528# ======================================================== 529# Add in the arch-specific flags. 530# Must be called with $(eval). 531# $(1): the LOCAL_ variable name 532# $(2): the bionic variable name to pull in 533define patch-up-arch-specific-flags 534$(1)_$(TARGET_ARCH) += $($(2)_$(TARGET_ARCH)) 535ifdef TARGET_2ND_ARCH 536$(1)_$(TARGET_2ND_ARCH) += $($(2)_$(TARGET_2ND_ARCH)) 537endif 538endef 539 540 541# ======================================================== 542# libc_stack_protector.a - stack protector code 543# ======================================================== 544# 545# The stack protector code needs to be compiled 546# with -fno-stack-protector, since it modifies the 547# stack canary. 548 549include $(CLEAR_VARS) 550 551LOCAL_SRC_FILES := bionic/__stack_chk_fail.cpp 552LOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector -Werror 553LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 554LOCAL_CPPFLAGS := $(libc_common_cppflags) 555LOCAL_C_INCLUDES := $(libc_common_c_includes) 556LOCAL_MODULE := libc_stack_protector 557LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 558LOCAL_SYSTEM_SHARED_LIBRARIES := 559 560$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 561include $(BUILD_STATIC_LIBRARY) 562 563 564# ======================================================== 565# libc_tzcode.a - upstream 'tzcode' code 566# ======================================================== 567 568include $(CLEAR_VARS) 569 570LOCAL_SRC_FILES := $(call all-c-files-under,tzcode) 571# tzcode doesn't include wcsftime, so we use the OpenBSD one. 572LOCAL_SRC_FILES += upstream-openbsd/lib/libc/time/wcsftime.c 573 574LOCAL_CFLAGS := $(libc_common_cflags) 575# Don't use ridiculous amounts of stack. 576LOCAL_CFLAGS += -DALL_STATE 577# Include tzsetwall, timelocal, timegm, time2posix, and posix2time. 578LOCAL_CFLAGS += -DSTD_INSPIRED 579# The name of the tm_gmtoff field in our struct tm. 580LOCAL_CFLAGS += -DTM_GMTOFF=tm_gmtoff 581# Where we store our tzdata. 582LOCAL_CFLAGS += -DTZDIR=\"/system/usr/share/zoneinfo\" 583# Include timezone and daylight globals. 584LOCAL_CFLAGS += -DUSG_COMPAT=1 585LOCAL_CFLAGS += -DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU 586 587LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 588LOCAL_CPPFLAGS := $(libc_common_cppflags) 589LOCAL_C_INCLUDES := $(libc_common_c_includes) $(LOCAL_PATH)/tzcode/ 590LOCAL_MODULE := libc_tzcode 591LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 592LOCAL_SYSTEM_SHARED_LIBRARIES := 593 594$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 595include $(BUILD_STATIC_LIBRARY) 596 597 598# ======================================================== 599# libc_dns.a - modified NetBSD DNS code 600# ======================================================== 601 602include $(CLEAR_VARS) 603 604LOCAL_SRC_FILES := $(call all-c-files-under,dns) 605LOCAL_CFLAGS := \ 606 $(libc_common_cflags) \ 607 -DANDROID_CHANGES \ 608 -DINET6 \ 609 -I$(LOCAL_PATH)/dns/include \ 610 -I$(LOCAL_PATH)/private \ 611 -I$(LOCAL_PATH)/upstream-netbsd/lib/libc/include \ 612 -include upstream-netbsd/android/include/netbsd-compat.h \ 613# -Werror \ 614 615LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 616LOCAL_CPPFLAGS := $(libc_common_cppflags) 617LOCAL_C_INCLUDES := $(libc_common_c_includes) 618LOCAL_MODULE := libc_dns 619LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 620LOCAL_SYSTEM_SHARED_LIBRARIES := 621 622$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 623include $(BUILD_STATIC_LIBRARY) 624 625 626# ======================================================== 627# libc_freebsd.a - upstream FreeBSD C library code 628# ======================================================== 629# 630# These files are built with the freebsd-compat.h header file 631# automatically included. 632 633include $(CLEAR_VARS) 634 635LOCAL_SRC_FILES := $(libc_upstream_freebsd_src_files) 636LOCAL_CFLAGS := \ 637 $(libc_common_cflags) \ 638 -Wno-sign-compare -Wno-uninitialized \ 639 -I$(LOCAL_PATH)/upstream-freebsd/android/include \ 640 -I$(LOCAL_PATH)/upstream-freebsd/lib/libc/include \ 641 -include freebsd-compat.h \ 642# -Werror \ 643 644LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 645LOCAL_CPPFLAGS := $(libc_common_cppflags) 646LOCAL_C_INCLUDES := $(libc_common_c_includes) 647LOCAL_MODULE := libc_freebsd 648LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 649LOCAL_SYSTEM_SHARED_LIBRARIES := 650 651$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 652include $(BUILD_STATIC_LIBRARY) 653 654 655# ======================================================== 656# libc_netbsd.a - upstream NetBSD C library code 657# ======================================================== 658# 659# These files are built with the netbsd-compat.h header file 660# automatically included. 661 662include $(CLEAR_VARS) 663 664LOCAL_SRC_FILES := $(libc_upstream_netbsd_src_files) 665LOCAL_CFLAGS := \ 666 $(libc_common_cflags) \ 667 -Wno-sign-compare -Wno-uninitialized \ 668 -Werror \ 669 -DPOSIX_MISTAKE \ 670 -I$(LOCAL_PATH)/upstream-netbsd/android/include \ 671 -I$(LOCAL_PATH)/upstream-netbsd/lib/libc/include \ 672 -include netbsd-compat.h \ 673 674LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 675LOCAL_CPPFLAGS := $(libc_common_cppflags) 676LOCAL_C_INCLUDES := $(libc_common_c_includes) 677LOCAL_MODULE := libc_netbsd 678LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 679LOCAL_SYSTEM_SHARED_LIBRARIES := 680 681$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 682include $(BUILD_STATIC_LIBRARY) 683 684 685# ======================================================== 686# libc_openbsd.a - upstream OpenBSD C library code 687# ======================================================== 688# 689# These files are built with the openbsd-compat.h header file 690# automatically included. 691 692include $(CLEAR_VARS) 693 694LOCAL_SRC_FILES := $(libc_upstream_openbsd_src_files) 695LOCAL_CFLAGS := \ 696 $(libc_common_cflags) \ 697 -Wno-sign-compare -Wno-uninitialized \ 698 -Werror \ 699 -I$(LOCAL_PATH)/upstream-openbsd/android/include \ 700 -I$(LOCAL_PATH)/upstream-openbsd/lib/libc/include \ 701 -I$(LOCAL_PATH)/upstream-openbsd/lib/libc/gdtoa/ \ 702 -include openbsd-compat.h \ 703 704LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 705LOCAL_CPPFLAGS := $(libc_common_cppflags) 706LOCAL_C_INCLUDES := $(libc_common_c_includes) 707LOCAL_MODULE := libc_openbsd 708LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 709LOCAL_SYSTEM_SHARED_LIBRARIES := 710 711$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 712include $(BUILD_STATIC_LIBRARY) 713 714 715# ======================================================== 716# libc_gdtoa.a - upstream OpenBSD C library gdtoa code 717# ======================================================== 718# 719# These files are built with the openbsd-compat.h header file 720# automatically included. 721 722include $(CLEAR_VARS) 723 724LOCAL_SRC_FILES_32 := $(libc_upstream_openbsd_gdtoa_src_files_32) 725LOCAL_SRC_FILES_64 := $(libc_upstream_openbsd_gdtoa_src_files_64) 726LOCAL_CFLAGS := \ 727 $(libc_common_cflags) \ 728 -Wno-sign-compare -Wno-uninitialized \ 729 -Werror \ 730 -fvisibility=hidden \ 731 -I$(LOCAL_PATH)/upstream-openbsd/android/include \ 732 -I$(LOCAL_PATH)/upstream-openbsd/lib/libc/include \ 733 -include openbsd-compat.h \ 734 735LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 736LOCAL_CPPFLAGS := $(libc_common_cppflags) 737LOCAL_C_INCLUDES := $(libc_common_c_includes) 738LOCAL_MODULE := libc_gdtoa 739LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 740LOCAL_SYSTEM_SHARED_LIBRARIES := 741 742$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 743include $(BUILD_STATIC_LIBRARY) 744 745 746# ======================================================== 747# libc_bionic.a - home-grown C library code 748# ======================================================== 749 750include $(CLEAR_VARS) 751 752LOCAL_SRC_FILES := $(libc_bionic_src_files) 753LOCAL_CFLAGS := $(libc_common_cflags) \ 754 -Werror \ 755 -Wframe-larger-than=2048 \ 756 757LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 758LOCAL_CPPFLAGS := $(libc_common_cppflags) 759LOCAL_C_INCLUDES := $(libc_common_c_includes) 760LOCAL_MODULE := libc_bionic 761LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 762LOCAL_SYSTEM_SHARED_LIBRARIES := 763 764ifneq ($(TARGET_USES_LOGD),false) 765LOCAL_CFLAGS += -DTARGET_USES_LOGD 766endif 767 768$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 769$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_bionic_src_files)) 770include $(BUILD_STATIC_LIBRARY) 771 772 773# ======================================================== 774# libc_syscalls.a 775# ======================================================== 776 777include $(CLEAR_VARS) 778 779LOCAL_SRC_FILES_$(TARGET_ARCH) := $(call all-S-files-under,arch-$(TARGET_ARCH)/syscalls) 780ifdef TARGET_2ND_ARCH 781LOCAL_SRC_FILES_$(TARGET_2ND_ARCH) := $(call all-S-files-under,arch-$(TARGET_2ND_ARCH)/syscalls) 782endif 783LOCAL_MODULE := libc_syscalls 784LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 785LOCAL_SYSTEM_SHARED_LIBRARIES := 786 787include $(BUILD_STATIC_LIBRARY) 788 789 790# ======================================================== 791# libc_common.a 792# ======================================================== 793 794include $(CLEAR_VARS) 795 796LOCAL_SRC_FILES := $(libc_common_src_files) 797LOCAL_CFLAGS := $(libc_common_cflags) 798LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 799LOCAL_CPPFLAGS := $(libc_common_cppflags) 800LOCAL_C_INCLUDES := $(libc_common_c_includes) 801LOCAL_MODULE := libc_common 802LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 803LOCAL_WHOLE_STATIC_LIBRARIES := \ 804 libc_bionic \ 805 libc_dns \ 806 libc_freebsd \ 807 libc_gdtoa \ 808 libc_netbsd \ 809 libc_openbsd \ 810 libc_stack_protector \ 811 libc_syscalls \ 812 libc_tzcode \ 813 814LOCAL_SYSTEM_SHARED_LIBRARIES := 815 816# TODO: split out the asflags. 817LOCAL_ASFLAGS := $(LOCAL_CFLAGS) 818 819$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 820$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_common_src_files)) 821$(eval $(call patch-up-arch-specific-flags,LOCAL_ASFLAGS,LOCAL_CFLAGS)) 822include $(BUILD_STATIC_LIBRARY) 823 824 825# ======================================================== 826# libc_nomalloc.a 827# ======================================================== 828# 829# This is a version of the static C library that does not 830# include malloc. It's useful in situations when the user wants 831# to provide their own malloc implementation, or wants to 832# explicitly disallow the use of malloc, such as in the 833# dynamic linker. 834 835include $(CLEAR_VARS) 836 837LOCAL_SRC_FILES := \ 838 $(libc_arch_static_src_files) \ 839 $(libc_static_common_src_files) \ 840 bionic/libc_init_static.cpp 841 842LOCAL_C_INCLUDES := $(libc_common_c_includes) 843LOCAL_CFLAGS := $(libc_common_cflags) \ 844 -DLIBC_STATIC \ 845 -Werror \ 846 847LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 848LOCAL_CPPFLAGS := $(libc_common_cppflags) 849 850LOCAL_MODULE := libc_nomalloc 851LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 852LOCAL_WHOLE_STATIC_LIBRARIES := libc_common 853LOCAL_SYSTEM_SHARED_LIBRARIES := 854 855$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 856$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_static_src_files)) 857include $(BUILD_STATIC_LIBRARY) 858 859 860# ======================================================== 861# libc.a 862# ======================================================== 863include $(CLEAR_VARS) 864 865LOCAL_SRC_FILES := \ 866 $(libc_arch_static_src_files) \ 867 $(libc_static_common_src_files) \ 868 bionic/dlmalloc.c \ 869 bionic/malloc_debug_common.cpp \ 870 bionic/libc_init_static.cpp \ 871 872LOCAL_CFLAGS := $(libc_common_cflags) \ 873 -DLIBC_STATIC \ 874 -Werror \ 875 876LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 877LOCAL_CPPFLAGS := $(libc_common_cppflags) 878LOCAL_C_INCLUDES := $(libc_common_c_includes) 879LOCAL_MODULE := libc 880LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 881LOCAL_WHOLE_STATIC_LIBRARIES := libc_common 882LOCAL_SYSTEM_SHARED_LIBRARIES := 883 884$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 885$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_static_src_files)) 886include $(BUILD_STATIC_LIBRARY) 887 888 889# ======================================================== 890# libc.so 891# ======================================================== 892include $(CLEAR_VARS) 893 894LOCAL_CFLAGS := $(libc_common_cflags) -Werror 895LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 896LOCAL_CPPFLAGS := $(libc_common_cppflags) 897LOCAL_C_INCLUDES := $(libc_common_c_includes) 898 899LOCAL_SRC_FILES := \ 900 $(libc_arch_dynamic_src_files) \ 901 $(libc_static_common_src_files) \ 902 bionic/dlmalloc.c \ 903 bionic/malloc_debug_common.cpp \ 904 bionic/debug_mapinfo.cpp \ 905 bionic/debug_stacktrace.cpp \ 906 bionic/libc_init_dynamic.cpp \ 907 bionic/NetdClient.cpp \ 908 909LOCAL_MODULE := libc 910LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 911LOCAL_REQUIRED_MODULES := tzdata 912 913# Leave the symbols in the shared library so that stack unwinders can produce 914# meaningful name resolution. 915LOCAL_STRIP_MODULE := keep_symbols 916 917# WARNING: The only library libc.so should depend on is libdl.so! If you add other libraries, 918# make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries. This 919# ensures that symbols that are pulled into those new libraries from libgcc.a are not declared 920# external; if that were the case, then libc would not pull those symbols from libgcc.a as it 921# should, instead relying on the external symbols from the dependent libraries. That would 922# create a "cloaked" dependency on libgcc.a in libc though the libraries, which is not what 923# you wanted! 924 925LOCAL_SHARED_LIBRARIES := libdl 926LOCAL_WHOLE_STATIC_LIBRARIES := libc_common 927LOCAL_SYSTEM_SHARED_LIBRARIES := 928 929$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 930$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_dynamic_src_files)) 931$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_static_common_src_files)) 932# special for arm 933LOCAL_NO_CRT_arm := true 934LOCAL_CFLAGS_arm += -DCRT_LEGACY_WORKAROUND 935LOCAL_SRC_FILES_arm += \ 936 arch-common/bionic/crtbegin_so.c \ 937 arch-arm/bionic/atexit_legacy.c \ 938 arch-common/bionic/crtend_so.S 939 940include $(BUILD_SHARED_LIBRARY) 941 942 943# For all builds, except for the -user build we will enable memory 944# allocation checking (including memory leaks, buffer overwrites, etc.) 945# Note that all these checks are also controlled by env. settings 946# that can enable, or disable specific checks. Note also that some of 947# the checks are available only in emulator and are implemeted in 948# libc_malloc_qemu_instrumented.so. 949ifneq ($(TARGET_BUILD_VARIANT),user) 950 951# ======================================================== 952# libc_malloc_debug_leak.so 953# ======================================================== 954include $(CLEAR_VARS) 955 956LOCAL_CFLAGS := \ 957 $(libc_common_cflags) \ 958 -DMALLOC_LEAK_CHECK \ 959 -Werror \ 960 961LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 962LOCAL_CPPFLAGS := $(libc_common_cppflags) 963 964LOCAL_C_INCLUDES := $(libc_common_c_includes) 965 966LOCAL_SRC_FILES := \ 967 bionic/debug_mapinfo.cpp \ 968 bionic/debug_stacktrace.cpp \ 969 bionic/malloc_debug_leak.cpp \ 970 bionic/malloc_debug_check.cpp \ 971 972LOCAL_MODULE := libc_malloc_debug_leak 973LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 974 975LOCAL_SHARED_LIBRARIES := libc libdl 976LOCAL_WHOLE_STATIC_LIBRARIES := libc_common 977LOCAL_SYSTEM_SHARED_LIBRARIES := 978LOCAL_ALLOW_UNDEFINED_SYMBOLS := true 979 980# Don't install on release build 981LOCAL_MODULE_TAGS := eng debug 982 983$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 984include $(BUILD_SHARED_LIBRARY) 985 986 987# ======================================================== 988# libc_malloc_debug_qemu.so 989# ======================================================== 990include $(CLEAR_VARS) 991 992LOCAL_CFLAGS := \ 993 $(libc_common_cflags) \ 994 -DMALLOC_QEMU_INSTRUMENT \ 995 -Werror \ 996 997LOCAL_CONLYFLAGS := $(libc_common_conlyflags) 998LOCAL_CPPFLAGS := $(libc_common_cppflags) 999 1000LOCAL_C_INCLUDES := $(libc_common_c_includes) 1001 1002LOCAL_SRC_FILES := \ 1003 bionic/malloc_debug_qemu.cpp 1004 1005LOCAL_MODULE := libc_malloc_debug_qemu 1006LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 1007 1008LOCAL_SHARED_LIBRARIES := libc libdl 1009LOCAL_WHOLE_STATIC_LIBRARIES := libc_common 1010LOCAL_SYSTEM_SHARED_LIBRARIES := 1011 1012# Don't install on release build 1013LOCAL_MODULE_TAGS := eng debug 1014 1015$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) 1016include $(BUILD_SHARED_LIBRARY) 1017 1018endif #!user 1019 1020 1021# ======================================================== 1022include $(call all-makefiles-under,$(LOCAL_PATH)) 1023