Android.mk revision 6771b9cef635f0da98932a1f0f877a07257ca088
11dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_PATH:= $(call my-dir)
21dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
31dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(LOCAL_PATH)/arch-$(TARGET_ARCH)/syscalls.mk
4ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin
5ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define the common source files for all the libc instances
6ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# =========================================================
71dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_src_files := \
81dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	$(syscall_src) \
91dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/alarm.c \
101dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/exec.c \
111dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/fnmatch.c \
121dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/syslog.c \
131dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/system.c \
141dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	unistd/time.c \
151dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/asprintf.c \
161dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fflush.c \
171dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fgetc.c \
181dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/findfp.c \
191dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fprintf.c \
201dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fputc.c \
211dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fread.c \
221dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/freopen.c \
231dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fscanf.c \
241dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fseek.c \
251dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/ftell.c \
261dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/fvwrite.c \
271dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/gets.c \
281dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/printf.c \
291dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/refill.c \
301dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/rewind.c \
311dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/scanf.c \
321dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/snprintf.c\
331dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/sprintf.c \
341dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/sscanf.c \
351dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/stdio.c \
361dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/ungetc.c \
371dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vasprintf.c \
381dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vfprintf.c \
391dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vfscanf.c \
401dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vprintf.c \
411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vsnprintf.c \
421dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vsprintf.c \
431dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vscanf.c \
441dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/vsscanf.c \
451dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdio/wbuf.c \
461dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/atexit.c \
471dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/ctype_.c \
481dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/exit.c \
491dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/getenv.c \
501dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/putenv.c \
511dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/setenv.c \
521dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strtod.c \
531dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strtoimax.c \
541dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strtol.c \
551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strtoll.c \
561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strtoul.c \
571dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strtoull.c \
581dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/strtoumax.c \
591dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/tolower_.c \
601dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	stdlib/toupper_.c \
611dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strcasecmp.c \
621dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strcspn.c \
631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strdup.c \
641dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strpbrk.c \
651dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strsep.c \
661dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strspn.c \
671dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strstr.c \
681dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	string/strtok.c \
693527fd6f0df794207215790321824b7844cc712dDavid 'Digit' Turner	wchar/wcswidth.c \
7070465614e14a87f547cdd1b82b0b270b87d215c1Kristian Monsen	wchar/wcsxfrm.c \
711dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/arc4random.c \
72a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/atoi.c \
73a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/atol.c \
74a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/atoll.c \
75a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/bindresvport.c \
76a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/bionic_clone.c \
77fc10b24accd082fb33c8f92ff8b92481c22fe3dcColin Cross	bionic/clearenv.c \
78a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/cpuacct.c \
79a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/daemon.c \
8064ceac3f493e3063a289aec4a12c74787be974e4Colin Cross	bionic/err.c \
81a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/ether_aton.c \
82a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/ether_ntoa.c \
83a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/fcntl.c \
84fc10b24accd082fb33c8f92ff8b92481c22fe3dcColin Cross	bionic/fdprintf.c \
85a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/flockfile.c \
861dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/fork.c \
87a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/fstatfs.c \
88a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/ftime.c \
89a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/ftok.c \
9064ceac3f493e3063a289aec4a12c74787be974e4Colin Cross	bionic/fts.c \
91a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/getdtablesize.c \
92a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/gethostname.c \
93a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/getpgrp.c \
94a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/getpriority.c \
95a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/getpt.c \
961dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/if_indextoname.c \
97a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/if_nametoindex.c \
98a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/initgroups.c \
991dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/ioctl.c \
100a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/isatty.c \
101a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/issetugid.c \
1021dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/ldexp.c \
103a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/lseek64.c \
1041dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/md5.c \
105a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/memmem.c \
106a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/memswap.c \
1076771b9cef635f0da98932a1f0f877a07257ca088Colin Cross	bionic/name_mem.c \
108a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/openat.c \
109a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/open.c \
110a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/pathconf.c \
111a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/perror.c \
112a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/pread.c \
113a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/pselect.c \
114a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/ptsname.c \
115a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/ptsname_r.c \
1161dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/pututline.c \
117a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/pwrite.c \
118a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/reboot.c \
119a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/recv.c \
12072e6fd42421dca80fb2776a9185c186d4a04e5f7David 'Digit' Turner	bionic/sched_cpualloc.c \
12172e6fd42421dca80fb2776a9185c186d4a04e5f7David 'Digit' Turner	bionic/sched_cpucount.c \
122a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/sched_getcpu.c \
1231dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/semaphore.c \
124a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/send.c \
125a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/setegid.c \
126a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/seteuid.c \
127a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/setpgrp.c \
128a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/setresuid.c \
129a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/setreuid.c \
130a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/setuid.c \
131a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/sigblock.c \
132a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/siginterrupt.c \
133a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/siglist.c \
134a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/signal.c \
135a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/signame.c \
136a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/sigsetmask.c \
137a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/sigsuspend.c \
138a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/sleep.c \
139a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/statfs.c \
140a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/strndup.c \
141a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/strntoimax.c \
142a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/strntoumax.c \
143a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/strtotimeval.c \
1441dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/system_properties.c \
1455e9a086145764d64c0f7fbce5489d820aa7fdcd4Colin Cross	bionic/system_properties_compat.c \
146a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/tcgetpgrp.c \
147a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/tcsetpgrp.c \
1481dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/thread_atexit.c \
149a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/time64.c \
150a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/umount.c \
151a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/unlockpt.c \
152a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/usleep.c \
1531dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/utmp.c \
154a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/wcscoll.c \
1551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/gethnamaddr.c \
1561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/inet/nsap_addr.c \
1571dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/__dn_comp.c \
1581dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/__res_close.c \
1591dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/__res_send.c \
1601dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/herror.c \
1611dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_comp.c \
1621dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_data.c \
1631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_debug.c \
1641dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_init.c \
1651dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_mkquery.c \
1661dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_query.c \
1671dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_send.c \
16810093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI	netbsd/resolv/res_state.c \
1691dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/resolv/res_cache.c \
1701dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/net/nsdispatch.c \
1711dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/net/getaddrinfo.c \
1721dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/net/getnameinfo.c \
1731dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/net/getservbyname.c \
1741dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/net/getservent.c \
1751dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/net/base64.c \
1761dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/net/getservbyport.c \
1771dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/nameser/ns_name.c \
1781dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/nameser/ns_parse.c \
1791dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/nameser/ns_ttl.c \
1801dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/nameser/ns_netint.c \
1811dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	netbsd/nameser/ns_print.c \
1824fa7b105644222d9b35347c9d226ca8e011072ebColin Cross	netbsd/nameser/ns_samedomain.c \
1831dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
1847c860db0747f6276a6e43984d43f8fa5181ea936Christopher Ferris# Fortify implementations of libc functions.
1857c860db0747f6276a6e43984d43f8fa5181ea936Christopher Ferrislibc_common_src_files += \
1867c860db0747f6276a6e43984d43f8fa5181ea936Christopher Ferris    bionic/__fgets_chk.cpp \
1877c860db0747f6276a6e43984d43f8fa5181ea936Christopher Ferris    bionic/__memcpy_chk.cpp \
1887c860db0747f6276a6e43984d43f8fa5181ea936Christopher Ferris    bionic/__memmove_chk.cpp \
1897c860db0747f6276a6e43984d43f8fa5181ea936Christopher Ferris    bionic/__memset_chk.cpp \
1907c860db0747f6276a6e43984d43f8fa5181ea936Christopher Ferris    bionic/__strcat_chk.cpp \
1917c860db0747f6276a6e43984d43f8fa5181ea936Christopher Ferris    bionic/__strchr_chk.cpp \
1927c860db0747f6276a6e43984d43f8fa5181ea936Christopher Ferris    bionic/__strcpy_chk.cpp \
1937c860db0747f6276a6e43984d43f8fa5181ea936Christopher Ferris    bionic/__strlcat_chk.cpp \
1947c860db0747f6276a6e43984d43f8fa5181ea936Christopher Ferris    bionic/__strlcpy_chk.cpp \
1957c860db0747f6276a6e43984d43f8fa5181ea936Christopher Ferris    bionic/__strlen_chk.cpp \
1967c860db0747f6276a6e43984d43f8fa5181ea936Christopher Ferris    bionic/__strncat_chk.cpp \
1977c860db0747f6276a6e43984d43f8fa5181ea936Christopher Ferris    bionic/__strncpy_chk.cpp \
1987c860db0747f6276a6e43984d43f8fa5181ea936Christopher Ferris    bionic/__strrchr_chk.cpp \
1997c860db0747f6276a6e43984d43f8fa5181ea936Christopher Ferris    bionic/__umask_chk.cpp \
2007c860db0747f6276a6e43984d43f8fa5181ea936Christopher Ferris    bionic/__vsnprintf_chk.cpp \
2017c860db0747f6276a6e43984d43f8fa5181ea936Christopher Ferris    bionic/__vsprintf_chk.cpp \
2027c860db0747f6276a6e43984d43f8fa5181ea936Christopher Ferris
20329c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hugheslibc_bionic_src_files := \
20461e699a133a4807fe878a6cb0d7190d7c96e21f8Elliott Hughes    bionic/abort.cpp \
205063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/assert.cpp \
206428f5567be25b8090e3dd72e2d3d337c305b514eElliott Hughes    bionic/brk.cpp \
207c30396f5f225e0b5a83a35432e2d82a7063cfdb9David 'Digit' Turner    bionic/dirent.cpp \
20891a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes    bionic/__errno.c \
2099b84824dfd597d8137137fa33295faa26cc70ae0Kito Cheng    bionic/eventfd_read.cpp \
2109b84824dfd597d8137137fa33295faa26cc70ae0Kito Cheng    bionic/eventfd_write.cpp \
2112c5153b043b44e9935a334ae9b2d5a4bc5258b40Nick Kralevich    bionic/getauxval.cpp \
212063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/getcwd.cpp \
21342b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes    bionic/libc_init_common.cpp \
2148f2a5a0b40fc82126c691d5c30131d908772aab7Elliott Hughes    bionic/libc_logging.cpp \
21558b575485c446f9d76ee00f67516ed42cf017769Elliott Hughes    bionic/libgen.cpp \
216107cdd406b8e404af4d552498076cfe2dfe5efbfElliott Hughes    bionic/mmap.cpp \
2173e898476c7230b60a0f76968e64ff25f475b48c0Elliott Hughes    bionic/pthread_attr.cpp \
2189d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_detach.cpp \
2199d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_equal.cpp \
2209d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_getcpuclockid.cpp \
2219d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_getschedparam.cpp \
2229d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_internals.cpp \
2239d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_join.cpp \
2249d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_kill.cpp \
2259d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_self.cpp \
2263e898476c7230b60a0f76968e64ff25f475b48c0Elliott Hughes    bionic/pthread_setname_np.cpp \
2279d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_setschedparam.cpp \
228c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    bionic/pthread_sigmask.cpp \
229d8a5a6f513c6fa99229e9c82c5c308c7cd6b3d54Chris Dearman    bionic/raise.cpp \
230428f5567be25b8090e3dd72e2d3d337c305b514eElliott Hughes    bionic/sbrk.cpp \
231701bec2af33feaa9dddf12ccf8e4c714441b7f2eElliott Hughes    bionic/scandir.cpp \
2324ca685e36e9d7f53c135eba2b4b8ece152129dbeKito Cheng    bionic/sched_getaffinity.cpp \
2334a9e837840fda3aaea48aeba85c7c7a8782d2586Elliott Hughes    bionic/__set_errno.cpp \
234063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/setlocale.cpp \
235a4b2dc016fa62bd172a73c3f8971c805700ffb0fRom Lemarchand    bionic/signalfd.cpp \
236c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    bionic/sigwait.cpp \
23706040fd75c1edff9e5ffb2b3d3e2a6e66d57c11dElliott Hughes    bionic/statvfs.cpp \
238063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/strerror.cpp \
239063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/strerror_r.cpp \
240063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/strsignal.cpp \
241063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/stubs.cpp \
24291a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes    bionic/sysconf.cpp \
243063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/tdestroy.cpp \
244063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/tmpfile.cpp \
24517a8b0db63d54e9d79bf11112ace0c4fe9606289Elliott Hughes    bionic/wait.cpp \
246063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/wchar.cpp \
24729c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
248ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hugheslibc_tzcode_src_files := \
249ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    tzcode/asctime.c \
250ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    tzcode/difftime.c \
251ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    tzcode/localtime.c \
252ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    tzcode/strftime.c \
253ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    tzcode/strptime.c \
254ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes
255f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hugheslibc_upstream_freebsd_src_files := \
2566b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/clrerr.c \
2576b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fclose.c \
2586b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fdopen.c \
2596b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/feof.c \
2606b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/ferror.c \
2616b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fgetln.c \
2626b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fgetpos.c \
2636b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fgets.c \
2646b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fileno.c \
2656b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/flags.c \
2666b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fopen.c \
2676b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fpurge.c \
2686b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fputs.c \
2696b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fsetpos.c \
2706b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/funopen.c \
2716b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fwalk.c \
2726b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fwrite.c \
2736b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/getc.c \
2746b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/getchar.c \
275677ee5647721df22f13909375d5d0e770a1a80bfElliott Hughes    upstream-freebsd/lib/libc/stdio/makebuf.c \
276284f7880323d33356df682c3cfb6b7f0c665bfd4Elliott Hughes    upstream-freebsd/lib/libc/stdio/mktemp.c \
2776b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/putc.c \
2786b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/putchar.c \
2796b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/puts.c \
2806b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/putw.c \
2816b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/remove.c \
2826b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/rget.c \
2836b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/setbuf.c \
2846b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/setbuffer.c \
285677ee5647721df22f13909375d5d0e770a1a80bfElliott Hughes    upstream-freebsd/lib/libc/stdio/setvbuf.c \
2866b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/tempnam.c \
2876b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/tmpnam.c \
2886b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/wsetup.c \
289d278b828fef47fb2d7098f8ec70867fbd3da09d6Elliott Hughes    upstream-freebsd/lib/libc/stdlib/getopt_long.c \
2900b25f633a23e575c8a1f9547d1af5dc5b0157a1cElliott Hughes    upstream-freebsd/lib/libc/stdlib/qsort.c \
291f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    upstream-freebsd/lib/libc/stdlib/realpath.c \
292eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcpcpy.c \
293eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcpncpy.c \
294eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcscasecmp.c \
295eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcscspn.c \
296eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsdup.c \
297eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcslcat.c \
298eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcslcpy.c \
299eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsncasecmp.c \
300eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsncat.c \
301eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsncmp.c \
302eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsncpy.c \
303eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsnlen.c \
304eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcspbrk.c \
305eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsspn.c \
306eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsstr.c \
307eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcstok.c \
308eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wmemchr.c \
309eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wmemcpy.c \
310eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wmemmove.c \
311eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wmemset.c \
312f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
313f8b3a920a895a53b207017249080087d562bd0d2Elliott Hugheslibc_upstream_netbsd_src_files := \
314e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
315e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/common/lib/libc/inet/inet_addr.c \
316e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/compat-43/creat.c \
317e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/gen/ftw.c \
318e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/gen/nftw.c \
319e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/gen/nice.c \
3206b3f49a5374305ce9690c3c5ca2aadc90f54c521Elliott Hughes    upstream-netbsd/libc/gen/popen.c \
321e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/gen/psignal.c \
322ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/gen/setjmperr.c \
323e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/gen/utime.c \
324e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/inet/inet_ntoa.c \
325e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/inet/inet_ntop.c \
326e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/inet/inet_pton.c \
327ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/isc/ev_streams.c \
328ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/isc/ev_timers.c \
329e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/regex/regcomp.c \
330e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/regex/regerror.c \
331e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/regex/regexec.c \
332e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/regex/regfree.c \
333e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdio/getdelim.c \
334e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdio/getline.c \
335ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/stdlib/bsearch.c \
336ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/stdlib/div.c \
337e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/drand48.c \
338e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/erand48.c \
339e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/jrand48.c \
340ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/stdlib/ldiv.c \
341ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/stdlib/lldiv.c \
342e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/lrand48.c \
343e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/mrand48.c \
344e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/nrand48.c \
345e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/_rand48.c \
346e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/seed48.c \
347e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/srand48.c \
348e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/tdelete.c \
349e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/tfind.c \
350e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/tsearch.c \
351c51cd764a2d0897234762abd4dbd21420cb9f17dElliott Hughes    upstream-netbsd/libc/string/memccpy.c \
352e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/string/strcasestr.c \
3532b473070126345e323d0694b87f88264cc9a77ccElliott Hughes    upstream-netbsd/libc/string/strcoll.c \
354e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/string/strxfrm.c \
355ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/unistd/killpg.c \
356f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
357ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Architecture specific source files go here
358ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# =========================================================
3591dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectifeq ($(TARGET_ARCH),arm)
3601dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_src_files += \
361a89864a20b818621a1da10e88fda815334062f9fElliott Hughes	bionic/memmove.c.arm \
3628ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare	string/bcopy.c \
3638ff1a2759a6389bed30d7862d0beb76077032c99Bruce Beare	string/strncmp.c \
3640a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	string/strncat.c \
3650a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	string/strncpy.c \
3660a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	bionic/strchr.cpp \
3670a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	string/strrchr.c \
3680a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	bionic/memchr.c \
3690a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	bionic/memrchr.c \
3700a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	string/index.c \
3710a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	bionic/strnlen.c \
3720a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	string/strlcat.c \
3730a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	string/strlcpy.c \
3740a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	upstream-freebsd/lib/libc/string/wcschr.c \
3750a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	upstream-freebsd/lib/libc/string/wcsrchr.c \
3760a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	upstream-freebsd/lib/libc/string/wcscmp.c \
3770a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	upstream-freebsd/lib/libc/string/wcscpy.c \
3780a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	upstream-freebsd/lib/libc/string/wmemcmp.c \
3790a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	upstream-freebsd/lib/libc/string/wcslen.c \
3800a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	upstream-freebsd/lib/libc/string/wcscat.c
3811dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
3821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# These files need to be arm so that gdbserver
3831dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# can set breakpoints in them without messing
3841dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# up any thumb code.
3851dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_src_files += \
3864f086aeb4aa06e13079b7fec71a8178ceeacf318Matt Fischer	bionic/pthread-atfork.c.arm \
3878a1d2cf1422e35257c160ac5bb12dd3ee481c433David 'Digit' Turner	bionic/pthread-rwlocks.c.arm \
3881dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/pthread-timers.c.arm \
3891dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/ptrace.c.arm
390ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin
3916a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turnerlibc_static_common_src_files += \
39244b53ad6818de344e0b499ad8fdbb21fcb0ff2b6Elliott Hughes    bionic/pthread.c.arm \
3934b4a8824289c48c823cd38bc63289d121aae3d67Elliott Hughes    bionic/pthread_create.cpp.arm \
39444b53ad6818de344e0b499ad8fdbb21fcb0ff2b6Elliott Hughes    bionic/pthread_key.cpp.arm \
3956a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner
396a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif # arm
3971dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
3981dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectifeq ($(TARGET_ARCH),x86)
3991dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_src_files += \
400d2547040a13fe1bce31a60df35d4953c596a3db0Elliott Hughes    bionic/pthread-atfork.c \
401d2547040a13fe1bce31a60df35d4953c596a3db0Elliott Hughes    bionic/pthread-rwlocks.c \
402d2547040a13fe1bce31a60df35d4953c596a3db0Elliott Hughes    bionic/pthread-timers.c \
403d2547040a13fe1bce31a60df35d4953c596a3db0Elliott Hughes    bionic/ptrace.c \
4041dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
4056a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turnerlibc_static_common_src_files += \
40644b53ad6818de344e0b499ad8fdbb21fcb0ff2b6Elliott Hughes    bionic/pthread.c \
4074b4a8824289c48c823cd38bc63289d121aae3d67Elliott Hughes    bionic/pthread_create.cpp \
40844b53ad6818de344e0b499ad8fdbb21fcb0ff2b6Elliott Hughes    bionic/pthread_key.cpp \
4096a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner
410a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif # x86
41110093276e98d26428875480c502a278dffe550c7Shin-ichiro KAWASAKI
412a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),mips)
413a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamlibc_common_src_files += \
414857fed50cbf2d1a701a5a1a29e124f7e9fb945d5Elliott Hughes	bionic/memcmp.c \
415a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham	string/bcopy.c \
416a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham	string/strcmp.c \
417a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham	string/strcpy.c \
4180a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	string/strncmp.c \
4190a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	string/strcat.c \
4200a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	string/strncat.c \
4210a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	string/strncpy.c \
4220a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	bionic/strchr.cpp \
4230a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	string/strrchr.c \
4240a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	bionic/memchr.c \
4250a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	bionic/memrchr.c \
4260a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	string/index.c \
4270a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	bionic/strnlen.c \
4280a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	string/strlcat.c \
4290a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	string/strlcpy.c \
4300a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	upstream-freebsd/lib/libc/string/wcschr.c \
4310a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	upstream-freebsd/lib/libc/string/wcsrchr.c \
4320a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	upstream-freebsd/lib/libc/string/wcscmp.c \
4330a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	upstream-freebsd/lib/libc/string/wcscpy.c \
4340a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	upstream-freebsd/lib/libc/string/wmemcmp.c \
4350a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	upstream-freebsd/lib/libc/string/wcslen.c \
4360a490665a3a287cd3aee1e7327f2381222c387c4Liubov Dmitrieva	upstream-freebsd/lib/libc/string/wcscat.c
437a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham
438a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamlibc_common_src_files += \
439a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham	bionic/pthread-atfork.c \
440a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham	bionic/pthread-rwlocks.c \
441a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham	bionic/pthread-timers.c \
442a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham	bionic/ptrace.c
443a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham
444a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamlibc_static_common_src_files += \
445ba342c11adbe92aa918d50b0d2a36453510ebf02Elliott Hughes    bionic/pthread.c \
4464b4a8824289c48c823cd38bc63289d121aae3d67Elliott Hughes    bionic/pthread_create.cpp \
44744b53ad6818de344e0b499ad8fdbb21fcb0ff2b6Elliott Hughes    bionic/pthread_key.cpp \
448a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham
449a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif # mips
4501dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
4517c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrisifeq ($(strip $(TARGET_CPU_VARIANT)),)
4527c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris$(warning TARGET_CPU_VARIANT is not defined)
4537c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrisendif
4547c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris
4557c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris###########################################################
4567c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## Add cpu specific source files.
4577c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris##
4587c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## This can be called multiple times, but it will only add
4597c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## the first source file for each unique $(1).
4607c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## $(1): Unique identifier to identify the cpu variant
4617c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris##       implementation.
4627c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris## $(2): Cpu specific source file.
4637c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris###########################################################
4647c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris
4657c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrisdefine libc-add-cpu-variant-src
4667c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris$(if $(filter true,$(_LIBC_ARCH_CPU_VARIANT_HAS_$(1))), \
4677c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris	, \
4687c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris     $(eval _LIBC_ARCH_CPU_VARIANT_HAS_$(1) := true) \
4697c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris     $(eval _LIBC_ARCH_CPU_VARIANT_SRC_FILE.$(1) := $(2)) \
4707c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris     $(eval _LIBC_ARCH_CPU_VARIANT_SRC_FILES += $(2)) \
4717c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris)
4727c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrisendef
4737c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris
4747c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris_LIBC_ARCH_COMMON_SRC_FILES :=
4757c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris_LIBC_ARCH_CPU_VARIANT_SRC_FILES :=
4767c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris_LIBC_ARCH_STATIC_SRC_FILES :=
4777c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris_LIBC_ARCH_DYNAMIC_SRC_FILES :=
4787c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrisinclude bionic/libc/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk
4797c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris
4807c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrislibc_common_src_files += $(_LIBC_ARCH_COMMON_SRC_FILES)
4817c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrislibc_common_src_files += $(_LIBC_ARCH_CPU_VARIANT_SRC_FILES)
4827c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrislibc_arch_static_src_files := $(_LIBC_ARCH_STATIC_SRC_FILES)
4837c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferrislibc_arch_dynamic_src_files := $(_LIBC_ARCH_DYNAMIC_SRC_FILES)
4847c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris
485ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define some common cflags
486ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
4871dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_cflags := \
488470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes    -DWITH_ERRLIST \
489470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes    -DANDROID_CHANGES \
490470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes    -D_LIBC=1 \
491470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes    -DFLOATING_POINT \
492470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes    -DINET6 \
493470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes    -I$(LOCAL_PATH)/private \
494470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes    -DPOSIX_MISTAKE \
495470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes    -DLOG_ON_HEAP_ERROR \
496c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes    -Wall -Wextra
4971dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
498d2c9dcc9265e66f6432ec39dcc7378b944449e60Dave Bortifeq ($(strip $(DEBUG_BIONIC_LIBC)),true)
4991dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project  libc_common_cflags += -DDEBUG
5001dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectendif
5011dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
5022fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren# To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in
5032fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren# the appropriate BoardConfig.mk file.
5042fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren#
5052fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Renifneq ($(BOARD_MALLOC_ALIGNMENT),)
5062fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren  libc_common_cflags += -DMALLOC_ALIGNMENT=$(BOARD_MALLOC_ALIGNMENT)
5072fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Renendif
5082fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren
5091dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectifeq ($(TARGET_ARCH),arm)
510a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  libc_common_cflags += -DSOFTFLOAT
5111dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project  libc_common_cflags += -fstrict-aliasing
512ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin  libc_crt_target_cflags := -mthumb-interwork
513ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavinendif # !arm
5141dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
515a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),x86)
516a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  libc_common_cflags += -DSOFTFLOAT
517a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  libc_crt_target_cflags :=
518a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  ifeq ($(ARCH_X86_HAVE_SSE2),true)
519a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham      libc_crt_target_cflags += -DUSE_SSE2=1
520a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  endif
521a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  ifeq ($(ARCH_X86_HAVE_SSSE3),true)
522a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham      libc_crt_target_cflags += -DUSE_SSSE3=1
523a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  endif
524a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif # x86
525a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham
526a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),mips)
527a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  ifneq ($(ARCH_MIPS_HAS_FPU),true)
528a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham    libc_common_cflags += -DSOFTFLOAT
529a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  endif
530a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  libc_common_cflags += -fstrict-aliasing
531a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham  libc_crt_target_cflags := $(TARGET_GLOBAL_CFLAGS)
532a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif # mips
533a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham
534fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden# Define ANDROID_SMP appropriately.
535fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenifeq ($(TARGET_CPU_SMP),true)
536fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden    libc_common_cflags += -DANDROID_SMP=1
537fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenelse
538fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden    libc_common_cflags += -DANDROID_SMP=0
539fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenendif
540fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden
54176be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hughes# crtbrand.c needs <stdint.h> and a #define for the platform SDK version.
54276be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hugheslibc_crt_target_cflags += \
54376be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hughes    -I$(LOCAL_PATH)/include  \
54476be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hughes    -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)
545fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden
546ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define some common includes
547ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
5481dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_c_includes := \
5491dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project		$(LOCAL_PATH)/stdlib  \
5501dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project		$(LOCAL_PATH)/string  \
55176656afc6dd069fcfda5768e6e54bb85e4e99942Nick Kralevich		$(LOCAL_PATH)/stdio   \
55276656afc6dd069fcfda5768e6e54bb85e4e99942Nick Kralevich		external/safe-iop/include
5531dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
5549d40326830c2bd407427889c554adeb915ee6b4aNick Kralevich# Needed to access private/__dso_handle.h from
5553b43f87d2949a340e2c19cb735af7727157d8274David 'Digit' Turner# crtbegin_xxx.S and crtend_xxx.S
55676be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hugheslibc_crt_target_cflags += \
55776be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hughes    -I$(LOCAL_PATH)/private \
55876be660aae0911467c51dc3f86a4f8d7fed5b332Elliott Hughes    -I$(LOCAL_PATH)/arch-$(TARGET_ARCH)/include
5591dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
560ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define the libc run-time (crt) support object files that must be built,
561ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# which are needed to build all other objects (shared/static libs and
562ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# executables)
563ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ==========================================================================
564a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham# ARM, MIPS, and x86 all need crtbegin_so/crtend_so.
5656a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner#
5666a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# For x86, the .init section must point to a function that calls all
5676a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# entries in the .ctors section. (on ARM this is done through the
5686a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# .init_array section instead).
5696a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner#
570a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham# For all the platforms, the .fini_array section must point to a function
5716a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# that will call __cxa_finalize(&__dso_handle) in order to ensure that
5726a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner# static C++ destructors are properly called on dlclose().
5736a9b888d7c4b246f6f66360789c72b754ff85021David 'Digit' Turner#
574a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),arm)
575a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham    libc_crt_target_so_cflags :=
576a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif
577a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamifeq ($(TARGET_ARCH),mips)
578a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham    libc_crt_target_so_cflags := -fPIC
579a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif
5802d2dbd30243f4ffd1e0a10ade989e25d29f7f45cDavid 'Digit' Turnerifeq ($(TARGET_ARCH),x86)
581a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandham    libc_crt_target_so_cflags := -fPIC
582a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif
583a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamlibc_crt_target_so_cflags += $(libc_crt_target_cflags)
5844c6b925bac0ebe2898acbcb4c4ba257463dbfc26Elliott Hugheslibc_crt_target_crtbegin_file := $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin.c
5854c6b925bac0ebe2898acbcb4c4ba257463dbfc26Elliott Hugheslibc_crt_target_crtbegin_so_file := $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin_so.c
586ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope
587ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope# See the comment in crtbrand.c for the reason why we need to generate
588ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope# crtbrand.s before generating crtbrand.o.
589ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.s
590ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope$(GEN): $(LOCAL_PATH)/bionic/crtbrand.c
591ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope	@mkdir -p $(dir $@)
592cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) -S \
593cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang		-MD -MF $(@:%.s=%.d) -o $@ $<
594cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) sed -i -e '/\.note\.ABI-tag/s/progbits/note/' $@
595cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(call transform-d-to-p-args,$(@:%.s=%.d),$(@:%.s=%.P))
596cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.s=%.P)
597ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeALL_GENERATED_SOURCES += $(GEN)
598ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope
599ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o
600ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.s
601ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope	@mkdir -p $(dir $@)
602cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) -o $@ -c $<
603ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeALL_GENERATED_SOURCES += $(GEN)
604ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope
605fc9e525fe07846c1efa23235a59575f8dad69c53Ying WangGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_so.o
60612949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughes$(GEN): $(libc_crt_target_crtbegin_so_file)
6071dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	@mkdir -p $(dir $@)
608cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) \
609cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang		-MD -MF $(@:%.o=%.d) -o $@ -c $<
610cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(transform-d-to-p)
611cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P)
6121dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectALL_GENERATED_SOURCES += $(GEN)
6131dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
614fc9e525fe07846c1efa23235a59575f8dad69c53Ying WangGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_so.o
615ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtend_so.S
616ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	@mkdir -p $(dir $@)
617cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) \
618cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang		-MD -MF $(@:%.o=%.d) -o $@ -c $<
619cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(transform-d-to-p)
620cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P)
621ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinALL_GENERATED_SOURCES += $(GEN)
622fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei Liao
623cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang# The following two are installed to device
624fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei LiaoGEN := $(TARGET_OUT_SHARED_LIBRARIES)/crtbegin_so.o
625cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_so.o
626cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) mkdir -p $(dir $@) && cp -f $< $@
627fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei LiaoALL_GENERATED_SOURCES += $(GEN)
628fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei Liao
629fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei LiaoGEN := $(TARGET_OUT_SHARED_LIBRARIES)/crtend_so.o
630cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_so.o
631cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) mkdir -p $(dir $@) && cp -f $< $@
632fc0725ec5cc51053c06bf2c67755a5a57a5da621Shih-wei LiaoALL_GENERATED_SOURCES += $(GEN)
6331dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
6341dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
635ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static1.o
63612949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughes$(GEN): $(libc_crt_target_crtbegin_file)
637ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	@mkdir -p $(dir $@)
638cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) $(TARGET_CC) $(libc_crt_target_cflags) \
639cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang		-MD -MF $(@:%.o=%.d) -o $@ -c $<
640cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(transform-d-to-p)
641cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P)
642ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinALL_GENERATED_SOURCES += $(GEN)
6431dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
644ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static.o
645ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static1.o $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o
646ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope	@mkdir -p $(dir $@)
647cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) $(TARGET_LD) -r -o $@ $^
648ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeALL_GENERATED_SOURCES += $(GEN)
649ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope
650ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic1.o
65112949e5d3946cc5d5b53d52adf5a3b925bfca2c6Elliott Hughes$(GEN): $(libc_crt_target_crtbegin_file)
6521dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	@mkdir -p $(dir $@)
653cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) $(TARGET_CC) $(libc_crt_target_cflags) \
654cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang		-MD -MF $(@:%.o=%.d) -o $@ -c $<
655cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(transform-d-to-p)
656cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P)
6571dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectALL_GENERATED_SOURCES += $(GEN)
6581dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
659ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic.o
660ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic1.o $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o
661ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael Hope	@mkdir -p $(dir $@)
662cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) $(TARGET_LD) -r -o $@ $^
663ea8fad11d980d55ebd2bcf2302f3f1f742b6351cMichael HopeALL_GENERATED_SOURCES += $(GEN)
664ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin
665ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# We rename crtend.o to crtend_android.o to avoid a
666ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# name clash between gcc and bionic.
667fc9e525fe07846c1efa23235a59575f8dad69c53Ying WangGEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_android.o
668ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtend.S
6691dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	@mkdir -p $(dir $@)
670cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(hide) $(TARGET_CC) $(libc_crt_target_cflags) \
671cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang		-MD -MF $(@:%.o=%.d) -o $@ -c $<
672cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang	$(transform-d-to-p)
673cf464878efda7652b0a7eb636e45944eda6b6f2fYing Wang-include $(GEN:%.o=%.P)
6741dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectALL_GENERATED_SOURCES += $(GEN)
6751dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
6761dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
677ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# To enable malloc leak check for statically linked programs, add
678ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# "WITH_MALLOC_CHECK_LIBC_A := true" to buildspec.mk
679ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinWITH_MALLOC_CHECK_LIBC_A := $(strip $(WITH_MALLOC_CHECK_LIBC_A))
6801dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
681ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
6826334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# libbionic_ssp.a - stack protector code
6836334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# ========================================================
6846334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich#
6856334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# The stack protector code needs to be compiled
6866334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# with -fno-stack-protector, since it modifies the
6876334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# stack canary.
6886334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
6896334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevichinclude $(CLEAR_VARS)
6906334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
691642331b5dd5647e7d196ac4f44406fd435478a56Elliott HughesLOCAL_SRC_FILES := bionic/__stack_chk_fail.cpp
692dc5ec07158079b39f758ed41eca5b937e52c3729Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector -Werror
6936334c662cae4cd9b61f5f3185048b0cd3633dad7Nick KralevichLOCAL_C_INCLUDES := $(libc_common_c_includes)
6946334c662cae4cd9b61f5f3185048b0cd3633dad7Nick KralevichLOCAL_MODULE := libbionic_ssp
695ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
6966334c662cae4cd9b61f5f3185048b0cd3633dad7Nick KralevichLOCAL_SYSTEM_SHARED_LIBRARIES :=
6976334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
6986334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevichinclude $(BUILD_STATIC_LIBRARY)
6996334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
7006334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
7016334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# ========================================================
702ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes# libc_tzcode.a - upstream 'tzcode' code
703ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes# ========================================================
704ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes
705ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughesinclude $(CLEAR_VARS)
706ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes
707ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_SRC_FILES := $(libc_tzcode_src_files)
708ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_CFLAGS := \
709ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    $(libc_common_cflags) \
710ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    -std=gnu99 \
711ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    -DSTD_INSPIRED=1 \
712ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    -DTZDIR=\"/system/usr/share/zoneinfo\" \
713ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    -DTM_GMTOFF=tm_gmtoff \
714ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    -DUSG_COMPAT=1
715ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes)
716ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_MODULE := libc_tzcode
717ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
718ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
719ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes
720ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
721ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes
722ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes
723ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes# ========================================================
724f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# libc_freebsd.a - upstream FreeBSD C library code
725f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# ========================================================
726f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes#
727f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# These files are built with the freebsd-compat.h header file
728f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# automatically included.
729f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
730f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughesinclude $(CLEAR_VARS)
731f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
732f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_SRC_FILES := $(libc_upstream_freebsd_src_files)
733f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_CFLAGS := \
734f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    $(libc_common_cflags) \
735f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    -I$(LOCAL_PATH)/upstream-freebsd \
736f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    -I$(LOCAL_PATH)/upstream-freebsd/libc/include \
737f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    -include upstream-freebsd/freebsd-compat.h
738f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes)
739f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_MODULE := libc_freebsd
740f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
741f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
742f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
743f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
744f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
745f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
746f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# ========================================================
747f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# libc_netbsd.a - upstream NetBSD C library code
748f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# ========================================================
749f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes#
750f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# These files are built with the netbsd-compat.h header file
751f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# automatically included.
752f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
753f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughesinclude $(CLEAR_VARS)
754f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
755f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_SRC_FILES := $(libc_upstream_netbsd_src_files)
756f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_CFLAGS := \
757f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes    $(libc_common_cflags) \
7583d2d448af1b16923f5a329b49bb8e658dbad8a06Elliott Hughes    -I$(LOCAL_PATH)/upstream-netbsd \
759ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    -I$(LOCAL_PATH)/upstream-netbsd/libc/include \
760f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes    -include upstream-netbsd/netbsd-compat.h
761f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes)
762f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_MODULE := libc_netbsd
763ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
764f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
765f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
766f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
767f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
768f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
769f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# ========================================================
77029c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# libc_bionic.a - home-grown C library code
77129c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# ========================================================
77229c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes#
77329c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughesinclude $(CLEAR_VARS)
77429c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
77529c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_SRC_FILES := $(libc_bionic_src_files)
77629c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) -Werror
77729c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes)
77829c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_MODULE := libc_bionic
77929c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
78029c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
78129c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
78229c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
78329c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
78429c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
78529c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# ========================================================
786ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# libc_common.a
787ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
788f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
789ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavininclude $(CLEAR_VARS)
7901dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
791ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_SRC_FILES := $(libc_common_src_files)
792ab44f52202878cdf2bf22457aeae33ec24089556Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) \
793ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    -std=gnu99 \
794ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    -I$(LOCAL_PATH)/upstream-netbsd/libc/include # for netbsd private headers
795ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_C_INCLUDES := $(libc_common_c_includes)
7961dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_MODULE := libc_common
797ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
798ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_WHOLE_STATIC_LIBRARIES := \
799ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    libbionic_ssp \
800ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    libc_bionic \
801ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    libc_freebsd \
802ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    libc_netbsd \
803ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    libc_tzcode
8041dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
8051dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
806c97c5fc7880267fd835d22946a920bf370461cf2Ying Wang# TODO: split out the asflags.
807c97c5fc7880267fd835d22946a920bf370461cf2Ying WangLOCAL_ASFLAGS := $(LOCAL_CFLAGS)
808c97c5fc7880267fd835d22946a920bf370461cf2Ying Wang
8091dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_STATIC_LIBRARY)
8101dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
8111dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
812ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
81349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# libc_nomalloc.a
81449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# ========================================================
81549e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin#
81649e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# This is a version of the static C library that does not
81791a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# include malloc. It's useful in situations when the user wants
81891a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# to provide their own malloc implementation, or wants to
81991a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# explicitly disallow the use of the use of malloc,
82091a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# such as in the dynamic loader.
82149e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
82249e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavininclude $(CLEAR_VARS)
82349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
82449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_SRC_FILES := \
82549e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin	$(libc_arch_static_src_files) \
8266a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner	$(libc_static_common_src_files) \
82742b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes	bionic/libc_init_static.cpp
82849e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
82949e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_C_INCLUDES := $(libc_common_c_includes)
8306a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' TurnerLOCAL_CFLAGS := $(libc_common_cflags) \
83129c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes                -DLIBC_STATIC \
83229c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes                -std=gnu99
83349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
83449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_MODULE := libc_nomalloc
835ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
83649e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
83749e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_SYSTEM_SHARED_LIBRARIES :=
83849e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
83949e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavininclude $(BUILD_STATIC_LIBRARY)
84049e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
84149e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
84249e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# ========================================================
8431dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# libc.a
8441dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
8451dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS)
8461dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
8471dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \
848ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	$(libc_arch_static_src_files) \
8496a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner	$(libc_static_common_src_files) \
8501dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/dlmalloc.c \
851c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes	bionic/malloc_debug_common.cpp \
85242b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes	bionic/libc_init_static.cpp
8531dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
854b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_CFLAGS := $(libc_common_cflags) \
85529c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes                -DLIBC_STATIC \
85629c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes                -std=gnu99
8571dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes)
858ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_MODULE := libc
859ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
8601dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
8611dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
8621dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
8631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_STATIC_LIBRARY)
8641dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
8651dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
866ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
8671dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# libc.so
8681dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
8691dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS)
8701dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
8717c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian# pthread deadlock prediction:
8727c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian# set -DPTHREAD_DEBUG -DPTHREAD_DEBUG_ENABLED=1 to enable support for
8737c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian# pthread deadlock prediction.
8747c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian# Since this code is experimental it is disabled by default.
8757c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian# see libc/bionic/pthread_debug.c for details
8767c0c3793722aea293c45921ef50e4adcdf9645ceMathias Agopian
87729c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) -std=gnu99 -DPTHREAD_DEBUG -DPTHREAD_DEBUG_ENABLED=0
8781dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes)
8791dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
8801dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \
881ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	$(libc_arch_dynamic_src_files) \
8826a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' Turner	$(libc_static_common_src_files) \
8831dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project	bionic/dlmalloc.c \
884c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes	bionic/malloc_debug_common.cpp \
8851e980b6bc8315d00a07312b25486531247abd98cElliott Hughes	bionic/pthread_debug.cpp \
88642b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes	bionic/libc_init_dynamic.cpp
8871dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
888f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvelifeq ($(TARGET_ARCH),arm)
889f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel	LOCAL_NO_CRT := true
890f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel	LOCAL_CFLAGS += -DCRT_LEGACY_WORKAROUND
891f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel
892f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel	LOCAL_SRC_FILES := \
893f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel		arch-arm/bionic/crtbegin_so.c \
894f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel		arch-arm/bionic/atexit_legacy.c \
895f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel		$(LOCAL_SRC_FILES) \
896f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel		arch-arm/bionic/crtend_so.S
897f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvelendif
898f3cfcd869ded41d25c1f4f4e48e7c374a64f9583Ard Biesheuvel
8991dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_MODULE:= libc
900ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
901914d8d4cff10f023ccd382fb43b2c7833dd34f72Elliott HughesLOCAL_REQUIRED_MODULES := tzdata
9021dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
9031dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# WARNING: The only library libc.so should depend on is libdl.so!  If you add other libraries,
9041dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries.  This
9051dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ensures that symbols that are pulled into those new libraries from libgcc.a are not declared
9061dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# external; if that were the case, then libc would not pull those symbols from libgcc.a as it
9071dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# should, instead relying on the external symbols from the dependent libraries.  That would
9081dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# create an "cloaked" dependency on libgcc.a in libc though the libraries, which is not what
9091dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# you wanted!
9101dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
9111dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SHARED_LIBRARIES := libdl
9121dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
9131dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
9141dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
9151dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_SHARED_LIBRARY)
9161dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
9171dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
918b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# For all builds, except for the -user build we will enable memory
919b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# allocation checking (including memory leaks, buffer overwrites, etc.)
920b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# Note that all these checks are also controlled by env. settings
921b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# that can enable, or disable specific checks. Note also that some of
922b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# the checks are available only in emulator and are implemeted in
923b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_qemu_instrumented.so.
924b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineifneq ($(TARGET_BUILD_VARIANT),user)
925b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
926ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
927b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_debug_leak.so
9281dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
9291dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS)
9301dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
931ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_CFLAGS := \
932ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	$(libc_common_cflags) \
933ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin	-DMALLOC_LEAK_CHECK
9341dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
9351dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes)
9361dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
9371dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \
9381e980b6bc8315d00a07312b25486531247abd98cElliott Hughes	bionic/debug_mapinfo.cpp \
9391e980b6bc8315d00a07312b25486531247abd98cElliott Hughes	bionic/debug_stacktrace.cpp \
940c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes	bionic/malloc_debug_leak.cpp \
941c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes	bionic/malloc_debug_check.cpp \
9421dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
943b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE:= libc_malloc_debug_leak
944ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
9451dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
946e007775f4b21f6b94078ed1d34b753435ba28fdaPavel ChupinLOCAL_SHARED_LIBRARIES := libc libdl
947b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
948b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_SYSTEM_SHARED_LIBRARIES :=
949aa46fa24035f3ab020f9a7abd86c25ae2196bb32Bruce BeareLOCAL_ALLOW_UNDEFINED_SYMBOLS := true
950368070454b1349d1fcf29a5d1eb51c869fb538f6Iliyan Malchev
951b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# Don't install on release build
952b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE_TAGS := eng debug
9531dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
954b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineinclude $(BUILD_SHARED_LIBRARY)
955b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
956b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
957b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# ========================================================
958b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_debug_qemu.so
959b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# ========================================================
960b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineinclude $(CLEAR_VARS)
961b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
962b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_CFLAGS := \
963b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine	$(libc_common_cflags) \
964b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine	-DMALLOC_QEMU_INSTRUMENT
965b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
966b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_C_INCLUDES := $(libc_common_c_includes)
967b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
968b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_SRC_FILES := \
969c4d1fecc105063e68a5090a6900b63d1b9a24287Elliott Hughes	bionic/malloc_debug_qemu.cpp
970b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
971b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE:= libc_malloc_debug_qemu
972ae5c64413bf72bc18d7fc81e1f5761824bc01f49Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
973b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
9747c0c3793722aea293c45921ef50e4adcdf9645ceMathias AgopianLOCAL_SHARED_LIBRARIES := libc libdl
9751dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
9761dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
977368070454b1349d1fcf29a5d1eb51c869fb538f6Iliyan Malchev
9781dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# Don't install on release build
979b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE_TAGS := eng debug
9801dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
9811dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_SHARED_LIBRARY)
9821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
983b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineendif	#!user
984b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
985b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
9861dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
9871dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(call all-makefiles-under,$(LOCAL_PATH))
988