Android.mk revision 7c83a1ed81a15f3e75836c1ac7d500a952f02e10
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/exec.c \
121dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/fnmatch.c \
131dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/getopt_long.c \
141dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/popen.c \
151dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/syslog.c \
161dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/system.c \
171dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/time.c \
181dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/asprintf.c \
191dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/clrerr.c \
201dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fclose.c \
211dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fdopen.c \
221dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/feof.c \
231dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/ferror.c \
241dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fflush.c \
251dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fgetc.c \
261dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fgetln.c \
271dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fgetpos.c \
281dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fgets.c \
291dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fileno.c \
301dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/findfp.c \
311dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/flags.c \
321dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fopen.c \
331dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fprintf.c \
341dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fpurge.c \
351dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fputc.c \
361dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fputs.c \
371dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fread.c \
381dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/freopen.c \
391dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fscanf.c \
401dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fseek.c \
411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fsetpos.c \
421dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/ftell.c \
431dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/funopen.c \
441dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fvwrite.c \
451dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fwalk.c \
461dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fwrite.c \
471dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/getc.c \
481dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/getchar.c \
491dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/gets.c \
501dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/makebuf.c \
511dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/mktemp.c \
521dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/printf.c \
531dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/putc.c \
541dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/putchar.c \
551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/puts.c \
561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/putw.c \
571dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/refill.c \
581dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/remove.c \
591dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/rewind.c \
601dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/rget.c \
611dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/scanf.c \
621dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/setbuf.c \
631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/setbuffer.c \
641dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/setvbuf.c \
651dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/snprintf.c\
661dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/sprintf.c \
671dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/sscanf.c \
681dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/stdio.c \
691dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/tempnam.c \
701dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/tmpnam.c \
711dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/ungetc.c \
721dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vasprintf.c \
731dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vfprintf.c \
741dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vfscanf.c \
751dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vprintf.c \
761dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vsnprintf.c \
771dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vsprintf.c \
781dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vscanf.c \
791dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vsscanf.c \
801dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/wbuf.c \
811dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/wsetup.c \
821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/atexit.c \
831dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/ctype_.c \
841dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/exit.c \
851dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/getenv.c \
861dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/putenv.c \
871dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/qsort.c \
881dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/setenv.c \
891dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strtod.c \
901dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strtoimax.c \
911dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strtol.c \
921dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strtoll.c \
931dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strtoul.c \
941dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strtoull.c \
951dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strtoumax.c \
961dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/tolower_.c \
971dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/toupper_.c \
981dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/index.c \
991dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strcasecmp.c \
1001dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strcat.c \
1011dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strchr.c \
1021dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strcspn.c \
1031dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strdup.c \
1041dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strlcat.c \
1051dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strlcpy.c \
1061dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strncat.c \
1071dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strncpy.c \
1081dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strpbrk.c \
1091dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strrchr.c \
1101dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strsep.c \
1111dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strspn.c \
1121dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strstr.c \
1131dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strtok.c \
1143527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcpcpy.c \
1153527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcpncpy.c \
1163527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcscasecmp.c \
1173527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcscat.c \
1183527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcschr.c \
1193527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcscmp.c \
1203527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcscpy.c \
1213527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcscspn.c \
1223527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcsdup.c \
1233527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcslcat.c \
1243527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcslcpy.c \
1253527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcslen.c \
1263527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcsncasecmp.c \
1273527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcsncat.c \
1283527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcsncmp.c \
1293527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcsncpy.c \
1303527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcsnlen.c \
1313527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcspbrk.c \
1323527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcsrchr.c \
1333527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcsspn.c \
1343527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcsstr.c \
1353527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcstok.c \
1363527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcswidth.c \
13770465614e14a87f547cdd1b82b0b270b87d215c1Kristian Monsen	wchar/wcsxfrm.c \
1383527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wmemchr.c \
13970465614e14a87f547cdd1b82b0b270b87d215c1Kristian Monsen	wchar/wmemcmp.c \
1403527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wmemcpy.c \
1413527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wmemmove.c \
1423527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wmemset.c \
1431dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	tzcode/asctime.c \
1441dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	tzcode/difftime.c \
1451dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	tzcode/localtime.c \
1461dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	tzcode/strftime.c \
1471dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	tzcode/strptime.c \
1481dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/arc4random.c \
149a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/atoi.c \
150a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/atol.c \
151a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/atoll.c \
152a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/bindresvport.c \
153a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/bionic_clone.c \
154fc10b24accd082fb33c8f92ff8b92481c22fe3dcColin Cross	bionic/clearenv.c \
155a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/cpuacct.c \
156a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/daemon.c \
15764ceac3f493e3063a289aec4a12c74787be974e4Colin Cross	bionic/err.c \
158a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/ether_aton.c \
159a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/ether_ntoa.c \
160a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/fcntl.c \
161fc10b24accd082fb33c8f92ff8b92481c22fe3dcColin Cross	bionic/fdprintf.c \
162a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/flockfile.c \
1631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/fork.c \
164a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/fstatfs.c \
165a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/ftime.c \
166a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/ftok.c \
16764ceac3f493e3063a289aec4a12c74787be974e4Colin Cross	bionic/fts.c \
168a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/getdtablesize.c \
169a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/gethostname.c \
170a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/getpgrp.c \
171a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/getpriority.c \
172a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/getpt.c \
1731dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/if_indextoname.c \
174a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/if_nametoindex.c \
175a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/initgroups.c \
1761dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/ioctl.c \
177a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/isatty.c \
178a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/issetugid.c \
1791dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/ldexp.c \
1801dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/logd_write.c \
181a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/lseek64.c \
1821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/md5.c \
183a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/memchr.c \
184a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/memmem.c \
185a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/memrchr.c \
186a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/memswap.c \
187a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/mmap.c \
188a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/openat.c \
189a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/open.c \
190a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/pathconf.c \
191a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/perror.c \
192a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/pread.c \
193a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/pselect.c \
194a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/ptsname.c \
195a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/ptsname_r.c \
1961dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/pututline.c \
197a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/pwrite.c \
1981dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/realpath.c \
199a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/reboot.c \
200a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/recv.c \
20172e6fd42421dca80fb2776a9185c186d4a04e5f7David 'Digit' Turner	bionic/sched_cpualloc.c \
20272e6fd42421dca80fb2776a9185c186d4a04e5f7David 'Digit' Turner	bionic/sched_cpucount.c \
203a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/sched_getaffinity.c \
204a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/sched_getcpu.c \
2051dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/semaphore.c \
206a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/send.c \
207a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/setegid.c \
208a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/seteuid.c \
209a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/setpgrp.c \
210a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/setresuid.c \
211a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/setreuid.c \
212a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/setuid.c \
213a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/sigblock.c \
214a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/siginterrupt.c \
215a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/siglist.c \
216a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/signal.c \
217a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/signame.c \
218a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/sigsetmask.c \
219a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/sigsuspend.c \
220a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/sleep.c \
221a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/statfs.c \
222a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/strndup.c \
223a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/strnlen.c \
224a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/strntoimax.c \
225a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/strntoumax.c \
226a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/strtotimeval.c \
2271dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/system_properties.c \
228a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/tcgetpgrp.c \
229a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/tcsetpgrp.c \
2301dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/thread_atexit.c \
231a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/time64.c \
232a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/umount.c \
233a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/unlockpt.c \
234a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/usleep.c \
2351dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/utmp.c \
236a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/wait.c \
237a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/wcscoll.c \
2381dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/gethnamaddr.c \
2391dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/inet/nsap_addr.c \
2401dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/__dn_comp.c \
2411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/__res_close.c \
2421dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/__res_send.c \
2431dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/herror.c \
2441dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_comp.c \
2451dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_data.c \
2461dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_debug.c \
2471dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_init.c \
2481dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_mkquery.c \
2491dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_query.c \
2501dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_send.c \
25110093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	netbsd/resolv/res_state.c \
2521dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_cache.c \
2531dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/net/nsdispatch.c \
2541dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/net/getaddrinfo.c \
2551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/net/getnameinfo.c \
2561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/net/getservbyname.c \
2571dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/net/getservent.c \
2581dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/net/base64.c \
2591dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/net/getservbyport.c \
2601dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/nameser/ns_name.c \
2611dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/nameser/ns_parse.c \
2621dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/nameser/ns_ttl.c \
2631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/nameser/ns_netint.c \
2641dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/nameser/ns_print.c \
2654fa7b105644222d9b35347c9d226ca8e011072ebColin Cross	netbsd/nameser/ns_samedomain.c \
2661dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
26729c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hugheslibc_bionic_src_files := \
268063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/assert.cpp \
269428f5567be25b8090e3dd72e2d3d337c305b514eElliott Hughes    bionic/brk.cpp \
2701e980b6bc8315d00a07312b25486531247abd98cElliott Hughes    bionic/debug_format.cpp \
271c30396f5f225e0b5a83a35432e2d82a7063cfdb9David 'Digit' Turner    bionic/dirent.cpp \
27291a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes    bionic/__errno.c \
273063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/eventfd.cpp \
274063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/__fgets_chk.cpp \
2752c5153b043b44e9935a334ae9b2d5a4bc5258b40Nick Kralevich    bionic/getauxval.cpp \
276063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/getcwd.cpp \
27742b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes    bionic/libc_init_common.cpp \
27858b575485c446f9d76ee00f67516ed42cf017769Elliott Hughes    bionic/libgen.cpp \
279063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/__memcpy_chk.cpp \
280063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/__memmove_chk.cpp \
281063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/__memset_chk.cpp \
2823e898476c7230b60a0f76968e64ff25f475b48c0Elliott Hughes    bionic/pthread_attr.cpp \
2839d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_detach.cpp \
2849d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_equal.cpp \
2859d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_getcpuclockid.cpp \
2869d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_getschedparam.cpp \
2879d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_internals.cpp \
2889d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_join.cpp \
2899d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_kill.cpp \
2909d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_self.cpp \
2913e898476c7230b60a0f76968e64ff25f475b48c0Elliott Hughes    bionic/pthread_setname_np.cpp \
2929d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_setschedparam.cpp \
293c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    bionic/pthread_sigmask.cpp \
294d8a5a6f513c6fa99229e9c82c5c308c7cd6b3d54Chris Dearman    bionic/raise.cpp \
295428f5567be25b8090e3dd72e2d3d337c305b514eElliott Hughes    bionic/sbrk.cpp \
296701bec2af33feaa9dddf12ccf8e4c714441b7f2eElliott Hughes    bionic/scandir.cpp \
2974a9e837840fda3aaea48aeba85c7c7a8782d2586Elliott Hughes    bionic/__set_errno.cpp \
298063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/setlocale.cpp \
299a4b2dc016fa62bd172a73c3f8971c805700ffb0fRom Lemarchand    bionic/signalfd.cpp \
300c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    bionic/sigwait.cpp \
301063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/__strcat_chk.cpp \
302063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/__strcpy_chk.cpp \
303063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/strerror.cpp \
304063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/strerror_r.cpp \
305063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/__strlcat_chk.cpp \
306063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/__strlcpy_chk.cpp \
307063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/__strlen_chk.cpp \
308063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/__strncat_chk.cpp \
309063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/__strncpy_chk.cpp \
310063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/strsignal.cpp \
311063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/stubs.cpp \
31291a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes    bionic/sysconf.cpp \
313063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/tdestroy.cpp \
314063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/tmpfile.cpp \
315063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/__umask_chk.cpp \
316063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/__vsnprintf_chk.cpp \
317063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/__vsprintf_chk.cpp \
318063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/wchar.cpp \
31929c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
320f8b3a920a895a53b207017249080087d562bd0d2Elliott Hugheslibc_upstream_netbsd_src_files := \
321e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
322e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/common/lib/libc/inet/inet_addr.c \
323e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/compat-43/creat.c \
324e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/gen/ftw.c \
325e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/gen/nftw.c \
326e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/gen/nice.c \
327e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/gen/psignal.c \
328ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/gen/setjmperr.c \
329e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/gen/utime.c \
330e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/inet/inet_ntoa.c \
331e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/inet/inet_ntop.c \
332e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/inet/inet_pton.c \
333ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/isc/ev_streams.c \
334ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/isc/ev_timers.c \
335e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/regex/regcomp.c \
336e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/regex/regerror.c \
337e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/regex/regexec.c \
338e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/regex/regfree.c \
339e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdio/getdelim.c \
340e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdio/getline.c \
341ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/stdlib/bsearch.c \
342ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/stdlib/div.c \
343e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/drand48.c \
344e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/erand48.c \
345e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/jrand48.c \
346ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/stdlib/ldiv.c \
347ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/stdlib/lldiv.c \
348e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/lrand48.c \
349e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/mrand48.c \
350e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/nrand48.c \
351e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/_rand48.c \
352e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/seed48.c \
353e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/srand48.c \
354e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/tdelete.c \
355e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/tfind.c \
356e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/tsearch.c \
357c51cd764a2d0897234762abd4dbd21420cb9f17dElliott Hughes    upstream-netbsd/libc/string/memccpy.c \
358e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/string/strcasestr.c \
3592b473070126345e323d0694b87f88264cc9a77ccElliott Hughes    upstream-netbsd/libc/string/strcoll.c \
360e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/string/strxfrm.c \
361ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/unistd/killpg.c \
362f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
363ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Architecture specific source files go here
364ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# =========================================================
3651dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectifeq ($(TARGET_ARCH),arm)
3661dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_src_files += \
367a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/memmove.c.arm \
368a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/socketcalls.c \
3698ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare	string/bcopy.c \
3708ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare	string/strncmp.c \
3711dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
3721dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# These files need to be arm so that gdbserver
3731dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# can set breakpoints in them without messing
3741dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# up any thumb code.
3751dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_src_files += \
3764f086aeb4aa06e13079b7fec71a8178ceeacf318Matt Fischer	bionic/pthread-atfork.c.arm \
3778a1d2cf1422e35257c160ac5bb12dd3ee481c433David 'Digit' Turner	bionic/pthread-rwlocks.c.arm \
3781dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/pthread-timers.c.arm \
3791dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/ptrace.c.arm
380ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin
3816a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turnerlibc_static_common_src_files += \
38244b53ad6818de344e0b499ad8fdbb21fcb0ff2b6Elliott Hughes    bionic/pthread.c.arm \
3834b4a8824289c48c823cd38bc63289d121aae3d67Elliott Hughes    bionic/pthread_create.cpp.arm \
38444b53ad6818de344e0b499ad8fdbb21fcb0ff2b6Elliott Hughes    bionic/pthread_key.cpp.arm \
3856a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner
386a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif # arm
3871dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
3881dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectifeq ($(TARGET_ARCH),x86)
3891dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_src_files += \
390d2547040a13fe1bce31a60df35d4953c596a3db0Elliott Hughes    bionic/pthread-atfork.c \
391d2547040a13fe1bce31a60df35d4953c596a3db0Elliott Hughes    bionic/pthread-rwlocks.c \
392d2547040a13fe1bce31a60df35d4953c596a3db0Elliott Hughes    bionic/pthread-timers.c \
393d2547040a13fe1bce31a60df35d4953c596a3db0Elliott Hughes    bionic/ptrace.c \
394d2547040a13fe1bce31a60df35d4953c596a3db0Elliott Hughes    string/strcpy.c \
3951dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
3966a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turnerlibc_static_common_src_files += \
39744b53ad6818de344e0b499ad8fdbb21fcb0ff2b6Elliott Hughes    bionic/pthread.c \
3984b4a8824289c48c823cd38bc63289d121aae3d67Elliott Hughes    bionic/pthread_create.cpp \
39944b53ad6818de344e0b499ad8fdbb21fcb0ff2b6Elliott Hughes    bionic/pthread_key.cpp \
4006a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner
401a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif # x86
40210093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI
403a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),mips)
404a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamlibc_common_src_files += \
405857fed50cbf2d1a701a5a1a29e124f7e9fb945d5Elliott Hughes	bionic/memcmp.c \
406a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham	string/bcopy.c \
407a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham	string/strcmp.c \
408a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham	string/strcpy.c \
409a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham	string/strncmp.c
410a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham
411a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamlibc_common_src_files += \
412a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham	bionic/pthread-atfork.c \
413a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham	bionic/pthread-rwlocks.c \
414a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham	bionic/pthread-timers.c \
415a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham	bionic/ptrace.c
416a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham
417a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamlibc_static_common_src_files += \
418ba342c11adbe92aa918d50b0d2a36453510ebf02Elliott Hughes    bionic/pthread.c \
4194b4a8824289c48c823cd38bc63289d121aae3d67Elliott Hughes    bionic/pthread_create.cpp \
42044b53ad6818de344e0b499ad8fdbb21fcb0ff2b6Elliott Hughes    bionic/pthread_key.cpp \
421a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham
422a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif # mips
4231dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
4247c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrisifeq ($(strip $(TARGET_CPU_VARIANT)),)
4257c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris$(warning TARGET_CPU_VARIANT is not defined)
4267c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrisendif
4277c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris
4287c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris###########################################################
4297c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## Add cpu specific source files.
4307c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris##
4317c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## This can be called multiple times, but it will only add
4327c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## the first source file for each unique $(1).
4337c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## $(1): Unique identifier to identify the cpu variant
4347c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris##       implementation.
4357c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## $(2): Cpu specific source file.
4367c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris###########################################################
4377c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris
4387c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrisdefine libc-add-cpu-variant-src
4397c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris$(if $(filter true,$(_LIBC_ARCH_CPU_VARIANT_HAS_$(1))), \
4407c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris	, \
4417c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris     $(eval _LIBC_ARCH_CPU_VARIANT_HAS_$(1) := true) \
4427c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris     $(eval _LIBC_ARCH_CPU_VARIANT_SRC_FILE.$(1) := $(2)) \
4437c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris     $(eval _LIBC_ARCH_CPU_VARIANT_SRC_FILES += $(2)) \
4447c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris)
4457c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrisendef
4467c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris
4477c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris_LIBC_ARCH_COMMON_SRC_FILES :=
4487c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris_LIBC_ARCH_CPU_VARIANT_SRC_FILES :=
4497c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris_LIBC_ARCH_STATIC_SRC_FILES :=
4507c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris_LIBC_ARCH_DYNAMIC_SRC_FILES :=
4517c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrisinclude bionic/libc/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk
4527c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris
4537c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrislibc_common_src_files += $(_LIBC_ARCH_COMMON_SRC_FILES)
4547c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrislibc_common_src_files += $(_LIBC_ARCH_CPU_VARIANT_SRC_FILES)
4557c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrislibc_arch_static_src_files := $(_LIBC_ARCH_STATIC_SRC_FILES)
4567c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrislibc_arch_dynamic_src_files := $(_LIBC_ARCH_DYNAMIC_SRC_FILES)
4577c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris
458ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define some common cflags
459ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
4601dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_cflags := \
461470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes    -DWITH_ERRLIST \
462470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes    -DANDROID_CHANGES \
463470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes    -D_LIBC=1 \
464470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes    -DFLOATING_POINT \
465470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes    -DINET6 \
466470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes    -I$(LOCAL_PATH)/private \
467470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes    -DPOSIX_MISTAKE \
468470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes    -DLOG_ON_HEAP_ERROR \
469c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes    -Wall -Wextra
4701dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
471d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turner# these macro definitions are required to implement the
472d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turner# 'timezone' and 'daylight' global variables, as well as
473d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turner# properly update the 'tm_gmtoff' field in 'struct tm'.
474d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turner#
475d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turnerlibc_common_cflags += \
476d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turner    -DTM_GMTOFF=tm_gmtoff \
477d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turner    -DUSG_COMPAT=1
478d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turner
479d2c9dcc9265e66f6432ec39dcc7378b944449e60Dave Bortifeq ($(strip $(DEBUG_BIONIC_LIBC)),true)
4801dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project  libc_common_cflags += -DDEBUG
4811dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectendif
4821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
4832fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren# To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in
4842fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren# the appropriate BoardConfig.mk file.
4852fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren#
4862fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Renifneq ($(BOARD_MALLOC_ALIGNMENT),)
4872fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren  libc_common_cflags += -DMALLOC_ALIGNMENT=$(BOARD_MALLOC_ALIGNMENT)
4882fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Renendif
4892fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren
4901dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectifeq ($(TARGET_ARCH),arm)
491a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  libc_common_cflags += -DSOFTFLOAT
4921dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project  libc_common_cflags += -fstrict-aliasing
493ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin  libc_crt_target_cflags := -mthumb-interwork
4944a05d12cf52a9a40759f11f28543bd75715c8f00David 'Digit' Turner  #
49591a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes  # Define HAVE_32_BYTE_CACHE_LINES to indicate to the C library
49691a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes  # that it should use the 32-byte version of memcpy, not
497fe6338da9168330d44b409b2ee36103e8bfe6697Henrik Smiding  # the 64-byte version.
498fe6338da9168330d44b409b2ee36103e8bfe6697Henrik Smiding  #
499fe6338da9168330d44b409b2ee36103e8bfe6697Henrik Smiding  ifeq ($(ARCH_ARM_HAVE_32_BYTE_CACHE_LINES),true)
500fe6338da9168330d44b409b2ee36103e8bfe6697Henrik Smiding    libc_common_cflags += -DHAVE_32_BYTE_CACHE_LINE
501fe6338da9168330d44b409b2ee36103e8bfe6697Henrik Smiding  endif
50208e72d0161e39e99ff1003bf1ce894f37d7b7eb4Prajakta Gudadhe  ifeq ($(ARCH_ARM_USE_NON_NEON_MEMCPY),true)
50308e72d0161e39e99ff1003bf1ce894f37d7b7eb4Prajakta Gudadhe    libc_common_cflags += -DARCH_ARM_USE_NON_NEON_MEMCPY
50408e72d0161e39e99ff1003bf1ce894f37d7b7eb4Prajakta Gudadhe  endif
505ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavinendif # !arm
5061dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
507a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),x86)
508a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  libc_common_cflags += -DSOFTFLOAT
509a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  libc_crt_target_cflags :=
510a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  ifeq ($(ARCH_X86_HAVE_SSE2),true)
511a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham      libc_crt_target_cflags += -DUSE_SSE2=1
512a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  endif
513a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  ifeq ($(ARCH_X86_HAVE_SSSE3),true)
514a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham      libc_crt_target_cflags += -DUSE_SSSE3=1
515a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  endif
516a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif # x86
517a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham
518a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),mips)
519a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  ifneq ($(ARCH_MIPS_HAS_FPU),true)
520a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham    libc_common_cflags += -DSOFTFLOAT
521a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  endif
522a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  libc_common_cflags += -fstrict-aliasing
523a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  libc_crt_target_cflags := $(TARGET_GLOBAL_CFLAGS)
524a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif # mips
525a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham
526fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden# Define ANDROID_SMP appropriately.
527fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenifeq ($(TARGET_CPU_SMP),true)
528fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden    libc_common_cflags += -DANDROID_SMP=1
529fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenelse
530fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden    libc_common_cflags += -DANDROID_SMP=0
531fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenendif
532fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden
53376be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hughes# crtbrand.c needs <stdint.h> and a #define for the platform SDK version.
53476be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hugheslibc_crt_target_cflags += \
53576be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hughes    -I$(LOCAL_PATH)/include  \
53676be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hughes    -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)
537fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden
538ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define some common includes
539ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
5401dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_c_includes := \
5411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project		$(LOCAL_PATH)/stdlib  \
5421dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project		$(LOCAL_PATH)/string  \
54376656afc6dd069fcfda5768e6e54bb85e4e99942Nick Kralevich		$(LOCAL_PATH)/stdio   \
54476656afc6dd069fcfda5768e6e54bb85e4e99942Nick Kralevich		external/safe-iop/include
5451dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
5469d40326830c2bd407427889c554adeb915ee6b4aNick Kralevich# Needed to access private/__dso_handle.h from
5473b43f87d2949a340e2c19cb735af7727157d8274David 'Digit' Turner# crtbegin_xxx.S and crtend_xxx.S
54876be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hugheslibc_crt_target_cflags += \
54976be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hughes    -I$(LOCAL_PATH)/private \
55076be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hughes    -I$(LOCAL_PATH)/arch-$(TARGET_ARCH)/include
5511dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
552ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define the libc run-time (crt) support object files that must be built,
553ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# which are needed to build all other objects (shared/static libs and
554ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# executables)
555ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ==========================================================================
556a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham# ARM, MIPS, and x86 all need crtbegin_so/crtend_so.
5576a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner#
5586a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# For x86, the .init section must point to a function that calls all
5596a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# entries in the .ctors section. (on ARM this is done through the
5606a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# .init_array section instead).
5616a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner#
562a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham# For all the platforms, the .fini_array section must point to a function
5636a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# that will call __cxa_finalize(&__dso_handle) in order to ensure that
5646a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# static C++ destructors are properly called on dlclose().
5656a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner#
566a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),arm)
56712949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughes    libc_crtbegin_extension := c
568a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham    libc_crt_target_so_cflags :=
569a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif
570a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),mips)
57112949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughes    libc_crtbegin_extension := S
572a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham    libc_crt_target_so_cflags := -fPIC
573a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif
5742d2dbd30243f4ffd1e0a10ade989e25d29f7f45cDavid 'Digit' Turnerifeq ($(TARGET_ARCH),x86)
57520c4a3a8eee5ca8c87ae377732f541baffce1fdaPavel Chupin    libc_crtbegin_extension := c
576a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham    libc_crt_target_so_cflags := -fPIC
577a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif
57812949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughesifeq ($(libc_crtbegin_extension),)
579a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham    $(error $(TARGET_ARCH) not supported)
5802d2dbd30243f4ffd1e0a10ade989e25d29f7f45cDavid 'Digit' Turnerendif
581a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamlibc_crt_target_so_cflags += $(libc_crt_target_cflags)
58212949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hugheslibc_crt_target_crtbegin_file := $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin.$(libc_crtbegin_extension)
58312949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hugheslibc_crt_target_crtbegin_so_file := $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin_so.$(libc_crtbegin_extension)
584ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope
585ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope# See the comment in crtbrand.c for the reason why we need to generate
586ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope# crtbrand.s before generating crtbrand.o.
587ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.s
588ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope$(GEN): $(LOCAL_PATH)/bionic/crtbrand.c
589ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope	@mkdir -p $(dir $@)
590cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) -S \
591cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang		-MD -MF $(@:%.s=%.d) -o $@ $<
592cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) sed -i -e '/\.note\.ABI-tag/s/progbits/note/' $@
593cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(call transform-d-to-p-args,$(@:%.s=%.d),$(@:%.s=%.P))
594cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.s=%.P)
595ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeALL_GENERATED_SOURCES += $(GEN)
596ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope
597ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o
598ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.s
599ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope	@mkdir -p $(dir $@)
600cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) -o $@ -c $<
601ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeALL_GENERATED_SOURCES += $(GEN)
602ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope
603fc9e525fe07846c1efa23235a59575f8dad69c53Ying WangGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_so.o
60412949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughes$(GEN): $(libc_crt_target_crtbegin_so_file)
6051dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	@mkdir -p $(dir $@)
606cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) \
607cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang		-MD -MF $(@:%.o=%.d) -o $@ -c $<
608cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(transform-d-to-p)
609cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P)
6101dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectALL_GENERATED_SOURCES += $(GEN)
6111dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
612fc9e525fe07846c1efa23235a59575f8dad69c53Ying WangGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_so.o
613ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtend_so.S
614ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	@mkdir -p $(dir $@)
615cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) \
616cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang		-MD -MF $(@:%.o=%.d) -o $@ -c $<
617cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(transform-d-to-p)
618cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P)
619ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinALL_GENERATED_SOURCES += $(GEN)
620fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei Liao
621cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang# The following two are installed to device
622fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei LiaoGEN := $(TARGET_OUT_SHARED_LIBRARIES)/crtbegin_so.o
623cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_so.o
624cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) mkdir -p $(dir $@) && cp -f $< $@
625fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei LiaoALL_GENERATED_SOURCES += $(GEN)
626fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei Liao
627fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei LiaoGEN := $(TARGET_OUT_SHARED_LIBRARIES)/crtend_so.o
628cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_so.o
629cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) mkdir -p $(dir $@) && cp -f $< $@
630fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei LiaoALL_GENERATED_SOURCES += $(GEN)
6311dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
6321dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
633ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static1.o
63412949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughes$(GEN): $(libc_crt_target_crtbegin_file)
635ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	@mkdir -p $(dir $@)
636cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) $(TARGET_CC) $(libc_crt_target_cflags) \
637cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang		-MD -MF $(@:%.o=%.d) -o $@ -c $<
638cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(transform-d-to-p)
639cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P)
640ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinALL_GENERATED_SOURCES += $(GEN)
6411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
642ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static.o
643ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static1.o $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o
644ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope	@mkdir -p $(dir $@)
645cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) $(TARGET_LD) -r -o $@ $^
646ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeALL_GENERATED_SOURCES += $(GEN)
647ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope
648ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic1.o
64912949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughes$(GEN): $(libc_crt_target_crtbegin_file)
6501dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	@mkdir -p $(dir $@)
651cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) $(TARGET_CC) $(libc_crt_target_cflags) \
652cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang		-MD -MF $(@:%.o=%.d) -o $@ -c $<
653cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(transform-d-to-p)
654cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P)
6551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectALL_GENERATED_SOURCES += $(GEN)
6561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
657ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic.o
658ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic1.o $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o
659ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope	@mkdir -p $(dir $@)
660cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) $(TARGET_LD) -r -o $@ $^
661ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeALL_GENERATED_SOURCES += $(GEN)
662ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin
663ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# We rename crtend.o to crtend_android.o to avoid a
664ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# name clash between gcc and bionic.
665fc9e525fe07846c1efa23235a59575f8dad69c53Ying WangGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_android.o
666ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtend.S
6671dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	@mkdir -p $(dir $@)
668cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) $(TARGET_CC) $(libc_crt_target_cflags) \
669cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang		-MD -MF $(@:%.o=%.d) -o $@ -c $<
670cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(transform-d-to-p)
671cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P)
6721dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectALL_GENERATED_SOURCES += $(GEN)
6731dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
6741dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
675ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# To enable malloc leak check for statically linked programs, add
676ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# "WITH_MALLOC_CHECK_LIBC_A := true" to buildspec.mk
677ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinWITH_MALLOC_CHECK_LIBC_A := $(strip $(WITH_MALLOC_CHECK_LIBC_A))
6781dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
679ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
6806334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# libbionic_ssp.a - stack protector code
6816334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# ========================================================
6826334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich#
6836334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# The stack protector code needs to be compiled
6846334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# with -fno-stack-protector, since it modifies the
6856334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# stack canary.
6866334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
6876334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevichinclude $(CLEAR_VARS)
6886334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
689fb7eb5e07f43587c2bedf2aaa53b21fa002417bbElliott HughesLOCAL_SRC_FILES := bionic/__stack_chk_fail.cpp bionic/__stack_chk_guard.cpp
690dc5ec07158079b39f758ed41eca5b937e52c3729Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector -Werror
6916334c662cae4cd9b61f5f3185048b0cd3633dad7Nick KralevichLOCAL_C_INCLUDES := $(libc_common_c_includes)
6926334c662cae4cd9b61f5f3185048b0cd3633dad7Nick KralevichLOCAL_MODULE := libbionic_ssp
693ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
6946334c662cae4cd9b61f5f3185048b0cd3633dad7Nick KralevichLOCAL_SYSTEM_SHARED_LIBRARIES :=
6956334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
6966334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevichinclude $(BUILD_STATIC_LIBRARY)
6976334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
6986334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
6996334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# ========================================================
700f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# libc_netbsd.a - upstream NetBSD C library code
701f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# ========================================================
702f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes#
703f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# These files are built with the netbsd-compat.h header file
704f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# automatically included.
705f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
706f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughesinclude $(CLEAR_VARS)
707f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
708f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_SRC_FILES := $(libc_upstream_netbsd_src_files)
709f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_CFLAGS := \
710f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes    $(libc_common_cflags) \
7113d2d448af1b16923f5a329b49bb8e658dbad8a06Elliott Hughes    -I$(LOCAL_PATH)/upstream-netbsd \
712ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    -I$(LOCAL_PATH)/upstream-netbsd/libc/include \
713f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes    -include upstream-netbsd/netbsd-compat.h
714f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes)
715f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_MODULE := libc_netbsd
716ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
717f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
718f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
719f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
720f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
721f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
722f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# ========================================================
72329c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# libc_bionic.a - home-grown C library code
72429c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# ========================================================
72529c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes#
72629c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughesinclude $(CLEAR_VARS)
72729c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
72829c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_SRC_FILES := $(libc_bionic_src_files)
72929c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) -Werror
73029c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes)
73129c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_MODULE := libc_bionic
73229c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
73329c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
73429c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
73529c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
73629c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
73729c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
73829c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# ========================================================
739ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# libc_common.a
740ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
741f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
742ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavininclude $(CLEAR_VARS)
7431dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
744ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_SRC_FILES := $(libc_common_src_files)
745ab44f52202878cdf2bf22457aeae33ec24089556Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) \
746ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    -std=gnu99 \
747ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    -I$(LOCAL_PATH)/upstream-netbsd/libc/include # for netbsd private headers
748ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_C_INCLUDES := $(libc_common_c_includes)
7491dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_MODULE := libc_common
750ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
75129c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_WHOLE_STATIC_LIBRARIES := libbionic_ssp libc_bionic libc_netbsd
7521dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
7531dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
754c97c5fc7880267fd835d22946a920bf370461cf2Ying Wang# TODO: split out the asflags.
755c97c5fc7880267fd835d22946a920bf370461cf2Ying WangLOCAL_ASFLAGS := $(LOCAL_CFLAGS)
756c97c5fc7880267fd835d22946a920bf370461cf2Ying Wang
7571dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_STATIC_LIBRARY)
7581dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
7591dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
760ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
76149e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# libc_nomalloc.a
76249e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# ========================================================
76349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin#
76449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# This is a version of the static C library that does not
76591a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# include malloc. It's useful in situations when the user wants
76691a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# to provide their own malloc implementation, or wants to
76791a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# explicitly disallow the use of the use of malloc,
76891a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# such as in the dynamic loader.
76949e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
77049e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavininclude $(CLEAR_VARS)
77149e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
77249e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_SRC_FILES := \
77349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin	$(libc_arch_static_src_files) \
7746a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner	$(libc_static_common_src_files) \
77542b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes	bionic/libc_init_static.cpp
77649e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
77749e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_C_INCLUDES := $(libc_common_c_includes)
7786a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' TurnerLOCAL_CFLAGS := $(libc_common_cflags) \
77929c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes                -DLIBC_STATIC \
78029c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes                -std=gnu99
78149e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
78249e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_MODULE := libc_nomalloc
783ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
78449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
78549e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_SYSTEM_SHARED_LIBRARIES :=
78649e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
78749e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavininclude $(BUILD_STATIC_LIBRARY)
78849e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
78949e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
79049e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# ========================================================
7911dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# libc.a
7921dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
7931dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS)
7941dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
7951dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \
796ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	$(libc_arch_static_src_files) \
7976a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner	$(libc_static_common_src_files) \
7981dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/dlmalloc.c \
799c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes	bionic/malloc_debug_common.cpp \
80042b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes	bionic/libc_init_static.cpp
8011dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
802b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_CFLAGS := $(libc_common_cflags) \
80329c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes                -DLIBC_STATIC \
80429c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes                -std=gnu99
8051dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes)
806ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_MODULE := libc
807ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
8081dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
8091dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
8101dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
8111dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_STATIC_LIBRARY)
8121dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
8131dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
814ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
8151dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# libc.so
8161dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
8171dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS)
8181dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
8197c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian# pthread deadlock prediction:
8207c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian# set -DPTHREAD_DEBUG -DPTHREAD_DEBUG_ENABLED=1 to enable support for
8217c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian# pthread deadlock prediction.
8227c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian# Since this code is experimental it is disabled by default.
8237c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian# see libc/bionic/pthread_debug.c for details
8247c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian
82529c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) -std=gnu99 -DPTHREAD_DEBUG -DPTHREAD_DEBUG_ENABLED=0
8261dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes)
8271dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
8281dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \
829ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	$(libc_arch_dynamic_src_files) \
8306a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner	$(libc_static_common_src_files) \
8311dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/dlmalloc.c \
832c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes	bionic/malloc_debug_common.cpp \
8331e980b6bc8315d00a07312b25486531247abd98cElliott Hughes	bionic/pthread_debug.cpp \
83442b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes	bionic/libc_init_dynamic.cpp
8351dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
836f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvelifeq ($(TARGET_ARCH),arm)
837f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel	LOCAL_NO_CRT := true
838f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel	LOCAL_CFLAGS += -DCRT_LEGACY_WORKAROUND
839f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel
840f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel	LOCAL_SRC_FILES := \
841f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel		arch-arm/bionic/crtbegin_so.c \
842f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel		arch-arm/bionic/atexit_legacy.c \
843f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel		$(LOCAL_SRC_FILES) \
844f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel		arch-arm/bionic/crtend_so.S
845f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvelendif
846f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel
8471dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_MODULE:= libc
848ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
849914d8d4cff10f023ccd382fb43b2c7833dd34f72Elliott HughesLOCAL_REQUIRED_MODULES := tzdata
8501dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
8511dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# WARNING: The only library libc.so should depend on is libdl.so!  If you add other libraries,
8521dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries.  This
8531dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ensures that symbols that are pulled into those new libraries from libgcc.a are not declared
8541dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# external; if that were the case, then libc would not pull those symbols from libgcc.a as it
8551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# should, instead relying on the external symbols from the dependent libraries.  That would
8561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# create an "cloaked" dependency on libgcc.a in libc though the libraries, which is not what
8571dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# you wanted!
8581dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
8591dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SHARED_LIBRARIES := libdl
8601dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
8611dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
8621dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
8631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_SHARED_LIBRARY)
8641dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
8651dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
866b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# For all builds, except for the -user build we will enable memory
867b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# allocation checking (including memory leaks, buffer overwrites, etc.)
868b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# Note that all these checks are also controlled by env. settings
869b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# that can enable, or disable specific checks. Note also that some of
870b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# the checks are available only in emulator and are implemeted in
871b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_qemu_instrumented.so.
872b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineifneq ($(TARGET_BUILD_VARIANT),user)
873b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
874ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
875b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_debug_leak.so
8761dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
8771dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS)
8781dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
879ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_CFLAGS := \
880ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	$(libc_common_cflags) \
881ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	-DMALLOC_LEAK_CHECK
8821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
8831dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes)
8841dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
8851dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \
8861e980b6bc8315d00a07312b25486531247abd98cElliott Hughes	bionic/debug_mapinfo.cpp \
8871e980b6bc8315d00a07312b25486531247abd98cElliott Hughes	bionic/debug_stacktrace.cpp \
888c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes	bionic/malloc_debug_leak.cpp \
889c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes	bionic/malloc_debug_check.cpp \
8901dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
891b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE:= libc_malloc_debug_leak
892ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
8931dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
894e007775f4b21f6b94078ed1d34b753435ba28fdaPavel ChupinLOCAL_SHARED_LIBRARIES := libc libdl
895b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
896b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_SYSTEM_SHARED_LIBRARIES :=
897aa46fa24035f3ab020f9a7abd86c25ae2196bb32Bruce BeareLOCAL_ALLOW_UNDEFINED_SYMBOLS := true
898368070454b1349d1fcf29a5d1eb51c869fb538f6Iliyan Malchev
899b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# Don't install on release build
900b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE_TAGS := eng debug
9011dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
902b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineinclude $(BUILD_SHARED_LIBRARY)
903b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
904b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
905b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# ========================================================
906b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_debug_qemu.so
907b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# ========================================================
908b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineinclude $(CLEAR_VARS)
909b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
910b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_CFLAGS := \
911b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine	$(libc_common_cflags) \
912b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine	-DMALLOC_QEMU_INSTRUMENT
913b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
914b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_C_INCLUDES := $(libc_common_c_includes)
915b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
916b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_SRC_FILES := \
917c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes	bionic/malloc_debug_qemu.cpp
918b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
919b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE:= libc_malloc_debug_qemu
920ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
921b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
9227c0c3793722aea293c45921ef50e4adcdf9645ceMathias AgopianLOCAL_SHARED_LIBRARIES := libc libdl
9231dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
9241dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
925368070454b1349d1fcf29a5d1eb51c869fb538f6Iliyan Malchev
9261dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# Don't install on release build
927b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE_TAGS := eng debug
9281dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
9291dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_SHARED_LIBRARY)
9301dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
931b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineendif	#!user
932b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
933b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
9341dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
9351dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(call all-makefiles-under,$(LOCAL_PATH))
936