| Serban Constantinescu | e210488 | 2013-09-26 11:37:10 +0100 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 2 |  | 
| Christopher Ferris | d7a6329 | 2013-10-03 13:26:22 -0700 | [diff] [blame] | 3 | # Make everything depend on any changes to included makefiles. | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 4 | libc_common_additional_dependencies := $(LOCAL_PATH)/Android.mk | 
 | 5 |  | 
 | 6 | # Load config for TARGET_ARCH | 
 | 7 | my_2nd_arch_prefix := | 
 | 8 | include $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk | 
 | 9 | libc_common_additional_dependencies += \ | 
 | 10 |     $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk | 
 | 11 |  | 
 | 12 |  | 
 | 13 | ifdef TARGET_2ND_ARCH | 
 | 14 | # Load config for TARGET_2ND_ARCH | 
 | 15 | my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) | 
 | 16 | include $(LOCAL_PATH)/arch-$(TARGET_2ND_ARCH)/$(TARGET_2ND_ARCH).mk | 
 | 17 | my_2nd_arch_prefix := | 
 | 18 | libc_common_additional_dependencies += \ | 
 | 19 |     $(LOCAL_PATH)/arch-$(TARGET_2ND_ARCH)/$(TARGET_2ND_ARCH).mk | 
 | 20 | endif | 
 | 21 |  | 
 | 22 | # crt obj files | 
 | 23 | # ======================================================== | 
 | 24 | # crtbrand.c needs <stdint.h> and a #define for the platform SDK version. | 
 | 25 | libc_crt_target_cflags := \ | 
 | 26 |     -I$(LOCAL_PATH)/include \ | 
 | 27 |     -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) \ | 
 | 28 |  | 
 | 29 | my_2nd_arch_prefix := | 
 | 30 | include $(LOCAL_PATH)/crt.mk | 
 | 31 | ifdef TARGET_2ND_ARCH | 
 | 32 | my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) | 
 | 33 | include $(LOCAL_PATH)/crt.mk | 
 | 34 | my_2nd_arch_prefix := | 
 | 35 | endif | 
| Christopher Ferris | d7a6329 | 2013-10-03 13:26:22 -0700 | [diff] [blame] | 36 |  | 
| Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 37 | # Define the common source files for all the libc instances | 
 | 38 | # ========================================================= | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 39 | libc_common_src_files := \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 40 | 	unistd/alarm.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 41 | 	unistd/exec.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 42 | 	unistd/fnmatch.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 43 | 	unistd/syslog.c \ | 
 | 44 | 	unistd/system.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 45 | 	unistd/time.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 46 | 	stdio/asprintf.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 47 | 	stdio/fflush.c \ | 
 | 48 | 	stdio/fgetc.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 49 | 	stdio/findfp.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 50 | 	stdio/fprintf.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 51 | 	stdio/fputc.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 52 | 	stdio/fread.c \ | 
 | 53 | 	stdio/freopen.c \ | 
 | 54 | 	stdio/fscanf.c \ | 
 | 55 | 	stdio/fseek.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 56 | 	stdio/ftell.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 57 | 	stdio/fvwrite.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 58 | 	stdio/gets.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 59 | 	stdio/printf.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 60 | 	stdio/refill.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 61 | 	stdio/rewind.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 62 | 	stdio/scanf.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 63 | 	stdio/snprintf.c\ | 
 | 64 | 	stdio/sprintf.c \ | 
 | 65 | 	stdio/sscanf.c \ | 
 | 66 | 	stdio/stdio.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 67 | 	stdio/ungetc.c \ | 
 | 68 | 	stdio/vasprintf.c \ | 
 | 69 | 	stdio/vfprintf.c \ | 
 | 70 | 	stdio/vfscanf.c \ | 
 | 71 | 	stdio/vprintf.c \ | 
 | 72 | 	stdio/vsnprintf.c \ | 
 | 73 | 	stdio/vsprintf.c \ | 
 | 74 | 	stdio/vscanf.c \ | 
 | 75 | 	stdio/vsscanf.c \ | 
 | 76 | 	stdio/wbuf.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 77 | 	stdlib/atexit.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 78 | 	stdlib/ctype_.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 79 | 	stdlib/getenv.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 80 | 	stdlib/putenv.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 81 | 	stdlib/setenv.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 82 | 	stdlib/strtod.c \ | 
 | 83 | 	stdlib/strtoimax.c \ | 
 | 84 | 	stdlib/strtol.c \ | 
 | 85 | 	stdlib/strtoll.c \ | 
 | 86 | 	stdlib/strtoul.c \ | 
 | 87 | 	stdlib/strtoull.c \ | 
 | 88 | 	stdlib/strtoumax.c \ | 
 | 89 | 	stdlib/tolower_.c \ | 
 | 90 | 	stdlib/toupper_.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 91 | 	string/strcasecmp.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 92 | 	string/strcspn.c \ | 
 | 93 | 	string/strdup.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 94 | 	string/strpbrk.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 95 | 	string/strsep.c \ | 
 | 96 | 	string/strspn.c \ | 
 | 97 | 	string/strstr.c \ | 
 | 98 | 	string/strtok.c \ | 
| David 'Digit' Turner | 3527fd6 | 2010-06-14 17:18:35 -0700 | [diff] [blame] | 99 | 	wchar/wcswidth.c \ | 
| Kristian Monsen | 7046561 | 2010-06-16 14:51:52 +0100 | [diff] [blame] | 100 | 	wchar/wcsxfrm.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 101 | 	bionic/arc4random.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 102 | 	bionic/atoi.c \ | 
 | 103 | 	bionic/atol.c \ | 
 | 104 | 	bionic/atoll.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 105 | 	bionic/bindresvport.c \ | 
| Colin Cross | fc10b24 | 2010-01-13 17:48:34 -0800 | [diff] [blame] | 106 | 	bionic/clearenv.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 107 | 	bionic/daemon.c \ | 
| Colin Cross | 64ceac3 | 2010-01-13 21:19:52 -0800 | [diff] [blame] | 108 | 	bionic/err.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 109 | 	bionic/ether_aton.c \ | 
 | 110 | 	bionic/ether_ntoa.c \ | 
| Colin Cross | fc10b24 | 2010-01-13 17:48:34 -0800 | [diff] [blame] | 111 | 	bionic/fdprintf.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 112 | 	bionic/flockfile.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 113 | 	bionic/ftime.c \ | 
 | 114 | 	bionic/ftok.c \ | 
| Colin Cross | 64ceac3 | 2010-01-13 21:19:52 -0800 | [diff] [blame] | 115 | 	bionic/fts.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 116 | 	bionic/getdtablesize.c \ | 
 | 117 | 	bionic/gethostname.c \ | 
 | 118 | 	bionic/getpgrp.c \ | 
 | 119 | 	bionic/getpriority.c \ | 
 | 120 | 	bionic/getpt.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 121 | 	bionic/if_indextoname.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 122 | 	bionic/if_nametoindex.c \ | 
 | 123 | 	bionic/initgroups.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 124 | 	bionic/ioctl.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 125 | 	bionic/isatty.c \ | 
 | 126 | 	bionic/issetugid.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 127 | 	bionic/ldexp.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 128 | 	bionic/md5.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 129 | 	bionic/memmem.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 130 | 	bionic/memswap.c \ | 
| Colin Cross | 6771b9c | 2013-08-07 13:31:17 -0700 | [diff] [blame] | 131 | 	bionic/name_mem.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 132 | 	bionic/pathconf.c \ | 
 | 133 | 	bionic/perror.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 134 | 	bionic/ptsname.c \ | 
 | 135 | 	bionic/ptsname_r.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 136 | 	bionic/pututline.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 137 | 	bionic/reboot.c \ | 
 | 138 | 	bionic/recv.c \ | 
| David 'Digit' Turner | 72e6fd4 | 2010-12-03 18:04:01 +0100 | [diff] [blame] | 139 | 	bionic/sched_cpualloc.c \ | 
 | 140 | 	bionic/sched_cpucount.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 141 | 	bionic/semaphore.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 142 | 	bionic/send.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 143 | 	bionic/setpgrp.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 144 | 	bionic/sigblock.c \ | 
 | 145 | 	bionic/siginterrupt.c \ | 
 | 146 | 	bionic/siglist.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 147 | 	bionic/signame.c \ | 
 | 148 | 	bionic/sigsetmask.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 149 | 	bionic/strndup.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 150 | 	bionic/strntoimax.c \ | 
 | 151 | 	bionic/strntoumax.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 152 | 	bionic/strtotimeval.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 153 | 	bionic/system_properties.c \ | 
| Colin Cross | 5e9a086 | 2013-06-24 18:36:39 -0700 | [diff] [blame] | 154 | 	bionic/system_properties_compat.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 155 | 	bionic/tcgetpgrp.c \ | 
 | 156 | 	bionic/tcsetpgrp.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 157 | 	bionic/time64.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 158 | 	bionic/umount.c \ | 
 | 159 | 	bionic/unlockpt.c \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 160 | 	bionic/utmp.c \ | 
| Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 161 | 	bionic/wcscoll.c \ | 
| Elliott Hughes | eb847bc | 2013-10-09 15:50:50 -0700 | [diff] [blame] | 162 |  | 
 | 163 |  | 
 | 164 | libc_dns_src_files += \ | 
 | 165 |     netbsd/gethnamaddr.c \ | 
 | 166 |     netbsd/inet/nsap_addr.c \ | 
 | 167 |     netbsd/nameser/ns_name.c \ | 
 | 168 |     netbsd/nameser/ns_netint.c \ | 
 | 169 |     netbsd/nameser/ns_parse.c \ | 
 | 170 |     netbsd/nameser/ns_print.c \ | 
 | 171 |     netbsd/nameser/ns_samedomain.c \ | 
 | 172 |     netbsd/nameser/ns_ttl.c \ | 
 | 173 |     netbsd/net/base64.c \ | 
 | 174 |     netbsd/net/getaddrinfo.c \ | 
 | 175 |     netbsd/net/getnameinfo.c \ | 
 | 176 |     netbsd/net/getservbyname.c \ | 
 | 177 |     netbsd/net/getservbyport.c \ | 
 | 178 |     netbsd/net/getservent.c \ | 
 | 179 |     netbsd/net/nsdispatch.c \ | 
 | 180 |     netbsd/resolv/__dn_comp.c \ | 
 | 181 |     netbsd/resolv/herror.c \ | 
 | 182 |     netbsd/resolv/res_cache.c \ | 
 | 183 |     netbsd/resolv/__res_close.c \ | 
 | 184 |     netbsd/resolv/res_comp.c \ | 
 | 185 |     netbsd/resolv/res_data.c \ | 
 | 186 |     netbsd/resolv/res_debug.c \ | 
 | 187 |     netbsd/resolv/res_init.c \ | 
 | 188 |     netbsd/resolv/res_mkquery.c \ | 
 | 189 |     netbsd/resolv/res_query.c \ | 
 | 190 |     netbsd/resolv/__res_send.c \ | 
 | 191 |     netbsd/resolv/res_send.c \ | 
 | 192 |     netbsd/resolv/res_state.c \ | 
 | 193 |  | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 194 |  | 
| Christopher Ferris | 59a13c1 | 2013-08-01 13:13:33 -0700 | [diff] [blame] | 195 | # Fortify implementations of libc functions. | 
 | 196 | libc_common_src_files += \ | 
| Nick Kralevich | 90201d5 | 2013-10-02 16:11:30 -0700 | [diff] [blame] | 197 |     bionic/__FD_chk.cpp \ | 
| Christopher Ferris | 59a13c1 | 2013-08-01 13:13:33 -0700 | [diff] [blame] | 198 |     bionic/__fgets_chk.cpp \ | 
| Christopher Ferris | 59a13c1 | 2013-08-01 13:13:33 -0700 | [diff] [blame] | 199 |     bionic/__memmove_chk.cpp \ | 
| Nick Kralevich | b036b5c | 2013-10-09 20:16:34 -0700 | [diff] [blame] | 200 |     bionic/__read_chk.cpp \ | 
| Nick Kralevich | 60f4f9a | 2013-09-24 16:32:07 -0700 | [diff] [blame] | 201 |     bionic/__recvfrom_chk.cpp \ | 
| Christopher Ferris | 59a13c1 | 2013-08-01 13:13:33 -0700 | [diff] [blame] | 202 |     bionic/__strchr_chk.cpp \ | 
| Christopher Ferris | 59a13c1 | 2013-08-01 13:13:33 -0700 | [diff] [blame] | 203 |     bionic/__strlcat_chk.cpp \ | 
 | 204 |     bionic/__strlcpy_chk.cpp \ | 
 | 205 |     bionic/__strlen_chk.cpp \ | 
 | 206 |     bionic/__strncat_chk.cpp \ | 
 | 207 |     bionic/__strncpy_chk.cpp \ | 
 | 208 |     bionic/__strrchr_chk.cpp \ | 
 | 209 |     bionic/__umask_chk.cpp \ | 
 | 210 |     bionic/__vsnprintf_chk.cpp \ | 
 | 211 |     bionic/__vsprintf_chk.cpp \ | 
 | 212 |  | 
| Elliott Hughes | 29c7f0b | 2012-10-22 17:05:27 -0700 | [diff] [blame] | 213 | libc_bionic_src_files := \ | 
| Elliott Hughes | 61e699a | 2013-06-12 14:05:46 -0700 | [diff] [blame] | 214 |     bionic/abort.cpp \ | 
| Elliott Hughes | f8fcfbc | 2013-10-22 13:28:46 -0700 | [diff] [blame] | 215 |     bionic/access.cpp \ | 
| Elliott Hughes | 063cfb2 | 2012-10-25 20:55:23 -0700 | [diff] [blame] | 216 |     bionic/assert.cpp \ | 
| Elliott Hughes | 1195207 | 2013-10-24 15:15:14 -0700 | [diff] [blame] | 217 |     bionic/bionic_time_conversions.cpp \ | 
| Elliott Hughes | 428f556 | 2013-02-05 16:10:59 -0800 | [diff] [blame] | 218 |     bionic/brk.cpp \ | 
| Elliott Hughes | f8fcfbc | 2013-10-22 13:28:46 -0700 | [diff] [blame] | 219 |     bionic/chmod.cpp \ | 
 | 220 |     bionic/chown.cpp \ | 
| Elliott Hughes | 36d6188 | 2013-11-19 13:31:58 -0800 | [diff] [blame] | 221 |     bionic/clone.cpp \ | 
| David 'Digit' Turner | c30396f | 2012-10-29 15:32:54 +0100 | [diff] [blame] | 222 |     bionic/dirent.cpp \ | 
| Elliott Hughes | cac7b9d | 2013-10-23 09:48:29 -0700 | [diff] [blame] | 223 |     bionic/dup2.cpp \ | 
 | 224 |     bionic/epoll_create.cpp \ | 
| Elliott Hughes | 1195207 | 2013-10-24 15:15:14 -0700 | [diff] [blame] | 225 |     bionic/epoll_wait.cpp \ | 
 | 226 |     bionic/epoll_pwait.cpp \ | 
| Elliott Hughes | 2a0b873 | 2013-10-08 18:50:24 -0700 | [diff] [blame] | 227 |     bionic/__errno.cpp \ | 
| Kito Cheng | 9b84824 | 2013-04-03 11:29:40 +0800 | [diff] [blame] | 228 |     bionic/eventfd_read.cpp \ | 
 | 229 |     bionic/eventfd_write.cpp \ | 
| Elliott Hughes | bf42568 | 2013-10-24 16:29:40 -0700 | [diff] [blame] | 230 |     bionic/ffs.cpp \ | 
| Elliott Hughes | 232163c | 2013-10-09 17:35:36 -0700 | [diff] [blame] | 231 |     bionic/fork.cpp \ | 
| Elliott Hughes | d0be7c8 | 2013-08-08 17:13:33 -0700 | [diff] [blame] | 232 |     bionic/futimens.cpp \ | 
| Nick Kralevich | 2c5153b | 2013-01-11 14:43:05 -0800 | [diff] [blame] | 233 |     bionic/getauxval.cpp \ | 
| Elliott Hughes | 063cfb2 | 2012-10-25 20:55:23 -0700 | [diff] [blame] | 234 |     bionic/getcwd.cpp \ | 
| Elliott Hughes | cac7b9d | 2013-10-23 09:48:29 -0700 | [diff] [blame] | 235 |     bionic/inotify_init.cpp \ | 
| Elliott Hughes | f8fcfbc | 2013-10-22 13:28:46 -0700 | [diff] [blame] | 236 |     bionic/lchown.cpp \ | 
| Elliott Hughes | 42b2c6a | 2013-02-07 10:14:39 -0800 | [diff] [blame] | 237 |     bionic/libc_init_common.cpp \ | 
| Elliott Hughes | 8f2a5a0 | 2013-03-15 15:30:25 -0700 | [diff] [blame] | 238 |     bionic/libc_logging.cpp \ | 
| Elliott Hughes | 58b5754 | 2012-10-29 14:27:10 -0700 | [diff] [blame] | 239 |     bionic/libgen.cpp \ | 
| Elliott Hughes | f8fcfbc | 2013-10-22 13:28:46 -0700 | [diff] [blame] | 240 |     bionic/link.cpp \ | 
 | 241 |     bionic/lstat.cpp \ | 
 | 242 |     bionic/mkdir.cpp \ | 
| Elliott Hughes | 594b1a4 | 2013-10-22 10:54:11 -0700 | [diff] [blame] | 243 |     bionic/mkfifo.cpp \ | 
| Elliott Hughes | f8fcfbc | 2013-10-22 13:28:46 -0700 | [diff] [blame] | 244 |     bionic/mknod.cpp \ | 
 | 245 |     bionic/open.cpp \ | 
| Elliott Hughes | 1195207 | 2013-10-24 15:15:14 -0700 | [diff] [blame] | 246 |     bionic/pause.cpp \ | 
| Elliott Hughes | cac7b9d | 2013-10-23 09:48:29 -0700 | [diff] [blame] | 247 |     bionic/pipe.cpp \ | 
| Elliott Hughes | 1195207 | 2013-10-24 15:15:14 -0700 | [diff] [blame] | 248 |     bionic/poll.cpp \ | 
| Elliott Hughes | f64b8ea | 2014-02-03 16:20:46 -0800 | [diff] [blame] | 249 |     bionic/posix_fallocate.cpp \ | 
| Elliott Hughes | c3f1140 | 2013-10-30 14:40:09 -0700 | [diff] [blame] | 250 |     bionic/pthread_atfork.cpp \ | 
| Elliott Hughes | 3e89847 | 2013-02-12 16:40:24 +0000 | [diff] [blame] | 251 |     bionic/pthread_attr.cpp \ | 
| Elliott Hughes | c3f1140 | 2013-10-30 14:40:09 -0700 | [diff] [blame] | 252 |     bionic/pthread_cond.cpp \ | 
 | 253 |     bionic/pthread_create.cpp \ | 
| Elliott Hughes | 9d23e04 | 2013-02-15 19:21:51 -0800 | [diff] [blame] | 254 |     bionic/pthread_detach.cpp \ | 
 | 255 |     bionic/pthread_equal.cpp \ | 
| Elliott Hughes | c3f1140 | 2013-10-30 14:40:09 -0700 | [diff] [blame] | 256 |     bionic/pthread_exit.cpp \ | 
| Elliott Hughes | 9d23e04 | 2013-02-15 19:21:51 -0800 | [diff] [blame] | 257 |     bionic/pthread_getcpuclockid.cpp \ | 
 | 258 |     bionic/pthread_getschedparam.cpp \ | 
 | 259 |     bionic/pthread_internals.cpp \ | 
 | 260 |     bionic/pthread_join.cpp \ | 
| Elliott Hughes | c3f1140 | 2013-10-30 14:40:09 -0700 | [diff] [blame] | 261 |     bionic/pthread_key.cpp \ | 
| Elliott Hughes | 9d23e04 | 2013-02-15 19:21:51 -0800 | [diff] [blame] | 262 |     bionic/pthread_kill.cpp \ | 
| Elliott Hughes | c3f1140 | 2013-10-30 14:40:09 -0700 | [diff] [blame] | 263 |     bionic/pthread_mutex.cpp \ | 
 | 264 |     bionic/pthread_once.cpp \ | 
 | 265 |     bionic/pthread_rwlock.cpp \ | 
| Elliott Hughes | 9d23e04 | 2013-02-15 19:21:51 -0800 | [diff] [blame] | 266 |     bionic/pthread_self.cpp \ | 
| Elliott Hughes | 3e89847 | 2013-02-12 16:40:24 +0000 | [diff] [blame] | 267 |     bionic/pthread_setname_np.cpp \ | 
| Elliott Hughes | 9d23e04 | 2013-02-15 19:21:51 -0800 | [diff] [blame] | 268 |     bionic/pthread_setschedparam.cpp \ | 
| Elliott Hughes | c5d028f | 2013-01-10 14:42:14 -0800 | [diff] [blame] | 269 |     bionic/pthread_sigmask.cpp \ | 
| Elliott Hughes | c3f1140 | 2013-10-30 14:40:09 -0700 | [diff] [blame] | 270 |     bionic/ptrace.cpp \ | 
| Chris Dearman | d8a5a6f | 2012-12-07 18:41:10 -0800 | [diff] [blame] | 271 |     bionic/raise.cpp \ | 
| Elliott Hughes | f8fcfbc | 2013-10-22 13:28:46 -0700 | [diff] [blame] | 272 |     bionic/readlink.cpp \ | 
 | 273 |     bionic/rename.cpp \ | 
 | 274 |     bionic/rmdir.cpp \ | 
| Elliott Hughes | 428f556 | 2013-02-05 16:10:59 -0800 | [diff] [blame] | 275 |     bionic/sbrk.cpp \ | 
| Elliott Hughes | 701bec2 | 2013-02-25 13:14:31 -0800 | [diff] [blame] | 276 |     bionic/scandir.cpp \ | 
| Kito Cheng | 4ca685e | 2013-04-10 00:57:42 +0800 | [diff] [blame] | 277 |     bionic/sched_getaffinity.cpp \ | 
| Elliott Hughes | 887e114 | 2014-01-02 12:05:50 -0800 | [diff] [blame] | 278 |     bionic/sched_getcpu.cpp \ | 
| Elliott Hughes | 232163c | 2013-10-09 17:35:36 -0700 | [diff] [blame] | 279 |     bionic/setegid.cpp \ | 
| Elliott Hughes | 4a9e837 | 2012-11-30 11:58:57 -0800 | [diff] [blame] | 280 |     bionic/__set_errno.cpp \ | 
| Elliott Hughes | 232163c | 2013-10-09 17:35:36 -0700 | [diff] [blame] | 281 |     bionic/seteuid.cpp \ | 
| Elliott Hughes | 063cfb2 | 2012-10-25 20:55:23 -0700 | [diff] [blame] | 282 |     bionic/setlocale.cpp \ | 
| Rom Lemarchand | a4b2dc0 | 2013-01-09 15:46:06 -0800 | [diff] [blame] | 283 |     bionic/signalfd.cpp \ | 
| Elliott Hughes | c7e9b23 | 2013-10-16 22:27:54 -0700 | [diff] [blame] | 284 |     bionic/sigaction.cpp \ | 
 | 285 |     bionic/sigaddset.cpp \ | 
 | 286 |     bionic/sigdelset.cpp \ | 
 | 287 |     bionic/sigemptyset.cpp \ | 
 | 288 |     bionic/sigfillset.cpp \ | 
 | 289 |     bionic/sigismember.cpp \ | 
 | 290 |     bionic/signal.cpp \ | 
| Elliott Hughes | 40d105c | 2013-10-16 12:53:58 -0700 | [diff] [blame] | 291 |     bionic/sigpending.cpp \ | 
| Elliott Hughes | 19e6232 | 2013-10-15 11:23:57 -0700 | [diff] [blame] | 292 |     bionic/sigprocmask.cpp \ | 
| Elliott Hughes | 1f5af92 | 2013-10-15 18:01:56 -0700 | [diff] [blame] | 293 |     bionic/sigsuspend.cpp \ | 
| Elliott Hughes | c5d028f | 2013-01-10 14:42:14 -0800 | [diff] [blame] | 294 |     bionic/sigwait.cpp \ | 
| Elliott Hughes | f8fcfbc | 2013-10-22 13:28:46 -0700 | [diff] [blame] | 295 |     bionic/stat.cpp \ | 
| Elliott Hughes | 06040fd | 2013-07-09 13:25:03 -0700 | [diff] [blame] | 296 |     bionic/statvfs.cpp \ | 
| Elliott Hughes | 063cfb2 | 2012-10-25 20:55:23 -0700 | [diff] [blame] | 297 |     bionic/strerror.cpp \ | 
 | 298 |     bionic/strerror_r.cpp \ | 
| Elliott Hughes | 063cfb2 | 2012-10-25 20:55:23 -0700 | [diff] [blame] | 299 |     bionic/strsignal.cpp \ | 
 | 300 |     bionic/stubs.cpp \ | 
| Elliott Hughes | f8fcfbc | 2013-10-22 13:28:46 -0700 | [diff] [blame] | 301 |     bionic/symlink.cpp \ | 
| Elliott Hughes | 91a9925 | 2013-02-12 21:56:42 -0800 | [diff] [blame] | 302 |     bionic/sysconf.cpp \ | 
| Elliott Hughes | c3f1140 | 2013-10-30 14:40:09 -0700 | [diff] [blame] | 303 |     bionic/thread_atexit.cpp \ | 
| Elliott Hughes | 063cfb2 | 2012-10-25 20:55:23 -0700 | [diff] [blame] | 304 |     bionic/tdestroy.cpp \ | 
| Elliott Hughes | c3f1140 | 2013-10-30 14:40:09 -0700 | [diff] [blame] | 305 |     bionic/timer.cpp \ | 
| Elliott Hughes | 063cfb2 | 2012-10-25 20:55:23 -0700 | [diff] [blame] | 306 |     bionic/tmpfile.cpp \ | 
| Elliott Hughes | f8fcfbc | 2013-10-22 13:28:46 -0700 | [diff] [blame] | 307 |     bionic/unlink.cpp \ | 
 | 308 |     bionic/utimes.cpp \ | 
| Elliott Hughes | 17a8b0d | 2013-03-21 15:43:53 -0700 | [diff] [blame] | 309 |     bionic/wait.cpp \ | 
| Elliott Hughes | 063cfb2 | 2012-10-25 20:55:23 -0700 | [diff] [blame] | 310 |     bionic/wchar.cpp \ | 
| Elliott Hughes | 29c7f0b | 2012-10-22 17:05:27 -0700 | [diff] [blame] | 311 |  | 
| Elliott Hughes | ce4783c | 2013-07-12 17:31:11 -0700 | [diff] [blame] | 312 |  | 
| Elliott Hughes | f077784 | 2013-03-01 16:59:46 -0800 | [diff] [blame] | 313 | libc_upstream_freebsd_src_files := \ | 
| Elliott Hughes | ab61eb3 | 2013-11-20 16:09:06 -0800 | [diff] [blame] | 314 |     upstream-freebsd/lib/libc/gen/sleep.c \ | 
 | 315 |     upstream-freebsd/lib/libc/gen/usleep.c \ | 
| Elliott Hughes | 6b05c8e | 2013-04-11 13:54:48 -0700 | [diff] [blame] | 316 |     upstream-freebsd/lib/libc/stdio/clrerr.c \ | 
 | 317 |     upstream-freebsd/lib/libc/stdio/fclose.c \ | 
 | 318 |     upstream-freebsd/lib/libc/stdio/fdopen.c \ | 
 | 319 |     upstream-freebsd/lib/libc/stdio/feof.c \ | 
 | 320 |     upstream-freebsd/lib/libc/stdio/ferror.c \ | 
 | 321 |     upstream-freebsd/lib/libc/stdio/fgetln.c \ | 
 | 322 |     upstream-freebsd/lib/libc/stdio/fgetpos.c \ | 
 | 323 |     upstream-freebsd/lib/libc/stdio/fgets.c \ | 
 | 324 |     upstream-freebsd/lib/libc/stdio/fileno.c \ | 
 | 325 |     upstream-freebsd/lib/libc/stdio/flags.c \ | 
 | 326 |     upstream-freebsd/lib/libc/stdio/fopen.c \ | 
 | 327 |     upstream-freebsd/lib/libc/stdio/fpurge.c \ | 
 | 328 |     upstream-freebsd/lib/libc/stdio/fputs.c \ | 
 | 329 |     upstream-freebsd/lib/libc/stdio/fsetpos.c \ | 
 | 330 |     upstream-freebsd/lib/libc/stdio/funopen.c \ | 
 | 331 |     upstream-freebsd/lib/libc/stdio/fwalk.c \ | 
 | 332 |     upstream-freebsd/lib/libc/stdio/fwrite.c \ | 
 | 333 |     upstream-freebsd/lib/libc/stdio/getc.c \ | 
 | 334 |     upstream-freebsd/lib/libc/stdio/getchar.c \ | 
| Elliott Hughes | 677ee56 | 2013-06-12 15:24:15 -0700 | [diff] [blame] | 335 |     upstream-freebsd/lib/libc/stdio/makebuf.c \ | 
| Elliott Hughes | 284f788 | 2013-07-19 15:20:31 -0700 | [diff] [blame] | 336 |     upstream-freebsd/lib/libc/stdio/mktemp.c \ | 
| Elliott Hughes | 6b05c8e | 2013-04-11 13:54:48 -0700 | [diff] [blame] | 337 |     upstream-freebsd/lib/libc/stdio/putc.c \ | 
 | 338 |     upstream-freebsd/lib/libc/stdio/putchar.c \ | 
 | 339 |     upstream-freebsd/lib/libc/stdio/puts.c \ | 
 | 340 |     upstream-freebsd/lib/libc/stdio/putw.c \ | 
 | 341 |     upstream-freebsd/lib/libc/stdio/remove.c \ | 
 | 342 |     upstream-freebsd/lib/libc/stdio/rget.c \ | 
 | 343 |     upstream-freebsd/lib/libc/stdio/setbuf.c \ | 
 | 344 |     upstream-freebsd/lib/libc/stdio/setbuffer.c \ | 
| Elliott Hughes | 677ee56 | 2013-06-12 15:24:15 -0700 | [diff] [blame] | 345 |     upstream-freebsd/lib/libc/stdio/setvbuf.c \ | 
| Elliott Hughes | 6b05c8e | 2013-04-11 13:54:48 -0700 | [diff] [blame] | 346 |     upstream-freebsd/lib/libc/stdio/tempnam.c \ | 
 | 347 |     upstream-freebsd/lib/libc/stdio/tmpnam.c \ | 
 | 348 |     upstream-freebsd/lib/libc/stdio/wsetup.c \ | 
| Elliott Hughes | aec2ffb | 2013-08-12 12:07:05 -0700 | [diff] [blame] | 349 |     upstream-freebsd/lib/libc/stdlib/abs.c \ | 
| Elliott Hughes | d278b82 | 2013-06-25 14:48:10 -0700 | [diff] [blame] | 350 |     upstream-freebsd/lib/libc/stdlib/getopt_long.c \ | 
| Elliott Hughes | aec2ffb | 2013-08-12 12:07:05 -0700 | [diff] [blame] | 351 |     upstream-freebsd/lib/libc/stdlib/imaxabs.c \ | 
 | 352 |     upstream-freebsd/lib/libc/stdlib/imaxdiv.c \ | 
 | 353 |     upstream-freebsd/lib/libc/stdlib/labs.c \ | 
 | 354 |     upstream-freebsd/lib/libc/stdlib/llabs.c \ | 
| Elliott Hughes | 0b25f63 | 2013-04-11 18:08:34 -0700 | [diff] [blame] | 355 |     upstream-freebsd/lib/libc/stdlib/qsort.c \ | 
| Elliott Hughes | f077784 | 2013-03-01 16:59:46 -0800 | [diff] [blame] | 356 |     upstream-freebsd/lib/libc/stdlib/realpath.c \ | 
| Elliott Hughes | eb93ebf | 2013-03-01 18:35:56 -0800 | [diff] [blame] | 357 |     upstream-freebsd/lib/libc/string/wcpcpy.c \ | 
 | 358 |     upstream-freebsd/lib/libc/string/wcpncpy.c \ | 
 | 359 |     upstream-freebsd/lib/libc/string/wcscasecmp.c \ | 
| Elliott Hughes | eb93ebf | 2013-03-01 18:35:56 -0800 | [diff] [blame] | 360 |     upstream-freebsd/lib/libc/string/wcscspn.c \ | 
 | 361 |     upstream-freebsd/lib/libc/string/wcsdup.c \ | 
 | 362 |     upstream-freebsd/lib/libc/string/wcslcat.c \ | 
 | 363 |     upstream-freebsd/lib/libc/string/wcslcpy.c \ | 
| Elliott Hughes | eb93ebf | 2013-03-01 18:35:56 -0800 | [diff] [blame] | 364 |     upstream-freebsd/lib/libc/string/wcsncasecmp.c \ | 
 | 365 |     upstream-freebsd/lib/libc/string/wcsncat.c \ | 
 | 366 |     upstream-freebsd/lib/libc/string/wcsncmp.c \ | 
 | 367 |     upstream-freebsd/lib/libc/string/wcsncpy.c \ | 
 | 368 |     upstream-freebsd/lib/libc/string/wcsnlen.c \ | 
 | 369 |     upstream-freebsd/lib/libc/string/wcspbrk.c \ | 
| Elliott Hughes | eb93ebf | 2013-03-01 18:35:56 -0800 | [diff] [blame] | 370 |     upstream-freebsd/lib/libc/string/wcsspn.c \ | 
 | 371 |     upstream-freebsd/lib/libc/string/wcsstr.c \ | 
 | 372 |     upstream-freebsd/lib/libc/string/wcstok.c \ | 
 | 373 |     upstream-freebsd/lib/libc/string/wmemchr.c \ | 
| Elliott Hughes | eb93ebf | 2013-03-01 18:35:56 -0800 | [diff] [blame] | 374 |     upstream-freebsd/lib/libc/string/wmemcpy.c \ | 
 | 375 |     upstream-freebsd/lib/libc/string/wmemmove.c \ | 
 | 376 |     upstream-freebsd/lib/libc/string/wmemset.c \ | 
| Elliott Hughes | f077784 | 2013-03-01 16:59:46 -0800 | [diff] [blame] | 377 |  | 
| Elliott Hughes | f8b3a92 | 2012-08-10 11:39:58 -0700 | [diff] [blame] | 378 | libc_upstream_netbsd_src_files := \ | 
| Elliott Hughes | e8bcca3 | 2012-10-23 12:26:26 -0700 | [diff] [blame] | 379 |     upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \ | 
 | 380 |     upstream-netbsd/common/lib/libc/inet/inet_addr.c \ | 
 | 381 |     upstream-netbsd/libc/compat-43/creat.c \ | 
 | 382 |     upstream-netbsd/libc/gen/ftw.c \ | 
 | 383 |     upstream-netbsd/libc/gen/nftw.c \ | 
 | 384 |     upstream-netbsd/libc/gen/nice.c \ | 
| Elliott Hughes | 6b3f49a | 2013-03-06 16:20:55 -0800 | [diff] [blame] | 385 |     upstream-netbsd/libc/gen/popen.c \ | 
| Elliott Hughes | e8bcca3 | 2012-10-23 12:26:26 -0700 | [diff] [blame] | 386 |     upstream-netbsd/libc/gen/psignal.c \ | 
| Elliott Hughes | ab44f52 | 2012-10-23 16:05:09 -0700 | [diff] [blame] | 387 |     upstream-netbsd/libc/gen/setjmperr.c \ | 
| Elliott Hughes | e8bcca3 | 2012-10-23 12:26:26 -0700 | [diff] [blame] | 388 |     upstream-netbsd/libc/gen/utime.c \ | 
 | 389 |     upstream-netbsd/libc/inet/inet_ntoa.c \ | 
 | 390 |     upstream-netbsd/libc/inet/inet_ntop.c \ | 
 | 391 |     upstream-netbsd/libc/inet/inet_pton.c \ | 
| Elliott Hughes | ab44f52 | 2012-10-23 16:05:09 -0700 | [diff] [blame] | 392 |     upstream-netbsd/libc/isc/ev_streams.c \ | 
 | 393 |     upstream-netbsd/libc/isc/ev_timers.c \ | 
| Elliott Hughes | e8bcca3 | 2012-10-23 12:26:26 -0700 | [diff] [blame] | 394 |     upstream-netbsd/libc/regex/regcomp.c \ | 
 | 395 |     upstream-netbsd/libc/regex/regerror.c \ | 
 | 396 |     upstream-netbsd/libc/regex/regexec.c \ | 
 | 397 |     upstream-netbsd/libc/regex/regfree.c \ | 
 | 398 |     upstream-netbsd/libc/stdio/getdelim.c \ | 
 | 399 |     upstream-netbsd/libc/stdio/getline.c \ | 
| Elliott Hughes | ab44f52 | 2012-10-23 16:05:09 -0700 | [diff] [blame] | 400 |     upstream-netbsd/libc/stdlib/bsearch.c \ | 
 | 401 |     upstream-netbsd/libc/stdlib/div.c \ | 
| Elliott Hughes | e8bcca3 | 2012-10-23 12:26:26 -0700 | [diff] [blame] | 402 |     upstream-netbsd/libc/stdlib/drand48.c \ | 
 | 403 |     upstream-netbsd/libc/stdlib/erand48.c \ | 
| Pawit Pornkitprasan | 6522899 | 2013-11-14 23:50:45 +0700 | [diff] [blame] | 404 |     upstream-netbsd/libc/stdlib/exit.c \ | 
| Elliott Hughes | e8bcca3 | 2012-10-23 12:26:26 -0700 | [diff] [blame] | 405 |     upstream-netbsd/libc/stdlib/jrand48.c \ | 
| Elliott Hughes | ab44f52 | 2012-10-23 16:05:09 -0700 | [diff] [blame] | 406 |     upstream-netbsd/libc/stdlib/ldiv.c \ | 
 | 407 |     upstream-netbsd/libc/stdlib/lldiv.c \ | 
| Elliott Hughes | e8bcca3 | 2012-10-23 12:26:26 -0700 | [diff] [blame] | 408 |     upstream-netbsd/libc/stdlib/lrand48.c \ | 
 | 409 |     upstream-netbsd/libc/stdlib/mrand48.c \ | 
 | 410 |     upstream-netbsd/libc/stdlib/nrand48.c \ | 
 | 411 |     upstream-netbsd/libc/stdlib/_rand48.c \ | 
 | 412 |     upstream-netbsd/libc/stdlib/seed48.c \ | 
 | 413 |     upstream-netbsd/libc/stdlib/srand48.c \ | 
 | 414 |     upstream-netbsd/libc/stdlib/tdelete.c \ | 
 | 415 |     upstream-netbsd/libc/stdlib/tfind.c \ | 
 | 416 |     upstream-netbsd/libc/stdlib/tsearch.c \ | 
| Elliott Hughes | c51cd76 | 2013-01-22 14:41:23 -0800 | [diff] [blame] | 417 |     upstream-netbsd/libc/string/memccpy.c \ | 
| Elliott Hughes | e8bcca3 | 2012-10-23 12:26:26 -0700 | [diff] [blame] | 418 |     upstream-netbsd/libc/string/strcasestr.c \ | 
| Elliott Hughes | 2b47307 | 2013-01-22 15:10:19 -0800 | [diff] [blame] | 419 |     upstream-netbsd/libc/string/strcoll.c \ | 
| Elliott Hughes | e8bcca3 | 2012-10-23 12:26:26 -0700 | [diff] [blame] | 420 |     upstream-netbsd/libc/string/strxfrm.c \ | 
| Pawit Pornkitprasan | 6522899 | 2013-11-14 23:50:45 +0700 | [diff] [blame] | 421 |     upstream-netbsd/libc/thread-stub/__isthreaded.c \ | 
| Elliott Hughes | ab44f52 | 2012-10-23 16:05:09 -0700 | [diff] [blame] | 422 |     upstream-netbsd/libc/unistd/killpg.c \ | 
| Elliott Hughes | f8b3a92 | 2012-08-10 11:39:58 -0700 | [diff] [blame] | 423 |  | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 424 | libc_arch_static_src_files := \ | 
 | 425 |     bionic/dl_iterate_phdr_static.cpp \ | 
| Christopher Ferris | 7c83a1e | 2013-02-26 01:30:00 -0800 | [diff] [blame] | 426 |  | 
| Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 427 | # Define some common cflags | 
 | 428 | # ======================================================== | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 429 | libc_common_cflags := \ | 
| Elliott Hughes | 470631e | 2012-06-06 10:32:56 -0700 | [diff] [blame] | 430 |     -DANDROID_CHANGES \ | 
| Elliott Hughes | 470631e | 2012-06-06 10:32:56 -0700 | [diff] [blame] | 431 |     -D_LIBC=1 \ | 
| Elliott Hughes | 2ec400b | 2013-10-08 17:04:33 -0700 | [diff] [blame] | 432 |     -Wall -Wextra \ | 
 | 433 |  | 
 | 434 | # Try to catch typical 32-bit assumptions that break with 64-bit pointers. | 
 | 435 | libc_common_cflags += \ | 
 | 436 |     -Werror=pointer-to-int-cast \ | 
 | 437 |     -Werror=int-to-pointer-cast \ | 
 | 438 |     -Werror=type-limits \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 439 |  | 
| Dave Bort | d2c9dcc | 2009-04-23 15:50:03 -0700 | [diff] [blame] | 440 | ifeq ($(strip $(DEBUG_BIONIC_LIBC)),true) | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 441 |   libc_common_cflags += -DDEBUG | 
 | 442 | endif | 
 | 443 |  | 
| Jack Ren | 2fd81ef | 2011-11-19 09:48:03 +0800 | [diff] [blame] | 444 | # To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in | 
 | 445 | # the appropriate BoardConfig.mk file. | 
 | 446 | # | 
 | 447 | ifneq ($(BOARD_MALLOC_ALIGNMENT),) | 
 | 448 |   libc_common_cflags += -DMALLOC_ALIGNMENT=$(BOARD_MALLOC_ALIGNMENT) | 
 | 449 | endif | 
 | 450 |  | 
| Andy McFadden | fcd00eb | 2010-05-28 13:31:45 -0700 | [diff] [blame] | 451 | # Define ANDROID_SMP appropriately. | 
 | 452 | ifeq ($(TARGET_CPU_SMP),true) | 
 | 453 |     libc_common_cflags += -DANDROID_SMP=1 | 
 | 454 | else | 
 | 455 |     libc_common_cflags += -DANDROID_SMP=0 | 
 | 456 | endif | 
 | 457 |  | 
| Stephen Hines | 762cea4 | 2013-09-30 17:10:53 -0700 | [diff] [blame] | 458 | # Define some common conlyflags | 
 | 459 | libc_common_conlyflags := \ | 
 | 460 |     -std=gnu99 | 
 | 461 |  | 
 | 462 | # Define some common cppflags | 
 | 463 | libc_common_cppflags := \ | 
 | 464 |     -std=gnu++11 | 
 | 465 |  | 
| Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 466 | # Define some common includes | 
 | 467 | # ======================================================== | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 468 | libc_common_c_includes := \ | 
 | 469 | 		$(LOCAL_PATH)/stdlib  \ | 
 | 470 | 		$(LOCAL_PATH)/string  \ | 
| Nick Kralevich | 76656af | 2012-06-07 16:30:02 -0700 | [diff] [blame] | 471 | 		$(LOCAL_PATH)/stdio   \ | 
 | 472 | 		external/safe-iop/include | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 473 |  | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 474 | # ======================================================== | 
 | 475 | # Add in the arch-specific flags. | 
 | 476 | # Must be called with $(eval). | 
 | 477 | # $(1): the LOCAL_ variable name | 
 | 478 | # $(2): the bionic variable name to pull in | 
 | 479 | define patch-up-arch-specific-flags | 
 | 480 | $(1)_$(TARGET_ARCH) += $($(2)_$(TARGET_ARCH)) | 
 | 481 | ifdef TARGET_2ND_ARCH | 
 | 482 | $(1)_$(TARGET_2ND_ARCH) += $($(2)_$(TARGET_2ND_ARCH)) | 
| David 'Digit' Turner | 2d2dbd3 | 2011-06-25 17:26:38 +0200 | [diff] [blame] | 483 | endif | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 484 | endef | 
| Michael Hope | ea8fad1 | 2012-07-31 16:18:22 +1200 | [diff] [blame] | 485 |  | 
| Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 486 |  | 
 | 487 | # ======================================================== | 
| Nick Kralevich | 6334c66 | 2012-07-10 10:46:19 -0700 | [diff] [blame] | 488 | # libbionic_ssp.a - stack protector code | 
 | 489 | # ======================================================== | 
 | 490 | # | 
 | 491 | # The stack protector code needs to be compiled | 
 | 492 | # with -fno-stack-protector, since it modifies the | 
 | 493 | # stack canary. | 
 | 494 |  | 
 | 495 | include $(CLEAR_VARS) | 
 | 496 |  | 
| Elliott Hughes | 642331b | 2013-03-06 15:03:53 -0800 | [diff] [blame] | 497 | LOCAL_SRC_FILES := bionic/__stack_chk_fail.cpp | 
| Elliott Hughes | dc5ec07 | 2013-02-14 11:15:58 -0800 | [diff] [blame] | 498 | LOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector -Werror | 
| Stephen Hines | 762cea4 | 2013-09-30 17:10:53 -0700 | [diff] [blame] | 499 | LOCAL_CONLYFLAGS := $(libc_common_conlyflags) | 
 | 500 | LOCAL_CPPFLAGS := $(libc_common_cppflags) | 
| Nick Kralevich | 6334c66 | 2012-07-10 10:46:19 -0700 | [diff] [blame] | 501 | LOCAL_C_INCLUDES := $(libc_common_c_includes) | 
 | 502 | LOCAL_MODULE := libbionic_ssp | 
| Christopher Ferris | d7a6329 | 2013-10-03 13:26:22 -0700 | [diff] [blame] | 503 | LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) | 
| Nick Kralevich | 6334c66 | 2012-07-10 10:46:19 -0700 | [diff] [blame] | 504 | LOCAL_SYSTEM_SHARED_LIBRARIES := | 
 | 505 |  | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 506 | $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) | 
| Nick Kralevich | 6334c66 | 2012-07-10 10:46:19 -0700 | [diff] [blame] | 507 | include $(BUILD_STATIC_LIBRARY) | 
 | 508 |  | 
 | 509 |  | 
 | 510 | # ======================================================== | 
| Elliott Hughes | ce4783c | 2013-07-12 17:31:11 -0700 | [diff] [blame] | 511 | # libc_tzcode.a - upstream 'tzcode' code | 
 | 512 | # ======================================================== | 
 | 513 |  | 
 | 514 | include $(CLEAR_VARS) | 
 | 515 |  | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 516 | LOCAL_SRC_FILES := \ | 
 | 517 |     tzcode/asctime.c \ | 
 | 518 |     tzcode/difftime.c \ | 
 | 519 |     tzcode/localtime.c \ | 
 | 520 |     tzcode/strftime.c \ | 
 | 521 |     tzcode/strptime.c \ | 
 | 522 |  | 
| Elliott Hughes | ce4783c | 2013-07-12 17:31:11 -0700 | [diff] [blame] | 523 | LOCAL_CFLAGS := \ | 
 | 524 |     $(libc_common_cflags) \ | 
| Elliott Hughes | ce4783c | 2013-07-12 17:31:11 -0700 | [diff] [blame] | 525 |     -DSTD_INSPIRED=1 \ | 
 | 526 |     -DTZDIR=\"/system/usr/share/zoneinfo\" \ | 
 | 527 |     -DTM_GMTOFF=tm_gmtoff \ | 
 | 528 |     -DUSG_COMPAT=1 | 
| Stephen Hines | 762cea4 | 2013-09-30 17:10:53 -0700 | [diff] [blame] | 529 | LOCAL_CONLYFLAGS := $(libc_common_conlyflags) | 
 | 530 | LOCAL_CPPFLAGS := $(libc_common_cppflags) | 
| Elliott Hughes | ce4783c | 2013-07-12 17:31:11 -0700 | [diff] [blame] | 531 | LOCAL_C_INCLUDES := $(libc_common_c_includes) | 
 | 532 | LOCAL_MODULE := libc_tzcode | 
| Christopher Ferris | d7a6329 | 2013-10-03 13:26:22 -0700 | [diff] [blame] | 533 | LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) | 
| Elliott Hughes | ce4783c | 2013-07-12 17:31:11 -0700 | [diff] [blame] | 534 | LOCAL_SYSTEM_SHARED_LIBRARIES := | 
 | 535 |  | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 536 | $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) | 
| Elliott Hughes | ce4783c | 2013-07-12 17:31:11 -0700 | [diff] [blame] | 537 | include $(BUILD_STATIC_LIBRARY) | 
 | 538 |  | 
 | 539 |  | 
 | 540 | # ======================================================== | 
| Elliott Hughes | eb847bc | 2013-10-09 15:50:50 -0700 | [diff] [blame] | 541 | # libc_dns.a - modified NetBSD DNS code | 
 | 542 | # ======================================================== | 
 | 543 |  | 
 | 544 | include $(CLEAR_VARS) | 
 | 545 |  | 
 | 546 | LOCAL_SRC_FILES := $(libc_dns_src_files) | 
 | 547 | LOCAL_CFLAGS := \ | 
 | 548 |     $(libc_common_cflags) \ | 
 | 549 |     -DINET6 \ | 
 | 550 |     -I$(LOCAL_PATH)/private \ | 
 | 551 |     -I$(LOCAL_PATH)/upstream-netbsd/libc/include # for NetBSD private headers | 
 | 552 |  | 
 | 553 | LOCAL_CONLYFLAGS := $(libc_common_conlyflags) | 
 | 554 | LOCAL_CPPFLAGS := $(libc_common_cppflags) | 
 | 555 | LOCAL_C_INCLUDES := $(libc_common_c_includes) | 
 | 556 | LOCAL_MODULE := libc_dns | 
 | 557 | LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) | 
 | 558 | LOCAL_SYSTEM_SHARED_LIBRARIES := | 
 | 559 |  | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 560 | $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) | 
| Elliott Hughes | eb847bc | 2013-10-09 15:50:50 -0700 | [diff] [blame] | 561 | include $(BUILD_STATIC_LIBRARY) | 
 | 562 |  | 
 | 563 |  | 
 | 564 | # ======================================================== | 
| Elliott Hughes | f077784 | 2013-03-01 16:59:46 -0800 | [diff] [blame] | 565 | # libc_freebsd.a - upstream FreeBSD C library code | 
 | 566 | # ======================================================== | 
 | 567 | # | 
 | 568 | # These files are built with the freebsd-compat.h header file | 
 | 569 | # automatically included. | 
 | 570 |  | 
 | 571 | include $(CLEAR_VARS) | 
 | 572 |  | 
 | 573 | LOCAL_SRC_FILES := $(libc_upstream_freebsd_src_files) | 
 | 574 | LOCAL_CFLAGS := \ | 
 | 575 |     $(libc_common_cflags) \ | 
 | 576 |     -I$(LOCAL_PATH)/upstream-freebsd \ | 
 | 577 |     -I$(LOCAL_PATH)/upstream-freebsd/libc/include \ | 
 | 578 |     -include upstream-freebsd/freebsd-compat.h | 
| Stephen Hines | 762cea4 | 2013-09-30 17:10:53 -0700 | [diff] [blame] | 579 | LOCAL_CONLYFLAGS := $(libc_common_conlyflags) | 
 | 580 | LOCAL_CPPFLAGS := $(libc_common_cppflags) | 
| Elliott Hughes | f077784 | 2013-03-01 16:59:46 -0800 | [diff] [blame] | 581 | LOCAL_C_INCLUDES := $(libc_common_c_includes) | 
 | 582 | LOCAL_MODULE := libc_freebsd | 
| Christopher Ferris | d7a6329 | 2013-10-03 13:26:22 -0700 | [diff] [blame] | 583 | LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) | 
| Elliott Hughes | f077784 | 2013-03-01 16:59:46 -0800 | [diff] [blame] | 584 | LOCAL_SYSTEM_SHARED_LIBRARIES := | 
 | 585 |  | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 586 | $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) | 
| Elliott Hughes | f077784 | 2013-03-01 16:59:46 -0800 | [diff] [blame] | 587 | include $(BUILD_STATIC_LIBRARY) | 
 | 588 |  | 
 | 589 |  | 
 | 590 | # ======================================================== | 
| Elliott Hughes | f8b3a92 | 2012-08-10 11:39:58 -0700 | [diff] [blame] | 591 | # libc_netbsd.a - upstream NetBSD C library code | 
 | 592 | # ======================================================== | 
 | 593 | # | 
 | 594 | # These files are built with the netbsd-compat.h header file | 
 | 595 | # automatically included. | 
 | 596 |  | 
 | 597 | include $(CLEAR_VARS) | 
 | 598 |  | 
 | 599 | LOCAL_SRC_FILES := $(libc_upstream_netbsd_src_files) | 
 | 600 | LOCAL_CFLAGS := \ | 
 | 601 |     $(libc_common_cflags) \ | 
| Elliott Hughes | eb847bc | 2013-10-09 15:50:50 -0700 | [diff] [blame] | 602 |     -DPOSIX_MISTAKE \ | 
| Elliott Hughes | 3d2d448 | 2012-08-13 16:38:29 -0700 | [diff] [blame] | 603 |     -I$(LOCAL_PATH)/upstream-netbsd \ | 
| Elliott Hughes | ab44f52 | 2012-10-23 16:05:09 -0700 | [diff] [blame] | 604 |     -I$(LOCAL_PATH)/upstream-netbsd/libc/include \ | 
| Elliott Hughes | f8b3a92 | 2012-08-10 11:39:58 -0700 | [diff] [blame] | 605 |     -include upstream-netbsd/netbsd-compat.h | 
| Stephen Hines | 762cea4 | 2013-09-30 17:10:53 -0700 | [diff] [blame] | 606 | LOCAL_CONLYFLAGS := $(libc_common_conlyflags) | 
 | 607 | LOCAL_CPPFLAGS := $(libc_common_cppflags) | 
| Elliott Hughes | f8b3a92 | 2012-08-10 11:39:58 -0700 | [diff] [blame] | 608 | LOCAL_C_INCLUDES := $(libc_common_c_includes) | 
 | 609 | LOCAL_MODULE := libc_netbsd | 
| Christopher Ferris | d7a6329 | 2013-10-03 13:26:22 -0700 | [diff] [blame] | 610 | LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) | 
| Elliott Hughes | f8b3a92 | 2012-08-10 11:39:58 -0700 | [diff] [blame] | 611 | LOCAL_SYSTEM_SHARED_LIBRARIES := | 
 | 612 |  | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 613 | $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) | 
| Elliott Hughes | f8b3a92 | 2012-08-10 11:39:58 -0700 | [diff] [blame] | 614 | include $(BUILD_STATIC_LIBRARY) | 
 | 615 |  | 
 | 616 |  | 
 | 617 | # ======================================================== | 
| Elliott Hughes | 29c7f0b | 2012-10-22 17:05:27 -0700 | [diff] [blame] | 618 | # libc_bionic.a - home-grown C library code | 
 | 619 | # ======================================================== | 
| Elliott Hughes | e7c59f9 | 2013-12-17 20:47:06 -0800 | [diff] [blame] | 620 |  | 
| Elliott Hughes | 29c7f0b | 2012-10-22 17:05:27 -0700 | [diff] [blame] | 621 | include $(CLEAR_VARS) | 
 | 622 |  | 
 | 623 | LOCAL_SRC_FILES := $(libc_bionic_src_files) | 
 | 624 | LOCAL_CFLAGS := $(libc_common_cflags) -Werror | 
| Stephen Hines | 762cea4 | 2013-09-30 17:10:53 -0700 | [diff] [blame] | 625 | LOCAL_CONLYFLAGS := $(libc_common_conlyflags) | 
 | 626 | LOCAL_CPPFLAGS := $(libc_common_cppflags) | 
| Elliott Hughes | 29c7f0b | 2012-10-22 17:05:27 -0700 | [diff] [blame] | 627 | LOCAL_C_INCLUDES := $(libc_common_c_includes) | 
 | 628 | LOCAL_MODULE := libc_bionic | 
| Christopher Ferris | d7a6329 | 2013-10-03 13:26:22 -0700 | [diff] [blame] | 629 | LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) | 
| Elliott Hughes | 29c7f0b | 2012-10-22 17:05:27 -0700 | [diff] [blame] | 630 | LOCAL_SYSTEM_SHARED_LIBRARIES := | 
 | 631 |  | 
| Elliott Hughes | 66759d6 | 2013-10-31 14:09:39 -0700 | [diff] [blame] | 632 | # Set -DPTHREAD_DEBUG_ENABLED=true to enable support for pthread deadlock prediction. | 
 | 633 | # Since this code is experimental it is disabled by default. | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 634 | LOCAL_CFLAGS += -DPTHREAD_DEBUG_ENABLED=false | 
| Elliott Hughes | 66759d6 | 2013-10-31 14:09:39 -0700 | [diff] [blame] | 635 |  | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 636 | $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) | 
 | 637 | $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_bionic_src_files)) | 
| Elliott Hughes | 29c7f0b | 2012-10-22 17:05:27 -0700 | [diff] [blame] | 638 | include $(BUILD_STATIC_LIBRARY) | 
 | 639 |  | 
 | 640 |  | 
 | 641 | # ======================================================== | 
| Elliott Hughes | b3a23bd | 2014-02-11 13:32:02 -0800 | [diff] [blame] | 642 | # libc_syscalls.a | 
 | 643 | # ======================================================== | 
 | 644 |  | 
 | 645 | include $(CLEAR_VARS) | 
 | 646 |  | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 647 | LOCAL_SRC_FILES_$(TARGET_ARCH) := $(call all-S-files-under,arch-$(TARGET_ARCH)/syscalls) | 
 | 648 | ifdef TARGET_2ND_ARCH | 
 | 649 | LOCAL_SRC_FILES_$(TARGET_2ND_ARCH) := $(call all-S-files-under,arch-$(TARGET_2ND_ARCH)/syscalls) | 
 | 650 | endif | 
| Elliott Hughes | b3a23bd | 2014-02-11 13:32:02 -0800 | [diff] [blame] | 651 | LOCAL_MODULE := libc_syscalls | 
 | 652 | LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) | 
 | 653 | LOCAL_SYSTEM_SHARED_LIBRARIES := | 
 | 654 |  | 
 | 655 | include $(BUILD_STATIC_LIBRARY) | 
 | 656 |  | 
 | 657 |  | 
 | 658 | # ======================================================== | 
| Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 659 | # libc_common.a | 
 | 660 | # ======================================================== | 
| Elliott Hughes | f8b3a92 | 2012-08-10 11:39:58 -0700 | [diff] [blame] | 661 |  | 
| Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 662 | include $(CLEAR_VARS) | 
 | 663 |  | 
 | 664 | LOCAL_SRC_FILES := $(libc_common_src_files) | 
| Elliott Hughes | eb847bc | 2013-10-09 15:50:50 -0700 | [diff] [blame] | 665 | LOCAL_CFLAGS := $(libc_common_cflags) | 
| Stephen Hines | 762cea4 | 2013-09-30 17:10:53 -0700 | [diff] [blame] | 666 | LOCAL_CONLYFLAGS := $(libc_common_conlyflags) | 
 | 667 | LOCAL_CPPFLAGS := $(libc_common_cppflags) | 
| Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 668 | LOCAL_C_INCLUDES := $(libc_common_c_includes) | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 669 | LOCAL_MODULE := libc_common | 
| Christopher Ferris | d7a6329 | 2013-10-03 13:26:22 -0700 | [diff] [blame] | 670 | LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) | 
| Elliott Hughes | ce4783c | 2013-07-12 17:31:11 -0700 | [diff] [blame] | 671 | LOCAL_WHOLE_STATIC_LIBRARIES := \ | 
 | 672 |     libbionic_ssp \ | 
 | 673 |     libc_bionic \ | 
| Elliott Hughes | eb847bc | 2013-10-09 15:50:50 -0700 | [diff] [blame] | 674 |     libc_dns \ | 
| Elliott Hughes | ce4783c | 2013-07-12 17:31:11 -0700 | [diff] [blame] | 675 |     libc_freebsd \ | 
 | 676 |     libc_netbsd \ | 
| Elliott Hughes | b3a23bd | 2014-02-11 13:32:02 -0800 | [diff] [blame] | 677 |     libc_syscalls \ | 
| Elliott Hughes | eb847bc | 2013-10-09 15:50:50 -0700 | [diff] [blame] | 678 |     libc_tzcode \ | 
 | 679 |  | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 680 | LOCAL_SYSTEM_SHARED_LIBRARIES := | 
 | 681 |  | 
| Ying Wang | c97c5fc | 2012-08-11 14:23:19 -0700 | [diff] [blame] | 682 | # TODO: split out the asflags. | 
 | 683 | LOCAL_ASFLAGS := $(LOCAL_CFLAGS) | 
 | 684 |  | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 685 | $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) | 
 | 686 | $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_common_src_files)) | 
 | 687 | $(eval $(call patch-up-arch-specific-flags,LOCAL_ASFLAGS,LOCAL_CFLAGS)) | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 688 | include $(BUILD_STATIC_LIBRARY) | 
 | 689 |  | 
 | 690 |  | 
| Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 691 | # ======================================================== | 
| Dima Zavin | 49e5533 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 692 | # libc_nomalloc.a | 
 | 693 | # ======================================================== | 
 | 694 | # | 
 | 695 | # This is a version of the static C library that does not | 
| Elliott Hughes | 91a9925 | 2013-02-12 21:56:42 -0800 | [diff] [blame] | 696 | # include malloc. It's useful in situations when the user wants | 
 | 697 | # to provide their own malloc implementation, or wants to | 
 | 698 | # explicitly disallow the use of the use of malloc, | 
 | 699 | # such as in the dynamic loader. | 
| Dima Zavin | 49e5533 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 700 |  | 
 | 701 | include $(CLEAR_VARS) | 
 | 702 |  | 
 | 703 | LOCAL_SRC_FILES := \ | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 704 |     $(libc_arch_static_src_files) \ | 
 | 705 |     $(libc_static_common_src_files) \ | 
 | 706 |     bionic/libc_init_static.cpp | 
| Dima Zavin | 49e5533 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 707 |  | 
 | 708 | LOCAL_C_INCLUDES := $(libc_common_c_includes) | 
| David 'Digit' Turner | 6a51def | 2010-08-27 08:19:19 -0700 | [diff] [blame] | 709 | LOCAL_CFLAGS := $(libc_common_cflags) \ | 
| Stephen Hines | 762cea4 | 2013-09-30 17:10:53 -0700 | [diff] [blame] | 710 |                 -DLIBC_STATIC | 
 | 711 | LOCAL_CONLYFLAGS := $(libc_common_conlyflags) | 
 | 712 | LOCAL_CPPFLAGS := $(libc_common_cppflags) | 
| Dima Zavin | 49e5533 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 713 |  | 
 | 714 | LOCAL_MODULE := libc_nomalloc | 
| Christopher Ferris | d7a6329 | 2013-10-03 13:26:22 -0700 | [diff] [blame] | 715 | LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) | 
| Dima Zavin | 49e5533 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 716 | LOCAL_WHOLE_STATIC_LIBRARIES := libc_common | 
 | 717 | LOCAL_SYSTEM_SHARED_LIBRARIES := | 
 | 718 |  | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 719 | $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) | 
 | 720 | $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_static_src_files)) | 
| Dima Zavin | 49e5533 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 721 | include $(BUILD_STATIC_LIBRARY) | 
 | 722 |  | 
 | 723 |  | 
 | 724 | # ======================================================== | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 725 | # libc.a | 
 | 726 | # ======================================================== | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 727 | include $(CLEAR_VARS) | 
 | 728 |  | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 729 | LOCAL_SRC_FILES := \ | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 730 |     $(libc_arch_static_src_files) \ | 
 | 731 |     $(libc_static_common_src_files) \ | 
 | 732 |     bionic/dlmalloc.c \ | 
 | 733 |     bionic/malloc_debug_common.cpp \ | 
 | 734 |     bionic/libc_init_static.cpp \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 735 |  | 
| Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 736 | LOCAL_CFLAGS := $(libc_common_cflags) \ | 
| Stephen Hines | 762cea4 | 2013-09-30 17:10:53 -0700 | [diff] [blame] | 737 |                 -DLIBC_STATIC | 
 | 738 | LOCAL_CONLYFLAGS := $(libc_common_conlyflags) | 
 | 739 | LOCAL_CPPFLAGS := $(libc_common_cppflags) | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 740 | LOCAL_C_INCLUDES := $(libc_common_c_includes) | 
| Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 741 | LOCAL_MODULE := libc | 
| Christopher Ferris | d7a6329 | 2013-10-03 13:26:22 -0700 | [diff] [blame] | 742 | LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 743 | LOCAL_WHOLE_STATIC_LIBRARIES := libc_common | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 744 | LOCAL_SYSTEM_SHARED_LIBRARIES := | 
 | 745 |  | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 746 | $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) | 
 | 747 | $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_static_src_files)) | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 748 | include $(BUILD_STATIC_LIBRARY) | 
 | 749 |  | 
 | 750 |  | 
| Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 751 | # ======================================================== | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 752 | # libc.so | 
 | 753 | # ======================================================== | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 754 | include $(CLEAR_VARS) | 
 | 755 |  | 
| Elliott Hughes | 66759d6 | 2013-10-31 14:09:39 -0700 | [diff] [blame] | 756 | LOCAL_CFLAGS := $(libc_common_cflags) | 
| Stephen Hines | 762cea4 | 2013-09-30 17:10:53 -0700 | [diff] [blame] | 757 | LOCAL_CONLYFLAGS := $(libc_common_conlyflags) | 
 | 758 | LOCAL_CPPFLAGS := $(libc_common_cppflags) | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 759 | LOCAL_C_INCLUDES := $(libc_common_c_includes) | 
 | 760 |  | 
 | 761 | LOCAL_SRC_FILES := \ | 
| Elliott Hughes | e7c59f9 | 2013-12-17 20:47:06 -0800 | [diff] [blame] | 762 |     $(libc_arch_dynamic_src_files) \ | 
 | 763 |     $(libc_static_common_src_files) \ | 
 | 764 |     bionic/dlmalloc.c \ | 
 | 765 |     bionic/malloc_debug_common.cpp \ | 
 | 766 |     bionic/debug_mapinfo.cpp \ | 
 | 767 |     bionic/debug_stacktrace.cpp \ | 
 | 768 |     bionic/pthread_debug.cpp \ | 
 | 769 |     bionic/libc_init_dynamic.cpp \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 770 |  | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 771 | LOCAL_MODULE:= libc | 
| Christopher Ferris | d7a6329 | 2013-10-03 13:26:22 -0700 | [diff] [blame] | 772 | LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) | 
| Elliott Hughes | 914d8d4 | 2012-10-18 11:28:56 -0700 | [diff] [blame] | 773 | LOCAL_REQUIRED_MODULES := tzdata | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 774 |  | 
 | 775 | # WARNING: The only library libc.so should depend on is libdl.so!  If you add other libraries, | 
 | 776 | # make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries.  This | 
 | 777 | # ensures that symbols that are pulled into those new libraries from libgcc.a are not declared | 
 | 778 | # external; if that were the case, then libc would not pull those symbols from libgcc.a as it | 
 | 779 | # should, instead relying on the external symbols from the dependent libraries.  That would | 
 | 780 | # create an "cloaked" dependency on libgcc.a in libc though the libraries, which is not what | 
 | 781 | # you wanted! | 
 | 782 |  | 
 | 783 | LOCAL_SHARED_LIBRARIES := libdl | 
 | 784 | LOCAL_WHOLE_STATIC_LIBRARIES := libc_common | 
 | 785 | LOCAL_SYSTEM_SHARED_LIBRARIES := | 
 | 786 |  | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 787 | $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) | 
 | 788 | $(eval $(call patch-up-arch-specific-flags,libc_arch_dynamic_src_files)) | 
 | 789 | $(eval $(call patch-up-arch-specific-flags,libc_static_common_src_files)) | 
 | 790 | # special for arm | 
 | 791 | LOCAL_NO_CRT_arm := true | 
 | 792 | LOCAL_CFLAGS_arm += -DCRT_LEGACY_WORKAROUND | 
 | 793 | LOCAL_SRC_FILES_arm += \ | 
 | 794 |     arch-common/bionic/crtbegin_so.c \ | 
 | 795 |     arch-arm/bionic/atexit_legacy.c \ | 
 | 796 |     arch-common/bionic/crtend_so.S | 
 | 797 |  | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 798 | include $(BUILD_SHARED_LIBRARY) | 
 | 799 |  | 
 | 800 |  | 
| Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 801 | # For all builds, except for the -user build we will enable memory | 
 | 802 | # allocation checking (including memory leaks, buffer overwrites, etc.) | 
 | 803 | # Note that all these checks are also controlled by env. settings | 
 | 804 | # that can enable, or disable specific checks. Note also that some of | 
 | 805 | # the checks are available only in emulator and are implemeted in | 
 | 806 | # libc_malloc_qemu_instrumented.so. | 
 | 807 | ifneq ($(TARGET_BUILD_VARIANT),user) | 
 | 808 |  | 
| Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 809 | # ======================================================== | 
| Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 810 | # libc_malloc_debug_leak.so | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 811 | # ======================================================== | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 812 | include $(CLEAR_VARS) | 
 | 813 |  | 
| Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 814 | LOCAL_CFLAGS := \ | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 815 |     $(libc_common_cflags) \ | 
 | 816 |     -DMALLOC_LEAK_CHECK | 
| Stephen Hines | 762cea4 | 2013-09-30 17:10:53 -0700 | [diff] [blame] | 817 | LOCAL_CONLYFLAGS := $(libc_common_conlyflags) | 
 | 818 | LOCAL_CPPFLAGS := $(libc_common_cppflags) | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 819 |  | 
 | 820 | LOCAL_C_INCLUDES := $(libc_common_c_includes) | 
 | 821 |  | 
 | 822 | LOCAL_SRC_FILES := \ | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 823 |     bionic/debug_mapinfo.cpp \ | 
 | 824 |     bionic/debug_stacktrace.cpp \ | 
 | 825 |     bionic/malloc_debug_leak.cpp \ | 
 | 826 |     bionic/malloc_debug_check.cpp \ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 827 |  | 
| Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 828 | LOCAL_MODULE:= libc_malloc_debug_leak | 
| Christopher Ferris | d7a6329 | 2013-10-03 13:26:22 -0700 | [diff] [blame] | 829 | LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 830 |  | 
| Pavel Chupin | e007775 | 2012-09-10 19:35:25 +0400 | [diff] [blame] | 831 | LOCAL_SHARED_LIBRARIES := libc libdl | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 832 | LOCAL_WHOLE_STATIC_LIBRARIES := libc_common | 
 | 833 | LOCAL_SYSTEM_SHARED_LIBRARIES := | 
| Bruce Beare | aa46fa2 | 2010-07-08 14:47:50 -0700 | [diff] [blame] | 834 | LOCAL_ALLOW_UNDEFINED_SYMBOLS := true | 
| Iliyan Malchev | 3680704 | 2011-03-14 14:02:05 -0700 | [diff] [blame] | 835 |  | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 836 | # Don't install on release build | 
| Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 837 | LOCAL_MODULE_TAGS := eng debug | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 838 |  | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 839 | $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 840 | include $(BUILD_SHARED_LIBRARY) | 
 | 841 |  | 
| Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 842 |  | 
 | 843 | # ======================================================== | 
 | 844 | # libc_malloc_debug_qemu.so | 
 | 845 | # ======================================================== | 
 | 846 | include $(CLEAR_VARS) | 
 | 847 |  | 
 | 848 | LOCAL_CFLAGS := \ | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 849 |     $(libc_common_cflags) \ | 
 | 850 |     -DMALLOC_QEMU_INSTRUMENT | 
| Stephen Hines | 762cea4 | 2013-09-30 17:10:53 -0700 | [diff] [blame] | 851 | LOCAL_CONLYFLAGS := $(libc_common_conlyflags) | 
 | 852 | LOCAL_CPPFLAGS := $(libc_common_cppflags) | 
| Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 853 |  | 
 | 854 | LOCAL_C_INCLUDES := $(libc_common_c_includes) | 
 | 855 |  | 
 | 856 | LOCAL_SRC_FILES := \ | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 857 |     bionic/malloc_debug_qemu.cpp | 
| Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 858 |  | 
 | 859 | LOCAL_MODULE:= libc_malloc_debug_qemu | 
| Christopher Ferris | d7a6329 | 2013-10-03 13:26:22 -0700 | [diff] [blame] | 860 | LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) | 
| Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 861 |  | 
| Mathias Agopian | 7c0c379 | 2011-09-05 23:54:55 -0700 | [diff] [blame] | 862 | LOCAL_SHARED_LIBRARIES := libc libdl | 
| Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 863 | LOCAL_WHOLE_STATIC_LIBRARIES := libc_common | 
 | 864 | LOCAL_SYSTEM_SHARED_LIBRARIES := | 
| Iliyan Malchev | 3680704 | 2011-03-14 14:02:05 -0700 | [diff] [blame] | 865 |  | 
| Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 866 | # Don't install on release build | 
 | 867 | LOCAL_MODULE_TAGS := eng debug | 
 | 868 |  | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 869 | $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) | 
| Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 870 | include $(BUILD_SHARED_LIBRARY) | 
 | 871 |  | 
| Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame^] | 872 | endif  #!user | 
| Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 873 |  | 
 | 874 |  | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 875 | # ======================================================== | 
 | 876 | include $(call all-makefiles-under,$(LOCAL_PATH)) |