Android.mk revision 58b575485c446f9d76ee00f67516ed42cf017769
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 \ 154a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/brk.c \ 155fc10b24accd082fb33c8f92ff8b92481c22fe3dcColin Cross bionic/clearenv.c \ 156a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/cpuacct.c \ 157a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/daemon.c \ 15864ceac3f493e3063a289aec4a12c74787be974e4Colin Cross bionic/err.c \ 159a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/ether_aton.c \ 160a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/ether_ntoa.c \ 161a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/fcntl.c \ 162fc10b24accd082fb33c8f92ff8b92481c22fe3dcColin Cross bionic/fdprintf.c \ 163a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/flockfile.c \ 1641dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/fork.c \ 165a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/fstatfs.c \ 166a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/ftime.c \ 167a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/ftok.c \ 16864ceac3f493e3063a289aec4a12c74787be974e4Colin Cross bionic/fts.c \ 169a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/getdtablesize.c \ 170a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/gethostname.c \ 171a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/getpgrp.c \ 172a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/getpriority.c \ 173a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/getpt.c \ 1741dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/if_indextoname.c \ 175a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/if_nametoindex.c \ 176a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/initgroups.c \ 1771dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/ioctl.c \ 178a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/isatty.c \ 179a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/issetugid.c \ 1801dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/ldexp.c \ 1811dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/libc_init_common.c \ 1821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/logd_write.c \ 183a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/lseek64.c \ 1841dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/md5.c \ 185a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/memccpy.c \ 186a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/memchr.c \ 187a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/memmem.c \ 1884ce737f5df6bda362b45ca2a9d72d0aad2d5a58fAndy McFadden bionic/memmove_words.c \ 189a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/memrchr.c \ 190a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/memswap.c \ 191a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/mmap.c \ 192a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/openat.c \ 193a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/open.c \ 194a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/pathconf.c \ 195a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/perror.c \ 196a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/pread.c \ 197a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/pselect.c \ 198a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/ptsname.c \ 199a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/ptsname_r.c \ 2001dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/pututline.c \ 201a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/pwrite.c \ 202a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/raise.c \ 2031dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/realpath.c \ 204a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/reboot.c \ 205a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/recv.c \ 206a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/sbrk.c \ 20772e6fd42421dca80fb2776a9185c186d4a04e5f7David 'Digit' Turner bionic/sched_cpualloc.c \ 20872e6fd42421dca80fb2776a9185c186d4a04e5f7David 'Digit' Turner bionic/sched_cpucount.c \ 209a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/sched_getaffinity.c \ 210a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/sched_getcpu.c \ 2111dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/semaphore.c \ 212a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/send.c \ 213a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/setegid.c \ 214a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/__set_errno.c \ 215a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/seteuid.c \ 216a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/setpgrp.c \ 217a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/setresuid.c \ 218a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/setreuid.c \ 219a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/setuid.c \ 220a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/sigblock.c \ 221a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/siginterrupt.c \ 222a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/siglist.c \ 223a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/signal.c \ 224a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/signame.c \ 225a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/sigsetmask.c \ 226a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/sigsuspend.c \ 227a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/sigwait.c \ 228a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/sleep.c \ 229a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/statfs.c \ 230a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/strcoll.c \ 231a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/strndup.c \ 232a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/strnlen.c \ 233a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/strntoimax.c \ 234a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/strntoumax.c \ 235a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/strtotimeval.c \ 2361dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/system_properties.c \ 237a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/tcgetpgrp.c \ 238a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/tcsetpgrp.c \ 2391dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/thread_atexit.c \ 240a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/time64.c \ 241a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/umount.c \ 242a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/unlockpt.c \ 243a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/usleep.c \ 2441dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/utmp.c \ 245a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/wait.c \ 246a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/wcscoll.c \ 2471dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/gethnamaddr.c \ 2481dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/inet/nsap_addr.c \ 2491dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/resolv/__dn_comp.c \ 2501dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/resolv/__res_close.c \ 2511dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/resolv/__res_send.c \ 2521dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/resolv/herror.c \ 2531dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/resolv/res_comp.c \ 2541dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/resolv/res_data.c \ 2551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/resolv/res_debug.c \ 2561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/resolv/res_init.c \ 2571dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/resolv/res_mkquery.c \ 2581dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/resolv/res_query.c \ 2591dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/resolv/res_send.c \ 26010093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI netbsd/resolv/res_state.c \ 2611dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/resolv/res_cache.c \ 2621dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/net/nsdispatch.c \ 2631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/net/getaddrinfo.c \ 2641dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/net/getnameinfo.c \ 2651dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/net/getservbyname.c \ 2661dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/net/getservent.c \ 2671dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/net/base64.c \ 2681dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/net/getservbyport.c \ 2691dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/nameser/ns_name.c \ 2701dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/nameser/ns_parse.c \ 2711dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/nameser/ns_ttl.c \ 2721dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/nameser/ns_netint.c \ 2731dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project netbsd/nameser/ns_print.c \ 2744fa7b105644222d9b35347c9d226ca8e011072ebColin Cross netbsd/nameser/ns_samedomain.c \ 2751dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 27629c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hugheslibc_bionic_src_files := \ 277063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/assert.cpp \ 278c30396f5f225e0b5a83a35432e2d82a7063cfdb9David 'Digit' Turner bionic/dirent.cpp \ 279063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/eventfd.cpp \ 280063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/__fgets_chk.cpp \ 281063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/getcwd.cpp \ 28258b575485c446f9d76ee00f67516ed42cf017769Elliott Hughes bionic/libgen.cpp \ 283063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/__memcpy_chk.cpp \ 284063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/__memmove_chk.cpp \ 285063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/__memset_chk.cpp \ 286063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/setlocale.cpp \ 287063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/__strcat_chk.cpp \ 288063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/__strcpy_chk.cpp \ 289063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/strerror.cpp \ 290063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/strerror_r.cpp \ 291063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/__strlcat_chk.cpp \ 292063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/__strlcpy_chk.cpp \ 293063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/__strlen_chk.cpp \ 294063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/__strncat_chk.cpp \ 295063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/__strncpy_chk.cpp \ 296063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/strsignal.cpp \ 297063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/stubs.cpp \ 298063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/tdestroy.cpp \ 299063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/tmpfile.cpp \ 300063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/__umask_chk.cpp \ 301063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/__vsnprintf_chk.cpp \ 302063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/__vsprintf_chk.cpp \ 303063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/wchar.cpp \ 30429c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes 305f8b3a920a895a53b207017249080087d562bd0d2Elliott Hugheslibc_upstream_netbsd_src_files := \ 306e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \ 307e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/common/lib/libc/inet/inet_addr.c \ 308e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/compat-43/creat.c \ 309e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/gen/ftw.c \ 310e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/gen/nftw.c \ 311e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/gen/nice.c \ 312e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/gen/psignal.c \ 313ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/gen/setjmperr.c \ 314e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/gen/utime.c \ 315e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/inet/inet_ntoa.c \ 316e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/inet/inet_ntop.c \ 317e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/inet/inet_pton.c \ 318ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/isc/ev_streams.c \ 319ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/isc/ev_timers.c \ 320e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/regex/regcomp.c \ 321e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/regex/regerror.c \ 322e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/regex/regexec.c \ 323e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/regex/regfree.c \ 324e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdio/getdelim.c \ 325e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdio/getline.c \ 326ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/stdlib/bsearch.c \ 327ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/stdlib/div.c \ 328e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/drand48.c \ 329e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/erand48.c \ 330e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/jrand48.c \ 331ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/stdlib/ldiv.c \ 332ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/stdlib/lldiv.c \ 333e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/lrand48.c \ 334e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/mrand48.c \ 335e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/nrand48.c \ 336e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/_rand48.c \ 337e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/seed48.c \ 338e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/srand48.c \ 339e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/tdelete.c \ 340e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/tfind.c \ 341e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/tsearch.c \ 342e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/string/strcasestr.c \ 343e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/string/strxfrm.c \ 344ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/unistd/killpg.c \ 345f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes 3466a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner# The following files are common, but must be compiled 3476a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner# with different C flags when building a static C library. 3486a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner# 3496a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner# The reason for this is the implementation of __get_tls() 3506a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner# that will differ between the shared and static versions 3516a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner# of the library. 3526a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner# 3536a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner# See comments in private/bionic_tls.h for more details. 3546a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner# 3556a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner# NOTE: bionic/pthread.c is added later to this list 3566a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner# because it needs special handling on ARM, see 3576a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner# below. 3586a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner# 3596a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turnerlibc_static_common_src_files := \ 3606a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner bionic/__errno.c \ 361a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/sysconf.c \ 3626a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner 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 += \ 367017f438534068f48277fe6f7f7234e6f24ae5065Ben Cheng arch-arm/bionic/abort_arm.S \ 3680fec6b9d88ee5a9e359b2208038f9806c0804538David 'Digit' Turner arch-arm/bionic/atomics_arm.c \ 3691dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project arch-arm/bionic/clone.S \ 3706a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner arch-arm/bionic/eabi.c \ 371a89864a20b818621a1da10e88fda815334062f9fElliott Hughes arch-arm/bionic/_exit_with_stack_teardown.S \ 3721dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project arch-arm/bionic/ffs.S \ 3730fec6b9d88ee5a9e359b2208038f9806c0804538David 'Digit' Turner arch-arm/bionic/futex_arm.S \ 374a89864a20b818621a1da10e88fda815334062f9fElliott Hughes arch-arm/bionic/__get_sp.S \ 3751dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project arch-arm/bionic/kill.S \ 3762a7ad97539313c82e13d36c9c75cefb2982a87d8David 'Digit' Turner arch-arm/bionic/libgcc_compat.c \ 3771dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project arch-arm/bionic/memcmp16.S \ 378a89864a20b818621a1da10e88fda815334062f9fElliott Hughes arch-arm/bionic/memcmp.S \ 3791dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project arch-arm/bionic/memcpy.S \ 3801dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project arch-arm/bionic/memset.S \ 381a89864a20b818621a1da10e88fda815334062f9fElliott Hughes arch-arm/bionic/_setjmp.S \ 3821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project arch-arm/bionic/setjmp.S \ 3831dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project arch-arm/bionic/sigsetjmp.S \ 384f50e9be5930a08fa825b0c23353c802e11369b14Jim Huang arch-arm/bionic/strcmp.S \ 385a89864a20b818621a1da10e88fda815334062f9fElliott Hughes arch-arm/bionic/strcpy.S \ 386a89864a20b818621a1da10e88fda815334062f9fElliott Hughes arch-arm/bionic/strlen.c.arm \ 3871dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project arch-arm/bionic/syscall.S \ 388a89864a20b818621a1da10e88fda815334062f9fElliott Hughes arch-arm/bionic/tgkill.S \ 389a89864a20b818621a1da10e88fda815334062f9fElliott Hughes arch-arm/bionic/tkill.S \ 390a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/memmove.c.arm \ 391a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/socketcalls.c \ 3928ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare string/bcopy.c \ 3938ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare string/strncmp.c \ 3941dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 3951dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# These files need to be arm so that gdbserver 3961dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# can set breakpoints in them without messing 3971dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# up any thumb code. 3981dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_src_files += \ 3994f086aeb4aa06e13079b7fec71a8178ceeacf318Matt Fischer bionic/pthread-atfork.c.arm \ 4008a1d2cf1422e35257c160ac5bb12dd3ee481c433David 'Digit' Turner bionic/pthread-rwlocks.c.arm \ 4011dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/pthread-timers.c.arm \ 4021dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/ptrace.c.arm 403ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin 4046a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turnerlibc_static_common_src_files += \ 4056a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner bionic/pthread.c.arm \ 4066a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner 407ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# these are used by the static and dynamic versions of the libc 408ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# respectively 409ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavinlibc_arch_static_src_files := \ 410ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin arch-arm/bionic/exidx_static.c 411ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin 412ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavinlibc_arch_dynamic_src_files := \ 413ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin arch-arm/bionic/exidx_dynamic.c 414a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif # arm 4151dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 4161dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectifeq ($(TARGET_ARCH),x86) 4171dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_src_files += \ 4181dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project arch-x86/bionic/__get_sp.S \ 4191dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project arch-x86/bionic/__get_tls.c \ 4201dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project arch-x86/bionic/__set_tls.c \ 4211dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project arch-x86/bionic/clone.S \ 4221dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project arch-x86/bionic/_exit_with_stack_teardown.S \ 4230fec6b9d88ee5a9e359b2208038f9806c0804538David 'Digit' Turner arch-x86/bionic/futex_x86.S \ 4241dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project arch-x86/bionic/setjmp.S \ 4251dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project arch-x86/bionic/_setjmp.S \ 42618635d9c173120f6f97dd9b035b6f9a1ebfcd1a3Chih-Wei Huang arch-x86/bionic/sigsetjmp.S \ 4271dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project arch-x86/bionic/vfork.S \ 4283c543e1da9a2780a70b25299f39734bf0a18c4a0Bruce Beare arch-x86/bionic/syscall.S \ 4298ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare arch-x86/string/bcopy_wrapper.S \ 4308ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare arch-x86/string/memcpy_wrapper.S \ 4318ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare arch-x86/string/memmove_wrapper.S \ 4328ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare arch-x86/string/bzero_wrapper.S \ 4338ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare arch-x86/string/memcmp_wrapper.S \ 4348ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare arch-x86/string/memset_wrapper.S \ 4358ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare arch-x86/string/strcmp_wrapper.S \ 4368ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare arch-x86/string/strncmp_wrapper.S \ 437124a542aa4d78040176f65b28f4958540b5d89aaBruce Beare arch-x86/string/strlen_wrapper.S \ 43873c04b32691cb344cb60289a646ded8fc551d09eJim Huang string/strcpy.c \ 4394f086aeb4aa06e13079b7fec71a8178ceeacf318Matt Fischer bionic/pthread-atfork.c \ 4408a1d2cf1422e35257c160ac5bb12dd3ee481c433David 'Digit' Turner bionic/pthread-rwlocks.c \ 4411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/pthread-timers.c \ 4421dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/ptrace.c 4431dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 4446a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turnerlibc_static_common_src_files += \ 4456a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner bionic/pthread.c \ 4466a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner 447ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavinlibc_arch_static_src_files := \ 448405b8029a6888f386adf3512113a33546141d1c8Raghu Gandham bionic/dl_iterate_phdr_static.c 449ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin 450ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavinlibc_arch_dynamic_src_files := 451a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif # x86 45210093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI 453a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),mips) 454a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamlibc_common_src_files += \ 455a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham arch-mips/bionic/__get_sp.S \ 456a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham arch-mips/bionic/__get_tls.c \ 457a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham arch-mips/bionic/__set_tls.c \ 458a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham arch-mips/bionic/_exit_with_stack_teardown.S \ 459a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham arch-mips/bionic/_setjmp.S \ 460a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham arch-mips/bionic/futex_mips.S \ 461a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham arch-mips/bionic/bzero.S \ 462a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham arch-mips/bionic/cacheflush.c \ 463a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham arch-mips/bionic/clone.S \ 464a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham arch-mips/bionic/ffs.S \ 465a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham arch-mips/bionic/memcmp16.S \ 466a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham arch-mips/bionic/memmove.c \ 467a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham arch-mips/bionic/pipe.S \ 468a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham arch-mips/bionic/setjmp.S \ 469a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham arch-mips/bionic/sigsetjmp.S \ 470a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham arch-mips/bionic/vfork.S 471a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham 472a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamlibc_common_src_files += \ 473a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham arch-mips/string/memset.S \ 474a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham arch-mips/string/memcpy.S \ 475a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham arch-mips/string/mips_strlen.c 476a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham 477a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamlibc_common_src_files += \ 478857fed50cbf2d1a701a5a1a29e124f7e9fb945d5Elliott Hughes bionic/memcmp.c \ 479a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham string/bcopy.c \ 480a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham string/strcmp.c \ 481a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham string/strcpy.c \ 482a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham string/strncmp.c 483a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham 484a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamlibc_common_src_files += \ 485a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham bionic/pthread-atfork.c \ 486a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham bionic/pthread-rwlocks.c \ 487a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham bionic/pthread-timers.c \ 488a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham bionic/ptrace.c 489a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham 490a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamlibc_static_common_src_files += \ 491a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham bionic/pthread.c 492a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham 493a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamlibc_arch_static_src_files := \ 494a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham bionic/dl_iterate_phdr_static.c 495a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham 496a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamlibc_arch_dynamic_src_files := 497a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif # mips 4981dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 499ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define some common cflags 500ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ======================================================== 5011dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_cflags := \ 502470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes -DWITH_ERRLIST \ 503470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes -DANDROID_CHANGES \ 504470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes -D_LIBC=1 \ 505470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes -DFLOATING_POINT \ 506470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes -DINET6 \ 507470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes -I$(LOCAL_PATH)/private \ 508470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes -DPOSIX_MISTAKE \ 509470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes -DLOG_ON_HEAP_ERROR \ 510c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes -Wall -Wextra 5111dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 512d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turner# these macro definitions are required to implement the 513d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turner# 'timezone' and 'daylight' global variables, as well as 514d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turner# properly update the 'tm_gmtoff' field in 'struct tm'. 515d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turner# 516d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turnerlibc_common_cflags += \ 517d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turner -DTM_GMTOFF=tm_gmtoff \ 518d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turner -DUSG_COMPAT=1 519d7ed1ae98249af8a58ce97784a29f048d77789a9David 'Digit' Turner 520d2c9dcc9265e66f6432ec39dcc7378b944449e60Dave Bortifeq ($(strip $(DEBUG_BIONIC_LIBC)),true) 5211dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project libc_common_cflags += -DDEBUG 5221dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectendif 5231dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 5242fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren# To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in 5252fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren# the appropriate BoardConfig.mk file. 5262fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren# 5272fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Renifneq ($(BOARD_MALLOC_ALIGNMENT),) 5282fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren libc_common_cflags += -DMALLOC_ALIGNMENT=$(BOARD_MALLOC_ALIGNMENT) 5292fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Renendif 5302fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren 5311dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectifeq ($(TARGET_ARCH),arm) 532a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_common_cflags += -DSOFTFLOAT 5331dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project libc_common_cflags += -fstrict-aliasing 534ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin libc_crt_target_cflags := -mthumb-interwork 5354a05d12cf52a9a40759f11f28543bd75715c8f00David 'Digit' Turner # 5364a05d12cf52a9a40759f11f28543bd75715c8f00David 'Digit' Turner # Define HAVE_ARM_TLS_REGISTER macro to indicate to the C library 5374a05d12cf52a9a40759f11f28543bd75715c8f00David 'Digit' Turner # that it should access the hardware TLS register directly in 5384a05d12cf52a9a40759f11f28543bd75715c8f00David 'Digit' Turner # private/bionic_tls.h 5394a05d12cf52a9a40759f11f28543bd75715c8f00David 'Digit' Turner # 5404a05d12cf52a9a40759f11f28543bd75715c8f00David 'Digit' Turner # The value must match your kernel configuration 5414a05d12cf52a9a40759f11f28543bd75715c8f00David 'Digit' Turner # 5424a05d12cf52a9a40759f11f28543bd75715c8f00David 'Digit' Turner ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) 5434a05d12cf52a9a40759f11f28543bd75715c8f00David 'Digit' Turner libc_common_cflags += -DHAVE_ARM_TLS_REGISTER 5444a05d12cf52a9a40759f11f28543bd75715c8f00David 'Digit' Turner endif 545fe6338da9168330d44b409b2ee36103e8bfe6697Henrik Smiding # 546fe6338da9168330d44b409b2ee36103e8bfe6697Henrik Smiding # Define HAVE_32_BYTE_CACHE_LINES to indicate to C 547fe6338da9168330d44b409b2ee36103e8bfe6697Henrik Smiding # library it should use to 32-byte version of memcpy, and not 548fe6338da9168330d44b409b2ee36103e8bfe6697Henrik Smiding # the 64-byte version. 549fe6338da9168330d44b409b2ee36103e8bfe6697Henrik Smiding # 550fe6338da9168330d44b409b2ee36103e8bfe6697Henrik Smiding ifeq ($(ARCH_ARM_HAVE_32_BYTE_CACHE_LINES),true) 551fe6338da9168330d44b409b2ee36103e8bfe6697Henrik Smiding libc_common_cflags += -DHAVE_32_BYTE_CACHE_LINE 552fe6338da9168330d44b409b2ee36103e8bfe6697Henrik Smiding endif 55308e72d0161e39e99ff1003bf1ce894f37d7b7eb4Prajakta Gudadhe ifeq ($(ARCH_ARM_USE_NON_NEON_MEMCPY),true) 55408e72d0161e39e99ff1003bf1ce894f37d7b7eb4Prajakta Gudadhe libc_common_cflags += -DARCH_ARM_USE_NON_NEON_MEMCPY 55508e72d0161e39e99ff1003bf1ce894f37d7b7eb4Prajakta Gudadhe endif 556ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavinendif # !arm 5571dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 558a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),x86) 559a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_common_cflags += -DSOFTFLOAT 560a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_crt_target_cflags := 561a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham ifeq ($(ARCH_X86_HAVE_SSE2),true) 562a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_crt_target_cflags += -DUSE_SSE2=1 563a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham endif 564a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham ifeq ($(ARCH_X86_HAVE_SSSE3),true) 565a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_crt_target_cflags += -DUSE_SSSE3=1 566a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham endif 567a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif # x86 568a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham 569a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),mips) 570a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham ifneq ($(ARCH_MIPS_HAS_FPU),true) 571a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_common_cflags += -DSOFTFLOAT 572a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham endif 573a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_common_cflags += -fstrict-aliasing 574a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_crt_target_cflags := $(TARGET_GLOBAL_CFLAGS) 575a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif # mips 576a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham 577fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden# Define ANDROID_SMP appropriately. 578fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenifeq ($(TARGET_CPU_SMP),true) 579fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden libc_common_cflags += -DANDROID_SMP=1 580fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenelse 581fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden libc_common_cflags += -DANDROID_SMP=0 582fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenendif 583fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden 58476be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hughes# crtbrand.c needs <stdint.h> and a #define for the platform SDK version. 58576be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hugheslibc_crt_target_cflags += \ 58676be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hughes -I$(LOCAL_PATH)/include \ 58776be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hughes -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) 588fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden 589ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define some common includes 590ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ======================================================== 5911dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_c_includes := \ 5921dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project $(LOCAL_PATH)/stdlib \ 5931dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project $(LOCAL_PATH)/string \ 59476656afc6dd069fcfda5768e6e54bb85e4e99942Nick Kralevich $(LOCAL_PATH)/stdio \ 59576656afc6dd069fcfda5768e6e54bb85e4e99942Nick Kralevich external/safe-iop/include 5961dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 5979d40326830c2bd407427889c554adeb915ee6b4aNick Kralevich# Needed to access private/__dso_handle.h from 5983b43f87d2949a340e2c19cb735af7727157d8274David 'Digit' Turner# crtbegin_xxx.S and crtend_xxx.S 59976be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hugheslibc_crt_target_cflags += \ 60076be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hughes -I$(LOCAL_PATH)/private \ 60176be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hughes -I$(LOCAL_PATH)/arch-$(TARGET_ARCH)/include 6021dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 603ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define the libc run-time (crt) support object files that must be built, 604ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# which are needed to build all other objects (shared/static libs and 605ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# executables) 606ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================================== 607a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham# ARM, MIPS, and x86 all need crtbegin_so/crtend_so. 6086a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# 6096a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# For x86, the .init section must point to a function that calls all 6106a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# entries in the .ctors section. (on ARM this is done through the 6116a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# .init_array section instead). 6126a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# 613a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham# For all the platforms, the .fini_array section must point to a function 6146a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# that will call __cxa_finalize(&__dso_handle) in order to ensure that 6156a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# static C++ destructors are properly called on dlclose(). 6166a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# 617a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),arm) 61812949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughes libc_crtbegin_extension := c 619a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_crt_target_so_cflags := 620a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif 621a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),mips) 62212949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughes libc_crtbegin_extension := S 623a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_crt_target_so_cflags := -fPIC 624a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif 6252d2dbd30243f4ffd1e0a10ade989e25d29f7f45cDavid 'Digit' Turnerifeq ($(TARGET_ARCH),x86) 62612949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughes libc_crtbegin_extension := S 627a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_crt_target_so_cflags := -fPIC 628a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif 62912949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughesifeq ($(libc_crtbegin_extension),) 630a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham $(error $(TARGET_ARCH) not supported) 6312d2dbd30243f4ffd1e0a10ade989e25d29f7f45cDavid 'Digit' Turnerendif 632a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamlibc_crt_target_so_cflags += $(libc_crt_target_cflags) 63312949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hugheslibc_crt_target_crtbegin_file := $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin.$(libc_crtbegin_extension) 63412949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hugheslibc_crt_target_crtbegin_so_file := $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin_so.$(libc_crtbegin_extension) 635ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope 636ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope# See the comment in crtbrand.c for the reason why we need to generate 637ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope# crtbrand.s before generating crtbrand.o. 638ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.s 639ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope$(GEN): $(LOCAL_PATH)/bionic/crtbrand.c 640ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope @mkdir -p $(dir $@) 641cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) -S \ 642cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang -MD -MF $(@:%.s=%.d) -o $@ $< 643cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) sed -i -e '/\.note\.ABI-tag/s/progbits/note/' $@ 644cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(call transform-d-to-p-args,$(@:%.s=%.d),$(@:%.s=%.P)) 645cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.s=%.P) 646ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeALL_GENERATED_SOURCES += $(GEN) 647ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope 648ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o 649ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.s 650ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope @mkdir -p $(dir $@) 651cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) -o $@ -c $< 652ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeALL_GENERATED_SOURCES += $(GEN) 653ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope 654fc9e525fe07846c1efa23235a59575f8dad69c53Ying WangGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_so.o 65512949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughes$(GEN): $(libc_crt_target_crtbegin_so_file) 6561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project @mkdir -p $(dir $@) 657cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) \ 658cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang -MD -MF $(@:%.o=%.d) -o $@ -c $< 659cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(transform-d-to-p) 660cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P) 6611dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectALL_GENERATED_SOURCES += $(GEN) 6621dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 663fc9e525fe07846c1efa23235a59575f8dad69c53Ying WangGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_so.o 664ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtend_so.S 665ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin @mkdir -p $(dir $@) 666cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) \ 667cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang -MD -MF $(@:%.o=%.d) -o $@ -c $< 668cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(transform-d-to-p) 669cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P) 670ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinALL_GENERATED_SOURCES += $(GEN) 671fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei Liao 672cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang# The following two are installed to device 673fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei LiaoGEN := $(TARGET_OUT_SHARED_LIBRARIES)/crtbegin_so.o 674cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_so.o 675cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) mkdir -p $(dir $@) && cp -f $< $@ 676fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei LiaoALL_GENERATED_SOURCES += $(GEN) 677fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei Liao 678fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei LiaoGEN := $(TARGET_OUT_SHARED_LIBRARIES)/crtend_so.o 679cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_so.o 680cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) mkdir -p $(dir $@) && cp -f $< $@ 681fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei LiaoALL_GENERATED_SOURCES += $(GEN) 6821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 6831dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 684ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static1.o 68512949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughes$(GEN): $(libc_crt_target_crtbegin_file) 686ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin @mkdir -p $(dir $@) 687cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_CC) $(libc_crt_target_cflags) \ 688cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang -MD -MF $(@:%.o=%.d) -o $@ -c $< 689cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(transform-d-to-p) 690cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P) 691ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinALL_GENERATED_SOURCES += $(GEN) 6921dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 693ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static.o 694ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static1.o $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o 695ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope @mkdir -p $(dir $@) 696cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_LD) -r -o $@ $^ 697ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeALL_GENERATED_SOURCES += $(GEN) 698ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope 699ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic1.o 70012949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughes$(GEN): $(libc_crt_target_crtbegin_file) 7011dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project @mkdir -p $(dir $@) 702cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_CC) $(libc_crt_target_cflags) \ 703cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang -MD -MF $(@:%.o=%.d) -o $@ -c $< 704cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(transform-d-to-p) 705cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P) 7061dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectALL_GENERATED_SOURCES += $(GEN) 7071dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 708ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic.o 709ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic1.o $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o 710ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope @mkdir -p $(dir $@) 711cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_LD) -r -o $@ $^ 712ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeALL_GENERATED_SOURCES += $(GEN) 713ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin 714ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# We rename crtend.o to crtend_android.o to avoid a 715ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# name clash between gcc and bionic. 716fc9e525fe07846c1efa23235a59575f8dad69c53Ying WangGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_android.o 717ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtend.S 7181dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project @mkdir -p $(dir $@) 719cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_CC) $(libc_crt_target_cflags) \ 720cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang -MD -MF $(@:%.o=%.d) -o $@ -c $< 721cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(transform-d-to-p) 722cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P) 7231dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectALL_GENERATED_SOURCES += $(GEN) 7241dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 7251dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 726ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# To enable malloc leak check for statically linked programs, add 727ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# "WITH_MALLOC_CHECK_LIBC_A := true" to buildspec.mk 728ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinWITH_MALLOC_CHECK_LIBC_A := $(strip $(WITH_MALLOC_CHECK_LIBC_A)) 7291dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 730ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ======================================================== 7316334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# libbionic_ssp.a - stack protector code 7326334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# ======================================================== 7336334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# 7346334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# The stack protector code needs to be compiled 7356334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# with -fno-stack-protector, since it modifies the 7366334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# stack canary. 7376334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich 7386334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevichinclude $(CLEAR_VARS) 7396334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich 740ad88a0863110798cef5169dcf917e18b967a7cf6Elliott HughesLOCAL_SRC_FILES := bionic/ssp.cpp 7416334c662cae4cd9b61f5f3185048b0cd3633dad7Nick KralevichLOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector 7426334c662cae4cd9b61f5f3185048b0cd3633dad7Nick KralevichLOCAL_C_INCLUDES := $(libc_common_c_includes) 7436334c662cae4cd9b61f5f3185048b0cd3633dad7Nick KralevichLOCAL_MODULE := libbionic_ssp 744ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 7456334c662cae4cd9b61f5f3185048b0cd3633dad7Nick KralevichLOCAL_SYSTEM_SHARED_LIBRARIES := 7466334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich 7476334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevichinclude $(BUILD_STATIC_LIBRARY) 7486334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich 7496334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich 7506334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# ======================================================== 751f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# libc_netbsd.a - upstream NetBSD C library code 752f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# ======================================================== 753f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# 754f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# These files are built with the netbsd-compat.h header file 755f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# automatically included. 756f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes 757f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughesinclude $(CLEAR_VARS) 758f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes 759f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_SRC_FILES := $(libc_upstream_netbsd_src_files) 760f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_CFLAGS := \ 761f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes $(libc_common_cflags) \ 7623d2d448af1b16923f5a329b49bb8e658dbad8a06Elliott Hughes -I$(LOCAL_PATH)/upstream-netbsd \ 763ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes -I$(LOCAL_PATH)/upstream-netbsd/libc/include \ 764f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes -include upstream-netbsd/netbsd-compat.h 765f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes) 766f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_MODULE := libc_netbsd 767ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 768f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES := 769f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes 770f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughesinclude $(BUILD_STATIC_LIBRARY) 771f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes 772f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes 773f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# ======================================================== 77429c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# libc_bionic.a - home-grown C library code 77529c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# ======================================================== 77629c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# 77729c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughesinclude $(CLEAR_VARS) 77829c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes 77929c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_SRC_FILES := $(libc_bionic_src_files) 78029c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) -Werror 78129c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes) 78229c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_MODULE := libc_bionic 78329c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 78429c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES := 78529c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes 78629c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughesinclude $(BUILD_STATIC_LIBRARY) 78729c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes 78829c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes 78929c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# ======================================================== 790ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# libc_common.a 791ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ======================================================== 792f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes 793ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavininclude $(CLEAR_VARS) 7941dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 795ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_SRC_FILES := $(libc_common_src_files) 796ab44f52202878cdf2bf22457aeae33ec24089556Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) \ 797ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes -std=gnu99 \ 798ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes -I$(LOCAL_PATH)/upstream-netbsd/libc/include # for netbsd private headers 799ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_C_INCLUDES := $(libc_common_c_includes) 8001dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_MODULE := libc_common 801ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 80229c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_WHOLE_STATIC_LIBRARIES := libbionic_ssp libc_bionic libc_netbsd 8031dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES := 8041dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 8051dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_STATIC_LIBRARY) 8061dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 8071dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 808ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ======================================================== 80949e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# libc_nomalloc.a 81049e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# ======================================================== 81149e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# 81249e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# This is a version of the static C library that does not 81349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# include malloc. It's useful in situations when calling 81449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# the user wants to provide their own malloc implementation, 81549e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# or wants to explicitly disallow the use of the use of malloc, 81649e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# like the dynamic loader. 81749e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin 81849e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavininclude $(CLEAR_VARS) 81949e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin 82049e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_SRC_FILES := \ 82149e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin $(libc_arch_static_src_files) \ 8226a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner $(libc_static_common_src_files) \ 82349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin bionic/libc_init_static.c 82449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin 82549e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_C_INCLUDES := $(libc_common_c_includes) 8266a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' TurnerLOCAL_CFLAGS := $(libc_common_cflags) \ 82729c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes -DLIBC_STATIC \ 82829c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes -std=gnu99 82949e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin 83049e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_MODULE := libc_nomalloc 831ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 83249e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_WHOLE_STATIC_LIBRARIES := libc_common 83349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_SYSTEM_SHARED_LIBRARIES := 83449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin 83549e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavininclude $(BUILD_STATIC_LIBRARY) 83649e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin 83749e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin 83849e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# ======================================================== 8391dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# libc.a 8401dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ======================================================== 8411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS) 8421dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 8431dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \ 844ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin $(libc_arch_static_src_files) \ 8456a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner $(libc_static_common_src_files) \ 8461dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/dlmalloc.c \ 847c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes bionic/malloc_debug_common.cpp \ 8481dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/libc_init_static.c 8491dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 850b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_CFLAGS := $(libc_common_cflags) \ 85129c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes -DLIBC_STATIC \ 85229c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes -std=gnu99 8531dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes) 854ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_MODULE := libc 855ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 8561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common 8571dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES := 8581dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 8591dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_STATIC_LIBRARY) 8601dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 8611dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 862ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ======================================================== 8631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# libc.so 8641dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ======================================================== 8651dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS) 8661dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 8677c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian# pthread deadlock prediction: 8687c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian# set -DPTHREAD_DEBUG -DPTHREAD_DEBUG_ENABLED=1 to enable support for 8697c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian# pthread deadlock prediction. 8707c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian# Since this code is experimental it is disabled by default. 8717c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian# see libc/bionic/pthread_debug.c for details 8727c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian 87329c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) -std=gnu99 -DPTHREAD_DEBUG -DPTHREAD_DEBUG_ENABLED=0 8741dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes) 8751dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 8761dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \ 877ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin $(libc_arch_dynamic_src_files) \ 8786a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner $(libc_static_common_src_files) \ 8791dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/dlmalloc.c \ 880c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes bionic/malloc_debug_common.cpp \ 8817c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian bionic/pthread_debug.c \ 8821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/libc_init_dynamic.c 8831dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 884f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvelifeq ($(TARGET_ARCH),arm) 885f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel LOCAL_NO_CRT := true 886f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel LOCAL_CFLAGS += -DCRT_LEGACY_WORKAROUND 887f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel 888f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel LOCAL_SRC_FILES := \ 889f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel arch-arm/bionic/crtbegin_so.c \ 890f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel arch-arm/bionic/atexit_legacy.c \ 891f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel $(LOCAL_SRC_FILES) \ 892f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel arch-arm/bionic/crtend_so.S 893f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvelendif 894f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel 8951dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_MODULE:= libc 896ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 897914d8d4cff10f023ccd382fb43b2c7833dd34f72Elliott HughesLOCAL_REQUIRED_MODULES := tzdata 8981dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 8991dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# WARNING: The only library libc.so should depend on is libdl.so! If you add other libraries, 9001dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries. This 9011dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ensures that symbols that are pulled into those new libraries from libgcc.a are not declared 9021dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# external; if that were the case, then libc would not pull those symbols from libgcc.a as it 9031dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# should, instead relying on the external symbols from the dependent libraries. That would 9041dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# create an "cloaked" dependency on libgcc.a in libc though the libraries, which is not what 9051dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# you wanted! 9061dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 9071dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SHARED_LIBRARIES := libdl 9081dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common 9091dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES := 9101dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 9111dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_SHARED_LIBRARY) 9121dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 9131dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 914b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# For all builds, except for the -user build we will enable memory 915b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# allocation checking (including memory leaks, buffer overwrites, etc.) 916b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# Note that all these checks are also controlled by env. settings 917b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# that can enable, or disable specific checks. Note also that some of 918b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# the checks are available only in emulator and are implemeted in 919b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_qemu_instrumented.so. 920b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineifneq ($(TARGET_BUILD_VARIANT),user) 921b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 922ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ======================================================== 923b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_debug_leak.so 9241dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ======================================================== 9251dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS) 9261dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 927ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_CFLAGS := \ 928ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin $(libc_common_cflags) \ 929ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin -DMALLOC_LEAK_CHECK 9301dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 9311dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes) 9321dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 9331dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \ 934c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes bionic/malloc_debug_leak.cpp \ 935c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes bionic/malloc_debug_check.cpp \ 936c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes bionic/malloc_debug_check_mapinfo.cpp \ 937c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes bionic/malloc_debug_stacktrace.cpp 9381dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 939b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE:= libc_malloc_debug_leak 940ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 9411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 942e007775f4b21f6b94078ed1d34b753435ba28fdaPavel ChupinLOCAL_SHARED_LIBRARIES := libc libdl 943b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_WHOLE_STATIC_LIBRARIES := libc_common 944b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_SYSTEM_SHARED_LIBRARIES := 945aa46fa24035f3ab020f9a7abd86c25ae2196bb32Bruce BeareLOCAL_ALLOW_UNDEFINED_SYMBOLS := true 946368070454b1349d1fcf29a5d1eb51c869fb538f6Iliyan Malchev 947b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# Don't install on release build 948b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE_TAGS := eng debug 9491dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 950b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineinclude $(BUILD_SHARED_LIBRARY) 951b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 952b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 953b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# ======================================================== 954b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_debug_qemu.so 955b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# ======================================================== 956b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineinclude $(CLEAR_VARS) 957b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 958b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_CFLAGS := \ 959b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine $(libc_common_cflags) \ 960b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine -DMALLOC_QEMU_INSTRUMENT 961b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 962b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_C_INCLUDES := $(libc_common_c_includes) 963b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 964b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_SRC_FILES := \ 965c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes bionic/malloc_debug_qemu.cpp 966b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 967b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE:= libc_malloc_debug_qemu 968ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 969b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 9707c0c3793722aea293c45921ef50e4adcdf9645ceMathias AgopianLOCAL_SHARED_LIBRARIES := libc libdl 9711dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common 9721dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES := 973368070454b1349d1fcf29a5d1eb51c869fb538f6Iliyan Malchev 9741dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# Don't install on release build 975b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE_TAGS := eng debug 9761dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 9771dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_SHARED_LIBRARY) 9781dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 979b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineendif #!user 980b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 981b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 9821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ======================================================== 9831dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(call all-makefiles-under,$(LOCAL_PATH)) 984