Android.mk revision aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9
1e210488e0d4082b9a0c55195c22191f29ed56bf8Serban ConstantinescuLOCAL_PATH := $(call my-dir)
21dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
3d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferris# Make everything depend on any changes to included makefiles.
4f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanglibc_common_additional_dependencies := $(LOCAL_PATH)/Android.mk
5f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
6f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# Load config for TARGET_ARCH
7f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangmy_2nd_arch_prefix :=
8f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanginclude $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk
9f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanglibc_common_additional_dependencies += \
10f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk
11f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
12f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
13f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangifdef TARGET_2ND_ARCH
14f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# Load config for TARGET_2ND_ARCH
15f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangmy_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX)
16f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanginclude $(LOCAL_PATH)/arch-$(TARGET_2ND_ARCH)/$(TARGET_2ND_ARCH).mk
17f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangmy_2nd_arch_prefix :=
18f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanglibc_common_additional_dependencies += \
19f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    $(LOCAL_PATH)/arch-$(TARGET_2ND_ARCH)/$(TARGET_2ND_ARCH).mk
20f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangendif
21f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
22f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# crt obj files
23f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# ========================================================
24f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# crtbrand.c needs <stdint.h> and a #define for the platform SDK version.
25f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanglibc_crt_target_cflags := \
26f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    -I$(LOCAL_PATH)/include \
27f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) \
28f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
29f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangmy_2nd_arch_prefix :=
30f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanginclude $(LOCAL_PATH)/crt.mk
31f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangifdef TARGET_2ND_ARCH
32f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangmy_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX)
33f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanginclude $(LOCAL_PATH)/crt.mk
34f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangmy_2nd_arch_prefix :=
35f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangendif
36d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher Ferris
37ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define the common source files for all the libc instances
38ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# =========================================================
391dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_src_files := \
4076c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/arc4random.c \
4176c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/atoi.c \
4276c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/atol.c \
4376c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/atoll.c \
4476c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/bindresvport.c \
4576c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/clearenv.c \
4676c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/daemon.c \
4776c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/err.c \
4876c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/ether_aton.c \
4976c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/ether_ntoa.c \
5076c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/fdprintf.c \
5176c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/flockfile.c \
5276c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/ftime.c \
5376c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/ftok.c \
5476c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/fts.c \
5576c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/getdtablesize.c \
5676c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/gethostname.c \
5776c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/getpgrp.c \
5876c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/getpriority.c \
5976c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/getpt.c \
6076c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/if_indextoname.c \
6176c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/if_nametoindex.c \
6276c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/initgroups.c \
6376c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/ioctl.c \
6476c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/isatty.c \
6576c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/issetugid.c \
6676c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/ldexp.c \
6776c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/md5.c \
6876c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/memmem.c \
6976c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/memswap.c \
7076c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/name_mem.c \
7176c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/pathconf.c \
7276c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/perror.c \
7376c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/ptsname.c \
7476c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/ptsname_r.c \
7576c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/pututline.c \
7676c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/reboot.c \
7776c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/recv.c \
7876c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/sched_cpualloc.c \
7976c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/sched_cpucount.c \
8076c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/semaphore.c \
8176c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/send.c \
8276c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/setpgrp.c \
8376c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/sigblock.c \
8476c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/siginterrupt.c \
8576c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/sigsetmask.c \
8676c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/strndup.c \
8776c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/strntoimax.c \
8876c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/strntoumax.c \
8976c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/strtotimeval.c \
9076c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/system_properties.c \
9176c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/system_properties_compat.c \
9276c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/tcgetpgrp.c \
9376c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/tcsetpgrp.c \
9476c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/time64.c \
9576c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/umount.c \
9676c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/unlockpt.c \
9776c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/utmp.c \
9876c8b882690dd9025caa625a023996c136377cb1Ying Wang    bionic/wcscoll.c \
99aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/asprintf.c \
100aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/fflush.c \
101aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/fgetc.c \
102aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/findfp.c \
103aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/fprintf.c \
104aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/fputc.c \
105aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/fread.c \
106aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/freopen.c \
107aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/fscanf.c \
108aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/fseek.c \
109aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/ftell.c \
110aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/fvwrite.c \
111aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/gets.c \
112aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/printf.c \
113aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/refill.c \
114aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/rewind.c \
115aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/scanf.c \
116aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/snprintf.c\
117aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/sprintf.c \
118aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/sscanf.c \
119aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/stdio.c \
120aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/ungetc.c \
121aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/vasprintf.c \
122aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/vfprintf.c \
123aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/vfscanf.c \
124aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/vprintf.c \
125aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/vscanf.c \
126aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/vsnprintf.c \
127aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/vsprintf.c \
128aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/vsscanf.c \
129aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdio/wbuf.c \
130aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdlib/atexit.c \
131aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdlib/ctype_.c \
132aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdlib/getenv.c \
133aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdlib/putenv.c \
134aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdlib/setenv.c \
135aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdlib/strtod.c \
136aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdlib/strtoimax.c \
137aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdlib/strtol.c \
138aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdlib/strtoll.c \
139aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdlib/strtoul.c \
140aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdlib/strtoull.c \
141aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdlib/strtoumax.c \
142aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdlib/tolower_.c \
143aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    stdlib/toupper_.c \
144aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    string/strcasecmp.c \
145aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    string/strcspn.c \
146aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    string/strdup.c \
147aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    string/strpbrk.c \
148aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    string/strsep.c \
149aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    string/strspn.c \
150aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    string/strstr.c \
151aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    string/strtok.c \
152aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    unistd/alarm.c \
153aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    unistd/exec.c \
154aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    unistd/fnmatch.c \
155aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    unistd/syslog.c \
156aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    unistd/system.c \
157aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    unistd/time.c \
158aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    wchar/wcswidth.c \
159aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    wchar/wcsxfrm.c \
160eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
161eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
162eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hugheslibc_dns_src_files += \
163eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/gethnamaddr.c \
164eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/inet/nsap_addr.c \
165eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/nameser/ns_name.c \
166eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/nameser/ns_netint.c \
167eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/nameser/ns_parse.c \
168eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/nameser/ns_print.c \
169eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/nameser/ns_samedomain.c \
170eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/nameser/ns_ttl.c \
171eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/net/base64.c \
172eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/net/getaddrinfo.c \
173eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/net/getnameinfo.c \
174eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/net/getservbyname.c \
175eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/net/getservbyport.c \
176eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/net/getservent.c \
177eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/net/nsdispatch.c \
178eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/resolv/__dn_comp.c \
179eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/resolv/herror.c \
180eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/resolv/res_cache.c \
181eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/resolv/__res_close.c \
182eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/resolv/res_comp.c \
183eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/resolv/res_data.c \
184eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/resolv/res_debug.c \
185eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/resolv/res_init.c \
186eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/resolv/res_mkquery.c \
187eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/resolv/res_query.c \
188eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/resolv/__res_send.c \
189eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/resolv/res_send.c \
190eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    netbsd/resolv/res_state.c \
191eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
1921dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
19359a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris# Fortify implementations of libc functions.
19459a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferrislibc_common_src_files += \
19590201d5eca050414d50a433866ccb580415bb0d4Nick Kralevich    bionic/__FD_chk.cpp \
19659a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__fgets_chk.cpp \
19759a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__memmove_chk.cpp \
198b036b5ca36c1e12b075909b3eca6eab73ee611cfNick Kralevich    bionic/__read_chk.cpp \
19960f4f9a5b99a0a66817f50edfc2194a49f8b5146Nick Kralevich    bionic/__recvfrom_chk.cpp \
20059a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__strchr_chk.cpp \
20159a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__strlcat_chk.cpp \
20259a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__strlcpy_chk.cpp \
20359a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__strlen_chk.cpp \
20459a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__strncat_chk.cpp \
20559a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__strncpy_chk.cpp \
20659a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__strrchr_chk.cpp \
20759a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__umask_chk.cpp \
20859a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__vsnprintf_chk.cpp \
20959a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris    bionic/__vsprintf_chk.cpp \
21059a13c122ebc4191583b67c846a95d690dcda5cfChristopher Ferris
21129c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hugheslibc_bionic_src_files := \
21261e699a133a4807fe878a6cb0d7190d7c96e21f8Elliott Hughes    bionic/abort.cpp \
213f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/access.cpp \
214063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/assert.cpp \
21511952073af22568bba0b661f7a9d4402c443a888Elliott Hughes    bionic/bionic_time_conversions.cpp \
216428f5567be25b8090e3dd72e2d3d337c305b514eElliott Hughes    bionic/brk.cpp \
217f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/chmod.cpp \
218f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/chown.cpp \
21936d6188f8cd8b948fb797f11d9620d63d0c2215aElliott Hughes    bionic/clone.cpp \
220c30396f5f225e0b5a83a35432e2d82a7063cfdb9David 'Digit' Turner    bionic/dirent.cpp \
221cac7b9d6ec1a09814bc028e2f768db732f018891Elliott Hughes    bionic/dup2.cpp \
222cac7b9d6ec1a09814bc028e2f768db732f018891Elliott Hughes    bionic/epoll_create.cpp \
22311952073af22568bba0b661f7a9d4402c443a888Elliott Hughes    bionic/epoll_pwait.cpp \
224aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    bionic/epoll_wait.cpp \
2252a0b873065edb304fa2d1c54f8de663ea638b8abElliott Hughes    bionic/__errno.cpp \
2269b84824dfd597d8137137fa33295faa26cc70ae0Kito Cheng    bionic/eventfd_read.cpp \
2279b84824dfd597d8137137fa33295faa26cc70ae0Kito Cheng    bionic/eventfd_write.cpp \
228bf425680e484486803bf21e4c4cd1e3f36614a3cElliott Hughes    bionic/ffs.cpp \
229232163cf70712fe00436b70dd495f4cf405e9eabElliott Hughes    bionic/fork.cpp \
230d0be7c8f9a06b3ca8ea7647ea35c8f9dc63f0fe1Elliott Hughes    bionic/futimens.cpp \
2312c5153b043b44e9935a334ae9b2d5a4bc5258b40Nick Kralevich    bionic/getauxval.cpp \
232063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/getcwd.cpp \
233cac7b9d6ec1a09814bc028e2f768db732f018891Elliott Hughes    bionic/inotify_init.cpp \
234f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/lchown.cpp \
23542b2c6a5eed5e4ef35315b8cd32d1355f12a69b6Elliott Hughes    bionic/libc_init_common.cpp \
2368f2a5a0b40fc82126c691d5c30131d908772aab7Elliott Hughes    bionic/libc_logging.cpp \
23758b575485c446f9d76ee00f67516ed42cf017769Elliott Hughes    bionic/libgen.cpp \
238f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/link.cpp \
239f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/lstat.cpp \
240f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/mkdir.cpp \
241594b1a4af204aa9de2b4913182f4556e38d71648Elliott Hughes    bionic/mkfifo.cpp \
242f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/mknod.cpp \
243f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/open.cpp \
24411952073af22568bba0b661f7a9d4402c443a888Elliott Hughes    bionic/pause.cpp \
245cac7b9d6ec1a09814bc028e2f768db732f018891Elliott Hughes    bionic/pipe.cpp \
24611952073af22568bba0b661f7a9d4402c443a888Elliott Hughes    bionic/poll.cpp \
247f64b8ea09db3bdd84eed59f7721301743332b3feElliott Hughes    bionic/posix_fallocate.cpp \
248c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/pthread_atfork.cpp \
2493e898476c7230b60a0f76968e64ff25f475b48c0Elliott Hughes    bionic/pthread_attr.cpp \
250c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/pthread_cond.cpp \
251c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/pthread_create.cpp \
2529d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_detach.cpp \
2539d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_equal.cpp \
254c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/pthread_exit.cpp \
2559d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_getcpuclockid.cpp \
2569d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_getschedparam.cpp \
2579d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_internals.cpp \
2589d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_join.cpp \
259c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/pthread_key.cpp \
2609d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_kill.cpp \
261c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/pthread_mutex.cpp \
262c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/pthread_once.cpp \
263c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/pthread_rwlock.cpp \
2649d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_self.cpp \
2653e898476c7230b60a0f76968e64ff25f475b48c0Elliott Hughes    bionic/pthread_setname_np.cpp \
2669d23e04c43dbb8480bea8be28b8a2f37423bec49Elliott Hughes    bionic/pthread_setschedparam.cpp \
267c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    bionic/pthread_sigmask.cpp \
268c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/ptrace.cpp \
269d8a5a6f513c6fa99229e9c82c5c308c7cd6b3d54Chris Dearman    bionic/raise.cpp \
270f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/readlink.cpp \
271f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/rename.cpp \
272f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/rmdir.cpp \
273428f5567be25b8090e3dd72e2d3d337c305b514eElliott Hughes    bionic/sbrk.cpp \
274701bec2af33feaa9dddf12ccf8e4c714441b7f2eElliott Hughes    bionic/scandir.cpp \
2754ca685e36e9d7f53c135eba2b4b8ece152129dbeKito Cheng    bionic/sched_getaffinity.cpp \
276887e1140fe7596fa1239a0bc802d2cdb51c57d3cElliott Hughes    bionic/sched_getcpu.cpp \
277232163cf70712fe00436b70dd495f4cf405e9eabElliott Hughes    bionic/setegid.cpp \
2784a9e837840fda3aaea48aeba85c7c7a8782d2586Elliott Hughes    bionic/__set_errno.cpp \
279232163cf70712fe00436b70dd495f4cf405e9eabElliott Hughes    bionic/seteuid.cpp \
280063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/setlocale.cpp \
281c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes    bionic/sigaction.cpp \
282c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes    bionic/sigaddset.cpp \
283c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes    bionic/sigdelset.cpp \
284c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes    bionic/sigemptyset.cpp \
285c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes    bionic/sigfillset.cpp \
286c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes    bionic/sigismember.cpp \
287c7e9b2331771e5e87c34a8ee3dc6cc41d35b02feElliott Hughes    bionic/signal.cpp \
288aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    bionic/signalfd.cpp \
28940d105ccb3e6283566ce54b693b3088f31aa4f26Elliott Hughes    bionic/sigpending.cpp \
29019e62325c268a668692e2b65fde2284079f369aaElliott Hughes    bionic/sigprocmask.cpp \
2911f5af926fa626734981d6b4dcc0ab54e520032a9Elliott Hughes    bionic/sigsuspend.cpp \
292c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    bionic/sigwait.cpp \
293f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/stat.cpp \
29406040fd75c1edff9e5ffb2b3d3e2a6e66d57c11dElliott Hughes    bionic/statvfs.cpp \
295063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/strerror.cpp \
296063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/strerror_r.cpp \
297063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/strsignal.cpp \
298063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/stubs.cpp \
299f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/symlink.cpp \
30091a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes    bionic/sysconf.cpp \
301aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    bionic/sys_siglist.c \
302aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    bionic/sys_signame.c \
303063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/tdestroy.cpp \
304aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9Elliott Hughes    bionic/thread_atexit.cpp \
305c3f114037dbf028896310609fd28cf2b3da99c4dElliott Hughes    bionic/timer.cpp \
306063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/tmpfile.cpp \
307f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/unlink.cpp \
308f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes    bionic/utimes.cpp \
30917a8b0db63d54e9d79bf11112ace0c4fe9606289Elliott Hughes    bionic/wait.cpp \
310063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes    bionic/wchar.cpp \
31129c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
312ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes
313f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hugheslibc_upstream_freebsd_src_files := \
314ab61eb366ac48addf2bca6093a34455193f5c8dfElliott Hughes    upstream-freebsd/lib/libc/gen/sleep.c \
315ab61eb366ac48addf2bca6093a34455193f5c8dfElliott Hughes    upstream-freebsd/lib/libc/gen/usleep.c \
3166b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/clrerr.c \
3176b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fclose.c \
3186b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fdopen.c \
3196b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/feof.c \
3206b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/ferror.c \
3216b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fgetln.c \
3226b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fgetpos.c \
3236b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fgets.c \
3246b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fileno.c \
3256b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/flags.c \
3266b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fopen.c \
3276b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fpurge.c \
3286b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fputs.c \
3296b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fsetpos.c \
3306b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/funopen.c \
3316b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fwalk.c \
3326b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/fwrite.c \
3336b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/getc.c \
3346b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/getchar.c \
335677ee5647721df22f13909375d5d0e770a1a80bfElliott Hughes    upstream-freebsd/lib/libc/stdio/makebuf.c \
336284f7880323d33356df682c3cfb6b7f0c665bfd4Elliott Hughes    upstream-freebsd/lib/libc/stdio/mktemp.c \
3376b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/putc.c \
3386b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/putchar.c \
3396b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/puts.c \
3406b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/putw.c \
3416b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/remove.c \
3426b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/rget.c \
3436b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/setbuf.c \
3446b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/setbuffer.c \
345677ee5647721df22f13909375d5d0e770a1a80bfElliott Hughes    upstream-freebsd/lib/libc/stdio/setvbuf.c \
3466b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/tempnam.c \
3476b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/tmpnam.c \
3486b05c8e28017518fae04a3a601d0d245916561d2Elliott Hughes    upstream-freebsd/lib/libc/stdio/wsetup.c \
349aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes    upstream-freebsd/lib/libc/stdlib/abs.c \
350d278b828fef47fb2d7098f8ec70867fbd3da09d6Elliott Hughes    upstream-freebsd/lib/libc/stdlib/getopt_long.c \
351aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes    upstream-freebsd/lib/libc/stdlib/imaxabs.c \
352aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes    upstream-freebsd/lib/libc/stdlib/imaxdiv.c \
353aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes    upstream-freebsd/lib/libc/stdlib/labs.c \
354aec2ffbc5a7b45368ceab3663265fbb659968fe7Elliott Hughes    upstream-freebsd/lib/libc/stdlib/llabs.c \
3550b25f633a23e575c8a1f9547d1af5dc5b0157a1cElliott Hughes    upstream-freebsd/lib/libc/stdlib/qsort.c \
356f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    upstream-freebsd/lib/libc/stdlib/realpath.c \
357eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcpcpy.c \
358eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcpncpy.c \
359eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcscasecmp.c \
360eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcscspn.c \
361eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsdup.c \
362eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcslcat.c \
363eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcslcpy.c \
364eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsncasecmp.c \
365eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsncat.c \
366eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsncmp.c \
367eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsncpy.c \
368eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsnlen.c \
369eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcspbrk.c \
370eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsspn.c \
371eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcsstr.c \
372eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wcstok.c \
373eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wmemchr.c \
374eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wmemcpy.c \
375eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wmemmove.c \
376eb93ebffba21e2c9b8a12bb86db60d38c7750270Elliott Hughes    upstream-freebsd/lib/libc/string/wmemset.c \
377f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
378f8b3a920a895a53b207017249080087d562bd0d2Elliott Hugheslibc_upstream_netbsd_src_files := \
379e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
380e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/common/lib/libc/inet/inet_addr.c \
381e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/compat-43/creat.c \
382e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/gen/ftw.c \
383e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/gen/nftw.c \
384e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/gen/nice.c \
3856b3f49a5374305ce9690c3c5ca2aadc90f54c521Elliott Hughes    upstream-netbsd/libc/gen/popen.c \
386e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/gen/psignal.c \
387ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/gen/setjmperr.c \
388e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/gen/utime.c \
389e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/inet/inet_ntoa.c \
390e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/inet/inet_ntop.c \
391e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/inet/inet_pton.c \
392ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/isc/ev_streams.c \
393ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/isc/ev_timers.c \
394e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/regex/regcomp.c \
395e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/regex/regerror.c \
396e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/regex/regexec.c \
397e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/regex/regfree.c \
398e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdio/getdelim.c \
399e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdio/getline.c \
400ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/stdlib/bsearch.c \
401ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/stdlib/div.c \
402e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/drand48.c \
403e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/erand48.c \
404652289942d0d2543af90c8af9c04d80a2edb481aPawit Pornkitprasan    upstream-netbsd/libc/stdlib/exit.c \
405e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/jrand48.c \
406ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/stdlib/ldiv.c \
407ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/stdlib/lldiv.c \
408e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/lrand48.c \
409e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/mrand48.c \
410e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/nrand48.c \
411e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/_rand48.c \
412e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/seed48.c \
413e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/srand48.c \
414e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/tdelete.c \
415e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/tfind.c \
416e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/stdlib/tsearch.c \
417c51cd764a2d0897234762abd4dbd21420cb9f17dElliott Hughes    upstream-netbsd/libc/string/memccpy.c \
418e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/string/strcasestr.c \
4192b473070126345e323d0694b87f88264cc9a77ccElliott Hughes    upstream-netbsd/libc/string/strcoll.c \
420e8bcca3a2ca4a70156c72239d62bb68eeb2929fdElliott Hughes    upstream-netbsd/libc/string/strxfrm.c \
421652289942d0d2543af90c8af9c04d80a2edb481aPawit Pornkitprasan    upstream-netbsd/libc/thread-stub/__isthreaded.c \
422ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    upstream-netbsd/libc/unistd/killpg.c \
423f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
424f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wanglibc_arch_static_src_files := \
425f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    bionic/dl_iterate_phdr_static.cpp \
4267c83a1ed81a15f3e75836c1ac7d500a952f02e10Christopher Ferris
427ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define some common cflags
428ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
4291dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_cflags := \
430470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes    -DANDROID_CHANGES \
431470631ed79538ce912edb94505dee3e24af8db89Elliott Hughes    -D_LIBC=1 \
4322ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes    -Wall -Wextra \
4332ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes
4342ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes# Try to catch typical 32-bit assumptions that break with 64-bit pointers.
4352ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hugheslibc_common_cflags += \
4362ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes    -Werror=pointer-to-int-cast \
4372ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes    -Werror=int-to-pointer-cast \
4382ec400bfc7d1605b68ae3f5501add7bf2647b9ddElliott Hughes    -Werror=type-limits \
4391dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
440d2c9dcc9265e66f6432ec39dcc7378b944449e60Dave Bortifeq ($(strip $(DEBUG_BIONIC_LIBC)),true)
4411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project  libc_common_cflags += -DDEBUG
4421dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectendif
4431dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
4442fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren# To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in
4452fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren# the appropriate BoardConfig.mk file.
4462fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren#
4472fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Renifneq ($(BOARD_MALLOC_ALIGNMENT),)
4482fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren  libc_common_cflags += -DMALLOC_ALIGNMENT=$(BOARD_MALLOC_ALIGNMENT)
4492fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Renendif
4502fd81ef71c10aecf6583facdd79f8f60f3eed678Jack Ren
451fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden# Define ANDROID_SMP appropriately.
452fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenifeq ($(TARGET_CPU_SMP),true)
453fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden    libc_common_cflags += -DANDROID_SMP=1
454fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenelse
455fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden    libc_common_cflags += -DANDROID_SMP=0
456fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFaddenendif
457fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aaAndy McFadden
458762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines# Define some common conlyflags
459762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hineslibc_common_conlyflags := \
460762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines    -std=gnu99
461762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines
462762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines# Define some common cppflags
463762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hineslibc_common_cppflags := \
464762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines    -std=gnu++11
465762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines
466ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# Define some common includes
467ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
4681dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectlibc_common_c_includes := \
46976c8b882690dd9025caa625a023996c136377cb1Ying Wang    $(LOCAL_PATH)/stdlib  \
47076c8b882690dd9025caa625a023996c136377cb1Ying Wang    $(LOCAL_PATH)/string  \
47176c8b882690dd9025caa625a023996c136377cb1Ying Wang    $(LOCAL_PATH)/stdio   \
47276c8b882690dd9025caa625a023996c136377cb1Ying Wang    external/safe-iop/include
4731dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
474f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# ========================================================
475f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# Add in the arch-specific flags.
476f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# Must be called with $(eval).
477f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# $(1): the LOCAL_ variable name
478f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# $(2): the bionic variable name to pull in
479f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangdefine patch-up-arch-specific-flags
480f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(1)_$(TARGET_ARCH) += $($(2)_$(TARGET_ARCH))
481f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangifdef TARGET_2ND_ARCH
482f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(1)_$(TARGET_2ND_ARCH) += $($(2)_$(TARGET_2ND_ARCH))
483a4c7933b49f1d43579f184167e79a5fb237bd206Raghu Gandhamendif
484f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangendef
485f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
4861dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
487ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
4886334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# libbionic_ssp.a - stack protector code
4896334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# ========================================================
4906334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich#
4916334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# The stack protector code needs to be compiled
4926334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# with -fno-stack-protector, since it modifies the
4936334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# stack canary.
4946334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
4956334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevichinclude $(CLEAR_VARS)
4966334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
497642331b5dd5647e7d196ac4f44406fd435478a56Elliott HughesLOCAL_SRC_FILES := bionic/__stack_chk_fail.cpp
498dc5ec07158079b39f758ed41eca5b937e52c3729Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector -Werror
499762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
500762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
5016334c662cae4cd9b61f5f3185048b0cd3633dad7Nick KralevichLOCAL_C_INCLUDES := $(libc_common_c_includes)
5026334c662cae4cd9b61f5f3185048b0cd3633dad7Nick KralevichLOCAL_MODULE := libbionic_ssp
503d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
5046334c662cae4cd9b61f5f3185048b0cd3633dad7Nick KralevichLOCAL_SYSTEM_SHARED_LIBRARIES :=
5056334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
506f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
5076334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevichinclude $(BUILD_STATIC_LIBRARY)
5086334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
5096334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich
5106334c662cae4cd9b61f5f3185048b0cd3633dad7Nick Kralevich# ========================================================
511ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes# libc_tzcode.a - upstream 'tzcode' code
512ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes# ========================================================
513ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes
514ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughesinclude $(CLEAR_VARS)
515ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes
516f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_SRC_FILES := \
517f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    tzcode/asctime.c \
518f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    tzcode/difftime.c \
519f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    tzcode/localtime.c \
520f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    tzcode/strftime.c \
521f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    tzcode/strptime.c \
522f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
523ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_CFLAGS := \
524ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    $(libc_common_cflags) \
525ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    -DSTD_INSPIRED=1 \
526ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    -DTZDIR=\"/system/usr/share/zoneinfo\" \
527ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    -DTM_GMTOFF=tm_gmtoff \
528ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    -DUSG_COMPAT=1
529762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
530762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
531ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes)
532ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_MODULE := libc_tzcode
533d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
534ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
535ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes
536f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
537ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
538ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes
539ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes
540ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes# ========================================================
541eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes# libc_dns.a - modified NetBSD DNS code
542eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes# ========================================================
543eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
544eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughesinclude $(CLEAR_VARS)
545eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
546eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_SRC_FILES := $(libc_dns_src_files)
547eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_CFLAGS := \
548eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    $(libc_common_cflags) \
549eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    -DINET6 \
550eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    -I$(LOCAL_PATH)/private \
551eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    -I$(LOCAL_PATH)/upstream-netbsd/libc/include # for NetBSD private headers
552eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
553eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
554eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_CPPFLAGS := $(libc_common_cppflags)
555eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes)
556eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_MODULE := libc_dns
557eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
558eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
559eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
560f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
561eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
562eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
563eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
564eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes# ========================================================
565f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# libc_freebsd.a - upstream FreeBSD C library code
566f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# ========================================================
567f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes#
568f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# These files are built with the freebsd-compat.h header file
569f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# automatically included.
570f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
571f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughesinclude $(CLEAR_VARS)
572f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
573f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_SRC_FILES := $(libc_upstream_freebsd_src_files)
574f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_CFLAGS := \
575f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    $(libc_common_cflags) \
576f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    -I$(LOCAL_PATH)/upstream-freebsd \
577f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    -I$(LOCAL_PATH)/upstream-freebsd/libc/include \
578f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes    -include upstream-freebsd/freebsd-compat.h
579762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
580762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
581f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes)
582f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_MODULE := libc_freebsd
583d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
584f0777843c03deb26b1f78c8edd17c557041696e9Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
585f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
586f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
587f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
588f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
589f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes
590f0777843c03deb26b1f78c8edd17c557041696e9Elliott Hughes# ========================================================
591f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# libc_netbsd.a - upstream NetBSD C library code
592f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# ========================================================
593f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes#
594f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# These files are built with the netbsd-compat.h header file
595f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# automatically included.
596f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
597f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughesinclude $(CLEAR_VARS)
598f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
599f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_SRC_FILES := $(libc_upstream_netbsd_src_files)
600f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_CFLAGS := \
601f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes    $(libc_common_cflags) \
602eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    -DPOSIX_MISTAKE \
6033d2d448af1b16923f5a329b49bb8e658dbad8a06Elliott Hughes    -I$(LOCAL_PATH)/upstream-netbsd \
604ab44f52202878cdf2bf22457aeae33ec24089556Elliott Hughes    -I$(LOCAL_PATH)/upstream-netbsd/libc/include \
605f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes    -include upstream-netbsd/netbsd-compat.h
606762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
607762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
608f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes)
609f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_MODULE := libc_netbsd
610d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
611f8b3a920a895a53b207017249080087d562bd0d2Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
612f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
613f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
614f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
615f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
616f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
617f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes# ========================================================
61829c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# libc_bionic.a - home-grown C library code
61929c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# ========================================================
620e7c59f9e2041812c597ff1c8689d47d1bfd32883Elliott Hughes
62129c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughesinclude $(CLEAR_VARS)
62229c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
62329c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_SRC_FILES := $(libc_bionic_src_files)
62429c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags) -Werror
625762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
626762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
62729c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_C_INCLUDES := $(libc_common_c_includes)
62829c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_MODULE := libc_bionic
629d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
63029c7f0b4d18f812267c2194b85204e19e41d0387Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
63129c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
63266759d6041b33706c3a92dde48492ba4f2bbab2fElliott Hughes# Set -DPTHREAD_DEBUG_ENABLED=true to enable support for pthread deadlock prediction.
63366759d6041b33706c3a92dde48492ba4f2bbab2fElliott Hughes# Since this code is experimental it is disabled by default.
634f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_CFLAGS += -DPTHREAD_DEBUG_ENABLED=false
63566759d6041b33706c3a92dde48492ba4f2bbab2fElliott Hughes
636f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
637f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_bionic_src_files))
63829c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
63929c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
64029c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes
64129c7f0b4d18f812267c2194b85204e19e41d0387Elliott Hughes# ========================================================
642b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes# libc_syscalls.a
643b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes# ========================================================
644b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes
645b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughesinclude $(CLEAR_VARS)
646b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes
647f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_SRC_FILES_$(TARGET_ARCH) := $(call all-S-files-under,arch-$(TARGET_ARCH)/syscalls)
648f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangifdef TARGET_2ND_ARCH
649f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_SRC_FILES_$(TARGET_2ND_ARCH) := $(call all-S-files-under,arch-$(TARGET_2ND_ARCH)/syscalls)
650f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangendif
651b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott HughesLOCAL_MODULE := libc_syscalls
652b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
653b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott HughesLOCAL_SYSTEM_SHARED_LIBRARIES :=
654b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes
655b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughesinclude $(BUILD_STATIC_LIBRARY)
656b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes
657b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes
658b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes# ========================================================
659ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# libc_common.a
660ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
661f8b3a920a895a53b207017249080087d562bd0d2Elliott Hughes
662ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavininclude $(CLEAR_VARS)
6631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
664ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_SRC_FILES := $(libc_common_src_files)
665eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott HughesLOCAL_CFLAGS := $(libc_common_cflags)
666762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
667762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
668ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_C_INCLUDES := $(libc_common_c_includes)
6691dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_MODULE := libc_common
670d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
671ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott HughesLOCAL_WHOLE_STATIC_LIBRARIES := \
672ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    libbionic_ssp \
673ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    libc_bionic \
674eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    libc_dns \
675ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    libc_freebsd \
676ce4783ce76a4ef888466e02e4c6f3a0a3910bce8Elliott Hughes    libc_netbsd \
677b3a23bd0178c8edbb34e310be08e6fb73ac6ba09Elliott Hughes    libc_syscalls \
678eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes    libc_tzcode \
679eb847bc8666842a3cfc9c06e8458ad1abebebaf0Elliott Hughes
6801dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
6811dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
682c97c5fc7880267fd835d22946a920bf370461cf2Ying Wang# TODO: split out the asflags.
683c97c5fc7880267fd835d22946a920bf370461cf2Ying WangLOCAL_ASFLAGS := $(LOCAL_CFLAGS)
684c97c5fc7880267fd835d22946a920bf370461cf2Ying Wang
685f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
686f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_common_src_files))
687f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_ASFLAGS,LOCAL_CFLAGS))
6881dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_STATIC_LIBRARY)
6891dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
6901dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
691ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
69249e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# libc_nomalloc.a
69349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# ========================================================
69449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin#
69549e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# This is a version of the static C library that does not
69691a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# include malloc. It's useful in situations when the user wants
69791a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# to provide their own malloc implementation, or wants to
69891a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# explicitly disallow the use of the use of malloc,
69991a9925998f2b878f0245ce03aab22cc412a4d8bElliott Hughes# such as in the dynamic loader.
70049e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
70149e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavininclude $(CLEAR_VARS)
70249e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
70349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_SRC_FILES := \
704f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    $(libc_arch_static_src_files) \
705f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    $(libc_static_common_src_files) \
706f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    bionic/libc_init_static.cpp
70749e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
70849e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_C_INCLUDES := $(libc_common_c_includes)
7096a51defa034a1c033ed01f7de444c0a4fc615249David 'Digit' TurnerLOCAL_CFLAGS := $(libc_common_cflags) \
710762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines                -DLIBC_STATIC
711762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
712762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
71349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
71449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_MODULE := libc_nomalloc
715d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
71649e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
71749e55332784b82f7112ee7c1ea3c176c9dc32d7aDima ZavinLOCAL_SYSTEM_SHARED_LIBRARIES :=
71849e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
719f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
720f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_static_src_files))
72149e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavininclude $(BUILD_STATIC_LIBRARY)
72249e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
72349e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin
72449e55332784b82f7112ee7c1ea3c176c9dc32d7aDima Zavin# ========================================================
7251dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# libc.a
7261dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
7271dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS)
7281dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
7291dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \
730f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    $(libc_arch_static_src_files) \
731f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    $(libc_static_common_src_files) \
732f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    bionic/dlmalloc.c \
733f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    bionic/malloc_debug_common.cpp \
734f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    bionic/libc_init_static.cpp \
7351dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
736b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_CFLAGS := $(libc_common_cflags) \
737762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen Hines                -DLIBC_STATIC
738762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
739762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
7401dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes)
741ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_MODULE := libc
742d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
7431dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
7441dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
7451dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
746f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
747f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_static_src_files))
7481dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_STATIC_LIBRARY)
7491dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
7501dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
751ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
7521dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# libc.so
7531dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
7541dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS)
7551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
75666759d6041b33706c3a92dde48492ba4f2bbab2fElliott HughesLOCAL_CFLAGS := $(libc_common_cflags)
757762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
758762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
7591dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes)
7601dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
7611dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \
762e7c59f9e2041812c597ff1c8689d47d1bfd32883Elliott Hughes    $(libc_arch_dynamic_src_files) \
763e7c59f9e2041812c597ff1c8689d47d1bfd32883Elliott Hughes    $(libc_static_common_src_files) \
764e7c59f9e2041812c597ff1c8689d47d1bfd32883Elliott Hughes    bionic/dlmalloc.c \
765e7c59f9e2041812c597ff1c8689d47d1bfd32883Elliott Hughes    bionic/malloc_debug_common.cpp \
766e7c59f9e2041812c597ff1c8689d47d1bfd32883Elliott Hughes    bionic/debug_mapinfo.cpp \
767e7c59f9e2041812c597ff1c8689d47d1bfd32883Elliott Hughes    bionic/debug_stacktrace.cpp \
768e7c59f9e2041812c597ff1c8689d47d1bfd32883Elliott Hughes    bionic/pthread_debug.cpp \
769e7c59f9e2041812c597ff1c8689d47d1bfd32883Elliott Hughes    bionic/libc_init_dynamic.cpp \
7701dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
7711dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_MODULE:= libc
772d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
773914d8d4cff10f023ccd382fb43b2c7833dd34f72Elliott HughesLOCAL_REQUIRED_MODULES := tzdata
7741dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
7751dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# WARNING: The only library libc.so should depend on is libdl.so!  If you add other libraries,
7761dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries.  This
7771dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ensures that symbols that are pulled into those new libraries from libgcc.a are not declared
7781dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# external; if that were the case, then libc would not pull those symbols from libgcc.a as it
7791dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# should, instead relying on the external symbols from the dependent libraries.  That would
7801dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# create an "cloaked" dependency on libgcc.a in libc though the libraries, which is not what
7811dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# you wanted!
7821dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
7831dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SHARED_LIBRARIES := libdl
7841dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
7851dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
7861dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
787f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
78876c8b882690dd9025caa625a023996c136377cb1Ying Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_dynamic_src_files))
78976c8b882690dd9025caa625a023996c136377cb1Ying Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_static_common_src_files))
790f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang# special for arm
791f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_NO_CRT_arm := true
792f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_CFLAGS_arm += -DCRT_LEGACY_WORKAROUND
793f25d677147ae55a1f3b6ef7fa3ee27921792813fYing WangLOCAL_SRC_FILES_arm += \
794f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    arch-common/bionic/crtbegin_so.c \
795f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    arch-arm/bionic/atexit_legacy.c \
796f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    arch-common/bionic/crtend_so.S
797f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang
7981dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_SHARED_LIBRARY)
7991dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
8001dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
801b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# For all builds, except for the -user build we will enable memory
802b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# allocation checking (including memory leaks, buffer overwrites, etc.)
803b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# Note that all these checks are also controlled by env. settings
804b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# that can enable, or disable specific checks. Note also that some of
805b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# the checks are available only in emulator and are implemeted in
806b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_qemu_instrumented.so.
807b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineifneq ($(TARGET_BUILD_VARIANT),user)
808b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
809ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima Zavin# ========================================================
810b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_debug_leak.so
8111dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
8121dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(CLEAR_VARS)
8131dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
814ca122b0e34df0e8c485be0d3ab1b80f728b76276Dima ZavinLOCAL_CFLAGS := \
815f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    $(libc_common_cflags) \
816f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    -DMALLOC_LEAK_CHECK
817762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
818762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
8191dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
8201dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_C_INCLUDES := $(libc_common_c_includes)
8211dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
8221dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SRC_FILES := \
823f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    bionic/debug_mapinfo.cpp \
824f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    bionic/debug_stacktrace.cpp \
825f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    bionic/malloc_debug_leak.cpp \
826f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    bionic/malloc_debug_check.cpp \
8271dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
828b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE:= libc_malloc_debug_leak
829d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
8301dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
831e007775f4b21f6b94078ed1d34b753435ba28fdaPavel ChupinLOCAL_SHARED_LIBRARIES := libc libdl
832b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
833b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_SYSTEM_SHARED_LIBRARIES :=
834aa46fa24035f3ab020f9a7abd86c25ae2196bb32Bruce BeareLOCAL_ALLOW_UNDEFINED_SYMBOLS := true
835368070454b1349d1fcf29a5d1eb51c869fb538f6Iliyan Malchev
836b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# Don't install on release build
837b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE_TAGS := eng debug
8381dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
839f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
840b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineinclude $(BUILD_SHARED_LIBRARY)
841b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
842b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
843b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# ========================================================
844b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# libc_malloc_debug_qemu.so
845b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine# ========================================================
846b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkineinclude $(CLEAR_VARS)
847b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
848b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_CFLAGS := \
849f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    $(libc_common_cflags) \
850f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    -DMALLOC_QEMU_INSTRUMENT
851762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CONLYFLAGS := $(libc_common_conlyflags)
852762cea46f070e25b33de6f36a54fb7c293f0fee5Stephen HinesLOCAL_CPPFLAGS := $(libc_common_cppflags)
853b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
854b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_C_INCLUDES := $(libc_common_c_includes)
855b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
856b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_SRC_FILES := \
857f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang    bionic/malloc_debug_qemu.cpp
858b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
859b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE:= libc_malloc_debug_qemu
860d7a632948d5b3128cc536a2c4db3124b4fa57a80Christopher FerrisLOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
861b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
8627c0c3793722aea293c45921ef50e4adcdf9645ceMathias AgopianLOCAL_SHARED_LIBRARIES := libc libdl
8631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_WHOLE_STATIC_LIBRARIES := libc_common
8641dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source ProjectLOCAL_SYSTEM_SHARED_LIBRARIES :=
865368070454b1349d1fcf29a5d1eb51c869fb538f6Iliyan Malchev
8661dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# Don't install on release build
867b74ceb25aae555570df64fa4d4076272733a9a20Vladimir ChtchetkineLOCAL_MODULE_TAGS := eng debug
8681dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
869f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wang$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
8701dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(BUILD_SHARED_LIBRARY)
8711dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
872f25d677147ae55a1f3b6ef7fa3ee27921792813fYing Wangendif  #!user
873b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
874b74ceb25aae555570df64fa4d4076272733a9a20Vladimir Chtchetkine
8751dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project# ========================================================
8761dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectinclude $(call all-makefiles-under,$(LOCAL_PATH))
877