Android.mk revision e210488e0d4082b9a0c55195c22191f29ed56bf8
1e210488e0d4082b9a0c55195c22191f29ed56bf8Serban ConstantinescuLOCAL_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/getenv.c \ 541dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/putenv.c \ 551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/setenv.c \ 561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/strtod.c \ 571dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/strtoimax.c \ 581dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/strtol.c \ 591dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/strtoll.c \ 601dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/strtoul.c \ 611dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/strtoull.c \ 621dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/strtoumax.c \ 631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/tolower_.c \ 641dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project stdlib/toupper_.c \ 651dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project string/strcasecmp.c \ 661dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project string/strcspn.c \ 671dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project string/strdup.c \ 681dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project string/strpbrk.c \ 691dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project string/strsep.c \ 701dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project string/strspn.c \ 711dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project string/strstr.c \ 721dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project string/strtok.c \ 733527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner wchar/wcswidth.c \ 7470465614e14a87f547cdd1b82b0b270b87d215c1Kristian Monsen wchar/wcsxfrm.c \ 751dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/arc4random.c \ 76a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/atoi.c \ 77a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/atol.c \ 78a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/atoll.c \ 79a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/bindresvport.c \ 80fc10b24accd082fb33c8f92ff8b92481c22fe3dcColin Cross bionic/clearenv.c \ 81a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/daemon.c \ 8264ceac3f493e3063a289aec4a12c74787be974e4Colin Cross bionic/err.c \ 83a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/ether_aton.c \ 84a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/ether_ntoa.c \ 85fc10b24accd082fb33c8f92ff8b92481c22fe3dcColin Cross bionic/fdprintf.c \ 86a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/flockfile.c \ 87a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/ftime.c \ 88a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/ftok.c \ 8964ceac3f493e3063a289aec4a12c74787be974e4Colin Cross bionic/fts.c \ 90a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/getdtablesize.c \ 91a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/gethostname.c \ 92a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/getpgrp.c \ 93a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/getpriority.c \ 94a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/getpt.c \ 951dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/if_indextoname.c \ 96a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/if_nametoindex.c \ 97a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/initgroups.c \ 981dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/ioctl.c \ 99a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/isatty.c \ 100a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/issetugid.c \ 1011dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/ldexp.c \ 1021dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/md5.c \ 103a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/memmem.c \ 104a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/memswap.c \ 1056771b9cef635f0da98932a1f0f877a07257ca088Colin Cross bionic/name_mem.c \ 106a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/pathconf.c \ 107a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/perror.c \ 108a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/ptsname.c \ 109a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/ptsname_r.c \ 1101dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/pututline.c \ 111a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/reboot.c \ 112a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/recv.c \ 11372e6fd42421dca80fb2776a9185c186d4a04e5f7David 'Digit' Turner bionic/sched_cpualloc.c \ 11472e6fd42421dca80fb2776a9185c186d4a04e5f7David 'Digit' Turner bionic/sched_cpucount.c \ 115a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/sched_getcpu.c \ 1161dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/semaphore.c \ 117a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/send.c \ 118a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/setpgrp.c \ 119a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/sigblock.c \ 120a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/siginterrupt.c \ 121a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/siglist.c \ 122a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/signame.c \ 123a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/sigsetmask.c \ 124a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/strndup.c \ 125a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/strntoimax.c \ 126a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/strntoumax.c \ 127a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/strtotimeval.c \ 1281dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/system_properties.c \ 1295e9a086145764d64c0f7fbce5489d820aa7fdcd4Colin Cross bionic/system_properties_compat.c \ 130a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/tcgetpgrp.c \ 131a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/tcsetpgrp.c \ 132a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/time64.c \ 133a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/umount.c \ 134a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/unlockpt.c \ 1351dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/utmp.c \ 136a89864a20b818621a1da10e88fda815334062f9fElliott Hughes bionic/wcscoll.c \ 137eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes 138eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes 139eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hugheslibc_dns_src_files += \ 140eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/gethnamaddr.c \ 141eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/inet/nsap_addr.c \ 142eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/nameser/ns_name.c \ 143eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/nameser/ns_netint.c \ 144eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/nameser/ns_parse.c \ 145eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/nameser/ns_print.c \ 146eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/nameser/ns_samedomain.c \ 147eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/nameser/ns_ttl.c \ 148eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/net/base64.c \ 149eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/net/getaddrinfo.c \ 150eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/net/getnameinfo.c \ 151eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/net/getservbyname.c \ 152eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/net/getservbyport.c \ 153eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/net/getservent.c \ 154eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/net/nsdispatch.c \ 155eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/__dn_comp.c \ 156eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/herror.c \ 157eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/res_cache.c \ 158eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/__res_close.c \ 159eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/res_comp.c \ 160eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/res_data.c \ 161eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/res_debug.c \ 162eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/res_init.c \ 163eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/res_mkquery.c \ 164eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/res_query.c \ 165eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/__res_send.c \ 166eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/res_send.c \ 167eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes netbsd/resolv/res_state.c \ 168eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes 1691dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 170062092543fdbd6fa2676e4f5b37a15f7bba94332Elliott Hughes# These are used by the 32-bit targets, but not the 64-bit ones. 171a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupinifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm mips x86)) 172a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupinlibc_common_src_files += \ 173062092543fdbd6fa2676e4f5b37a15f7bba94332Elliott Hughes bionic/legacy_32_bit_support.cpp \ 174567a8de3ca5b4c4f033bfbcdd339a3fd59a76227Elliott Hughes bionic/ndk_cruft.cpp \ 175a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin 176a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupinendif 177a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin 17859a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris# Fortify implementations of libc functions. 17959a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferrislibc_common_src_files += \ 18090201d5eca050414d50a433866ccb580415bb0d4Nick Kralevich bionic/__FD_chk.cpp \ 18159a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__fgets_chk.cpp \ 18259a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__memcpy_chk.cpp \ 18359a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__memmove_chk.cpp \ 18459a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__memset_chk.cpp \ 185b036b5ca36c1e12b075909b3eca6eab73ee611cfNick Kralevich bionic/__read_chk.cpp \ 18660f4f9a5b99a0a66817f50edfc2194a49f8b5146Nick Kralevich bionic/__recvfrom_chk.cpp \ 18759a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__strcat_chk.cpp \ 18859a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__strchr_chk.cpp \ 18959a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__strcpy_chk.cpp \ 19059a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__strlcat_chk.cpp \ 19159a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__strlcpy_chk.cpp \ 19259a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__strlen_chk.cpp \ 19359a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__strncat_chk.cpp \ 19459a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__strncpy_chk.cpp \ 19559a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__strrchr_chk.cpp \ 19659a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__umask_chk.cpp \ 19759a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__vsnprintf_chk.cpp \ 19859a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris bionic/__vsprintf_chk.cpp \ 19959a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris 20029c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hugheslibc_bionic_src_files := \ 20161e699a133a4807fe878a6cb0d7190d7c96e21f8Elliott Hughes bionic/abort.cpp \ 202f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes bionic/access.cpp \ 203063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/assert.cpp \ 20411952073af22568bba0b661f7a9d4402c443a888Elliott Hughes bionic/bionic_time_conversions.cpp \ 205428f5567be25b8090e3dd72e2d3d337c305b514eElliott Hughes bionic/brk.cpp \ 206f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes bionic/chmod.cpp \ 207f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes bionic/chown.cpp \ 20836d6188f8cd8b948fb797f11d9620d63d0c2215aElliott Hughes bionic/clone.cpp \ 209c30396f5f225e0b5a83a35432e2d82a7063cfdb9David 'Digit' Turner bionic/dirent.cpp \ 210cac7b9d6ec1a09814bc028e2f768db732f018891Elliott Hughes bionic/dup2.cpp \ 211cac7b9d6ec1a09814bc028e2f768db732f018891Elliott Hughes bionic/epoll_create.cpp \ 21211952073af22568bba0b661f7a9d4402c443a888Elliott Hughes bionic/epoll_wait.cpp \ 21311952073af22568bba0b661f7a9d4402c443a888Elliott Hughes bionic/epoll_pwait.cpp \ 2142a0b873065edb304fa2d1c54f8de663ea638b8abElliott Hughes bionic/__errno.cpp \ 2159b84824dfd597d8137137fa33295faa26cc70ae0Kito Cheng bionic/eventfd_read.cpp \ 2169b84824dfd597d8137137fa33295faa26cc70ae0Kito Cheng bionic/eventfd_write.cpp \ 217bf425680e484486803bf21e4c4cd1e3f36614a3cElliott Hughes bionic/ffs.cpp \ 218232163cf70712fe00436b70dd495f4cf405e9eabElliott Hughes bionic/fork.cpp \ 219d0be7c8f9a06b3ca8ea7647ea35c8f9dc63f0fe1Elliott Hughes bionic/futimens.cpp \ 2202c5153b043b44e9935a334ae9b2d5a4bc5258b40Nick Kralevich bionic/getauxval.cpp \ 221063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/getcwd.cpp \ 222cac7b9d6ec1a09814bc028e2f768db732f018891Elliott Hughes bionic/inotify_init.cpp \ 223f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes bionic/lchown.cpp \ 22442b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes bionic/libc_init_common.cpp \ 2258f2a5a0b40fc82126c691d5c30131d908772aab7Elliott Hughes bionic/libc_logging.cpp \ 22658b575485c446f9d76ee00f67516ed42cf017769Elliott Hughes bionic/libgen.cpp \ 227f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes bionic/link.cpp \ 228f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes bionic/lstat.cpp \ 229f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes bionic/mkdir.cpp \ 230594b1a4af204aa9de2b4913182f4556e38d71648Elliott Hughes bionic/mkfifo.cpp \ 231f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes bionic/mknod.cpp \ 232f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes bionic/open.cpp \ 23311952073af22568bba0b661f7a9d4402c443a888Elliott Hughes bionic/pause.cpp \ 234cac7b9d6ec1a09814bc028e2f768db732f018891Elliott Hughes bionic/pipe.cpp \ 23511952073af22568bba0b661f7a9d4402c443a888Elliott Hughes bionic/poll.cpp \ 236c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes bionic/pthread_atfork.cpp \ 2373e898476c7230b60a0f76968e64ff25f475b48c0Elliott Hughes bionic/pthread_attr.cpp \ 238c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes bionic/pthread_cond.cpp \ 239c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes bionic/pthread_create.cpp \ 2409d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes bionic/pthread_detach.cpp \ 2419d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes bionic/pthread_equal.cpp \ 242c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes bionic/pthread_exit.cpp \ 2439d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes bionic/pthread_getcpuclockid.cpp \ 2449d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes bionic/pthread_getschedparam.cpp \ 2459d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes bionic/pthread_internals.cpp \ 2469d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes bionic/pthread_join.cpp \ 247c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes bionic/pthread_key.cpp \ 2489d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes bionic/pthread_kill.cpp \ 249c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes bionic/pthread_mutex.cpp \ 250c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes bionic/pthread_once.cpp \ 251c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes bionic/pthread_rwlock.cpp \ 2529d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes bionic/pthread_self.cpp \ 2533e898476c7230b60a0f76968e64ff25f475b48c0Elliott Hughes bionic/pthread_setname_np.cpp \ 2549d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes bionic/pthread_setschedparam.cpp \ 255c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes bionic/pthread_sigmask.cpp \ 256c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes bionic/ptrace.cpp \ 257d8a5a6f513c6fa99229e9c82c5c308c7cd6b3d54Chris Dearman bionic/raise.cpp \ 258f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes bionic/readlink.cpp \ 259f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes bionic/rename.cpp \ 260f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes bionic/rmdir.cpp \ 261428f5567be25b8090e3dd72e2d3d337c305b514eElliott Hughes bionic/sbrk.cpp \ 262701bec2af33feaa9dddf12ccf8e4c714441b7f2eElliott Hughes bionic/scandir.cpp \ 2634ca685e36e9d7f53c135eba2b4b8ece152129dbeKito Cheng bionic/sched_getaffinity.cpp \ 264232163cf70712fe00436b70dd495f4cf405e9eabElliott Hughes bionic/setegid.cpp \ 2654a9e837840fda3aaea48aeba85c7c7a8782d2586Elliott Hughes bionic/__set_errno.cpp \ 266232163cf70712fe00436b70dd495f4cf405e9eabElliott Hughes bionic/seteuid.cpp \ 267063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/setlocale.cpp \ 268a4b2dc016fa62bd172a73c3f8971c805700ffb0fRom Lemarchand bionic/signalfd.cpp \ 269c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes bionic/sigaction.cpp \ 270c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes bionic/sigaddset.cpp \ 271c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes bionic/sigdelset.cpp \ 272c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes bionic/sigemptyset.cpp \ 273c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes bionic/sigfillset.cpp \ 274c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes bionic/sigismember.cpp \ 275c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes bionic/signal.cpp \ 27640d105ccb3e6283566ce54b693b3088f31aa4f26Elliott Hughes bionic/sigpending.cpp \ 27719e62325c268a668692e2b65fde2284079f369aaElliott Hughes bionic/sigprocmask.cpp \ 2781f5af926fa626734981d6b4dcc0ab54e520032a9Elliott Hughes bionic/sigsuspend.cpp \ 279c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes bionic/sigwait.cpp \ 280f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes bionic/stat.cpp \ 28106040fd75c1edff9e5ffb2b3d3e2a6e66d57c11dElliott Hughes bionic/statvfs.cpp \ 282063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/strerror.cpp \ 283063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/strerror_r.cpp \ 284063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/strsignal.cpp \ 285063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/stubs.cpp \ 286f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes bionic/symlink.cpp \ 28791a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes bionic/sysconf.cpp \ 288c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes bionic/thread_atexit.cpp \ 289063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/tdestroy.cpp \ 290c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes bionic/timer.cpp \ 291063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/tmpfile.cpp \ 292f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes bionic/unlink.cpp \ 293f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes bionic/utimes.cpp \ 29417a8b0db63d54e9d79bf11112ace0c4fe9606289Elliott Hughes bionic/wait.cpp \ 295063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes bionic/wchar.cpp \ 29629c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes 297a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin# These are shared by all the 32-bit targets, but not the 64-bit ones. 298a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupinifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm mips x86)) 299a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupinlibc_bionic_src_files += \ 300a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/mmap.cpp \ 301a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin 302a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupinendif 303a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin 304ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hugheslibc_tzcode_src_files := \ 305ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes tzcode/asctime.c \ 306ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes tzcode/difftime.c \ 307ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes tzcode/localtime.c \ 308ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes tzcode/strftime.c \ 309ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes tzcode/strptime.c \ 310ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes 311f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hugheslibc_upstream_freebsd_src_files := \ 312ab61eb366ac48addf2bca6093a34455193f5c8dfElliott Hughes upstream-freebsd/lib/libc/gen/sleep.c \ 313ab61eb366ac48addf2bca6093a34455193f5c8dfElliott Hughes upstream-freebsd/lib/libc/gen/usleep.c \ 3146b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/clrerr.c \ 3156b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fclose.c \ 3166b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fdopen.c \ 3176b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/feof.c \ 3186b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/ferror.c \ 3196b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fgetln.c \ 3206b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fgetpos.c \ 3216b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fgets.c \ 3226b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fileno.c \ 3236b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/flags.c \ 3246b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fopen.c \ 3256b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fpurge.c \ 3266b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fputs.c \ 3276b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fsetpos.c \ 3286b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/funopen.c \ 3296b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fwalk.c \ 3306b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/fwrite.c \ 3316b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/getc.c \ 3326b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/getchar.c \ 333677ee5647721df22f13909375d5d0e770a1a80bfElliott Hughes upstream-freebsd/lib/libc/stdio/makebuf.c \ 334284f7880323d33356df682c3cfb6b7f0c665bfd4Elliott Hughes upstream-freebsd/lib/libc/stdio/mktemp.c \ 3356b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/putc.c \ 3366b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/putchar.c \ 3376b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/puts.c \ 3386b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/putw.c \ 3396b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/remove.c \ 3406b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/rget.c \ 3416b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/setbuf.c \ 3426b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/setbuffer.c \ 343677ee5647721df22f13909375d5d0e770a1a80bfElliott Hughes upstream-freebsd/lib/libc/stdio/setvbuf.c \ 3446b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/tempnam.c \ 3456b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/tmpnam.c \ 3466b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes upstream-freebsd/lib/libc/stdio/wsetup.c \ 347aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes upstream-freebsd/lib/libc/stdlib/abs.c \ 348d278b828fef47fb2d7098f8ec70867fbd3da09d6Elliott Hughes upstream-freebsd/lib/libc/stdlib/getopt_long.c \ 349aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes upstream-freebsd/lib/libc/stdlib/imaxabs.c \ 350aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes upstream-freebsd/lib/libc/stdlib/imaxdiv.c \ 351aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes upstream-freebsd/lib/libc/stdlib/labs.c \ 352aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes upstream-freebsd/lib/libc/stdlib/llabs.c \ 3530b25f633a23e575c8a1f9547d1af5dc5b0157a1cElliott Hughes upstream-freebsd/lib/libc/stdlib/qsort.c \ 354f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes upstream-freebsd/lib/libc/stdlib/realpath.c \ 355eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcpcpy.c \ 356eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcpncpy.c \ 357eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcscasecmp.c \ 358eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcscspn.c \ 359eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcsdup.c \ 360eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcslcat.c \ 361eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcslcpy.c \ 362eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcsncasecmp.c \ 363eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcsncat.c \ 364eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcsncmp.c \ 365eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcsncpy.c \ 366eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcsnlen.c \ 367eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcspbrk.c \ 368eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcsspn.c \ 369eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcsstr.c \ 370eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wcstok.c \ 371eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wmemchr.c \ 372eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wmemcpy.c \ 373eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wmemmove.c \ 374eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes upstream-freebsd/lib/libc/string/wmemset.c \ 375f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes 376f8b3a920a895a53b207017249080087d562bd0d2Elliott Hugheslibc_upstream_netbsd_src_files := \ 377e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \ 378e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/common/lib/libc/inet/inet_addr.c \ 379e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/compat-43/creat.c \ 380e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/gen/ftw.c \ 381e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/gen/nftw.c \ 382e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/gen/nice.c \ 3836b3f49a5374305ce9690c3c5ca2aadc90f54c521Elliott Hughes upstream-netbsd/libc/gen/popen.c \ 384e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/gen/psignal.c \ 385ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/gen/setjmperr.c \ 386e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/gen/utime.c \ 387e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/inet/inet_ntoa.c \ 388e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/inet/inet_ntop.c \ 389e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/inet/inet_pton.c \ 390ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/isc/ev_streams.c \ 391ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/isc/ev_timers.c \ 392e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/regex/regcomp.c \ 393e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/regex/regerror.c \ 394e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/regex/regexec.c \ 395e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/regex/regfree.c \ 396e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdio/getdelim.c \ 397e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdio/getline.c \ 398ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/stdlib/bsearch.c \ 399ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/stdlib/div.c \ 400e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/drand48.c \ 401e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/erand48.c \ 402652289942d0d2543af90c8af9c04d80a2edb481aPawit Pornkitprasan upstream-netbsd/libc/stdlib/exit.c \ 403e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/jrand48.c \ 404ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/stdlib/ldiv.c \ 405ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/stdlib/lldiv.c \ 406e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/lrand48.c \ 407e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/mrand48.c \ 408e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/nrand48.c \ 409e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/_rand48.c \ 410e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/seed48.c \ 411e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/srand48.c \ 412e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/tdelete.c \ 413e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/tfind.c \ 414e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/stdlib/tsearch.c \ 415c51cd764a2d0897234762abd4dbd21420cb9f17dElliott Hughes upstream-netbsd/libc/string/memccpy.c \ 416e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/string/strcasestr.c \ 4172b473070126345e323d0694b87f88264cc9a77ccElliott Hughes upstream-netbsd/libc/string/strcoll.c \ 418e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes upstream-netbsd/libc/string/strxfrm.c \ 419652289942d0d2543af90c8af9c04d80a2edb481aPawit Pornkitprasan upstream-netbsd/libc/thread-stub/__isthreaded.c \ 420ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes upstream-netbsd/libc/unistd/killpg.c \ 421f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes 4222f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes# Architecture specific source files go here 4232f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes# ========================================================= 4242f287bc72827525ad42ee43d532d267a388104c3Elliott Hughesifeq ($(TARGET_ARCH),arm) 4252f287bc72827525ad42ee43d532d267a388104c3Elliott Hugheslibc_common_src_files += \ 4262f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes bionic/memchr.c \ 4272f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes bionic/memmove.c.arm \ 4282f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes bionic/memrchr.c \ 4292f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes bionic/strchr.cpp \ 4302f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes bionic/strnlen.c \ 4312f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes string/bcopy.c \ 4322f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes string/index.c \ 4332f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes string/strlcat.c \ 4342f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes string/strlcpy.c \ 4352f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes string/strncat.c \ 4362f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes string/strncmp.c \ 4372f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes string/strncpy.c \ 4382f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes string/strrchr.c \ 4392f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes upstream-freebsd/lib/libc/string/wcscat.c \ 4402f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes upstream-freebsd/lib/libc/string/wcschr.c \ 4412f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes upstream-freebsd/lib/libc/string/wcscmp.c \ 4422f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes upstream-freebsd/lib/libc/string/wcscpy.c \ 4432f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes upstream-freebsd/lib/libc/string/wcslen.c \ 4442f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes upstream-freebsd/lib/libc/string/wcsrchr.c \ 4452f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes upstream-freebsd/lib/libc/string/wmemcmp.c \ 4462f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes 4472f287bc72827525ad42ee43d532d267a388104c3Elliott Hughesendif # arm 4482f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes 4492f287bc72827525ad42ee43d532d267a388104c3Elliott Hughesifeq ($(TARGET_ARCH),mips) 4502f287bc72827525ad42ee43d532d267a388104c3Elliott Hugheslibc_common_src_files += \ 4512f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes bionic/memchr.c \ 4522f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes bionic/memcmp.c \ 4532f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes bionic/memrchr.c \ 4542f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes bionic/strchr.cpp \ 4552f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes bionic/strnlen.c \ 4562f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes string/bcopy.c \ 4572f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes string/index.c \ 4582f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes string/strcat.c \ 4592f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes string/strcmp.c \ 4602f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes string/strcpy.c \ 4612f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes string/strlcat.c \ 4622f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes string/strlcpy.c \ 4632f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes string/strncat.c \ 4642f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes string/strncmp.c \ 4652f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes string/strncpy.c \ 4662f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes string/strrchr.c \ 4672f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes upstream-freebsd/lib/libc/string/wcscat.c \ 4682f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes upstream-freebsd/lib/libc/string/wcschr.c \ 4692f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes upstream-freebsd/lib/libc/string/wcscmp.c \ 4702f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes upstream-freebsd/lib/libc/string/wcscpy.c \ 4712f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes upstream-freebsd/lib/libc/string/wcslen.c \ 4722f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes upstream-freebsd/lib/libc/string/wcsrchr.c \ 4732f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes upstream-freebsd/lib/libc/string/wmemcmp.c \ 4742f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes 4752f287bc72827525ad42ee43d532d267a388104c3Elliott Hughesendif # mips 47610093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI 477a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupinifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86_64)) 478a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupinlibc_common_src_files += \ 479a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/memchr.c \ 480a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/memcmp.c \ 481a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/memcpy.c \ 482a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/memmove.c \ 483a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/memrchr.c \ 484a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/memset.c \ 485a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/strchr.cpp \ 486a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin bionic/strnlen.c \ 487a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/bcopy.c \ 488a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/index.c \ 489a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strcat.c \ 490a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strcmp.c \ 491a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strcpy.c \ 492a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strlcat.c \ 493a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strlcpy.c \ 494a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strlen.c \ 495a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strncat.c \ 496a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strncmp.c \ 497a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strncpy.c \ 498a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin string/strrchr.c \ 499a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin upstream-freebsd/lib/libc/string/wcscat.c \ 500a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin upstream-freebsd/lib/libc/string/wcschr.c \ 501a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin upstream-freebsd/lib/libc/string/wcscmp.c \ 502a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin upstream-freebsd/lib/libc/string/wcscpy.c \ 503a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin upstream-freebsd/lib/libc/string/wcslen.c \ 504a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin upstream-freebsd/lib/libc/string/wcsrchr.c \ 505a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin upstream-freebsd/lib/libc/string/wmemcmp.c \ 506a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin 507a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupinendif # x86_64 508a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupin 509e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescuifeq ($(TARGET_ARCH), aarch64) 510e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu#TODO: Replace C stubs with optimised assembly 511e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinesculibc_common_src_files += \ 512e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu bionic/memchr.c \ 513e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu bionic/memcmp.c \ 514e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu bionic/memcpy.c \ 515e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu bionic/memmove.c \ 516e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu bionic/memrchr.c \ 517e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu bionic/memset.c \ 518e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu bionic/strchr.cpp \ 519e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu bionic/strnlen.c \ 520e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu string/bcopy.c \ 521e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu string/index.c \ 522e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu string/memcmp16.c \ 523e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu string/strcat.c \ 524e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu string/strcmp.c \ 525e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu string/strcpy.c \ 526e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu string/strlcat.c \ 527e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu string/strlcpy.c \ 528e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu string/strlen.c \ 529e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu string/strncat.c \ 530e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu string/strncmp.c \ 531e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu string/strncpy.c \ 532e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu string/strrchr.c \ 533e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu upstream-freebsd/lib/libc/string/wcscat.c \ 534e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu upstream-freebsd/lib/libc/string/wcschr.c \ 535e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu upstream-freebsd/lib/libc/string/wcscmp.c \ 536e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu upstream-freebsd/lib/libc/string/wcscpy.c \ 537e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu upstream-freebsd/lib/libc/string/wcslen.c \ 538e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu upstream-freebsd/lib/libc/string/wcsrchr.c \ 539e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu upstream-freebsd/lib/libc/string/wmemcmp.c \ 540e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu 541e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescuendif # aarch64 542e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu 5432f287bc72827525ad42ee43d532d267a388104c3Elliott Hughesifeq ($(TARGET_ARCH),arm) 5442f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes ifeq ($(strip $(TARGET_CPU_VARIANT)),) 5452f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes $(warning TARGET_ARCH is arm, but TARGET_CPU_VARIANT is not defined) 5462f287bc72827525ad42ee43d532d267a388104c3Elliott Hughes endif 5477c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrisendif 5487c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris 5497c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris########################################################### 5507c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## Add cpu specific source files. 5517c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## 5527c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## This can be called multiple times, but it will only add 5537c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## the first source file for each unique $(1). 5547c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## $(1): Unique identifier to identify the cpu variant 5557c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## implementation. 5567c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## $(2): Cpu specific source file. 5577c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris########################################################### 5587c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris 5597c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrisdefine libc-add-cpu-variant-src 5607c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris$(if $(filter true,$(_LIBC_ARCH_CPU_VARIANT_HAS_$(1))), \ 5617c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris , \ 5627c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris $(eval _LIBC_ARCH_CPU_VARIANT_HAS_$(1) := true) \ 5637c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris $(eval _LIBC_ARCH_CPU_VARIANT_SRC_FILE.$(1) := $(2)) \ 5647c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris $(eval _LIBC_ARCH_CPU_VARIANT_SRC_FILES += $(2)) \ 5657c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris) 5667c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrisendef 5677c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris 5687c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris_LIBC_ARCH_COMMON_SRC_FILES := 5697c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris_LIBC_ARCH_CPU_VARIANT_SRC_FILES := 5707c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris_LIBC_ARCH_STATIC_SRC_FILES := 5717c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris_LIBC_ARCH_DYNAMIC_SRC_FILES := 572d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferris_LIBC_ARCH_ADDITIONAL_DEPENDENCIES := 573d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferris 574d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferrislibc_common_additional_dependencies += \ 575d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferris $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk 576d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferrisinclude $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk 5777c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris 578eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hugheslibc_bionic_src_files += $(_LIBC_ARCH_COMMON_SRC_FILES) 579eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hugheslibc_bionic_src_files += $(_LIBC_ARCH_CPU_VARIANT_SRC_FILES) 5807c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrislibc_arch_static_src_files := $(_LIBC_ARCH_STATIC_SRC_FILES) 5817c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrislibc_arch_dynamic_src_files := $(_LIBC_ARCH_DYNAMIC_SRC_FILES) 582d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferrislibc_common_additional_dependencies += $(_LIBC_ARCH_ADDITIONAL_DEPENDENCIES) 5837c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris 584ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define some common cflags 585ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ======================================================== 5861dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_cflags := \ 587470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes -DANDROID_CHANGES \ 588470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes -D_LIBC=1 \ 5892ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes -Wall -Wextra \ 5902ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes 5912ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes# Try to catch typical 32-bit assumptions that break with 64-bit pointers. 5922ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hugheslibc_common_cflags += \ 5932ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes -Werror=pointer-to-int-cast \ 5942ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes -Werror=int-to-pointer-cast \ 5952ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes -Werror=type-limits \ 5961dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 597d2c9dcc9265e66f6432ec39dcc7378b944449e60Dave Bortifeq ($(strip $(DEBUG_BIONIC_LIBC)),true) 5981dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project libc_common_cflags += -DDEBUG 5991dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectendif 6001dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 6012fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren# To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in 6022fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren# the appropriate BoardConfig.mk file. 6032fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren# 6042fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Renifneq ($(BOARD_MALLOC_ALIGNMENT),) 6052fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren libc_common_cflags += -DMALLOC_ALIGNMENT=$(BOARD_MALLOC_ALIGNMENT) 6062fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Renendif 6072fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren 6081dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectifeq ($(TARGET_ARCH),arm) 609a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_common_cflags += -DSOFTFLOAT 6101dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project libc_common_cflags += -fstrict-aliasing 611ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin libc_crt_target_cflags := -mthumb-interwork 6127e841ed688947855a3bd20d2b23a44599257038aElliott Hughesendif # arm 613a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham 614a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),mips) 615a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham ifneq ($(ARCH_MIPS_HAS_FPU),true) 616a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_common_cflags += -DSOFTFLOAT 617a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham endif 618a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_common_cflags += -fstrict-aliasing 619a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_crt_target_cflags := $(TARGET_GLOBAL_CFLAGS) 620a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif # mips 621a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham 6227e841ed688947855a3bd20d2b23a44599257038aElliott Hughesifeq ($(TARGET_ARCH),x86) 6237e841ed688947855a3bd20d2b23a44599257038aElliott Hughes libc_crt_target_cflags := -m32 6247e841ed688947855a3bd20d2b23a44599257038aElliott Hughes libc_crt_target_ldflags := -melf_i386 6257e841ed688947855a3bd20d2b23a44599257038aElliott Hughesendif # x86 6267e841ed688947855a3bd20d2b23a44599257038aElliott Hughes 6277e841ed688947855a3bd20d2b23a44599257038aElliott Hughesifeq ($(TARGET_ARCH),x86_64) 6287e841ed688947855a3bd20d2b23a44599257038aElliott Hughes libc_crt_target_cflags := -m64 6297e841ed688947855a3bd20d2b23a44599257038aElliott Hughes libc_crt_target_ldflags := -melf_x86_64 6307e841ed688947855a3bd20d2b23a44599257038aElliott Hughesendif # x86_64 6317e841ed688947855a3bd20d2b23a44599257038aElliott Hughes 632fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden# Define ANDROID_SMP appropriately. 633fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenifeq ($(TARGET_CPU_SMP),true) 634fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden libc_common_cflags += -DANDROID_SMP=1 635fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenelse 636fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden libc_common_cflags += -DANDROID_SMP=0 637fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenendif 638fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden 63976be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hughes# crtbrand.c needs <stdint.h> and a #define for the platform SDK version. 64076be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hugheslibc_crt_target_cflags += \ 64176be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hughes -I$(LOCAL_PATH)/include \ 642eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes -I$(LOCAL_PATH)/arch-$(TARGET_ARCH)/include \ 643eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) \ 644fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden 645762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines# Define some common conlyflags 646762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hineslibc_common_conlyflags := \ 647762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines -std=gnu99 648762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines 649762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines# Define some common cppflags 650762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hineslibc_common_cppflags := \ 651762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines -std=gnu++11 652762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines 653ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define some common includes 654ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ======================================================== 6551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_c_includes := \ 6561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project $(LOCAL_PATH)/stdlib \ 6571dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project $(LOCAL_PATH)/string \ 65876656afc6dd069fcfda5768e6e54bb85e4e99942Nick Kralevich $(LOCAL_PATH)/stdio \ 65976656afc6dd069fcfda5768e6e54bb85e4e99942Nick Kralevich external/safe-iop/include 6601dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 661ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define the libc run-time (crt) support object files that must be built, 662ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# which are needed to build all other objects (shared/static libs and 663ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# executables) 664ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================================== 665e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu# AArch64, ARM, MIPS, and x86 all need crtbegin_so/crtend_so. 6666a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# 6676a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# For x86, the .init section must point to a function that calls all 6686a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# entries in the .ctors section. (on ARM this is done through the 6696a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# .init_array section instead). 6706a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# 671a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham# For all the platforms, the .fini_array section must point to a function 6726a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# that will call __cxa_finalize(&__dso_handle) in order to ensure that 6736a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# static C++ destructors are properly called on dlclose(). 6746a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# 675b49c17c2bf1232e29bc390e58d6fa43688929aa5Pavel Chupinlibc_crt_target_crtbegin_file := $(LOCAL_PATH)/arch-common/bionic/crtbegin.c 676b49c17c2bf1232e29bc390e58d6fa43688929aa5Pavel Chupinlibc_crt_target_crtbegin_so_file := $(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c 677b49c17c2bf1232e29bc390e58d6fa43688929aa5Pavel Chupin 678e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescuifeq ($(TARGET_ARCH),aarch64) 679e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu libc_crt_target_so_cflags := 680e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu libc_crt_target_crtbegin_file := $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin.c 681e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescuendif 682a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),arm) 683a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_crt_target_so_cflags := 684a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif 685a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),mips) 686a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_crt_target_so_cflags := -fPIC 687b49c17c2bf1232e29bc390e58d6fa43688929aa5Pavel Chupinlibc_crt_target_crtbegin_file := $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin.c 688a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif 689a567a8e4bd9036bcb74a0a028235a48d8b2a115ePavel Chupinifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64)) 690a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham libc_crt_target_so_cflags := -fPIC 691a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif 692a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamlibc_crt_target_so_cflags += $(libc_crt_target_cflags) 693ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope 694ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope# See the comment in crtbrand.c for the reason why we need to generate 695ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope# crtbrand.s before generating crtbrand.o. 696ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.s 697ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope$(GEN): $(LOCAL_PATH)/bionic/crtbrand.c 698ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope @mkdir -p $(dir $@) 699cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) -S \ 700cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang -MD -MF $(@:%.s=%.d) -o $@ $< 701cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) sed -i -e '/\.note\.ABI-tag/s/progbits/note/' $@ 702cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(call transform-d-to-p-args,$(@:%.s=%.d),$(@:%.s=%.P)) 703cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.s=%.P) 704ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeALL_GENERATED_SOURCES += $(GEN) 705ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope 706ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o 707ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.s 708ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope @mkdir -p $(dir $@) 709cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) -o $@ -c $< 710ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeALL_GENERATED_SOURCES += $(GEN) 711ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope 712fc9e525fe07846c1efa23235a59575f8dad69c53Ying WangGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_so.o 71312949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughes$(GEN): $(libc_crt_target_crtbegin_so_file) 7141dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project @mkdir -p $(dir $@) 715cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) \ 716cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang -MD -MF $(@:%.o=%.d) -o $@ -c $< 717cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(transform-d-to-p) 718cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P) 7191dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectALL_GENERATED_SOURCES += $(GEN) 7201dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 721fc9e525fe07846c1efa23235a59575f8dad69c53Ying WangGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_so.o 722b49c17c2bf1232e29bc390e58d6fa43688929aa5Pavel Chupin$(GEN): $(LOCAL_PATH)/arch-common/bionic/crtend_so.S 723ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin @mkdir -p $(dir $@) 724cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) \ 725cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang -MD -MF $(@:%.o=%.d) -o $@ -c $< 726cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(transform-d-to-p) 727cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P) 728ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinALL_GENERATED_SOURCES += $(GEN) 729fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei Liao 730cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang# The following two are installed to device 731fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei LiaoGEN := $(TARGET_OUT_SHARED_LIBRARIES)/crtbegin_so.o 732cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_so.o 733cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) mkdir -p $(dir $@) && cp -f $< $@ 734fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei LiaoALL_GENERATED_SOURCES += $(GEN) 735fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei Liao 736fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei LiaoGEN := $(TARGET_OUT_SHARED_LIBRARIES)/crtend_so.o 737cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_so.o 738cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) mkdir -p $(dir $@) && cp -f $< $@ 739fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei LiaoALL_GENERATED_SOURCES += $(GEN) 7401dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 7411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 742ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static1.o 74312949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughes$(GEN): $(libc_crt_target_crtbegin_file) 744ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin @mkdir -p $(dir $@) 745cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_CC) $(libc_crt_target_cflags) \ 746cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang -MD -MF $(@:%.o=%.d) -o $@ -c $< 747cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(transform-d-to-p) 748cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P) 749ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinALL_GENERATED_SOURCES += $(GEN) 7501dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 751ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static.o 752ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static1.o $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o 753ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope @mkdir -p $(dir $@) 754e85c1834248916d7d13891e602461d9be91dda28Pavel Chupin $(hide) $(TARGET_LD) $(libc_crt_target_ldflags) -r -o $@ $^ 755ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeALL_GENERATED_SOURCES += $(GEN) 756ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope 757ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic1.o 75812949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughes$(GEN): $(libc_crt_target_crtbegin_file) 7591dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project @mkdir -p $(dir $@) 760cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_CC) $(libc_crt_target_cflags) \ 761cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang -MD -MF $(@:%.o=%.d) -o $@ -c $< 762cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(transform-d-to-p) 763cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P) 7641dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectALL_GENERATED_SOURCES += $(GEN) 7651dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 766ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic.o 767ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic1.o $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o 768ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope @mkdir -p $(dir $@) 769e85c1834248916d7d13891e602461d9be91dda28Pavel Chupin $(hide) $(TARGET_LD) $(libc_crt_target_ldflags) -r -o $@ $^ 770ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeALL_GENERATED_SOURCES += $(GEN) 771ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin 772ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# We rename crtend.o to crtend_android.o to avoid a 773ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# name clash between gcc and bionic. 774fc9e525fe07846c1efa23235a59575f8dad69c53Ying WangGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_android.o 775b49c17c2bf1232e29bc390e58d6fa43688929aa5Pavel Chupin$(GEN): $(LOCAL_PATH)/arch-common/bionic/crtend.S 7761dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project @mkdir -p $(dir $@) 777cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(hide) $(TARGET_CC) $(libc_crt_target_cflags) \ 778cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang -MD -MF $(@:%.o=%.d) -o $@ -c $< 779cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang $(transform-d-to-p) 780cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P) 7811dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectALL_GENERATED_SOURCES += $(GEN) 7821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 7831dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 784ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# To enable malloc leak check for statically linked programs, add 785ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# "WITH_MALLOC_CHECK_LIBC_A := true" to buildspec.mk 786ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinWITH_MALLOC_CHECK_LIBC_A := $(strip $(WITH_MALLOC_CHECK_LIBC_A)) 7871dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 788ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ======================================================== 7896334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# libbionic_ssp.a - stack protector code 7906334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# ======================================================== 7916334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# 7926334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# The stack protector code needs to be compiled 7936334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# with -fno-stack-protector, since it modifies the 7946334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# stack canary. 7956334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich 7966334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevichinclude $(CLEAR_VARS) 7976334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich 798642331b5dd5647e7d196ac4f44406fd435478a56Elliott HughesLOCAL_SRC_FILES := bionic/__stack_chk_fail.cpp 799dc5ec07158079b39f758ed41eca5b937e52c3729Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector -Werror 800762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 801762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 8026334c662cae4cd9b61f5f3185048b0cd3633dad7Nick KralevichLOCAL_C_INCLUDES := $(libc_common_c_includes) 8036334c662cae4cd9b61f5f3185048b0cd3633dad7Nick KralevichLOCAL_MODULE := libbionic_ssp 804d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 8056334c662cae4cd9b61f5f3185048b0cd3633dad7Nick KralevichLOCAL_SYSTEM_SHARED_LIBRARIES := 8066334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich 8076334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevichinclude $(BUILD_STATIC_LIBRARY) 8086334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich 8096334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich 8106334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# ======================================================== 811ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes# libc_tzcode.a - upstream 'tzcode' code 812ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes# ======================================================== 813ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes 814ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughesinclude $(CLEAR_VARS) 815ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes 816ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_SRC_FILES := $(libc_tzcode_src_files) 817ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_CFLAGS := \ 818ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes $(libc_common_cflags) \ 819ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes -DSTD_INSPIRED=1 \ 820ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes -DTZDIR=\"/system/usr/share/zoneinfo\" \ 821ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes -DTM_GMTOFF=tm_gmtoff \ 822ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes -DUSG_COMPAT=1 823762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 824762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 825ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes) 826ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_MODULE := libc_tzcode 827d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 828ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES := 829ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes 830ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughesinclude $(BUILD_STATIC_LIBRARY) 831ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes 832ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes 833ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes# ======================================================== 834eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes# libc_dns.a - modified NetBSD DNS code 835eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes# ======================================================== 836eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes 837eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughesinclude $(CLEAR_VARS) 838eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes 839eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_SRC_FILES := $(libc_dns_src_files) 840eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_CFLAGS := \ 841eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes $(libc_common_cflags) \ 842eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes -DINET6 \ 843eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes -I$(LOCAL_PATH)/private \ 844eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes -I$(LOCAL_PATH)/upstream-netbsd/libc/include # for NetBSD private headers 845eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes 846eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 847eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_CPPFLAGS := $(libc_common_cppflags) 848eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes) 849eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_MODULE := libc_dns 850eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 851eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES := 852eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes 853eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughesinclude $(BUILD_STATIC_LIBRARY) 854eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes 855eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes 856eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes# ======================================================== 857f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# libc_freebsd.a - upstream FreeBSD C library code 858f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# ======================================================== 859f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# 860f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# These files are built with the freebsd-compat.h header file 861f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# automatically included. 862f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes 863f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughesinclude $(CLEAR_VARS) 864f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes 865f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_SRC_FILES := $(libc_upstream_freebsd_src_files) 866f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_CFLAGS := \ 867f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes $(libc_common_cflags) \ 868f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes -I$(LOCAL_PATH)/upstream-freebsd \ 869f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes -I$(LOCAL_PATH)/upstream-freebsd/libc/include \ 870f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes -include upstream-freebsd/freebsd-compat.h 871762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 872762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 873f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes) 874f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_MODULE := libc_freebsd 875d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 876f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES := 877f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes 878f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughesinclude $(BUILD_STATIC_LIBRARY) 879f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes 880f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes 881f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# ======================================================== 882f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# libc_netbsd.a - upstream NetBSD C library code 883f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# ======================================================== 884f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# 885f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# These files are built with the netbsd-compat.h header file 886f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# automatically included. 887f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes 888f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughesinclude $(CLEAR_VARS) 889f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes 890f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_SRC_FILES := $(libc_upstream_netbsd_src_files) 891f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_CFLAGS := \ 892f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes $(libc_common_cflags) \ 893eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes -DPOSIX_MISTAKE \ 8943d2d448af1b16923f5a329b49bb8e658dbad8a06Elliott Hughes -I$(LOCAL_PATH)/upstream-netbsd \ 895ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes -I$(LOCAL_PATH)/upstream-netbsd/libc/include \ 896f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes -include upstream-netbsd/netbsd-compat.h 897762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 898762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 899f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes) 900f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_MODULE := libc_netbsd 901d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 902f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES := 903f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes 904f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughesinclude $(BUILD_STATIC_LIBRARY) 905f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes 906f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes 907f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# ======================================================== 90829c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# libc_bionic.a - home-grown C library code 90929c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# ======================================================== 91029c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# 91129c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughesinclude $(CLEAR_VARS) 91229c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes 91329c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_SRC_FILES := $(libc_bionic_src_files) 91429c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) -Werror 915762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 916762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 91729c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes) 91829c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_MODULE := libc_bionic 919d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 92029c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES := 92129c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes 92266759d6041b33706c3a92dde48492ba4f2bbab2fElliott Hughes# Set -DPTHREAD_DEBUG_ENABLED=true to enable support for pthread deadlock prediction. 92366759d6041b33706c3a92dde48492ba4f2bbab2fElliott Hughes# Since this code is experimental it is disabled by default. 92466759d6041b33706c3a92dde48492ba4f2bbab2fElliott HughesLOCAL_CFLAGS += $(libc_common_cflags) -DPTHREAD_DEBUG_ENABLED=false 92566759d6041b33706c3a92dde48492ba4f2bbab2fElliott Hughes 92629c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughesinclude $(BUILD_STATIC_LIBRARY) 92729c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes 92829c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes 92929c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# ======================================================== 930ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# libc_common.a 931ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ======================================================== 932f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes 933ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavininclude $(CLEAR_VARS) 9341dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 935ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_SRC_FILES := $(libc_common_src_files) 936eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) 937762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 938762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 939ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_C_INCLUDES := $(libc_common_c_includes) 9401dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_MODULE := libc_common 941d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 942ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_WHOLE_STATIC_LIBRARIES := \ 943ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes libbionic_ssp \ 944ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes libc_bionic \ 945eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes libc_dns \ 946ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes libc_freebsd \ 947ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes libc_netbsd \ 948eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes libc_tzcode \ 949eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes 9501dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES := 9511dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 952c97c5fc7880267fd835d22946a920bf370461cf2Ying Wang# TODO: split out the asflags. 953c97c5fc7880267fd835d22946a920bf370461cf2Ying WangLOCAL_ASFLAGS := $(LOCAL_CFLAGS) 954c97c5fc7880267fd835d22946a920bf370461cf2Ying Wang 9551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_STATIC_LIBRARY) 9561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 9571dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 958ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ======================================================== 95949e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# libc_nomalloc.a 96049e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# ======================================================== 96149e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# 96249e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# This is a version of the static C library that does not 96391a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# include malloc. It's useful in situations when the user wants 96491a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# to provide their own malloc implementation, or wants to 96591a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# explicitly disallow the use of the use of malloc, 96691a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# such as in the dynamic loader. 96749e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin 96849e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavininclude $(CLEAR_VARS) 96949e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin 97049e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_SRC_FILES := \ 97149e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin $(libc_arch_static_src_files) \ 9726a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner $(libc_static_common_src_files) \ 97342b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes bionic/libc_init_static.cpp 97449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin 97549e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_C_INCLUDES := $(libc_common_c_includes) 9766a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' TurnerLOCAL_CFLAGS := $(libc_common_cflags) \ 977762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines -DLIBC_STATIC 978762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 979762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 98049e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin 98149e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_MODULE := libc_nomalloc 982d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 98349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_WHOLE_STATIC_LIBRARIES := libc_common 98449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_SYSTEM_SHARED_LIBRARIES := 98549e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin 98649e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavininclude $(BUILD_STATIC_LIBRARY) 98749e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin 98849e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin 98949e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# ======================================================== 9901dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# libc.a 9911dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ======================================================== 9921dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS) 9931dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 9941dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \ 995ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin $(libc_arch_static_src_files) \ 9966a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner $(libc_static_common_src_files) \ 9971dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/dlmalloc.c \ 998c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes bionic/malloc_debug_common.cpp \ 99942b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes bionic/libc_init_static.cpp 10001dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 1001b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_CFLAGS := $(libc_common_cflags) \ 1002762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines -DLIBC_STATIC 1003762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 1004762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 10051dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes) 1006ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_MODULE := libc 1007d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 10081dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common 10091dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES := 10101dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 10111dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_STATIC_LIBRARY) 10121dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 10131dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 1014ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ======================================================== 10151dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# libc.so 10161dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ======================================================== 10171dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS) 10181dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 101966759d6041b33706c3a92dde48492ba4f2bbab2fElliott HughesLOCAL_CFLAGS := $(libc_common_cflags) 1020762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 1021762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 10221dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes) 10231dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 10241dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \ 1025ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin $(libc_arch_dynamic_src_files) \ 10266a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner $(libc_static_common_src_files) \ 10271dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project bionic/dlmalloc.c \ 1028c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes bionic/malloc_debug_common.cpp \ 10291e980b6bc8315d00a07312b25486531247abd98cElliott Hughes bionic/pthread_debug.cpp \ 103042b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes bionic/libc_init_dynamic.cpp 10311dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 1032f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvelifeq ($(TARGET_ARCH),arm) 1033f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel LOCAL_NO_CRT := true 1034f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel LOCAL_CFLAGS += -DCRT_LEGACY_WORKAROUND 1035f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel 1036f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel LOCAL_SRC_FILES := \ 1037b49c17c2bf1232e29bc390e58d6fa43688929aa5Pavel Chupin arch-common/bionic/crtbegin_so.c \ 1038f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel arch-arm/bionic/atexit_legacy.c \ 1039f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel $(LOCAL_SRC_FILES) \ 1040b49c17c2bf1232e29bc390e58d6fa43688929aa5Pavel Chupin arch-common/bionic/crtend_so.S 1041f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvelendif 1042f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel 10431dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_MODULE:= libc 1044d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 1045914d8d4cff10f023ccd382fb43b2c7833dd34f72Elliott HughesLOCAL_REQUIRED_MODULES := tzdata 10461dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 10471dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# WARNING: The only library libc.so should depend on is libdl.so! If you add other libraries, 10481dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries. This 10491dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ensures that symbols that are pulled into those new libraries from libgcc.a are not declared 10501dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# external; if that were the case, then libc would not pull those symbols from libgcc.a as it 10511dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# should, instead relying on the external symbols from the dependent libraries. That would 10521dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# create an "cloaked" dependency on libgcc.a in libc though the libraries, which is not what 10531dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# you wanted! 10541dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 10551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SHARED_LIBRARIES := libdl 10561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common 10571dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES := 10581dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 10591dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_SHARED_LIBRARY) 10601dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 10611dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 1062b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# For all builds, except for the -user build we will enable memory 1063b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# allocation checking (including memory leaks, buffer overwrites, etc.) 1064b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# Note that all these checks are also controlled by env. settings 1065b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# that can enable, or disable specific checks. Note also that some of 1066b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# the checks are available only in emulator and are implemeted in 1067b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_qemu_instrumented.so. 1068b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineifneq ($(TARGET_BUILD_VARIANT),user) 1069b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 1070ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ======================================================== 1071b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_debug_leak.so 10721dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ======================================================== 10731dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS) 10741dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 1075ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_CFLAGS := \ 1076ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin $(libc_common_cflags) \ 1077ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin -DMALLOC_LEAK_CHECK 1078762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 1079762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 10801dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 10811dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes) 10821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 10831dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \ 10841e980b6bc8315d00a07312b25486531247abd98cElliott Hughes bionic/debug_mapinfo.cpp \ 10851e980b6bc8315d00a07312b25486531247abd98cElliott Hughes bionic/debug_stacktrace.cpp \ 1086c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes bionic/malloc_debug_leak.cpp \ 1087c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes bionic/malloc_debug_check.cpp \ 10881dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 1089b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE:= libc_malloc_debug_leak 1090d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 10911dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 1092e007775f4b21f6b94078ed1d34b753435ba28fdaPavel ChupinLOCAL_SHARED_LIBRARIES := libc libdl 1093b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_WHOLE_STATIC_LIBRARIES := libc_common 1094b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_SYSTEM_SHARED_LIBRARIES := 1095aa46fa24035f3ab020f9a7abd86c25ae2196bb32Bruce BeareLOCAL_ALLOW_UNDEFINED_SYMBOLS := true 1096368070454b1349d1fcf29a5d1eb51c869fb538f6Iliyan Malchev 1097b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# Don't install on release build 1098b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE_TAGS := eng debug 10991dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 1100b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineinclude $(BUILD_SHARED_LIBRARY) 1101b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 1102b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 1103b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# ======================================================== 1104b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_debug_qemu.so 1105b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# ======================================================== 1106e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescu#TODO: We do not build this library for now 1107e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescuifneq ($(TARGET_ARCH),aarch64) 1108b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineinclude $(CLEAR_VARS) 1109b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 1110b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_CFLAGS := \ 1111b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine $(libc_common_cflags) \ 1112b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine -DMALLOC_QEMU_INSTRUMENT 1113762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags) 1114762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags) 1115b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 1116b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_C_INCLUDES := $(libc_common_c_includes) 1117b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 1118b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_SRC_FILES := \ 1119c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes bionic/malloc_debug_qemu.cpp 1120b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 1121b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE:= libc_malloc_debug_qemu 1122d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) 1123b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 11247c0c3793722aea293c45921ef50e4adcdf9645ceMathias AgopianLOCAL_SHARED_LIBRARIES := libc libdl 11251dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common 11261dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES := 1127368070454b1349d1fcf29a5d1eb51c869fb538f6Iliyan Malchev 11281dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# Don't install on release build 1129b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE_TAGS := eng debug 11301dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 11311dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_SHARED_LIBRARY) 11321dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project 1133e210488e0d4082b9a0c55195c22191f29ed56bf8Serban Constantinescuendif #!aarch64 1134b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineendif #!user 1135b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 1136b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine 11371dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ======================================================== 11381dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(call all-makefiles-under,$(LOCAL_PATH)) 1139