Android.mk revision defd162212de3789d2268a1f3339c2a6097fa825
11dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_PATH:= $(call my-dir)
21dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
31dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(LOCAL_PATH)/arch-$(TARGET_ARCH)/syscalls.mk
4ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin
5ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define the common source files for all the libc instances
6ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# =========================================================
71dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_src_files := \
81dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	$(syscall_src) \
91dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/abort.c \
101dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/alarm.c \
111dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/brk.c \
121dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/creat.c \
131dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/daemon.c \
14defd162212de3789d2268a1f3339c2a6097fa825David 'Digit' Turner	unistd/eventfd.c \
151dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/exec.c \
161dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/fcntl.c \
171dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/fnmatch.c \
18ab8b54101eed0a4b92ebf8fa6994cd1b4f22d8f4David 'Digit' Turner	unistd/fstatfs.c \
191dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/ftime.c \
201dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/ftok.c \
211dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/getcwd.c \
221dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/getdtablesize.c \
231dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/gethostname.c \
241dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/getopt_long.c \
251dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/getpgrp.c \
261dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/getpriority.c \
271dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/getpt.c \
281dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/initgroups.c \
291dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/isatty.c \
301dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/issetugid.c \
318c59d96e243ba1a05d7d9ab7a14d1a00e20bad4aColin Cross	unistd/killpg.c \
321dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/lseek64.c \
331dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/mmap.c \
341dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/nice.c \
351dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/open.c \
361dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/openat.c \
371dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/opendir.c \
381dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/pathconf.c \
391dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/perror.c \
401dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/popen.c \
411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/pread.c \
421dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/pselect.c \
431dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/ptsname.c \
441dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/ptsname_r.c \
451dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/pwrite.c \
461dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/raise.c \
471dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/reboot.c \
481dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/recv.c \
491dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/sbrk.c \
501dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/send.c \
511dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/setegid.c \
529f6915631b918a56e0e6be958fb14d274cbab322Mike Chan	unistd/setuid.c \
531dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/seteuid.c \
549f6915631b918a56e0e6be958fb14d274cbab322Mike Chan	unistd/setreuid.c \
559f6915631b918a56e0e6be958fb14d274cbab322Mike Chan	unistd/setresuid.c \
561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/setpgrp.c \
571dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/sigblock.c \
581dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/siginterrupt.c \
591dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/siglist.c \
601dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/signal.c \
6192b10af793da235659198cf38ff2e0237c181058Thorsten Glaser	unistd/signame.c \
621dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/sigsetmask.c \
631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/sigsuspend.c \
641dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/sigwait.c \
651dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/sleep.c \
661dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/statfs.c \
671dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/strsignal.c \
681dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/syslog.c \
691dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/system.c \
701dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/tcgetpgrp.c \
711dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/tcsetpgrp.c \
721dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/time.c \
731dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/umount.c \
741dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/unlockpt.c \
751dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/usleep.c \
761dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/wait.c \
771dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/asprintf.c \
781dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/clrerr.c \
791dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fclose.c \
801dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fdopen.c \
811dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/feof.c \
821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/ferror.c \
831dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fflush.c \
841dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fgetc.c \
851dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fgetln.c \
861dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fgetpos.c \
871dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fgets.c \
881dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fileno.c \
891dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/findfp.c \
901dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/flags.c \
911dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/flockfile.c \
921dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fopen.c \
931dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fprintf.c \
941dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fpurge.c \
951dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fputc.c \
961dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fputs.c \
971dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fread.c \
981dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/freopen.c \
991dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fscanf.c \
1001dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fseek.c \
1011dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fsetpos.c \
1021dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/ftell.c \
1031dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/funopen.c \
1041dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fvwrite.c \
1051dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fwalk.c \
1061dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fwrite.c \
1071dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/getc.c \
1081dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/getchar.c \
1091dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/gets.c \
1101dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/makebuf.c \
1111dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/mktemp.c \
1121dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/printf.c \
1131dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/putc.c \
1141dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/putchar.c \
1151dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/puts.c \
1161dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/putw.c \
1171dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/refill.c \
1181dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/remove.c \
1191dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/rewind.c \
1201dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/rget.c \
1211dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/scanf.c \
1221dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/setbuf.c \
1231dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/setbuffer.c \
1241dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/setvbuf.c \
1251dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/snprintf.c\
1261dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/sprintf.c \
1271dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/sscanf.c \
1281dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/stdio.c \
1291dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/tempnam.c \
1301dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/tmpfile.c \
1311dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/tmpnam.c \
1321dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/ungetc.c \
1331dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vasprintf.c \
1341dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vfprintf.c \
1351dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vfscanf.c \
1361dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vprintf.c \
1371dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vsnprintf.c \
1381dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vsprintf.c \
1391dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vscanf.c \
1401dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vsscanf.c \
1411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/wbuf.c \
1421dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/wsetup.c \
1431dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/_rand48.c \
1441dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/assert.c \
1451dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/atexit.c \
1461dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/atoi.c \
1471dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/atol.c \
1481dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/atoll.c \
1491dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/bsearch.c \
1501dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/ctype_.c \
1511dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/div.c \
1521dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/exit.c \
1531dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/getenv.c \
1541dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/jrand48.c \
1551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/ldiv.c \
1561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/lldiv.c \
1571dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/locale.c \
1581dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/lrand48.c \
1591dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/mrand48.c \
1601dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/nrand48.c \
1611dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/putenv.c \
1621dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/qsort.c \
1631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/seed48.c \
1641dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/setenv.c \
1651dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/setjmperr.c \
1661dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/srand48.c \
1671dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strntoimax.c \
1681dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strntoumax.c \
1691dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strtod.c \
1701dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strtoimax.c \
1711dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strtol.c \
1721dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strtoll.c \
1731dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strtoul.c \
1741dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strtoull.c \
1751dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strtoumax.c \
1761dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/tolower_.c \
1771dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/toupper_.c \
1781dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/wchar.c \
1791dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/index.c \
1801dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/memccpy.c \
1811dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/memchr.c \
1821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/memmem.c \
1831dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/memrchr.c \
1841dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/memswap.c \
1851dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strcasecmp.c \
1861dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strcasestr.c \
1871dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strcat.c \
1881dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strchr.c \
1891dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strcoll.c \
1901dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strcpy.c \
1911dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strcspn.c \
1921dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strdup.c \
1931dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strerror.c \
1941dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strerror_r.c \
1951dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strlcat.c \
1961dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strlcpy.c \
1971dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strncat.c \
1981dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strncpy.c \
1991dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strndup.c \
2001dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strnlen.c \
2011dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strpbrk.c \
2021dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strrchr.c \
2031dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strsep.c \
2041dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strspn.c \
2051dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strstr.c \
2061dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strtok.c \
2071dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strtotimeval.c \
2081dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strxfrm.c \
2093527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcpcpy.c \
2103527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcpncpy.c \
2113527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcscasecmp.c \
2123527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcscat.c \
2133527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcschr.c \
2143527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcscmp.c \
2153527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcscoll.c \
2163527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcscpy.c \
2173527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcscspn.c \
2183527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcsdup.c \
2193527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcslcat.c \
2203527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcslcpy.c \
2213527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcslen.c \
2223527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcsncasecmp.c \
2233527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcsncat.c \
2243527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcsncmp.c \
2253527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcsncpy.c \
2263527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcsnlen.c \
2273527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcspbrk.c \
2283527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcsrchr.c \
2293527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcsspn.c \
2303527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcsstr.c \
2313527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcstok.c \
2323527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcswidth.c \
2333527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wmemchr.c \
234cb99ab98c99291a6c90043009ab8d64ec8058f9dKenny Root	wchar/wmemcmp.c \
2353527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wmemcpy.c \
2363527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wmemmove.c \
2373527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wmemset.c \
2381dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	inet/bindresvport.c \
2391dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	inet/inet_addr.c \
2401dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	inet/inet_aton.c \
2411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	inet/inet_ntoa.c \
2421dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	inet/inet_ntop.c \
2431dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	inet/inet_pton.c \
2441dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	tzcode/asctime.c \
2451dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	tzcode/difftime.c \
2461dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	tzcode/localtime.c \
2471dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	tzcode/strftime.c \
2481dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	tzcode/strptime.c \
2491dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/__set_errno.c \
2501dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/_rand48.c \
2519f6915631b918a56e0e6be958fb14d274cbab322Mike Chan	bionic/cpuacct.c \
2521dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/arc4random.c \
2531dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/basename.c \
2541dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/basename_r.c \
255fc10b24accd082fb33c8f92ff8b92481c22fe3dcColin Cross	bionic/clearenv.c \
2561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/dirname.c \
2571dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/dirname_r.c \
2581dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/drand48.c \
2591dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/erand48.c \
26064ceac3f493e3063a289aec4a12c74787be974e4Colin Cross	bionic/err.c \
261fc10b24accd082fb33c8f92ff8b92481c22fe3dcColin Cross	bionic/fdprintf.c \
2621dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/fork.c \
26364ceac3f493e3063a289aec4a12c74787be974e4Colin Cross	bionic/fts.c \
2641dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/if_nametoindex.c \
2651dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/if_indextoname.c \
2661dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/ioctl.c \
2671dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/ldexp.c \
2681dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/libc_init_common.c \
2691dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/logd_write.c \
2701dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/md5.c \
2711dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/pututline.c \
2721dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/realpath.c \
2731dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/semaphore.c \
2741dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/sha1.c \
2751dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/ssp.c \
2761dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/stubs.c \
2771dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/system_properties.c \
2781dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/time64.c \
2791dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/thread_atexit.c \
2801dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/utime.c \
2811dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/utmp.c \
2821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/gethnamaddr.c \
2831dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/isc/ev_timers.c \
2841dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/isc/ev_streams.c \
2851dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/inet/nsap_addr.c \
2861dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/__dn_comp.c \
2871dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/__res_close.c \
2881dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/__res_send.c \
2891dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/herror.c \
2901dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_comp.c \
2911dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_data.c \
2921dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_debug.c \
2931dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_init.c \
2941dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_mkquery.c \
2951dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_query.c \
2961dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_send.c \
29710093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	netbsd/resolv/res_state.c \
2981dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_cache.c \
2991dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/net/nsdispatch.c \
3001dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/net/getaddrinfo.c \
3011dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/net/getnameinfo.c \
3021dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/net/getservbyname.c \
3031dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/net/getservent.c \
3041dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/net/base64.c \
3051dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/net/getservbyport.c \
3061dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/nameser/ns_name.c \
3071dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/nameser/ns_parse.c \
3081dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/nameser/ns_ttl.c \
3091dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/nameser/ns_netint.c \
3101dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/nameser/ns_print.c \
3114fa7b105644222d9b35347c9d226ca8e011072ebColin Cross	netbsd/nameser/ns_samedomain.c \
3124fa7b105644222d9b35347c9d226ca8e011072ebColin Cross	regex/regcomp.c \
3134fa7b105644222d9b35347c9d226ca8e011072ebColin Cross	regex/regerror.c \
3144fa7b105644222d9b35347c9d226ca8e011072ebColin Cross	regex/regexec.c \
3154fa7b105644222d9b35347c9d226ca8e011072ebColin Cross	regex/regfree.c \
3161dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
3176a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner# The following files are common, but must be compiled
3186a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner# with different C flags when building a static C library.
3196a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner#
3206a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner# The reason for this is the implementation of __get_tls()
3216a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner# that will differ between the shared and static versions
3226a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner# of the library.
3236a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner#
3246a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner# See comments in private/bionic_tls.h for more details.
3256a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner#
3266a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner# NOTE: bionic/pthread.c is added later to this list
3276a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner#       because it needs special handling on ARM, see
3286a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner#       below.
3296a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner#
3306a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turnerlibc_static_common_src_files := \
3316a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner        unistd/sysconf.c \
3326a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner        bionic/__errno.c \
3336a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner
334ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Architecture specific source files go here
335ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# =========================================================
3361dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectifeq ($(TARGET_ARCH),arm)
3371dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_src_files += \
33897cf7f3394780d524038fc083e2c134031b54728David 'Digit' Turner	bionic/bionic_clone.c \
3391dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-arm/bionic/__get_pc.S \
3401dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-arm/bionic/__get_sp.S \
3411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-arm/bionic/_exit_with_stack_teardown.S \
3421dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-arm/bionic/_setjmp.S \
3431dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-arm/bionic/atomics_arm.S \
3441dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-arm/bionic/clone.S \
3456a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner	arch-arm/bionic/eabi.c \
3461dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-arm/bionic/ffs.S \
3471dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-arm/bionic/kill.S \
3482a7ad97539313c82e13d36c9c75cefb2982a87d8David 'Digit' Turner	arch-arm/bionic/libgcc_compat.c \
3491dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-arm/bionic/tkill.S \
3501dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-arm/bionic/memcmp.S \
3511dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-arm/bionic/memcmp16.S \
3521dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-arm/bionic/memcpy.S \
3531dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-arm/bionic/memset.S \
3541dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-arm/bionic/setjmp.S \
3551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-arm/bionic/sigsetjmp.S \
3561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-arm/bionic/strlen.c.arm \
3571dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-arm/bionic/syscall.S \
35810093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	string/memmove.c.arm \
3598ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare	string/bcopy.c \
3608ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare	string/strcmp.c \
3618ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare	string/strncmp.c \
3621dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/socketcalls.c
3631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
3641dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# These files need to be arm so that gdbserver
3651dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# can set breakpoints in them without messing
3661dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# up any thumb code.
3671dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_src_files += \
3688a1d2cf1422e35257c160ac5bb12dd3ee481c433David 'Digit' Turner	bionic/pthread-rwlocks.c.arm \
3691dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/pthread-timers.c.arm \
3701dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/ptrace.c.arm
371ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin
3726a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turnerlibc_static_common_src_files += \
3736a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner        bionic/pthread.c.arm \
3746a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner
375ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# these are used by the static and dynamic versions of the libc
376ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# respectively
377ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavinlibc_arch_static_src_files := \
378ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	arch-arm/bionic/exidx_static.c
379ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin
380ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavinlibc_arch_dynamic_src_files := \
381ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	arch-arm/bionic/exidx_dynamic.c
3821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectelse # !arm
3831dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
3841dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectifeq ($(TARGET_ARCH),x86)
3851dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_src_files += \
3861dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-x86/bionic/__get_sp.S \
3871dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-x86/bionic/__get_tls.c \
3881dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-x86/bionic/__set_tls.c \
3891dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-x86/bionic/atomics_x86.S \
3901dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-x86/bionic/clone.S \
3911dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-x86/bionic/_exit_with_stack_teardown.S \
3921dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-x86/bionic/setjmp.S \
3931dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-x86/bionic/_setjmp.S \
3941dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-x86/bionic/vfork.S \
3953c543e1da9a2780a70b25299f39734bf0a18c4a0Bruce Beare	arch-x86/bionic/syscall.S \
3968ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare	arch-x86/string/bcopy_wrapper.S \
3978ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare	arch-x86/string/memcpy_wrapper.S \
3988ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare	arch-x86/string/memmove_wrapper.S \
3998ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare	arch-x86/string/bzero_wrapper.S \
4008ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare	arch-x86/string/memcmp_wrapper.S \
4018ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare	arch-x86/string/memset_wrapper.S \
4028ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare	arch-x86/string/strcmp_wrapper.S \
4038ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare	arch-x86/string/strncmp_wrapper.S \
4041dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	arch-x86/string/strlen.S \
4058a1d2cf1422e35257c160ac5bb12dd3ee481c433David 'Digit' Turner	bionic/pthread-rwlocks.c \
4061dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/pthread-timers.c \
4071dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/ptrace.c
4081dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
4096a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turnerlibc_static_common_src_files += \
4106a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner        bionic/pthread.c \
4116a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner
412ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# this is needed for static versions of libc
413ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavinlibc_arch_static_src_files := \
414ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	arch-x86/bionic/dl_iterate_phdr_static.c
415ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin
416ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavinlibc_arch_dynamic_src_files :=
41710093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKIelse # !x86
41810093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI
41910093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKIifeq ($(TARGET_ARCH),sh)
42010093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKIlibc_common_src_files += \
42110093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	arch-sh/bionic/__get_pc.S \
42210093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	arch-sh/bionic/__get_sp.S \
42310093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	arch-sh/bionic/_exit_with_stack_teardown.S \
42410093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	arch-sh/bionic/_setjmp.S \
42510093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	arch-sh/bionic/atomics_sh.c \
42610093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	arch-sh/bionic/atomic_cmpxchg.S \
42710093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	arch-sh/bionic/clone.S \
42810093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	arch-sh/bionic/pipe.S \
42910093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	arch-sh/bionic/memcpy.S \
43010093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	arch-sh/bionic/memset.S \
43110093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	arch-sh/bionic/bzero.S \
43210093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	arch-sh/bionic/setjmp.S \
43310093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	arch-sh/bionic/sigsetjmp.S \
43410093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	arch-sh/bionic/syscall.S \
43510093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	arch-sh/bionic/memmove.S \
43610093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	arch-sh/bionic/__set_tls.c \
43710093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	arch-sh/bionic/__get_tls.c \
43810093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	arch-sh/bionic/ffs.S \
4398ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare	string/bcopy.c \
4408ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare	string/strcmp.c \
4418ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare	string/strncmp.c \
44210093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	string/memcmp.c \
44310093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	string/strlen.c \
4448a1d2cf1422e35257c160ac5bb12dd3ee481c433David 'Digit' Turner	bionic/pthread-rwlocks.c \
44510093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	bionic/pthread-timers.c \
44610093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	bionic/ptrace.c \
44710093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	unistd/socketcalls.c
4486a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner
4496a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turnerlibc_static_common_src_files += \
4506a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner        bionic/pthread.c \
4516a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner
45210093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKIendif # sh
45310093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI
45410093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKIendif # !x86
4551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectendif # !arm
4561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
457ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define some common cflags
458ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
4591dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_cflags := \
4601dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project		-DWITH_ERRLIST			\
4611dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project		-DANDROID_CHANGES		\
4621dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project		-DUSE_LOCKS 			\
4631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project		-DREALLOC_ZERO_BYTES_FREES 	\
4641dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project		-D_LIBC=1 			\
4651dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project		-DSOFTFLOAT                     \
4661dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project		-DFLOATING_POINT		\
4671dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project		-DINET6 \
4681dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project		-I$(LOCAL_PATH)/private \
4694fa7b105644222d9b35347c9d226ca8e011072ebColin Cross		-DUSE_DL_PREFIX \
4704fa7b105644222d9b35347c9d226ca8e011072ebColin Cross		-DPOSIX_MISTAKE
4711dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
472d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turner# these macro definitions are required to implement the
473d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turner# 'timezone' and 'daylight' global variables, as well as
474d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turner# properly update the 'tm_gmtoff' field in 'struct tm'.
475d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turner#
476d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turnerlibc_common_cflags += \
477d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turner    -DTM_GMTOFF=tm_gmtoff \
478d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turner    -DUSG_COMPAT=1
479d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turner
480d2c9dcc9265e66f6432ec39dcc7378b944449e60Dave Bortifeq ($(strip $(DEBUG_BIONIC_LIBC)),true)
4811dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project  libc_common_cflags += -DDEBUG
4821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectendif
4831dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
4841dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectifeq ($(TARGET_ARCH),arm)
4851dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project  libc_common_cflags += -fstrict-aliasing
486ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin  libc_crt_target_cflags := -mthumb-interwork
4874a05d12cf52a9a40759f11f28543bd75715c8f00David 'Digit' Turner  #
4884a05d12cf52a9a40759f11f28543bd75715c8f00David 'Digit' Turner  # Define HAVE_ARM_TLS_REGISTER macro to indicate to the C library
4894a05d12cf52a9a40759f11f28543bd75715c8f00David 'Digit' Turner  # that it should access the hardware TLS register directly in
4904a05d12cf52a9a40759f11f28543bd75715c8f00David 'Digit' Turner  # private/bionic_tls.h
4914a05d12cf52a9a40759f11f28543bd75715c8f00David 'Digit' Turner  #
4924a05d12cf52a9a40759f11f28543bd75715c8f00David 'Digit' Turner  # The value must match your kernel configuration
4934a05d12cf52a9a40759f11f28543bd75715c8f00David 'Digit' Turner  #
4944a05d12cf52a9a40759f11f28543bd75715c8f00David 'Digit' Turner  ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
4954a05d12cf52a9a40759f11f28543bd75715c8f00David 'Digit' Turner    libc_common_cflags += -DHAVE_ARM_TLS_REGISTER
4964a05d12cf52a9a40759f11f28543bd75715c8f00David 'Digit' Turner  endif
497ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavinelse # !arm
498ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin  ifeq ($(TARGET_ARCH),x86)
499ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin    libc_crt_target_cflags := -m32
5008ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare
5018ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare    # Enable recent IA friendly memory routines (such as for Atom)
5028ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare    # These will not work on the earlier x86 machines
5038ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare    libc_common_cflags += -mtune=i686 -DUSE_SSSE3 -DUSE_SSE2
504ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin  endif # x86
505ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavinendif # !arm
5061dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
507fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden# Define ANDROID_SMP appropriately.
508fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenifeq ($(TARGET_CPU_SMP),true)
509fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden    libc_common_cflags += -DANDROID_SMP=1
510fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenelse
511fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden    libc_common_cflags += -DANDROID_SMP=0
512fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenendif
513fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden
5146a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# Needed to access private/__dso_handle.S from
5156a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# crtbegin_xxx.S and crtend_xxx.S
5166a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner#
5176a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turnerlibc_crt_target_cflags += -I$(LOCAL_PATH)/private
518fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden
519ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define some common includes
520ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
5211dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_c_includes := \
5221dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project		$(LOCAL_PATH)/stdlib  \
5231dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project		$(LOCAL_PATH)/string  \
5241dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project		$(LOCAL_PATH)/stdio
5251dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
5261dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
527ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define the libc run-time (crt) support object files that must be built,
528ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# which are needed to build all other objects (shared/static libs and
529ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# executables)
530ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ==========================================================================
5311dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
5326a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turnerifneq ($(filter arm x86,$(TARGET_ARCH)),)
5336a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# ARM and x86 need crtbegin_so/crtend_so.
5346a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner#
5356a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# For x86, the .init section must point to a function that calls all
5366a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# entries in the .ctors section. (on ARM this is done through the
5376a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# .init_array section instead).
5386a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner#
5396a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# For both platforms, the .fini_array section must point to a function
5406a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# that will call __cxa_finalize(&__dso_handle) in order to ensure that
5416a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# static C++ destructors are properly called on dlclose().
5426a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner#
543ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinGEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_so.o
544ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin_so.S
5451dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	@mkdir -p $(dir $@)
546ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	$(TARGET_CC) $(libc_crt_target_cflags) -o $@ -c $<
5471dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectALL_GENERATED_SOURCES += $(GEN)
5481dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
549ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinGEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtend_so.o
550ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtend_so.S
551ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	@mkdir -p $(dir $@)
552ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	$(TARGET_CC) $(libc_crt_target_cflags) -o $@ -c $<
553ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinALL_GENERATED_SOURCES += $(GEN)
554ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavinendif # TARGET_ARCH == x86
5551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
5561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
557ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinGEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_static.o
558ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin_static.S
559ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	@mkdir -p $(dir $@)
560ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	$(TARGET_CC) $(libc_crt_target_cflags) -o $@ -c $<
561ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinALL_GENERATED_SOURCES += $(GEN)
5621dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
563ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinGEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_dynamic.o
564ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin_dynamic.S
5651dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	@mkdir -p $(dir $@)
566ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	$(TARGET_CC) $(libc_crt_target_cflags) -o $@ -c $<
5671dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectALL_GENERATED_SOURCES += $(GEN)
5681dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
569ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin
570ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# We rename crtend.o to crtend_android.o to avoid a
571ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# name clash between gcc and bionic.
572ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinGEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtend_android.o
573ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtend.S
5741dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	@mkdir -p $(dir $@)
575ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	$(TARGET_CC) $(libc_crt_target_cflags) -o $@ -c $<
5761dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectALL_GENERATED_SOURCES += $(GEN)
5771dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
5781dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
579ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# To enable malloc leak check for statically linked programs, add
580ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# "WITH_MALLOC_CHECK_LIBC_A := true" to buildspec.mk
581ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinWITH_MALLOC_CHECK_LIBC_A := $(strip $(WITH_MALLOC_CHECK_LIBC_A))
5821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
583ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
584ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# libc_common.a
585ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
586ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavininclude $(CLEAR_VARS)
5871dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
588ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_SRC_FILES := $(libc_common_src_files)
589ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_CFLAGS := $(libc_common_cflags)
590ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_C_INCLUDES := $(libc_common_c_includes)
5911dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_MODULE := libc_common
5921dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
5931dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
5941dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_STATIC_LIBRARY)
5951dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
5961dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
597ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
59849e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# libc_nomalloc.a
59949e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# ========================================================
60049e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin#
60149e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# This is a version of the static C library that does not
60249e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# include malloc. It's useful in situations when calling
60349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# the user wants to provide their own malloc implementation,
60449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# or wants to explicitly disallow the use of the use of malloc,
60549e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# like the dynamic loader.
60649e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
60749e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavininclude $(CLEAR_VARS)
60849e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
60949e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_SRC_FILES := \
61049e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin	$(libc_arch_static_src_files) \
6116a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner	$(libc_static_common_src_files) \
61249e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin	bionic/libc_init_static.c
61349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
61449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_C_INCLUDES := $(libc_common_c_includes)
6156a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' TurnerLOCAL_CFLAGS := $(libc_common_cflags) \
6166a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner                -DLIBC_STATIC
61749e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
61849e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_MODULE := libc_nomalloc
61949e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
62049e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_SYSTEM_SHARED_LIBRARIES :=
62149e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
62249e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavininclude $(BUILD_STATIC_LIBRARY)
62349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
62449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
62549e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# ========================================================
6261dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# libc.a
6271dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
6281dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS)
6291dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
6301dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \
631ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	$(libc_arch_static_src_files) \
6326a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner	$(libc_static_common_src_files) \
6331dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/dlmalloc.c \
634b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine	bionic/malloc_debug_common.c \
6351dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/libc_init_static.c
6361dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
637b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_CFLAGS := $(libc_common_cflags) \
638b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine                -DLIBC_STATIC
6391dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes)
640ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_MODULE := libc
6411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
6421dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
6431dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
6441dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_STATIC_LIBRARY)
6451dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
6461dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
647ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
6481dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# libc.so
6491dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
6501dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS)
6511dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
6521dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_CFLAGS := $(libc_common_cflags)
6531dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes)
6541dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
6551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \
656ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	$(libc_arch_dynamic_src_files) \
6576a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner	$(libc_static_common_src_files) \
6581dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/dlmalloc.c \
659b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine	bionic/malloc_debug_common.c \
6601dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/libc_init_dynamic.c
6611dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
6621dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_MODULE:= libc
6631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
6641dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# WARNING: The only library libc.so should depend on is libdl.so!  If you add other libraries,
6651dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries.  This
6661dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ensures that symbols that are pulled into those new libraries from libgcc.a are not declared
6671dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# external; if that were the case, then libc would not pull those symbols from libgcc.a as it
6681dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# should, instead relying on the external symbols from the dependent libraries.  That would
6691dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# create an "cloaked" dependency on libgcc.a in libc though the libraries, which is not what
6701dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# you wanted!
6711dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
6721dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SHARED_LIBRARIES := libdl
6731dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
6741dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
6751dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
6761dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_SHARED_LIBRARY)
6771dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
6781dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
679b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# For all builds, except for the -user build we will enable memory
680b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# allocation checking (including memory leaks, buffer overwrites, etc.)
681b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# Note that all these checks are also controlled by env. settings
682b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# that can enable, or disable specific checks. Note also that some of
683b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# the checks are available only in emulator and are implemeted in
684b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_qemu_instrumented.so.
685b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineifneq ($(TARGET_BUILD_VARIANT),user)
686b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
687ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
688b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_debug_leak.so
6891dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
6901dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS)
6911dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
692ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_CFLAGS := \
693ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	$(libc_common_cflags) \
694ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	-DMALLOC_LEAK_CHECK
6951dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
6961dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes)
6971dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
6981dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \
699b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine	bionic/malloc_debug_leak.c
7001dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
701b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE:= libc_malloc_debug_leak
7021dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
703b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_SHARED_LIBRARIES := libc
704b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
705b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_SYSTEM_SHARED_LIBRARIES :=
706b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# Don't prelink
707b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_PRELINK_MODULE := false
708b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# Don't install on release build
709b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE_TAGS := eng debug
7101dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
711b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineinclude $(BUILD_SHARED_LIBRARY)
712b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
713b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
714b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# ========================================================
715b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_debug_qemu.so
716b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# ========================================================
717b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineinclude $(CLEAR_VARS)
718b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
719b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_CFLAGS := \
720b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine	$(libc_common_cflags) \
721b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine	-DMALLOC_QEMU_INSTRUMENT
722b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
723b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_C_INCLUDES := $(libc_common_c_includes)
724b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
725b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_SRC_FILES := \
726b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine	bionic/malloc_debug_qemu.c
727b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
728b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE:= libc_malloc_debug_qemu
729b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
730b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_SHARED_LIBRARIES := libc
7311dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
7321dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
7331dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# Don't prelink
7341dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_PRELINK_MODULE := false
7351dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# Don't install on release build
736b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE_TAGS := eng debug
7371dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
7381dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_SHARED_LIBRARY)
7391dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
740b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineendif	#!user
741b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
742b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
7431dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
7441dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(call all-makefiles-under,$(LOCAL_PATH))
745