Android.mk revision c7e9b2331771e5e87c34a8ee3dc6cc41d35b02fe
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 5d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferris# Make everything depend on any changes to included makefiles. 6d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferrislibc_common_additional_dependencies := \ 7d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferris $(LOCAL_PATH)/arch-$(TARGET_ARCH)/syscalls.mk \ 8d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferris $(LOCAL_PATH)/Android.mk \ 9d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferris 10ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define the common source files for all the libc instances 11ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================= 121dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_src_files := \ 131dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project $(syscall_src) \ 141dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project unistd/alarm.c \ 151dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project unistd/exec.c \ 161dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project unistd/fnmatch.c \ 171dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project unistd/syslog.c \ 181dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project unistd/system.c \ 191dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project unistd/time.c \ 201dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/asprintf.c \ 211dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/fflush.c \ 221dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/fgetc.c \ 231dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/findfp.c \ 241dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/fprintf.c \ 251dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/fputc.c \ 261dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/fread.c \ 271dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/freopen.c \ 281dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/fscanf.c \ 291dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/fseek.c \ 301dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/ftell.c \ 311dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/fvwrite.c \ 321dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/gets.c \ 331dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/printf.c \ 341dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/refill.c \ 351dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/rewind.c \ 361dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/scanf.c \ 371dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/snprintf.c\ 381dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/sprintf.c \ 391dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/sscanf.c \ 401dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/stdio.c \ 411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/ungetc.c \ 421dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/vasprintf.c \ 431dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/vfprintf.c \ 441dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/vfscanf.c \ 451dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/vprintf.c \ 461dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/vsnprintf.c \ 471dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/vsprintf.c \ 481dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/vscanf.c \ 491dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/vsscanf.c \ 501dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdio/wbuf.c \ 511dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/atexit.c \ 521dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/ctype_.c \ 531dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/exit.c \ 541dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/getenv.c \ 551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/putenv.c \ 561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/setenv.c \ 571dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/strtod.c \ 581dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/strtoimax.c \ 591dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/strtol.c \ 601dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/strtoll.c \ 611dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/strtoul.c \ 621dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/strtoull.c \ 631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/strtoumax.c \ 641dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/tolower_.c \ 651dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/toupper_.c \ 661dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project string/strcasecmp.c \ 671dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project string/strcspn.c \ 681dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project string/strdup.c \ 691dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project string/strpbrk.c \ 701dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project string/strsep.c \ 711dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project string/strspn.c \ 721dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project string/strstr.c \ 731dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project string/strtok.c \ 743527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner wchar/wcswidth.c \ 7570465614e14a87f547cdd1b82b0b270b87d215c1Kristian Monsen wchar/wcsxfrm.c \ 761dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/arc4random.c \ 77a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/atoi.c \ 78a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/atol.c \ 79a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/atoll.c \ 80a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/bindresvport.c \ 81a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/bionic_clone.c \ 82fc10b24accd082fb33c8f92ff8b92481c22fe3dcColin Cross bionic/clearenv.c \ 83a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/daemon.c \ 8464ceac3f493e3063a289aec4a12c74787be974e4Colin Cross bionic/err.c \ 85a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/ether_aton.c \ 86a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/ether_ntoa.c \ 87fc10b24accd082fb33c8f92ff8b92481c22fe3dcColin Cross bionic/fdprintf.c \ 88a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/flockfile.c \ 89a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/ftime.c \ 90a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/ftok.c \ 9164ceac3f493e3063a289aec4a12c74787be974e4Colin Cross bionic/fts.c \ 92a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/getdtablesize.c \ 93a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/gethostname.c \ 94a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/getpgrp.c \ 95a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/getpriority.c \ 96a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/getpt.c \ 971dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/if_indextoname.c \ 98a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/if_nametoindex.c \ 99a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/initgroups.c \ 1001dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/ioctl.c \ 101a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/isatty.c \ 102a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/issetugid.c \ 1031dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/ldexp.c \ 1041dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/md5.c \ 105a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/memmem.c \ 106a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/memswap.c \ 107a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/openat.c \ 108a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/open.c \ 109a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/pathconf.c \ 110a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/perror.c \ 111a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/pread.c \ 112a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/pselect.c \ 113a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/ptsname.c \ 114a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/ptsname_r.c \ 1151dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/pututline.c \ 116a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/pwrite.c \ 117a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/reboot.c \ 118a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/recv.c \ 11972e6fd42421dca80fb2776a9185c186d4a04e5f7David 'Digit' Turner bionic/sched_cpualloc.c \ 12072e6fd42421dca80fb2776a9185c186d4a04e5f7David 'Digit' Turner bionic/sched_cpucount.c \ 121a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/sched_getcpu.c \ 1221dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/semaphore.c \ 123a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/send.c \ 124a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/setpgrp.c \ 125a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/sigblock.c \ 126a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/siginterrupt.c \ 127a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/siglist.c \ 128a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/signame.c \ 129a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/sigsetmask.c \ 130a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/sleep.c \ 131a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/strndup.c \ 132a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/strntoimax.c \ 133a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/strntoumax.c \ 134a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/strtotimeval.c \ 1351dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/system_properties.c \ 1365e9a086145764d64c0f7fbce5489d820aa7fdcd4Colin Cross bionic/system_properties_compat.c \ 137a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/tcgetpgrp.c \ 138a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/tcsetpgrp.c \ 1391dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/thread_atexit.c \ 140a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/time64.c \ 141a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/umount.c \ 142a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/unlockpt.c \ 143a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/usleep.c \ 1441dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/utmp.c \ 145a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/wcscoll.c \ 146eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes 147eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes 148eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hugheslibc_dns_src_files += \ 149eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/gethnamaddr.c \ 150eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/inet/nsap_addr.c \ 151eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/nameser/ns_name.c \ 152eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/nameser/ns_netint.c \ 153eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/nameser/ns_parse.c \ 154eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/nameser/ns_print.c \ 155eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/nameser/ns_samedomain.c \ 156eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/nameser/ns_ttl.c \ 157eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/net/base64.c \ 158eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/net/getaddrinfo.c \ 159eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/net/getnameinfo.c \ 160eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/net/getservbyname.c \ 161eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/net/getservbyport.c \ 162eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/net/getservent.c \ 163eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/net/nsdispatch.c \ 164eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/__dn_comp.c \ 165eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/herror.c \ 166eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/res_cache.c \ 167eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/__res_close.c \ 168eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/res_comp.c \ 169eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/res_data.c \ 170eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/res_debug.c \ 171eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/res_init.c \ 172eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/res_mkquery.c \ 173eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/res_query.c \ 174eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/__res_send.c \ 175eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/res_send.c \ 176eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/res_state.c \ 177eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes 1781dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 179a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin# These are shared by all the 32-bit targets, but not the 64-bit ones. 180a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupinifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm mips x86)) 181a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupinlibc_common_src_files += \ 182a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/fcntl.c \ 183a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/fstatfs.c \ 1842a0b873065edb304fa2d1c54f8de663ea638b8abElliott Hughes bionic/__get_tls.cpp \ 1859373bbb24b16fbee0f7d99a94651d614ec4d2318Pavel Chupin bionic/lseek64.c \ 186a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/statfs.c \ 187a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin 188a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupinendif 189a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin 19059a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris# Fortify implementations of libc functions. 19159a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferrislibc_common_src_files += \ 19290201d5eca050414d50a433866ccb580415bb0d4Nick Kralevich bionic/__FD_chk.cpp \ 19359a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__fgets_chk.cpp \ 19459a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__memcpy_chk.cpp \ 19559a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__memmove_chk.cpp \ 19659a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__memset_chk.cpp \ 197b036b5ca36c1e12b075909b3eca6eab73ee611cfNick Kralevich bionic/__read_chk.cpp \ 19860f4f9a5b99a0a66817f50edfc2194a49f8b5146Nick Kralevich bionic/__recvfrom_chk.cpp \ 19959a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__strcat_chk.cpp \ 20059a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__strchr_chk.cpp \ 20159a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__strcpy_chk.cpp \ 20259a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__strlcat_chk.cpp \ 20359a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__strlcpy_chk.cpp \ 20459a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__strlen_chk.cpp \ 20559a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__strncat_chk.cpp \ 20659a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__strncpy_chk.cpp \ 20759a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__strrchr_chk.cpp \ 20859a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__umask_chk.cpp \ 20959a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__vsnprintf_chk.cpp \ 21059a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__vsprintf_chk.cpp \ 21159a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris 21229c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hugheslibc_bionic_src_files := \ 21361e699a133a4807fe878a6cb0d7190d7c96e21f8Elliott Hughes bionic/abort.cpp \ 214063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/assert.cpp \ 215428f5567be25b8090e3dd72e2d3d337c305b514eElliott Hughes bionic/brk.cpp \ 216c30396f5f225e0b5a83a35432e2d82a7063cfdb9David 'Digit' Turner bionic/dirent.cpp \ 2172a0b873065edb304fa2d1c54f8de663ea638b8abElliott Hughes bionic/__errno.cpp \ 2189b84824dfd597d8137137fa33295faa26cc70ae0Kito Cheng bionic/eventfd_read.cpp \ 2199b84824dfd597d8137137fa33295faa26cc70ae0Kito Cheng bionic/eventfd_write.cpp \ 220232163cf70712fe00436b70dd495f4cf405e9eabElliott Hughes bionic/fork.cpp \ 221d0be7c8f9a06b3ca8ea7647ea35c8f9dc63f0fe1Elliott Hughes bionic/futimens.cpp \ 2222c5153b043b44e9935a334ae9b2d5a4bc5258b40Nick Kralevich bionic/getauxval.cpp \ 223063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/getcwd.cpp \ 22442b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes bionic/libc_init_common.cpp \ 2258f2a5a0b40fc82126c691d5c30131d908772aab7Elliott Hughes bionic/libc_logging.cpp \ 22658b575485c446f9d76ee00f67516ed42cf017769Elliott Hughes bionic/libgen.cpp \ 2273e898476c7230b60a0f76968e64ff25f475b48c0Elliott Hughes bionic/pthread_attr.cpp \ 2289d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes bionic/pthread_detach.cpp \ 2299d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes bionic/pthread_equal.cpp \ 2309d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes bionic/pthread_getcpuclockid.cpp \ 2319d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes bionic/pthread_getschedparam.cpp \ 2329d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes bionic/pthread_internals.cpp \ 2339d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes bionic/pthread_join.cpp \ 2349d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes bionic/pthread_kill.cpp \ 2359d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes bionic/pthread_self.cpp \ 2363e898476c7230b60a0f76968e64ff25f475b48c0Elliott Hughes bionic/pthread_setname_np.cpp \ 2379d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes bionic/pthread_setschedparam.cpp \ 238c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes bionic/pthread_sigmask.cpp \ 239d8a5a6f513c6fa99229e9c82c5c308c7cd6b3d54Chris Dearman bionic/raise.cpp \ 240428f5567be25b8090e3dd72e2d3d337c305b514eElliott Hughes bionic/sbrk.cpp \ 241701bec2af33feaa9dddf12ccf8e4c714441b7f2eElliott Hughes bionic/scandir.cpp \ 2424ca685e36e9d7f53c135eba2b4b8ece152129dbeKito Cheng bionic/sched_getaffinity.cpp \ 243232163cf70712fe00436b70dd495f4cf405e9eabElliott Hughes bionic/setegid.cpp \ 2444a9e837840fda3aaea48aeba85c7c7a8782d2586Elliott Hughes bionic/__set_errno.cpp \ 245232163cf70712fe00436b70dd495f4cf405e9eabElliott Hughes bionic/seteuid.cpp \ 246063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/setlocale.cpp \ 247a4b2dc016fa62bd172a73c3f8971c805700ffb0fRom Lemarchand bionic/signalfd.cpp \ 248c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes bionic/sigaction.cpp \ 249c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes bionic/sigaddset.cpp \ 250c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes bionic/sigdelset.cpp \ 251c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes bionic/sigemptyset.cpp \ 252c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes bionic/sigfillset.cpp \ 253c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes bionic/sigismember.cpp \ 254c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes bionic/signal.cpp \ 25540d105ccb3e6283566ce54b693b3088f31aa4f26Elliott Hughes bionic/sigpending.cpp \ 25619e62325c268a668692e2b65fde2284079f369aaElliott Hughes bionic/sigprocmask.cpp \ 2571f5af926fa626734981d6b4dcc0ab54e520032a9Elliott Hughes bionic/sigsuspend.cpp \ 258c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes bionic/sigwait.cpp \ 25906040fd75c1edff9e5ffb2b3d3e2a6e66d57c11dElliott Hughes bionic/statvfs.cpp \ 260063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/strerror.cpp \ 261063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/strerror_r.cpp \ 262063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/strsignal.cpp \ 263063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/stubs.cpp \ 26491a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes bionic/sysconf.cpp \ 265063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/tdestroy.cpp \ 266eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes bionic/__thread_entry.cpp \ 267063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/tmpfile.cpp \ 26817a8b0db63d54e9d79bf11112ace0c4fe9606289Elliott Hughes bionic/wait.cpp \ 269063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/wchar.cpp \ 27029c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes 271a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin# These are shared by all the 32-bit targets, but not the 64-bit ones. 272a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupinifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm mips x86)) 273a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupinlibc_bionic_src_files += \ 274a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/mmap.cpp \ 275a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin 276a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupinendif 277a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin 278ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hugheslibc_tzcode_src_files := \ 279ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes tzcode/asctime.c \ 280ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes tzcode/difftime.c \ 281ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes tzcode/localtime.c \ 282ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes tzcode/strftime.c \ 283ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes tzcode/strptime.c \ 284ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes 285f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hugheslibc_upstream_freebsd_src_files := \ 2866b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/clrerr.c \ 2876b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fclose.c \ 2886b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fdopen.c \ 2896b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/feof.c \ 2906b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/ferror.c \ 2916b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fgetln.c \ 2926b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fgetpos.c \ 2936b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fgets.c \ 2946b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fileno.c \ 2956b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/flags.c \ 2966b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fopen.c \ 2976b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fpurge.c \ 2986b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fputs.c \ 2996b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fsetpos.c \ 3006b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/funopen.c \ 3016b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fwalk.c \ 3026b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fwrite.c \ 3036b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/getc.c \ 3046b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/getchar.c \ 305677ee5647721df22f13909375d5d0e770a1a80bfElliott Hughes upstream-freebsd/lib/libc/stdio/makebuf.c \ 306284f7880323d33356df682c3cfb6b7f0c665bfd4Elliott Hughes upstream-freebsd/lib/libc/stdio/mktemp.c \ 3076b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/putc.c \ 3086b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/putchar.c \ 3096b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/puts.c \ 3106b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/putw.c \ 3116b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/remove.c \ 3126b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/rget.c \ 3136b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/setbuf.c \ 3146b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/setbuffer.c \ 315677ee5647721df22f13909375d5d0e770a1a80bfElliott Hughes upstream-freebsd/lib/libc/stdio/setvbuf.c \ 3166b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/tempnam.c \ 3176b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/tmpnam.c \ 3186b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/wsetup.c \ 319aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes upstream-freebsd/lib/libc/stdlib/abs.c \ 320d278b828fef47fb2d7098f8ec70867fbd3da09d6Elliott Hughes upstream-freebsd/lib/libc/stdlib/getopt_long.c \ 321aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes upstream-freebsd/lib/libc/stdlib/imaxabs.c \ 322aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes upstream-freebsd/lib/libc/stdlib/imaxdiv.c \ 323aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes upstream-freebsd/lib/libc/stdlib/labs.c \ 324aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes upstream-freebsd/lib/libc/stdlib/llabs.c \ 3250b25f633a23e575c8a1f9547d1af5dc5b0157a1cElliott Hughes upstream-freebsd/lib/libc/stdlib/qsort.c \ 326f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes upstream-freebsd/lib/libc/stdlib/realpath.c \ 327eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcpcpy.c \ 328eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcpncpy.c \ 329eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcscasecmp.c \ 330eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcscspn.c \ 331eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcsdup.c \ 332eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcslcat.c \ 333eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcslcpy.c \ 334eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcsncasecmp.c \ 335eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcsncat.c \ 336eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcsncmp.c \ 337eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcsncpy.c \ 338eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcsnlen.c \ 339eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcspbrk.c \ 340eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcsspn.c \ 341eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcsstr.c \ 342eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcstok.c \ 343eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wmemchr.c \ 344eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wmemcpy.c \ 345eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wmemmove.c \ 346eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wmemset.c \ 347f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes 348f8b3a920a895a53b207017249080087d562bd0d2Elliott Hugheslibc_upstream_netbsd_src_files := \ 349e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \ 350e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/common/lib/libc/inet/inet_addr.c \ 351e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/compat-43/creat.c \ 352e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/gen/ftw.c \ 353e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/gen/nftw.c \ 354e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/gen/nice.c \ 3556b3f49a5374305ce9690c3c5ca2aadc90f54c521Elliott Hughes upstream-netbsd/libc/gen/popen.c \ 356e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/gen/psignal.c \ 357ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/gen/setjmperr.c \ 358e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/gen/utime.c \ 359e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/inet/inet_ntoa.c \ 360e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/inet/inet_ntop.c \ 361e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/inet/inet_pton.c \ 362ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/isc/ev_streams.c \ 363ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/isc/ev_timers.c \ 364e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/regex/regcomp.c \ 365e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/regex/regerror.c \ 366e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/regex/regexec.c \ 367e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/regex/regfree.c \ 368e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdio/getdelim.c \ 369e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdio/getline.c \ 370ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/stdlib/bsearch.c \ 371ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/stdlib/div.c \ 372e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/drand48.c \ 373e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/erand48.c \ 374e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/jrand48.c \ 375ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/stdlib/ldiv.c \ 376ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/stdlib/lldiv.c \ 377e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/lrand48.c \ 378e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/mrand48.c \ 379e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/nrand48.c \ 380e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/_rand48.c \ 381e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/seed48.c \ 382e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/srand48.c \ 383e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/tdelete.c \ 384e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/tfind.c \ 385e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/tsearch.c \ 386c51cd764a2d0897234762abd4dbd21420cb9f17dElliott Hughes upstream-netbsd/libc/string/memccpy.c \ 387e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/string/strcasestr.c \ 3882b473070126345e323d0694b87f88264cc9a77ccElliott Hughes upstream-netbsd/libc/string/strcoll.c \ 389e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/string/strxfrm.c \ 390ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/unistd/killpg.c \ 391f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes 392a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin 393ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Architecture specific source files go here 394ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================= 3951dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectifeq ($(TARGET_ARCH),arm) 3961dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_src_files += \ 3970a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva bionic/memchr.c \ 398a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/memmove.c.arm \ 3990a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva bionic/memrchr.c \ 400a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/strchr.cpp \ 4010a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva bionic/strnlen.c \ 402a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/bcopy.c \ 403a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/index.c \ 4040a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva string/strlcat.c \ 4050a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva string/strlcpy.c \ 406a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strncat.c \ 407a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strncmp.c \ 408a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strncpy.c \ 409a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strrchr.c \ 410a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin upstream-freebsd/lib/libc/string/wcscat.c \ 4110a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva upstream-freebsd/lib/libc/string/wcschr.c \ 4120a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva upstream-freebsd/lib/libc/string/wcscmp.c \ 4130a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva upstream-freebsd/lib/libc/string/wcscpy.c \ 4140a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva upstream-freebsd/lib/libc/string/wcslen.c \ 415a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin upstream-freebsd/lib/libc/string/wcsrchr.c \ 416a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin upstream-freebsd/lib/libc/string/wmemcmp.c \ 4171dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 4181dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# These files need to be arm so that gdbserver 4191dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# can set breakpoints in them without messing 4201dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# up any thumb code. 421a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin# TODO: is this actually necessary? 4221dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_src_files += \ 423a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/pthread-atfork.c.arm \ 424a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/pthread-rwlocks.c.arm \ 425a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/pthread-timers.c.arm \ 426a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/ptrace.c.arm \ 427ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin 4286a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turnerlibc_static_common_src_files += \ 42944b53ad6818de344e0b499ad8fdbb21fcb0ff2b6Elliott Hughes bionic/pthread.c.arm \ 4304b4a8824289c48c823cd38bc63289d121aae3d67Elliott Hughes bionic/pthread_create.cpp.arm \ 43144b53ad6818de344e0b499ad8fdbb21fcb0ff2b6Elliott Hughes bionic/pthread_key.cpp.arm \ 4326a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner 433a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif # arm 4341dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 4351dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectifeq ($(TARGET_ARCH),x86) 4361dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_src_files += \ 437d2547040a13fe1bce31a60df35d4953c596a3db0Elliott Hughes bionic/pthread-atfork.c \ 438d2547040a13fe1bce31a60df35d4953c596a3db0Elliott Hughes bionic/pthread-rwlocks.c \ 439d2547040a13fe1bce31a60df35d4953c596a3db0Elliott Hughes bionic/pthread-timers.c \ 440d2547040a13fe1bce31a60df35d4953c596a3db0Elliott Hughes bionic/ptrace.c \ 4411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 4426a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turnerlibc_static_common_src_files += \ 44344b53ad6818de344e0b499ad8fdbb21fcb0ff2b6Elliott Hughes bionic/pthread.c \ 4444b4a8824289c48c823cd38bc63289d121aae3d67Elliott Hughes bionic/pthread_create.cpp \ 44544b53ad6818de344e0b499ad8fdbb21fcb0ff2b6Elliott Hughes bionic/pthread_key.cpp \ 4466a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner 447a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif # x86 44810093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI 449a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupinifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86_64)) 450a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupinlibc_common_src_files += \ 451a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/memchr.c \ 452a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/memcmp.c \ 453a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/memcpy.c \ 454a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/memmove.c \ 455a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/memrchr.c \ 456a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/memset.c \ 457a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/pthread-atfork.c \ 458a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/pthread-rwlocks.c \ 459a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/pthread-timers.c \ 460a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/ptrace.c \ 461a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/strchr.cpp \ 462a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/strnlen.c \ 463a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/bcopy.c \ 464a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/index.c \ 465a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strcat.c \ 466a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strcmp.c \ 467a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strcpy.c \ 468a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strlcat.c \ 469a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strlcpy.c \ 470a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strlen.c \ 471a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strncat.c \ 472a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strncmp.c \ 473a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strncpy.c \ 474a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strrchr.c \ 475a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin upstream-freebsd/lib/libc/string/wcscat.c \ 476a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin upstream-freebsd/lib/libc/string/wcschr.c \ 477a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin upstream-freebsd/lib/libc/string/wcscmp.c \ 478a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin upstream-freebsd/lib/libc/string/wcscpy.c \ 479a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin upstream-freebsd/lib/libc/string/wcslen.c \ 480a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin upstream-freebsd/lib/libc/string/wcsrchr.c \ 481a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin upstream-freebsd/lib/libc/string/wmemcmp.c \ 482a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin 483a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupinlibc_static_common_src_files += \ 484a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/pthread.c \ 485a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/pthread_create.cpp \ 486a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/pthread_key.cpp \ 487a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin 488a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupinendif # x86_64 489a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin 490a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),mips) 491a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamlibc_common_src_files += \ 492a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/memchr.c \ 493857fed50cbf2d1a701a5a1a29e124f7e9fb945d5Elliott Hughes bionic/memcmp.c \ 494a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/memrchr.c \ 495a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/strchr.cpp \ 496a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/strnlen.c \ 497a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham string/bcopy.c \ 498a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/index.c \ 499a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strcat.c \ 500a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham string/strcmp.c \ 501a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham string/strcpy.c \ 502a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strlcat.c \ 503a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strlcpy.c \ 5040a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva string/strncat.c \ 505a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strncmp.c \ 5060a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva string/strncpy.c \ 5070a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva string/strrchr.c \ 508fa4d596abc5dd3a485cc0b5e38b80393abef4a44Chris Dearman upstream-freebsd/lib/libc/string/wcscat.c \ 5090a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva upstream-freebsd/lib/libc/string/wcschr.c \ 5100a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva upstream-freebsd/lib/libc/string/wcscmp.c \ 5110a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva upstream-freebsd/lib/libc/string/wcscpy.c \ 5120a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva upstream-freebsd/lib/libc/string/wcslen.c \ 513a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin upstream-freebsd/lib/libc/string/wcsrchr.c \ 514a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin upstream-freebsd/lib/libc/string/wmemcmp.c \ 515a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham 516a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamlibc_common_src_files += \ 517eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes bionic/pthread-atfork.c \ 518eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes bionic/pthread-rwlocks.c \ 519eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes bionic/pthread-timers.c \ 520eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes bionic/ptrace.c \ 521a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham 522a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamlibc_static_common_src_files += \ 523ba342c11adbe92aa918d50b0d2a36453510ebf02Elliott Hughes bionic/pthread.c \ 5244b4a8824289c48c823cd38bc63289d121aae3d67Elliott Hughes bionic/pthread_create.cpp \ 52544b53ad6818de344e0b499ad8fdbb21fcb0ff2b6Elliott Hughes bionic/pthread_key.cpp \ 526a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham 527a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif # mips 5281dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 5297c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrisifeq ($(strip $(TARGET_CPU_VARIANT)),) 5307c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris$(warning TARGET_CPU_VARIANT is not defined) 5317c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrisendif 5327c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris 5337c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris########################################################### 5347c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## Add cpu specific source files. 5357c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## 5367c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## This can be called multiple times, but it will only add 5377c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## the first source file for each unique $(1). 5387c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## $(1): Unique identifier to identify the cpu variant 5397c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## implementation. 5407c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## $(2): Cpu specific source file. 5417c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris########################################################### 5427c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris 5437c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrisdefine libc-add-cpu-variant-src 5447c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris$(if $(filter true,$(_LIBC_ARCH_CPU_VARIANT_HAS_$(1))), \ 5457c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris , \ 5467c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris $(eval _LIBC_ARCH_CPU_VARIANT_HAS_$(1) := true) \ 5477c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris $(eval _LIBC_ARCH_CPU_VARIANT_SRC_FILE.$(1) := $(2)) \ 5487c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris $(eval _LIBC_ARCH_CPU_VARIANT_SRC_FILES += $(2)) \ 5497c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris) 5507c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrisendef 5517c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris 5527c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris_LIBC_ARCH_COMMON_SRC_FILES := 5537c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris_LIBC_ARCH_CPU_VARIANT_SRC_FILES := 5547c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris_LIBC_ARCH_STATIC_SRC_FILES := 5557c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris_LIBC_ARCH_DYNAMIC_SRC_FILES := 556d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferris_LIBC_ARCH_ADDITIONAL_DEPENDENCIES := 557d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferris 558d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferrislibc_common_additional_dependencies += \ 559d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferris $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk 560d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferrisinclude $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk 5617c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris 562eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hugheslibc_bionic_src_files += $(_LIBC_ARCH_COMMON_SRC_FILES) 563eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hugheslibc_bionic_src_files += $(_LIBC_ARCH_CPU_VARIANT_SRC_FILES) 5647c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrislibc_arch_static_src_files := $(_LIBC_ARCH_STATIC_SRC_FILES) 5657c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrislibc_arch_dynamic_src_files := $(_LIBC_ARCH_DYNAMIC_SRC_FILES) 566d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferrislibc_common_additional_dependencies += $(_LIBC_ARCH_ADDITIONAL_DEPENDENCIES) 5677c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris 568ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define some common cflags 569ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ======================================================== 5701dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_cflags := \ 571470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes -DANDROID_CHANGES \ 572470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes -D_LIBC=1 \ 5732ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes -Wall -Wextra \ 5742ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes 5752ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes# Try to catch typical 32-bit assumptions that break with 64-bit pointers. 5762ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hugheslibc_common_cflags += \ 5772ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes -Werror=pointer-to-int-cast \ 5782ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes -Werror=int-to-pointer-cast \ 5792ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes -Werror=type-limits \ 5801dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 581d2c9dcc9265e66f6432ec39dcc7378b944449e60Dave Bortifeq ($(strip $(DEBUG_BIONIC_LIBC)),true) 5821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project libc_common_cflags += -DDEBUG 5831dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectendif 5841dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 5852fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren# To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in 5862fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren# the appropriate BoardConfig.mk file. 5872fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren# 5882fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Renifneq ($(BOARD_MALLOC_ALIGNMENT),) 5892fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren libc_common_cflags += -DMALLOC_ALIGNMENT=$(BOARD_MALLOC_ALIGNMENT) 5902fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Renendif 5912fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren 5921dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectifeq ($(TARGET_ARCH),arm) 593a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_common_cflags += -DSOFTFLOAT 5941dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project libc_common_cflags += -fstrict-aliasing 595ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin libc_crt_target_cflags := -mthumb-interwork 5967e841ed688947855a3bd20d2b23a44599257038aElliott Hughesendif # arm 597a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham 598a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),mips) 599a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham ifneq ($(ARCH_MIPS_HAS_FPU),true) 600a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_common_cflags += -DSOFTFLOAT 601a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham endif 602a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_common_cflags += -fstrict-aliasing 603a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_crt_target_cflags := $(TARGET_GLOBAL_CFLAGS) 604a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif # mips 605a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham 6067e841ed688947855a3bd20d2b23a44599257038aElliott Hughesifeq ($(TARGET_ARCH),x86) 6077e841ed688947855a3bd20d2b23a44599257038aElliott Hughes libc_crt_target_cflags := -m32 6087e841ed688947855a3bd20d2b23a44599257038aElliott Hughes libc_crt_target_ldflags := -melf_i386 6097e841ed688947855a3bd20d2b23a44599257038aElliott Hughesendif # x86 6107e841ed688947855a3bd20d2b23a44599257038aElliott Hughes 6117e841ed688947855a3bd20d2b23a44599257038aElliott Hughesifeq ($(TARGET_ARCH),x86_64) 6127e841ed688947855a3bd20d2b23a44599257038aElliott Hughes libc_crt_target_cflags := -m64 6137e841ed688947855a3bd20d2b23a44599257038aElliott Hughes libc_crt_target_ldflags := -melf_x86_64 6147e841ed688947855a3bd20d2b23a44599257038aElliott Hughesendif # x86_64 6157e841ed688947855a3bd20d2b23a44599257038aElliott Hughes 616fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden# Define ANDROID_SMP appropriately. 617fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenifeq ($(TARGET_CPU_SMP),true) 618fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden libc_common_cflags += -DANDROID_SMP=1 619fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenelse 620fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden libc_common_cflags += -DANDROID_SMP=0 621fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenendif 622fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden 62376be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hughes# crtbrand.c needs <stdint.h> and a #define for the platform SDK version. 62476be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hugheslibc_crt_target_cflags += \ 62576be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hughes -I$(LOCAL_PATH)/include \ 626eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes -I$(LOCAL_PATH)/arch-$(TARGET_ARCH)/include \ 627eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) \ 628fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden 629762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines# Define some common conlyflags 630762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hineslibc_common_conlyflags := \ 631762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines -std=gnu99 632762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines 633762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines# Define some common cppflags 634762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hineslibc_common_cppflags := \ 635762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines -std=gnu++11 636762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines 637ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define some common includes 638ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ======================================================== 6391dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_c_includes := \ 6401dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project $(LOCAL_PATH)/stdlib \ 6411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project $(LOCAL_PATH)/string \ 64276656afc6dd069fcfda5768e6e54bb85e4e99942Nick Kralevich $(LOCAL_PATH)/stdio \ 64376656afc6dd069fcfda5768e6e54bb85e4e99942Nick Kralevich external/safe-iop/include 6441dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 645ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define the libc run-time (crt) support object files that must be built, 646ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# which are needed to build all other objects (shared/static libs and 647ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# executables) 648ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================================== 649a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham# ARM, MIPS, and x86 all need crtbegin_so/crtend_so. 6506a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# 6516a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# For x86, the .init section must point to a function that calls all 6526a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# entries in the .ctors section. (on ARM this is done through the 6536a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# .init_array section instead). 6546a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# 655a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham# For all the platforms, the .fini_array section must point to a function 6566a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# that will call __cxa_finalize(&__dso_handle) in order to ensure that 6576a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# static C++ destructors are properly called on dlclose(). 6586a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# 659b49c17c2bf1232e29bc390e58d6fa43688929aa5Pavel Chupinlibc_crt_target_crtbegin_file := $(LOCAL_PATH)/arch-common/bionic/crtbegin.c 660b49c17c2bf1232e29bc390e58d6fa43688929aa5Pavel Chupinlibc_crt_target_crtbegin_so_file := $(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c 661b49c17c2bf1232e29bc390e58d6fa43688929aa5Pavel Chupin 662a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),arm) 663a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_crt_target_so_cflags := 664a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif 665a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),mips) 666a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_crt_target_so_cflags := -fPIC 667b49c17c2bf1232e29bc390e58d6fa43688929aa5Pavel Chupinlibc_crt_target_crtbegin_file := $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin.c 668a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif 669a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupinifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64)) 670a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_crt_target_so_cflags := -fPIC 671a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif 672a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamlibc_crt_target_so_cflags += $(libc_crt_target_cflags) 673ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope 674ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope# See the comment in crtbrand.c for the reason why we need to generate 675ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope# crtbrand.s before generating crtbrand.o. 676ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.s 677ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope$(GEN): $(LOCAL_PATH)/bionic/crtbrand.c 678ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope @mkdir -p $(dir $@) 679cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) -S \ 680cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang -MD -MF $(@:%.s=%.d) -o $@ $< 681cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) sed -i -e '/\.note\.ABI-tag/s/progbits/note/' $@ 682cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(call transform-d-to-p-args,$(@:%.s=%.d),$(@:%.s=%.P)) 683cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.s=%.P) 684ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeALL_GENERATED_SOURCES += $(GEN) 685ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope 686ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o 687ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.s 688ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope @mkdir -p $(dir $@) 689cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) -o $@ -c $< 690ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeALL_GENERATED_SOURCES += $(GEN) 691ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope 692fc9e525fe07846c1efa23235a59575f8dad69c53Ying WangGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_so.o 69312949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughes$(GEN): $(libc_crt_target_crtbegin_so_file) 6941dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project @mkdir -p $(dir $@) 695cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) \ 696cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang -MD -MF $(@:%.o=%.d) -o $@ -c $< 697cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(transform-d-to-p) 698cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P) 6991dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectALL_GENERATED_SOURCES += $(GEN) 7001dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 701fc9e525fe07846c1efa23235a59575f8dad69c53Ying WangGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_so.o 702b49c17c2bf1232e29bc390e58d6fa43688929aa5Pavel Chupin$(GEN): $(LOCAL_PATH)/arch-common/bionic/crtend_so.S 703ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin @mkdir -p $(dir $@) 704cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) \ 705cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang -MD -MF $(@:%.o=%.d) -o $@ -c $< 706cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(transform-d-to-p) 707cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P) 708ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinALL_GENERATED_SOURCES += $(GEN) 709fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei Liao 710cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang# The following two are installed to device 711fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei LiaoGEN := $(TARGET_OUT_SHARED_LIBRARIES)/crtbegin_so.o 712cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_so.o 713cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) mkdir -p $(dir $@) && cp -f $< $@ 714fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei LiaoALL_GENERATED_SOURCES += $(GEN) 715fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei Liao 716fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei LiaoGEN := $(TARGET_OUT_SHARED_LIBRARIES)/crtend_so.o 717cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_so.o 718cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) mkdir -p $(dir $@) && cp -f $< $@ 719fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei LiaoALL_GENERATED_SOURCES += $(GEN) 7201dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 7211dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 722ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static1.o 72312949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughes$(GEN): $(libc_crt_target_crtbegin_file) 724ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin @mkdir -p $(dir $@) 725cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_CC) $(libc_crt_target_cflags) \ 726cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang -MD -MF $(@:%.o=%.d) -o $@ -c $< 727cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(transform-d-to-p) 728cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P) 729ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinALL_GENERATED_SOURCES += $(GEN) 7301dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 731ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static.o 732ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static1.o $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o 733ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope @mkdir -p $(dir $@) 734e85c1834248916d7d13891e602461d9be91dda28Pavel Chupin $(hide) $(TARGET_LD) $(libc_crt_target_ldflags) -r -o $@ $^ 735ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeALL_GENERATED_SOURCES += $(GEN) 736ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope 737ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic1.o 73812949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughes$(GEN): $(libc_crt_target_crtbegin_file) 7391dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project @mkdir -p $(dir $@) 740cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_CC) $(libc_crt_target_cflags) \ 741cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang -MD -MF $(@:%.o=%.d) -o $@ -c $< 742cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(transform-d-to-p) 743cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P) 7441dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectALL_GENERATED_SOURCES += $(GEN) 7451dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 746ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic.o 747ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic1.o $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o 748ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope @mkdir -p $(dir $@) 749e85c1834248916d7d13891e602461d9be91dda28Pavel Chupin $(hide) $(TARGET_LD) $(libc_crt_target_ldflags) -r -o $@ $^ 750ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeALL_GENERATED_SOURCES += $(GEN) 751ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin 752ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# We rename crtend.o to crtend_android.o to avoid a 753ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# name clash between gcc and bionic. 754fc9e525fe07846c1efa23235a59575f8dad69c53Ying WangGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_android.o 755b49c17c2bf1232e29bc390e58d6fa43688929aa5Pavel Chupin$(GEN): $(LOCAL_PATH)/arch-common/bionic/crtend.S 7561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project @mkdir -p $(dir $@) 757cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_CC) $(libc_crt_target_cflags) \ 758cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang -MD -MF $(@:%.o=%.d) -o $@ -c $< 759cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(transform-d-to-p) 760cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P) 7611dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectALL_GENERATED_SOURCES += $(GEN) 7621dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 7631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 764ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# To enable malloc leak check for statically linked programs, add 765ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# "WITH_MALLOC_CHECK_LIBC_A := true" to buildspec.mk 766ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinWITH_MALLOC_CHECK_LIBC_A := $(strip $(WITH_MALLOC_CHECK_LIBC_A)) 7671dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 768ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ======================================================== 7696334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# libbionic_ssp.a - stack protector code 7706334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# ======================================================== 7716334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# 7726334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# The stack protector code needs to be compiled 7736334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# with -fno-stack-protector, since it modifies the 7746334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# stack canary. 7756334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich 7766334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevichinclude $(CLEAR_VARS) 7776334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich 778642331b5dd5647e7d196ac4f44406fd435478a56Elliott HughesLOCAL_SRC_FILES := bionic/__stack_chk_fail.cpp 779dc5ec07158079b39f758ed41eca5b937e52c3729Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector -Werror 780762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 781762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 7826334c662cae4cd9b61f5f3185048b0cd3633dad7Nick KralevichLOCAL_C_INCLUDES := $(libc_common_c_includes) 7836334c662cae4cd9b61f5f3185048b0cd3633dad7Nick KralevichLOCAL_MODULE := libbionic_ssp 784d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 7856334c662cae4cd9b61f5f3185048b0cd3633dad7Nick KralevichLOCAL_SYSTEM_SHARED_LIBRARIES := 7866334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich 7876334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevichinclude $(BUILD_STATIC_LIBRARY) 7886334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich 7896334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich 7906334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# ======================================================== 791ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes# libc_tzcode.a - upstream 'tzcode' code 792ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes# ======================================================== 793ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes 794ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughesinclude $(CLEAR_VARS) 795ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes 796ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_SRC_FILES := $(libc_tzcode_src_files) 797ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_CFLAGS := \ 798ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes $(libc_common_cflags) \ 799ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes -DSTD_INSPIRED=1 \ 800ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes -DTZDIR=\"/system/usr/share/zoneinfo\" \ 801ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes -DTM_GMTOFF=tm_gmtoff \ 802ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes -DUSG_COMPAT=1 803762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 804762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 805ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes) 806ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_MODULE := libc_tzcode 807d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 808ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES := 809ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes 810ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughesinclude $(BUILD_STATIC_LIBRARY) 811ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes 812ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes 813ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes# ======================================================== 814eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes# libc_dns.a - modified NetBSD DNS code 815eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes# ======================================================== 816eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes 817eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughesinclude $(CLEAR_VARS) 818eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes 819eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_SRC_FILES := $(libc_dns_src_files) 820eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_CFLAGS := \ 821eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes $(libc_common_cflags) \ 822eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes -DINET6 \ 823eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes -I$(LOCAL_PATH)/private \ 824eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes -I$(LOCAL_PATH)/upstream-netbsd/libc/include # for NetBSD private headers 825eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes 826eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 827eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_CPPFLAGS := $(libc_common_cppflags) 828eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes) 829eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_MODULE := libc_dns 830eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 831eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES := 832eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes 833eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughesinclude $(BUILD_STATIC_LIBRARY) 834eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes 835eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes 836eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes# ======================================================== 837f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# libc_freebsd.a - upstream FreeBSD C library code 838f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# ======================================================== 839f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# 840f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# These files are built with the freebsd-compat.h header file 841f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# automatically included. 842f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes 843f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughesinclude $(CLEAR_VARS) 844f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes 845f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_SRC_FILES := $(libc_upstream_freebsd_src_files) 846f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_CFLAGS := \ 847f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes $(libc_common_cflags) \ 848f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes -I$(LOCAL_PATH)/upstream-freebsd \ 849f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes -I$(LOCAL_PATH)/upstream-freebsd/libc/include \ 850f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes -include upstream-freebsd/freebsd-compat.h 851762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 852762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 853f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes) 854f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_MODULE := libc_freebsd 855d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 856f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES := 857f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes 858f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughesinclude $(BUILD_STATIC_LIBRARY) 859f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes 860f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes 861f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# ======================================================== 862f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# libc_netbsd.a - upstream NetBSD C library code 863f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# ======================================================== 864f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# 865f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# These files are built with the netbsd-compat.h header file 866f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# automatically included. 867f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes 868f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughesinclude $(CLEAR_VARS) 869f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes 870f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_SRC_FILES := $(libc_upstream_netbsd_src_files) 871f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_CFLAGS := \ 872f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes $(libc_common_cflags) \ 873eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes -DPOSIX_MISTAKE \ 8743d2d448af1b16923f5a329b49bb8e658dbad8a06Elliott Hughes -I$(LOCAL_PATH)/upstream-netbsd \ 875ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes -I$(LOCAL_PATH)/upstream-netbsd/libc/include \ 876f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes -include upstream-netbsd/netbsd-compat.h 877762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 878762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 879f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes) 880f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_MODULE := libc_netbsd 881d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 882f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES := 883f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes 884f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughesinclude $(BUILD_STATIC_LIBRARY) 885f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes 886f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes 887f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# ======================================================== 88829c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# libc_bionic.a - home-grown C library code 88929c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# ======================================================== 89029c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# 89129c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughesinclude $(CLEAR_VARS) 89229c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes 89329c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_SRC_FILES := $(libc_bionic_src_files) 89429c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) -Werror 895762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 896762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 89729c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes) 89829c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_MODULE := libc_bionic 899d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 90029c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES := 90129c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes 90229c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughesinclude $(BUILD_STATIC_LIBRARY) 90329c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes 90429c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes 90529c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# ======================================================== 906ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# libc_common.a 907ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ======================================================== 908f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes 909ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavininclude $(CLEAR_VARS) 9101dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 911ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_SRC_FILES := $(libc_common_src_files) 912eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) 913762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 914762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 915ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_C_INCLUDES := $(libc_common_c_includes) 9161dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_MODULE := libc_common 917d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 918ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_WHOLE_STATIC_LIBRARIES := \ 919ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes libbionic_ssp \ 920ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes libc_bionic \ 921eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes libc_dns \ 922ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes libc_freebsd \ 923ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes libc_netbsd \ 924eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes libc_tzcode \ 925eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes 9261dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES := 9271dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 928c97c5fc7880267fd835d22946a920bf370461cf2Ying Wang# TODO: split out the asflags. 929c97c5fc7880267fd835d22946a920bf370461cf2Ying WangLOCAL_ASFLAGS := $(LOCAL_CFLAGS) 930c97c5fc7880267fd835d22946a920bf370461cf2Ying Wang 9311dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_STATIC_LIBRARY) 9321dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 9331dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 934ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ======================================================== 93549e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# libc_nomalloc.a 93649e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# ======================================================== 93749e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# 93849e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# This is a version of the static C library that does not 93991a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# include malloc. It's useful in situations when the user wants 94091a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# to provide their own malloc implementation, or wants to 94191a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# explicitly disallow the use of the use of malloc, 94291a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# such as in the dynamic loader. 94349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin 94449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavininclude $(CLEAR_VARS) 94549e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin 94649e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_SRC_FILES := \ 94749e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin $(libc_arch_static_src_files) \ 9486a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner $(libc_static_common_src_files) \ 94942b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes bionic/libc_init_static.cpp 95049e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin 95149e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_C_INCLUDES := $(libc_common_c_includes) 9526a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' TurnerLOCAL_CFLAGS := $(libc_common_cflags) \ 953762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines -DLIBC_STATIC 954762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 955762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 95649e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin 95749e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_MODULE := libc_nomalloc 958d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 95949e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_WHOLE_STATIC_LIBRARIES := libc_common 96049e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_SYSTEM_SHARED_LIBRARIES := 96149e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin 96249e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavininclude $(BUILD_STATIC_LIBRARY) 96349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin 96449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin 96549e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# ======================================================== 9661dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# libc.a 9671dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ======================================================== 9681dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS) 9691dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 9701dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \ 971ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin $(libc_arch_static_src_files) \ 9726a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner $(libc_static_common_src_files) \ 9731dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/dlmalloc.c \ 974c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes bionic/malloc_debug_common.cpp \ 97542b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes bionic/libc_init_static.cpp 9761dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 977b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_CFLAGS := $(libc_common_cflags) \ 978762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines -DLIBC_STATIC 979762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 980762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 9811dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes) 982ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_MODULE := libc 983d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 9841dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common 9851dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES := 9861dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 9871dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_STATIC_LIBRARY) 9881dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 9891dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 990ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ======================================================== 9911dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# libc.so 9921dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ======================================================== 9931dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS) 9941dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 9957c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian# pthread deadlock prediction: 9967c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian# set -DPTHREAD_DEBUG -DPTHREAD_DEBUG_ENABLED=1 to enable support for 9977c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian# pthread deadlock prediction. 9987c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian# Since this code is experimental it is disabled by default. 9997c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian# see libc/bionic/pthread_debug.c for details 10007c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian 1001762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CFLAGS := $(libc_common_cflags) -DPTHREAD_DEBUG -DPTHREAD_DEBUG_ENABLED=0 1002762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 1003762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 10041dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes) 10051dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 10061dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \ 1007ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin $(libc_arch_dynamic_src_files) \ 10086a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner $(libc_static_common_src_files) \ 10091dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/dlmalloc.c \ 1010c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes bionic/malloc_debug_common.cpp \ 10111e980b6bc8315d00a07312b25486531247abd98cElliott Hughes bionic/pthread_debug.cpp \ 101242b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes bionic/libc_init_dynamic.cpp 10131dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 1014f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvelifeq ($(TARGET_ARCH),arm) 1015f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel LOCAL_NO_CRT := true 1016f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel LOCAL_CFLAGS += -DCRT_LEGACY_WORKAROUND 1017f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel 1018f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel LOCAL_SRC_FILES := \ 1019b49c17c2bf1232e29bc390e58d6fa43688929aa5Pavel Chupin arch-common/bionic/crtbegin_so.c \ 1020f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel arch-arm/bionic/atexit_legacy.c \ 1021f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel $(LOCAL_SRC_FILES) \ 1022b49c17c2bf1232e29bc390e58d6fa43688929aa5Pavel Chupin arch-common/bionic/crtend_so.S 1023f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvelendif 1024f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel 10251dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_MODULE:= libc 1026d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 1027914d8d4cff10f023ccd382fb43b2c7833dd34f72Elliott HughesLOCAL_REQUIRED_MODULES := tzdata 10281dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 10291dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# WARNING: The only library libc.so should depend on is libdl.so! If you add other libraries, 10301dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries. This 10311dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ensures that symbols that are pulled into those new libraries from libgcc.a are not declared 10321dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# external; if that were the case, then libc would not pull those symbols from libgcc.a as it 10331dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# should, instead relying on the external symbols from the dependent libraries. That would 10341dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# create an "cloaked" dependency on libgcc.a in libc though the libraries, which is not what 10351dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# you wanted! 10361dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 10371dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SHARED_LIBRARIES := libdl 10381dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common 10391dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES := 10401dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 10411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_SHARED_LIBRARY) 10421dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 10431dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 1044b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# For all builds, except for the -user build we will enable memory 1045b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# allocation checking (including memory leaks, buffer overwrites, etc.) 1046b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# Note that all these checks are also controlled by env. settings 1047b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# that can enable, or disable specific checks. Note also that some of 1048b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# the checks are available only in emulator and are implemeted in 1049b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_qemu_instrumented.so. 1050b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineifneq ($(TARGET_BUILD_VARIANT),user) 1051b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 1052ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ======================================================== 1053b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_debug_leak.so 10541dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ======================================================== 10551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS) 10561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 1057ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_CFLAGS := \ 1058ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin $(libc_common_cflags) \ 1059ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin -DMALLOC_LEAK_CHECK 1060762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 1061762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 10621dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 10631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes) 10641dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 10651dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \ 10661e980b6bc8315d00a07312b25486531247abd98cElliott Hughes bionic/debug_mapinfo.cpp \ 10671e980b6bc8315d00a07312b25486531247abd98cElliott Hughes bionic/debug_stacktrace.cpp \ 1068c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes bionic/malloc_debug_leak.cpp \ 1069c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes bionic/malloc_debug_check.cpp \ 10701dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 1071b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE:= libc_malloc_debug_leak 1072d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 10731dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 1074e007775f4b21f6b94078ed1d34b753435ba28fdaPavel ChupinLOCAL_SHARED_LIBRARIES := libc libdl 1075b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_WHOLE_STATIC_LIBRARIES := libc_common 1076b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_SYSTEM_SHARED_LIBRARIES := 1077aa46fa24035f3ab020f9a7abd86c25ae2196bb32Bruce BeareLOCAL_ALLOW_UNDEFINED_SYMBOLS := true 1078368070454b1349d1fcf29a5d1eb51c869fb538f6Iliyan Malchev 1079b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# Don't install on release build 1080b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE_TAGS := eng debug 10811dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 1082b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineinclude $(BUILD_SHARED_LIBRARY) 1083b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 1084b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 1085b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# ======================================================== 1086b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_debug_qemu.so 1087b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# ======================================================== 1088b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineinclude $(CLEAR_VARS) 1089b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 1090b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_CFLAGS := \ 1091b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine $(libc_common_cflags) \ 1092b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine -DMALLOC_QEMU_INSTRUMENT 1093762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 1094762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 1095b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 1096b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_C_INCLUDES := $(libc_common_c_includes) 1097b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 1098b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_SRC_FILES := \ 1099c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes bionic/malloc_debug_qemu.cpp 1100b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 1101b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE:= libc_malloc_debug_qemu 1102d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 1103b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 11047c0c3793722aea293c45921ef50e4adcdf9645ceMathias AgopianLOCAL_SHARED_LIBRARIES := libc libdl 11051dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common 11061dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES := 1107368070454b1349d1fcf29a5d1eb51c869fb538f6Iliyan Malchev 11081dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# Don't install on release build 1109b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE_TAGS := eng debug 11101dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 11111dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_SHARED_LIBRARY) 11121dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 1113b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineendif #!user 1114b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 1115b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 11161dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ======================================================== 11171dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(call all-makefiles-under,$(LOCAL_PATH)) 1118