The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1 | LOCAL_PATH:= $(call my-dir) |
| 2 | |
| 3 | include $(LOCAL_PATH)/arch-$(TARGET_ARCH)/syscalls.mk |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 4 | |
| 5 | # Define the common source files for all the libc instances |
| 6 | # ========================================================= |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 7 | libc_common_src_files := \ |
| 8 | $(syscall_src) \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 9 | unistd/alarm.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 10 | unistd/exec.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 11 | unistd/fnmatch.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 12 | unistd/syslog.c \ |
| 13 | unistd/system.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 14 | unistd/time.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 15 | stdio/asprintf.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 16 | stdio/fflush.c \ |
| 17 | stdio/fgetc.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 18 | stdio/findfp.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 19 | stdio/fprintf.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 20 | stdio/fputc.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 21 | stdio/fread.c \ |
| 22 | stdio/freopen.c \ |
| 23 | stdio/fscanf.c \ |
| 24 | stdio/fseek.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 25 | stdio/ftell.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 26 | stdio/fvwrite.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 27 | stdio/gets.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 28 | stdio/printf.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 29 | stdio/refill.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 30 | stdio/rewind.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 31 | stdio/scanf.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 32 | stdio/snprintf.c\ |
| 33 | stdio/sprintf.c \ |
| 34 | stdio/sscanf.c \ |
| 35 | stdio/stdio.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 36 | stdio/ungetc.c \ |
| 37 | stdio/vasprintf.c \ |
| 38 | stdio/vfprintf.c \ |
| 39 | stdio/vfscanf.c \ |
| 40 | stdio/vprintf.c \ |
| 41 | stdio/vsnprintf.c \ |
| 42 | stdio/vsprintf.c \ |
| 43 | stdio/vscanf.c \ |
| 44 | stdio/vsscanf.c \ |
| 45 | stdio/wbuf.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 46 | stdlib/atexit.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 47 | stdlib/ctype_.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 48 | stdlib/exit.c \ |
| 49 | stdlib/getenv.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 50 | stdlib/putenv.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 51 | stdlib/setenv.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 52 | stdlib/strtod.c \ |
| 53 | stdlib/strtoimax.c \ |
| 54 | stdlib/strtol.c \ |
| 55 | stdlib/strtoll.c \ |
| 56 | stdlib/strtoul.c \ |
| 57 | stdlib/strtoull.c \ |
| 58 | stdlib/strtoumax.c \ |
| 59 | stdlib/tolower_.c \ |
| 60 | stdlib/toupper_.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 61 | string/strcasecmp.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 62 | string/strcspn.c \ |
| 63 | string/strdup.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 64 | string/strpbrk.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 65 | string/strsep.c \ |
| 66 | string/strspn.c \ |
| 67 | string/strstr.c \ |
| 68 | string/strtok.c \ |
David 'Digit' Turner | 3527fd6 | 2010-06-14 17:18:35 -0700 | [diff] [blame] | 69 | wchar/wcswidth.c \ |
Kristian Monsen | 7046561 | 2010-06-16 14:51:52 +0100 | [diff] [blame] | 70 | wchar/wcsxfrm.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 71 | bionic/arc4random.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 72 | bionic/atoi.c \ |
| 73 | bionic/atol.c \ |
| 74 | bionic/atoll.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 75 | bionic/bindresvport.c \ |
| 76 | bionic/bionic_clone.c \ |
Colin Cross | fc10b24 | 2010-01-13 17:48:34 -0800 | [diff] [blame] | 77 | bionic/clearenv.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 78 | bionic/cpuacct.c \ |
| 79 | bionic/daemon.c \ |
Colin Cross | 64ceac3 | 2010-01-13 21:19:52 -0800 | [diff] [blame] | 80 | bionic/err.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 81 | bionic/ether_aton.c \ |
| 82 | bionic/ether_ntoa.c \ |
Colin Cross | fc10b24 | 2010-01-13 17:48:34 -0800 | [diff] [blame] | 83 | bionic/fdprintf.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 84 | bionic/flockfile.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 85 | bionic/fork.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 86 | bionic/ftime.c \ |
| 87 | bionic/ftok.c \ |
Colin Cross | 64ceac3 | 2010-01-13 21:19:52 -0800 | [diff] [blame] | 88 | bionic/fts.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 89 | bionic/getdtablesize.c \ |
| 90 | bionic/gethostname.c \ |
| 91 | bionic/getpgrp.c \ |
| 92 | bionic/getpriority.c \ |
| 93 | bionic/getpt.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 94 | bionic/if_indextoname.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 95 | bionic/if_nametoindex.c \ |
| 96 | bionic/initgroups.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 97 | bionic/ioctl.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 98 | bionic/isatty.c \ |
| 99 | bionic/issetugid.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 100 | bionic/ldexp.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 101 | bionic/lseek64.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 102 | bionic/md5.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 103 | bionic/memmem.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 104 | bionic/memswap.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 105 | bionic/openat.c \ |
| 106 | bionic/open.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 107 | bionic/pathconf.c \ |
| 108 | bionic/perror.c \ |
| 109 | bionic/pread.c \ |
| 110 | bionic/pselect.c \ |
| 111 | bionic/ptsname.c \ |
| 112 | bionic/ptsname_r.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 113 | bionic/pututline.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 114 | bionic/pwrite.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 115 | bionic/reboot.c \ |
| 116 | bionic/recv.c \ |
David 'Digit' Turner | 72e6fd4 | 2010-12-03 18:04:01 +0100 | [diff] [blame] | 117 | bionic/sched_cpualloc.c \ |
| 118 | bionic/sched_cpucount.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 119 | bionic/sched_getcpu.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 120 | bionic/semaphore.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 121 | bionic/send.c \ |
| 122 | bionic/setegid.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 123 | bionic/seteuid.c \ |
| 124 | bionic/setpgrp.c \ |
| 125 | bionic/setresuid.c \ |
| 126 | bionic/setreuid.c \ |
| 127 | bionic/setuid.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 128 | bionic/sigblock.c \ |
| 129 | bionic/siginterrupt.c \ |
| 130 | bionic/siglist.c \ |
| 131 | bionic/signal.c \ |
| 132 | bionic/signame.c \ |
| 133 | bionic/sigsetmask.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 134 | bionic/sleep.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 135 | bionic/strndup.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 136 | bionic/strntoimax.c \ |
| 137 | bionic/strntoumax.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 138 | bionic/strtotimeval.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 139 | bionic/system_properties.c \ |
Colin Cross | 5e9a086 | 2013-06-24 18:36:39 -0700 | [diff] [blame] | 140 | bionic/system_properties_compat.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 141 | bionic/tcgetpgrp.c \ |
| 142 | bionic/tcsetpgrp.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 143 | bionic/thread_atexit.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 144 | bionic/time64.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 145 | bionic/umount.c \ |
| 146 | bionic/unlockpt.c \ |
| 147 | bionic/usleep.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 148 | bionic/utmp.c \ |
Elliott Hughes | a89864a | 2012-10-01 17:35:49 -0700 | [diff] [blame] | 149 | bionic/wcscoll.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 150 | netbsd/gethnamaddr.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 151 | netbsd/inet/nsap_addr.c \ |
| 152 | netbsd/resolv/__dn_comp.c \ |
| 153 | netbsd/resolv/__res_close.c \ |
| 154 | netbsd/resolv/__res_send.c \ |
| 155 | netbsd/resolv/herror.c \ |
| 156 | netbsd/resolv/res_comp.c \ |
| 157 | netbsd/resolv/res_data.c \ |
| 158 | netbsd/resolv/res_debug.c \ |
| 159 | netbsd/resolv/res_init.c \ |
| 160 | netbsd/resolv/res_mkquery.c \ |
| 161 | netbsd/resolv/res_query.c \ |
| 162 | netbsd/resolv/res_send.c \ |
Shin-ichiro KAWASAKI | 1009327 | 2009-09-28 16:11:39 +0900 | [diff] [blame] | 163 | netbsd/resolv/res_state.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 164 | netbsd/resolv/res_cache.c \ |
| 165 | netbsd/net/nsdispatch.c \ |
| 166 | netbsd/net/getaddrinfo.c \ |
| 167 | netbsd/net/getnameinfo.c \ |
| 168 | netbsd/net/getservbyname.c \ |
| 169 | netbsd/net/getservent.c \ |
| 170 | netbsd/net/base64.c \ |
| 171 | netbsd/net/getservbyport.c \ |
| 172 | netbsd/nameser/ns_name.c \ |
| 173 | netbsd/nameser/ns_parse.c \ |
| 174 | netbsd/nameser/ns_ttl.c \ |
| 175 | netbsd/nameser/ns_netint.c \ |
| 176 | netbsd/nameser/ns_print.c \ |
Colin Cross | 4fa7b10 | 2010-01-12 18:59:25 -0800 | [diff] [blame] | 177 | netbsd/nameser/ns_samedomain.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 178 | |
Pavel Chupin | a567a8e | 2012-12-18 17:30:02 +0400 | [diff] [blame] | 179 | # These are shared by all the 32-bit targets, but not the 64-bit ones. |
| 180 | ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm mips x86)) |
| 181 | libc_common_src_files += \ |
| 182 | bionic/fcntl.c \ |
| 183 | bionic/fstatfs.c \ |
| 184 | bionic/sigsuspend.c \ |
| 185 | bionic/statfs.c \ |
| 186 | |
| 187 | endif |
| 188 | |
Christopher Ferris | 59a13c1 | 2013-08-01 13:13:33 -0700 | [diff] [blame] | 189 | # Fortify implementations of libc functions. |
| 190 | libc_common_src_files += \ |
| 191 | bionic/__fgets_chk.cpp \ |
| 192 | bionic/__memcpy_chk.cpp \ |
| 193 | bionic/__memmove_chk.cpp \ |
| 194 | bionic/__memset_chk.cpp \ |
Nick Kralevich | 60f4f9a | 2013-09-24 16:32:07 -0700 | [diff] [blame] | 195 | bionic/__recvfrom_chk.cpp \ |
Christopher Ferris | 59a13c1 | 2013-08-01 13:13:33 -0700 | [diff] [blame] | 196 | bionic/__strcat_chk.cpp \ |
| 197 | bionic/__strchr_chk.cpp \ |
| 198 | bionic/__strcpy_chk.cpp \ |
| 199 | bionic/__strlcat_chk.cpp \ |
| 200 | bionic/__strlcpy_chk.cpp \ |
| 201 | bionic/__strlen_chk.cpp \ |
| 202 | bionic/__strncat_chk.cpp \ |
| 203 | bionic/__strncpy_chk.cpp \ |
| 204 | bionic/__strrchr_chk.cpp \ |
| 205 | bionic/__umask_chk.cpp \ |
| 206 | bionic/__vsnprintf_chk.cpp \ |
| 207 | bionic/__vsprintf_chk.cpp \ |
| 208 | |
Elliott Hughes | 29c7f0b | 2012-10-22 17:05:27 -0700 | [diff] [blame] | 209 | libc_bionic_src_files := \ |
Elliott Hughes | 61e699a | 2013-06-12 14:05:46 -0700 | [diff] [blame] | 210 | bionic/abort.cpp \ |
Elliott Hughes | 063cfb2 | 2012-10-25 20:55:23 -0700 | [diff] [blame] | 211 | bionic/assert.cpp \ |
Elliott Hughes | 428f556 | 2013-02-05 16:10:59 -0800 | [diff] [blame] | 212 | bionic/brk.cpp \ |
David 'Digit' Turner | c30396f | 2012-10-29 15:32:54 +0100 | [diff] [blame] | 213 | bionic/dirent.cpp \ |
Elliott Hughes | 91a9925 | 2013-02-12 21:56:42 -0800 | [diff] [blame] | 214 | bionic/__errno.c \ |
Kito Cheng | 9b84824 | 2013-04-03 11:29:40 +0800 | [diff] [blame] | 215 | bionic/eventfd_read.cpp \ |
| 216 | bionic/eventfd_write.cpp \ |
Elliott Hughes | d0be7c8 | 2013-08-08 17:13:33 -0700 | [diff] [blame] | 217 | bionic/futimens.cpp \ |
Nick Kralevich | 2c5153b | 2013-01-11 14:43:05 -0800 | [diff] [blame] | 218 | bionic/getauxval.cpp \ |
Elliott Hughes | 063cfb2 | 2012-10-25 20:55:23 -0700 | [diff] [blame] | 219 | bionic/getcwd.cpp \ |
Elliott Hughes | 42b2c6a | 2013-02-07 10:14:39 -0800 | [diff] [blame] | 220 | bionic/libc_init_common.cpp \ |
Elliott Hughes | 8f2a5a0 | 2013-03-15 15:30:25 -0700 | [diff] [blame] | 221 | bionic/libc_logging.cpp \ |
Elliott Hughes | 58b5754 | 2012-10-29 14:27:10 -0700 | [diff] [blame] | 222 | bionic/libgen.cpp \ |
Elliott Hughes | 3e89847 | 2013-02-12 16:40:24 +0000 | [diff] [blame] | 223 | bionic/pthread_attr.cpp \ |
Elliott Hughes | 9d23e04 | 2013-02-15 19:21:51 -0800 | [diff] [blame] | 224 | bionic/pthread_detach.cpp \ |
| 225 | bionic/pthread_equal.cpp \ |
| 226 | bionic/pthread_getcpuclockid.cpp \ |
| 227 | bionic/pthread_getschedparam.cpp \ |
| 228 | bionic/pthread_internals.cpp \ |
| 229 | bionic/pthread_join.cpp \ |
| 230 | bionic/pthread_kill.cpp \ |
| 231 | bionic/pthread_self.cpp \ |
Elliott Hughes | 3e89847 | 2013-02-12 16:40:24 +0000 | [diff] [blame] | 232 | bionic/pthread_setname_np.cpp \ |
Elliott Hughes | 9d23e04 | 2013-02-15 19:21:51 -0800 | [diff] [blame] | 233 | bionic/pthread_setschedparam.cpp \ |
Elliott Hughes | c5d028f | 2013-01-10 14:42:14 -0800 | [diff] [blame] | 234 | bionic/pthread_sigmask.cpp \ |
Chris Dearman | d8a5a6f | 2012-12-07 18:41:10 -0800 | [diff] [blame] | 235 | bionic/raise.cpp \ |
Elliott Hughes | 428f556 | 2013-02-05 16:10:59 -0800 | [diff] [blame] | 236 | bionic/sbrk.cpp \ |
Elliott Hughes | 701bec2 | 2013-02-25 13:14:31 -0800 | [diff] [blame] | 237 | bionic/scandir.cpp \ |
Kito Cheng | 4ca685e | 2013-04-10 00:57:42 +0800 | [diff] [blame] | 238 | bionic/sched_getaffinity.cpp \ |
Elliott Hughes | 4a9e837 | 2012-11-30 11:58:57 -0800 | [diff] [blame] | 239 | bionic/__set_errno.cpp \ |
Elliott Hughes | 063cfb2 | 2012-10-25 20:55:23 -0700 | [diff] [blame] | 240 | bionic/setlocale.cpp \ |
Rom Lemarchand | a4b2dc0 | 2013-01-09 15:46:06 -0800 | [diff] [blame] | 241 | bionic/signalfd.cpp \ |
Elliott Hughes | c5d028f | 2013-01-10 14:42:14 -0800 | [diff] [blame] | 242 | bionic/sigwait.cpp \ |
Elliott Hughes | 06040fd | 2013-07-09 13:25:03 -0700 | [diff] [blame] | 243 | bionic/statvfs.cpp \ |
Elliott Hughes | 063cfb2 | 2012-10-25 20:55:23 -0700 | [diff] [blame] | 244 | bionic/strerror.cpp \ |
| 245 | bionic/strerror_r.cpp \ |
Elliott Hughes | 063cfb2 | 2012-10-25 20:55:23 -0700 | [diff] [blame] | 246 | bionic/strsignal.cpp \ |
| 247 | bionic/stubs.cpp \ |
Elliott Hughes | 91a9925 | 2013-02-12 21:56:42 -0800 | [diff] [blame] | 248 | bionic/sysconf.cpp \ |
Elliott Hughes | 063cfb2 | 2012-10-25 20:55:23 -0700 | [diff] [blame] | 249 | bionic/tdestroy.cpp \ |
| 250 | bionic/tmpfile.cpp \ |
Elliott Hughes | 17a8b0d | 2013-03-21 15:43:53 -0700 | [diff] [blame] | 251 | bionic/wait.cpp \ |
Elliott Hughes | 063cfb2 | 2012-10-25 20:55:23 -0700 | [diff] [blame] | 252 | bionic/wchar.cpp \ |
Elliott Hughes | 29c7f0b | 2012-10-22 17:05:27 -0700 | [diff] [blame] | 253 | |
Pavel Chupin | a567a8e | 2012-12-18 17:30:02 +0400 | [diff] [blame] | 254 | # These are shared by all the 32-bit targets, but not the 64-bit ones. |
| 255 | ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm mips x86)) |
| 256 | libc_bionic_src_files += \ |
| 257 | bionic/mmap.cpp \ |
| 258 | |
| 259 | endif |
| 260 | |
Elliott Hughes | ce4783c | 2013-07-12 17:31:11 -0700 | [diff] [blame] | 261 | libc_tzcode_src_files := \ |
| 262 | tzcode/asctime.c \ |
| 263 | tzcode/difftime.c \ |
| 264 | tzcode/localtime.c \ |
| 265 | tzcode/strftime.c \ |
| 266 | tzcode/strptime.c \ |
| 267 | |
Elliott Hughes | f077784 | 2013-03-01 16:59:46 -0800 | [diff] [blame] | 268 | libc_upstream_freebsd_src_files := \ |
Elliott Hughes | 6b05c8e | 2013-04-11 13:54:48 -0700 | [diff] [blame] | 269 | upstream-freebsd/lib/libc/stdio/clrerr.c \ |
| 270 | upstream-freebsd/lib/libc/stdio/fclose.c \ |
| 271 | upstream-freebsd/lib/libc/stdio/fdopen.c \ |
| 272 | upstream-freebsd/lib/libc/stdio/feof.c \ |
| 273 | upstream-freebsd/lib/libc/stdio/ferror.c \ |
| 274 | upstream-freebsd/lib/libc/stdio/fgetln.c \ |
| 275 | upstream-freebsd/lib/libc/stdio/fgetpos.c \ |
| 276 | upstream-freebsd/lib/libc/stdio/fgets.c \ |
| 277 | upstream-freebsd/lib/libc/stdio/fileno.c \ |
| 278 | upstream-freebsd/lib/libc/stdio/flags.c \ |
| 279 | upstream-freebsd/lib/libc/stdio/fopen.c \ |
| 280 | upstream-freebsd/lib/libc/stdio/fpurge.c \ |
| 281 | upstream-freebsd/lib/libc/stdio/fputs.c \ |
| 282 | upstream-freebsd/lib/libc/stdio/fsetpos.c \ |
| 283 | upstream-freebsd/lib/libc/stdio/funopen.c \ |
| 284 | upstream-freebsd/lib/libc/stdio/fwalk.c \ |
| 285 | upstream-freebsd/lib/libc/stdio/fwrite.c \ |
| 286 | upstream-freebsd/lib/libc/stdio/getc.c \ |
| 287 | upstream-freebsd/lib/libc/stdio/getchar.c \ |
Elliott Hughes | 677ee56 | 2013-06-12 15:24:15 -0700 | [diff] [blame] | 288 | upstream-freebsd/lib/libc/stdio/makebuf.c \ |
Elliott Hughes | 284f788 | 2013-07-19 15:20:31 -0700 | [diff] [blame] | 289 | upstream-freebsd/lib/libc/stdio/mktemp.c \ |
Elliott Hughes | 6b05c8e | 2013-04-11 13:54:48 -0700 | [diff] [blame] | 290 | upstream-freebsd/lib/libc/stdio/putc.c \ |
| 291 | upstream-freebsd/lib/libc/stdio/putchar.c \ |
| 292 | upstream-freebsd/lib/libc/stdio/puts.c \ |
| 293 | upstream-freebsd/lib/libc/stdio/putw.c \ |
| 294 | upstream-freebsd/lib/libc/stdio/remove.c \ |
| 295 | upstream-freebsd/lib/libc/stdio/rget.c \ |
| 296 | upstream-freebsd/lib/libc/stdio/setbuf.c \ |
| 297 | upstream-freebsd/lib/libc/stdio/setbuffer.c \ |
Elliott Hughes | 677ee56 | 2013-06-12 15:24:15 -0700 | [diff] [blame] | 298 | upstream-freebsd/lib/libc/stdio/setvbuf.c \ |
Elliott Hughes | 6b05c8e | 2013-04-11 13:54:48 -0700 | [diff] [blame] | 299 | upstream-freebsd/lib/libc/stdio/tempnam.c \ |
| 300 | upstream-freebsd/lib/libc/stdio/tmpnam.c \ |
| 301 | upstream-freebsd/lib/libc/stdio/wsetup.c \ |
Elliott Hughes | aec2ffb | 2013-08-12 12:07:05 -0700 | [diff] [blame] | 302 | upstream-freebsd/lib/libc/stdlib/abs.c \ |
Elliott Hughes | d278b82 | 2013-06-25 14:48:10 -0700 | [diff] [blame] | 303 | upstream-freebsd/lib/libc/stdlib/getopt_long.c \ |
Elliott Hughes | aec2ffb | 2013-08-12 12:07:05 -0700 | [diff] [blame] | 304 | upstream-freebsd/lib/libc/stdlib/imaxabs.c \ |
| 305 | upstream-freebsd/lib/libc/stdlib/imaxdiv.c \ |
| 306 | upstream-freebsd/lib/libc/stdlib/labs.c \ |
| 307 | upstream-freebsd/lib/libc/stdlib/llabs.c \ |
Elliott Hughes | 0b25f63 | 2013-04-11 18:08:34 -0700 | [diff] [blame] | 308 | upstream-freebsd/lib/libc/stdlib/qsort.c \ |
Elliott Hughes | f077784 | 2013-03-01 16:59:46 -0800 | [diff] [blame] | 309 | upstream-freebsd/lib/libc/stdlib/realpath.c \ |
Elliott Hughes | eb93ebf | 2013-03-01 18:35:56 -0800 | [diff] [blame] | 310 | upstream-freebsd/lib/libc/string/wcpcpy.c \ |
| 311 | upstream-freebsd/lib/libc/string/wcpncpy.c \ |
| 312 | upstream-freebsd/lib/libc/string/wcscasecmp.c \ |
Elliott Hughes | eb93ebf | 2013-03-01 18:35:56 -0800 | [diff] [blame] | 313 | upstream-freebsd/lib/libc/string/wcscspn.c \ |
| 314 | upstream-freebsd/lib/libc/string/wcsdup.c \ |
| 315 | upstream-freebsd/lib/libc/string/wcslcat.c \ |
| 316 | upstream-freebsd/lib/libc/string/wcslcpy.c \ |
Elliott Hughes | eb93ebf | 2013-03-01 18:35:56 -0800 | [diff] [blame] | 317 | upstream-freebsd/lib/libc/string/wcsncasecmp.c \ |
| 318 | upstream-freebsd/lib/libc/string/wcsncat.c \ |
| 319 | upstream-freebsd/lib/libc/string/wcsncmp.c \ |
| 320 | upstream-freebsd/lib/libc/string/wcsncpy.c \ |
| 321 | upstream-freebsd/lib/libc/string/wcsnlen.c \ |
| 322 | upstream-freebsd/lib/libc/string/wcspbrk.c \ |
Elliott Hughes | eb93ebf | 2013-03-01 18:35:56 -0800 | [diff] [blame] | 323 | upstream-freebsd/lib/libc/string/wcsspn.c \ |
| 324 | upstream-freebsd/lib/libc/string/wcsstr.c \ |
| 325 | upstream-freebsd/lib/libc/string/wcstok.c \ |
| 326 | upstream-freebsd/lib/libc/string/wmemchr.c \ |
Elliott Hughes | eb93ebf | 2013-03-01 18:35:56 -0800 | [diff] [blame] | 327 | upstream-freebsd/lib/libc/string/wmemcpy.c \ |
| 328 | upstream-freebsd/lib/libc/string/wmemmove.c \ |
| 329 | upstream-freebsd/lib/libc/string/wmemset.c \ |
Elliott Hughes | f077784 | 2013-03-01 16:59:46 -0800 | [diff] [blame] | 330 | |
Elliott Hughes | f8b3a92 | 2012-08-10 11:39:58 -0700 | [diff] [blame] | 331 | libc_upstream_netbsd_src_files := \ |
Elliott Hughes | e8bcca3 | 2012-10-23 12:26:26 -0700 | [diff] [blame] | 332 | upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \ |
| 333 | upstream-netbsd/common/lib/libc/inet/inet_addr.c \ |
| 334 | upstream-netbsd/libc/compat-43/creat.c \ |
| 335 | upstream-netbsd/libc/gen/ftw.c \ |
| 336 | upstream-netbsd/libc/gen/nftw.c \ |
| 337 | upstream-netbsd/libc/gen/nice.c \ |
Elliott Hughes | 6b3f49a | 2013-03-06 16:20:55 -0800 | [diff] [blame] | 338 | upstream-netbsd/libc/gen/popen.c \ |
Elliott Hughes | e8bcca3 | 2012-10-23 12:26:26 -0700 | [diff] [blame] | 339 | upstream-netbsd/libc/gen/psignal.c \ |
Elliott Hughes | ab44f52 | 2012-10-23 16:05:09 -0700 | [diff] [blame] | 340 | upstream-netbsd/libc/gen/setjmperr.c \ |
Elliott Hughes | e8bcca3 | 2012-10-23 12:26:26 -0700 | [diff] [blame] | 341 | upstream-netbsd/libc/gen/utime.c \ |
| 342 | upstream-netbsd/libc/inet/inet_ntoa.c \ |
| 343 | upstream-netbsd/libc/inet/inet_ntop.c \ |
| 344 | upstream-netbsd/libc/inet/inet_pton.c \ |
Elliott Hughes | ab44f52 | 2012-10-23 16:05:09 -0700 | [diff] [blame] | 345 | upstream-netbsd/libc/isc/ev_streams.c \ |
| 346 | upstream-netbsd/libc/isc/ev_timers.c \ |
Elliott Hughes | e8bcca3 | 2012-10-23 12:26:26 -0700 | [diff] [blame] | 347 | upstream-netbsd/libc/regex/regcomp.c \ |
| 348 | upstream-netbsd/libc/regex/regerror.c \ |
| 349 | upstream-netbsd/libc/regex/regexec.c \ |
| 350 | upstream-netbsd/libc/regex/regfree.c \ |
| 351 | upstream-netbsd/libc/stdio/getdelim.c \ |
| 352 | upstream-netbsd/libc/stdio/getline.c \ |
Elliott Hughes | ab44f52 | 2012-10-23 16:05:09 -0700 | [diff] [blame] | 353 | upstream-netbsd/libc/stdlib/bsearch.c \ |
| 354 | upstream-netbsd/libc/stdlib/div.c \ |
Elliott Hughes | e8bcca3 | 2012-10-23 12:26:26 -0700 | [diff] [blame] | 355 | upstream-netbsd/libc/stdlib/drand48.c \ |
| 356 | upstream-netbsd/libc/stdlib/erand48.c \ |
| 357 | upstream-netbsd/libc/stdlib/jrand48.c \ |
Elliott Hughes | ab44f52 | 2012-10-23 16:05:09 -0700 | [diff] [blame] | 358 | upstream-netbsd/libc/stdlib/ldiv.c \ |
| 359 | upstream-netbsd/libc/stdlib/lldiv.c \ |
Elliott Hughes | e8bcca3 | 2012-10-23 12:26:26 -0700 | [diff] [blame] | 360 | upstream-netbsd/libc/stdlib/lrand48.c \ |
| 361 | upstream-netbsd/libc/stdlib/mrand48.c \ |
| 362 | upstream-netbsd/libc/stdlib/nrand48.c \ |
| 363 | upstream-netbsd/libc/stdlib/_rand48.c \ |
| 364 | upstream-netbsd/libc/stdlib/seed48.c \ |
| 365 | upstream-netbsd/libc/stdlib/srand48.c \ |
| 366 | upstream-netbsd/libc/stdlib/tdelete.c \ |
| 367 | upstream-netbsd/libc/stdlib/tfind.c \ |
| 368 | upstream-netbsd/libc/stdlib/tsearch.c \ |
Elliott Hughes | c51cd76 | 2013-01-22 14:41:23 -0800 | [diff] [blame] | 369 | upstream-netbsd/libc/string/memccpy.c \ |
Elliott Hughes | e8bcca3 | 2012-10-23 12:26:26 -0700 | [diff] [blame] | 370 | upstream-netbsd/libc/string/strcasestr.c \ |
Elliott Hughes | 2b47307 | 2013-01-22 15:10:19 -0800 | [diff] [blame] | 371 | upstream-netbsd/libc/string/strcoll.c \ |
Elliott Hughes | e8bcca3 | 2012-10-23 12:26:26 -0700 | [diff] [blame] | 372 | upstream-netbsd/libc/string/strxfrm.c \ |
Elliott Hughes | ab44f52 | 2012-10-23 16:05:09 -0700 | [diff] [blame] | 373 | upstream-netbsd/libc/unistd/killpg.c \ |
Elliott Hughes | f8b3a92 | 2012-08-10 11:39:58 -0700 | [diff] [blame] | 374 | |
Pavel Chupin | a567a8e | 2012-12-18 17:30:02 +0400 | [diff] [blame] | 375 | |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 376 | # Architecture specific source files go here |
| 377 | # ========================================================= |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 378 | ifeq ($(TARGET_ARCH),arm) |
| 379 | libc_common_src_files += \ |
Liubov Dmitrieva | 0a49066 | 2012-01-17 12:55:46 +0400 | [diff] [blame] | 380 | bionic/memchr.c \ |
Pavel Chupin | a567a8e | 2012-12-18 17:30:02 +0400 | [diff] [blame] | 381 | bionic/memmove.c.arm \ |
Liubov Dmitrieva | 0a49066 | 2012-01-17 12:55:46 +0400 | [diff] [blame] | 382 | bionic/memrchr.c \ |
Pavel Chupin | a567a8e | 2012-12-18 17:30:02 +0400 | [diff] [blame] | 383 | bionic/strchr.cpp \ |
Liubov Dmitrieva | 0a49066 | 2012-01-17 12:55:46 +0400 | [diff] [blame] | 384 | bionic/strnlen.c \ |
Pavel Chupin | a567a8e | 2012-12-18 17:30:02 +0400 | [diff] [blame] | 385 | string/bcopy.c \ |
| 386 | string/index.c \ |
Liubov Dmitrieva | 0a49066 | 2012-01-17 12:55:46 +0400 | [diff] [blame] | 387 | string/strlcat.c \ |
| 388 | string/strlcpy.c \ |
Pavel Chupin | a567a8e | 2012-12-18 17:30:02 +0400 | [diff] [blame] | 389 | string/strncat.c \ |
| 390 | string/strncmp.c \ |
| 391 | string/strncpy.c \ |
| 392 | string/strrchr.c \ |
| 393 | upstream-freebsd/lib/libc/string/wcscat.c \ |
Liubov Dmitrieva | 0a49066 | 2012-01-17 12:55:46 +0400 | [diff] [blame] | 394 | upstream-freebsd/lib/libc/string/wcschr.c \ |
Liubov Dmitrieva | 0a49066 | 2012-01-17 12:55:46 +0400 | [diff] [blame] | 395 | upstream-freebsd/lib/libc/string/wcscmp.c \ |
| 396 | upstream-freebsd/lib/libc/string/wcscpy.c \ |
Liubov Dmitrieva | 0a49066 | 2012-01-17 12:55:46 +0400 | [diff] [blame] | 397 | upstream-freebsd/lib/libc/string/wcslen.c \ |
Pavel Chupin | a567a8e | 2012-12-18 17:30:02 +0400 | [diff] [blame] | 398 | upstream-freebsd/lib/libc/string/wcsrchr.c \ |
| 399 | upstream-freebsd/lib/libc/string/wmemcmp.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 400 | |
| 401 | # These files need to be arm so that gdbserver |
| 402 | # can set breakpoints in them without messing |
| 403 | # up any thumb code. |
Pavel Chupin | a567a8e | 2012-12-18 17:30:02 +0400 | [diff] [blame] | 404 | # TODO: is this actually necessary? |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 405 | libc_common_src_files += \ |
Pavel Chupin | a567a8e | 2012-12-18 17:30:02 +0400 | [diff] [blame] | 406 | bionic/pthread-atfork.c.arm \ |
| 407 | bionic/pthread-rwlocks.c.arm \ |
| 408 | bionic/pthread-timers.c.arm \ |
| 409 | bionic/ptrace.c.arm \ |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 410 | |
David 'Digit' Turner | 6a51def | 2010-08-27 08:19:19 -0700 | [diff] [blame] | 411 | libc_static_common_src_files += \ |
Elliott Hughes | 44b53ad | 2013-02-11 20:18:47 +0000 | [diff] [blame] | 412 | bionic/pthread.c.arm \ |
Elliott Hughes | 4b4a882 | 2013-02-12 17:15:59 -0800 | [diff] [blame] | 413 | bionic/pthread_create.cpp.arm \ |
Elliott Hughes | 44b53ad | 2013-02-11 20:18:47 +0000 | [diff] [blame] | 414 | bionic/pthread_key.cpp.arm \ |
David 'Digit' Turner | 6a51def | 2010-08-27 08:19:19 -0700 | [diff] [blame] | 415 | |
Raghu Gandham | a4c7933 | 2012-08-07 12:23:24 -0700 | [diff] [blame] | 416 | endif # arm |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 417 | |
| 418 | ifeq ($(TARGET_ARCH),x86) |
| 419 | libc_common_src_files += \ |
Elliott Hughes | d254704 | 2013-02-13 16:31:52 -0800 | [diff] [blame] | 420 | bionic/pthread-atfork.c \ |
| 421 | bionic/pthread-rwlocks.c \ |
| 422 | bionic/pthread-timers.c \ |
| 423 | bionic/ptrace.c \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 424 | |
David 'Digit' Turner | 6a51def | 2010-08-27 08:19:19 -0700 | [diff] [blame] | 425 | libc_static_common_src_files += \ |
Elliott Hughes | 44b53ad | 2013-02-11 20:18:47 +0000 | [diff] [blame] | 426 | bionic/pthread.c \ |
Elliott Hughes | 4b4a882 | 2013-02-12 17:15:59 -0800 | [diff] [blame] | 427 | bionic/pthread_create.cpp \ |
Elliott Hughes | 44b53ad | 2013-02-11 20:18:47 +0000 | [diff] [blame] | 428 | bionic/pthread_key.cpp \ |
David 'Digit' Turner | 6a51def | 2010-08-27 08:19:19 -0700 | [diff] [blame] | 429 | |
Raghu Gandham | a4c7933 | 2012-08-07 12:23:24 -0700 | [diff] [blame] | 430 | endif # x86 |
Shin-ichiro KAWASAKI | 1009327 | 2009-09-28 16:11:39 +0900 | [diff] [blame] | 431 | |
Pavel Chupin | a567a8e | 2012-12-18 17:30:02 +0400 | [diff] [blame] | 432 | ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86_64)) |
| 433 | libc_common_src_files += \ |
| 434 | bionic/memchr.c \ |
| 435 | bionic/memcmp.c \ |
| 436 | bionic/memcpy.c \ |
| 437 | bionic/memmove.c \ |
| 438 | bionic/memrchr.c \ |
| 439 | bionic/memset.c \ |
| 440 | bionic/pthread-atfork.c \ |
| 441 | bionic/pthread-rwlocks.c \ |
| 442 | bionic/pthread-timers.c \ |
| 443 | bionic/ptrace.c \ |
| 444 | bionic/strchr.cpp \ |
| 445 | bionic/strnlen.c \ |
| 446 | string/bcopy.c \ |
| 447 | string/index.c \ |
| 448 | string/strcat.c \ |
| 449 | string/strcmp.c \ |
| 450 | string/strcpy.c \ |
| 451 | string/strlcat.c \ |
| 452 | string/strlcpy.c \ |
| 453 | string/strlen.c \ |
| 454 | string/strncat.c \ |
| 455 | string/strncmp.c \ |
| 456 | string/strncpy.c \ |
| 457 | string/strrchr.c \ |
| 458 | upstream-freebsd/lib/libc/string/wcscat.c \ |
| 459 | upstream-freebsd/lib/libc/string/wcschr.c \ |
| 460 | upstream-freebsd/lib/libc/string/wcscmp.c \ |
| 461 | upstream-freebsd/lib/libc/string/wcscpy.c \ |
| 462 | upstream-freebsd/lib/libc/string/wcslen.c \ |
| 463 | upstream-freebsd/lib/libc/string/wcsrchr.c \ |
| 464 | upstream-freebsd/lib/libc/string/wmemcmp.c \ |
| 465 | |
| 466 | libc_static_common_src_files += \ |
| 467 | bionic/pthread.c \ |
| 468 | bionic/pthread_create.cpp \ |
| 469 | bionic/pthread_key.cpp \ |
| 470 | |
| 471 | endif # x86_64 |
| 472 | |
Raghu Gandham | a4c7933 | 2012-08-07 12:23:24 -0700 | [diff] [blame] | 473 | ifeq ($(TARGET_ARCH),mips) |
| 474 | libc_common_src_files += \ |
Pavel Chupin | a567a8e | 2012-12-18 17:30:02 +0400 | [diff] [blame] | 475 | bionic/memchr.c \ |
Elliott Hughes | 857fed5 | 2012-10-02 11:20:07 -0700 | [diff] [blame] | 476 | bionic/memcmp.c \ |
Pavel Chupin | a567a8e | 2012-12-18 17:30:02 +0400 | [diff] [blame] | 477 | bionic/memrchr.c \ |
| 478 | bionic/strchr.cpp \ |
| 479 | bionic/strnlen.c \ |
Raghu Gandham | a4c7933 | 2012-08-07 12:23:24 -0700 | [diff] [blame] | 480 | string/bcopy.c \ |
Pavel Chupin | a567a8e | 2012-12-18 17:30:02 +0400 | [diff] [blame] | 481 | string/index.c \ |
| 482 | string/strcat.c \ |
Raghu Gandham | a4c7933 | 2012-08-07 12:23:24 -0700 | [diff] [blame] | 483 | string/strcmp.c \ |
| 484 | string/strcpy.c \ |
Liubov Dmitrieva | 0a49066 | 2012-01-17 12:55:46 +0400 | [diff] [blame] | 485 | string/strlcat.c \ |
| 486 | string/strlcpy.c \ |
Pavel Chupin | a567a8e | 2012-12-18 17:30:02 +0400 | [diff] [blame] | 487 | string/strncat.c \ |
| 488 | string/strncmp.c \ |
| 489 | string/strncpy.c \ |
| 490 | string/strrchr.c \ |
Chris Dearman | fa4d596 | 2013-10-01 19:11:26 -0700 | [diff] [blame^] | 491 | upstream-freebsd/lib/libc/string/wcscat.c \ |
Liubov Dmitrieva | 0a49066 | 2012-01-17 12:55:46 +0400 | [diff] [blame] | 492 | upstream-freebsd/lib/libc/string/wcschr.c \ |
Liubov Dmitrieva | 0a49066 | 2012-01-17 12:55:46 +0400 | [diff] [blame] | 493 | upstream-freebsd/lib/libc/string/wcscmp.c \ |
| 494 | upstream-freebsd/lib/libc/string/wcscpy.c \ |
Liubov Dmitrieva | 0a49066 | 2012-01-17 12:55:46 +0400 | [diff] [blame] | 495 | upstream-freebsd/lib/libc/string/wcslen.c \ |
Pavel Chupin | a567a8e | 2012-12-18 17:30:02 +0400 | [diff] [blame] | 496 | upstream-freebsd/lib/libc/string/wcsrchr.c \ |
| 497 | upstream-freebsd/lib/libc/string/wmemcmp.c \ |
Raghu Gandham | a4c7933 | 2012-08-07 12:23:24 -0700 | [diff] [blame] | 498 | |
| 499 | libc_common_src_files += \ |
| 500 | bionic/pthread-atfork.c \ |
| 501 | bionic/pthread-rwlocks.c \ |
| 502 | bionic/pthread-timers.c \ |
| 503 | bionic/ptrace.c |
| 504 | |
| 505 | libc_static_common_src_files += \ |
Elliott Hughes | ba342c1 | 2013-02-11 18:06:23 -0800 | [diff] [blame] | 506 | bionic/pthread.c \ |
Elliott Hughes | 4b4a882 | 2013-02-12 17:15:59 -0800 | [diff] [blame] | 507 | bionic/pthread_create.cpp \ |
Elliott Hughes | 44b53ad | 2013-02-11 20:18:47 +0000 | [diff] [blame] | 508 | bionic/pthread_key.cpp \ |
Raghu Gandham | a4c7933 | 2012-08-07 12:23:24 -0700 | [diff] [blame] | 509 | |
Raghu Gandham | a4c7933 | 2012-08-07 12:23:24 -0700 | [diff] [blame] | 510 | endif # mips |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 511 | |
Christopher Ferris | 7c83a1e | 2013-02-26 01:30:00 -0800 | [diff] [blame] | 512 | ifeq ($(strip $(TARGET_CPU_VARIANT)),) |
| 513 | $(warning TARGET_CPU_VARIANT is not defined) |
| 514 | endif |
| 515 | |
| 516 | ########################################################### |
| 517 | ## Add cpu specific source files. |
| 518 | ## |
| 519 | ## This can be called multiple times, but it will only add |
| 520 | ## the first source file for each unique $(1). |
| 521 | ## $(1): Unique identifier to identify the cpu variant |
| 522 | ## implementation. |
| 523 | ## $(2): Cpu specific source file. |
| 524 | ########################################################### |
| 525 | |
| 526 | define libc-add-cpu-variant-src |
| 527 | $(if $(filter true,$(_LIBC_ARCH_CPU_VARIANT_HAS_$(1))), \ |
| 528 | , \ |
| 529 | $(eval _LIBC_ARCH_CPU_VARIANT_HAS_$(1) := true) \ |
| 530 | $(eval _LIBC_ARCH_CPU_VARIANT_SRC_FILE.$(1) := $(2)) \ |
| 531 | $(eval _LIBC_ARCH_CPU_VARIANT_SRC_FILES += $(2)) \ |
| 532 | ) |
| 533 | endef |
| 534 | |
| 535 | _LIBC_ARCH_COMMON_SRC_FILES := |
| 536 | _LIBC_ARCH_CPU_VARIANT_SRC_FILES := |
| 537 | _LIBC_ARCH_STATIC_SRC_FILES := |
| 538 | _LIBC_ARCH_DYNAMIC_SRC_FILES := |
| 539 | include bionic/libc/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk |
| 540 | |
| 541 | libc_common_src_files += $(_LIBC_ARCH_COMMON_SRC_FILES) |
| 542 | libc_common_src_files += $(_LIBC_ARCH_CPU_VARIANT_SRC_FILES) |
| 543 | libc_arch_static_src_files := $(_LIBC_ARCH_STATIC_SRC_FILES) |
| 544 | libc_arch_dynamic_src_files := $(_LIBC_ARCH_DYNAMIC_SRC_FILES) |
| 545 | |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 546 | # Define some common cflags |
| 547 | # ======================================================== |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 548 | libc_common_cflags := \ |
Elliott Hughes | 470631e | 2012-06-06 10:32:56 -0700 | [diff] [blame] | 549 | -DANDROID_CHANGES \ |
Elliott Hughes | 470631e | 2012-06-06 10:32:56 -0700 | [diff] [blame] | 550 | -D_LIBC=1 \ |
Elliott Hughes | 470631e | 2012-06-06 10:32:56 -0700 | [diff] [blame] | 551 | -DINET6 \ |
| 552 | -I$(LOCAL_PATH)/private \ |
Elliott Hughes | 470631e | 2012-06-06 10:32:56 -0700 | [diff] [blame] | 553 | -DPOSIX_MISTAKE \ |
Elliott Hughes | c4d1fec | 2012-08-28 14:15:04 -0700 | [diff] [blame] | 554 | -Wall -Wextra |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 555 | |
Dave Bort | d2c9dcc | 2009-04-23 15:50:03 -0700 | [diff] [blame] | 556 | ifeq ($(strip $(DEBUG_BIONIC_LIBC)),true) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 557 | libc_common_cflags += -DDEBUG |
| 558 | endif |
| 559 | |
Jack Ren | 2fd81ef | 2011-11-19 09:48:03 +0800 | [diff] [blame] | 560 | # To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in |
| 561 | # the appropriate BoardConfig.mk file. |
| 562 | # |
| 563 | ifneq ($(BOARD_MALLOC_ALIGNMENT),) |
| 564 | libc_common_cflags += -DMALLOC_ALIGNMENT=$(BOARD_MALLOC_ALIGNMENT) |
| 565 | endif |
| 566 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 567 | ifeq ($(TARGET_ARCH),arm) |
Raghu Gandham | a4c7933 | 2012-08-07 12:23:24 -0700 | [diff] [blame] | 568 | libc_common_cflags += -DSOFTFLOAT |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 569 | libc_common_cflags += -fstrict-aliasing |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 570 | libc_crt_target_cflags := -mthumb-interwork |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 571 | endif # !arm |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 572 | |
Raghu Gandham | a4c7933 | 2012-08-07 12:23:24 -0700 | [diff] [blame] | 573 | ifeq ($(TARGET_ARCH),x86) |
Pavel Chupin | e85c183 | 2013-08-16 18:11:13 +0400 | [diff] [blame] | 574 | libc_crt_target_cflags := -m32 |
| 575 | libc_crt_target_ldflags := -melf_i386 |
Pavel Chupin | a567a8e | 2012-12-18 17:30:02 +0400 | [diff] [blame] | 576 | endif |
| 577 | ifeq ($(TARGET_ARCH),x86_64) |
| 578 | libc_crt_target_cflags := -m64 |
| 579 | libc_crt_target_ldflags := -melf_x86_64 |
| 580 | endif |
| 581 | |
| 582 | ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64)) |
| 583 | libc_common_cflags += -DSOFTFLOAT |
Raghu Gandham | a4c7933 | 2012-08-07 12:23:24 -0700 | [diff] [blame] | 584 | ifeq ($(ARCH_X86_HAVE_SSE2),true) |
| 585 | libc_crt_target_cflags += -DUSE_SSE2=1 |
| 586 | endif |
| 587 | ifeq ($(ARCH_X86_HAVE_SSSE3),true) |
| 588 | libc_crt_target_cflags += -DUSE_SSSE3=1 |
| 589 | endif |
Pavel Chupin | a567a8e | 2012-12-18 17:30:02 +0400 | [diff] [blame] | 590 | endif |
Raghu Gandham | a4c7933 | 2012-08-07 12:23:24 -0700 | [diff] [blame] | 591 | |
| 592 | ifeq ($(TARGET_ARCH),mips) |
| 593 | ifneq ($(ARCH_MIPS_HAS_FPU),true) |
| 594 | libc_common_cflags += -DSOFTFLOAT |
| 595 | endif |
| 596 | libc_common_cflags += -fstrict-aliasing |
| 597 | libc_crt_target_cflags := $(TARGET_GLOBAL_CFLAGS) |
| 598 | endif # mips |
| 599 | |
Andy McFadden | fcd00eb | 2010-05-28 13:31:45 -0700 | [diff] [blame] | 600 | # Define ANDROID_SMP appropriately. |
| 601 | ifeq ($(TARGET_CPU_SMP),true) |
| 602 | libc_common_cflags += -DANDROID_SMP=1 |
| 603 | else |
| 604 | libc_common_cflags += -DANDROID_SMP=0 |
| 605 | endif |
| 606 | |
Elliott Hughes | 76be660 | 2012-08-08 14:07:37 -0700 | [diff] [blame] | 607 | # crtbrand.c needs <stdint.h> and a #define for the platform SDK version. |
| 608 | libc_crt_target_cflags += \ |
| 609 | -I$(LOCAL_PATH)/include \ |
| 610 | -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) |
Andy McFadden | fcd00eb | 2010-05-28 13:31:45 -0700 | [diff] [blame] | 611 | |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 612 | # Define some common includes |
| 613 | # ======================================================== |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 614 | libc_common_c_includes := \ |
| 615 | $(LOCAL_PATH)/stdlib \ |
| 616 | $(LOCAL_PATH)/string \ |
Nick Kralevich | 76656af | 2012-06-07 16:30:02 -0700 | [diff] [blame] | 617 | $(LOCAL_PATH)/stdio \ |
| 618 | external/safe-iop/include |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 619 | |
Nick Kralevich | 9d40326 | 2012-05-31 11:40:10 -0700 | [diff] [blame] | 620 | # Needed to access private/__dso_handle.h from |
David 'Digit' Turner | 3b43f87 | 2010-07-01 23:09:28 -0700 | [diff] [blame] | 621 | # crtbegin_xxx.S and crtend_xxx.S |
Elliott Hughes | 76be660 | 2012-08-08 14:07:37 -0700 | [diff] [blame] | 622 | libc_crt_target_cflags += \ |
| 623 | -I$(LOCAL_PATH)/private \ |
| 624 | -I$(LOCAL_PATH)/arch-$(TARGET_ARCH)/include |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 625 | |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 626 | # Define the libc run-time (crt) support object files that must be built, |
| 627 | # which are needed to build all other objects (shared/static libs and |
| 628 | # executables) |
| 629 | # ========================================================================== |
Raghu Gandham | a4c7933 | 2012-08-07 12:23:24 -0700 | [diff] [blame] | 630 | # ARM, MIPS, and x86 all need crtbegin_so/crtend_so. |
David 'Digit' Turner | 6a9b888 | 2010-06-18 14:47:22 -0700 | [diff] [blame] | 631 | # |
| 632 | # For x86, the .init section must point to a function that calls all |
| 633 | # entries in the .ctors section. (on ARM this is done through the |
| 634 | # .init_array section instead). |
| 635 | # |
Raghu Gandham | a4c7933 | 2012-08-07 12:23:24 -0700 | [diff] [blame] | 636 | # For all the platforms, the .fini_array section must point to a function |
David 'Digit' Turner | 6a9b888 | 2010-06-18 14:47:22 -0700 | [diff] [blame] | 637 | # that will call __cxa_finalize(&__dso_handle) in order to ensure that |
| 638 | # static C++ destructors are properly called on dlclose(). |
| 639 | # |
Raghu Gandham | a4c7933 | 2012-08-07 12:23:24 -0700 | [diff] [blame] | 640 | ifeq ($(TARGET_ARCH),arm) |
Raghu Gandham | a4c7933 | 2012-08-07 12:23:24 -0700 | [diff] [blame] | 641 | libc_crt_target_so_cflags := |
David 'Digit' Turner | 2d2dbd3 | 2011-06-25 17:26:38 +0200 | [diff] [blame] | 642 | endif |
Raghu Gandham | a4c7933 | 2012-08-07 12:23:24 -0700 | [diff] [blame] | 643 | ifeq ($(TARGET_ARCH),mips) |
Raghu Gandham | a4c7933 | 2012-08-07 12:23:24 -0700 | [diff] [blame] | 644 | libc_crt_target_so_cflags := -fPIC |
| 645 | endif |
Pavel Chupin | a567a8e | 2012-12-18 17:30:02 +0400 | [diff] [blame] | 646 | ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64)) |
Raghu Gandham | a4c7933 | 2012-08-07 12:23:24 -0700 | [diff] [blame] | 647 | libc_crt_target_so_cflags := -fPIC |
| 648 | endif |
Raghu Gandham | a4c7933 | 2012-08-07 12:23:24 -0700 | [diff] [blame] | 649 | libc_crt_target_so_cflags += $(libc_crt_target_cflags) |
Elliott Hughes | 4c6b925 | 2013-07-17 17:38:45 -0700 | [diff] [blame] | 650 | libc_crt_target_crtbegin_file := $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin.c |
| 651 | libc_crt_target_crtbegin_so_file := $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin_so.c |
Michael Hope | ea8fad1 | 2012-07-31 16:18:22 +1200 | [diff] [blame] | 652 | |
| 653 | # See the comment in crtbrand.c for the reason why we need to generate |
| 654 | # crtbrand.s before generating crtbrand.o. |
| 655 | GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.s |
| 656 | $(GEN): $(LOCAL_PATH)/bionic/crtbrand.c |
| 657 | @mkdir -p $(dir $@) |
Ying Wang | cf46487 | 2012-09-07 17:06:56 -0700 | [diff] [blame] | 658 | $(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) -S \ |
| 659 | -MD -MF $(@:%.s=%.d) -o $@ $< |
| 660 | $(hide) sed -i -e '/\.note\.ABI-tag/s/progbits/note/' $@ |
| 661 | $(call transform-d-to-p-args,$(@:%.s=%.d),$(@:%.s=%.P)) |
| 662 | -include $(GEN:%.s=%.P) |
Michael Hope | ea8fad1 | 2012-07-31 16:18:22 +1200 | [diff] [blame] | 663 | ALL_GENERATED_SOURCES += $(GEN) |
| 664 | |
| 665 | GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o |
| 666 | $(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.s |
| 667 | @mkdir -p $(dir $@) |
Ying Wang | cf46487 | 2012-09-07 17:06:56 -0700 | [diff] [blame] | 668 | $(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) -o $@ -c $< |
Michael Hope | ea8fad1 | 2012-07-31 16:18:22 +1200 | [diff] [blame] | 669 | ALL_GENERATED_SOURCES += $(GEN) |
| 670 | |
Ying Wang | fc9e525 | 2012-05-15 15:15:11 -0700 | [diff] [blame] | 671 | GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_so.o |
Elliott Hughes | 12949e5 | 2012-09-10 11:16:12 -0700 | [diff] [blame] | 672 | $(GEN): $(libc_crt_target_crtbegin_so_file) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 673 | @mkdir -p $(dir $@) |
Ying Wang | cf46487 | 2012-09-07 17:06:56 -0700 | [diff] [blame] | 674 | $(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) \ |
| 675 | -MD -MF $(@:%.o=%.d) -o $@ -c $< |
| 676 | $(transform-d-to-p) |
| 677 | -include $(GEN:%.o=%.P) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 678 | ALL_GENERATED_SOURCES += $(GEN) |
| 679 | |
Ying Wang | fc9e525 | 2012-05-15 15:15:11 -0700 | [diff] [blame] | 680 | GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_so.o |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 681 | $(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtend_so.S |
| 682 | @mkdir -p $(dir $@) |
Ying Wang | cf46487 | 2012-09-07 17:06:56 -0700 | [diff] [blame] | 683 | $(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) \ |
| 684 | -MD -MF $(@:%.o=%.d) -o $@ -c $< |
| 685 | $(transform-d-to-p) |
| 686 | -include $(GEN:%.o=%.P) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 687 | ALL_GENERATED_SOURCES += $(GEN) |
Shih-wei Liao | fc0725e | 2012-07-28 00:33:28 -0700 | [diff] [blame] | 688 | |
Ying Wang | cf46487 | 2012-09-07 17:06:56 -0700 | [diff] [blame] | 689 | # The following two are installed to device |
Shih-wei Liao | fc0725e | 2012-07-28 00:33:28 -0700 | [diff] [blame] | 690 | GEN := $(TARGET_OUT_SHARED_LIBRARIES)/crtbegin_so.o |
Ying Wang | cf46487 | 2012-09-07 17:06:56 -0700 | [diff] [blame] | 691 | $(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_so.o |
| 692 | $(hide) mkdir -p $(dir $@) && cp -f $< $@ |
Shih-wei Liao | fc0725e | 2012-07-28 00:33:28 -0700 | [diff] [blame] | 693 | ALL_GENERATED_SOURCES += $(GEN) |
| 694 | |
| 695 | GEN := $(TARGET_OUT_SHARED_LIBRARIES)/crtend_so.o |
Ying Wang | cf46487 | 2012-09-07 17:06:56 -0700 | [diff] [blame] | 696 | $(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_so.o |
| 697 | $(hide) mkdir -p $(dir $@) && cp -f $< $@ |
Shih-wei Liao | fc0725e | 2012-07-28 00:33:28 -0700 | [diff] [blame] | 698 | ALL_GENERATED_SOURCES += $(GEN) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 699 | |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 700 | |
Michael Hope | ea8fad1 | 2012-07-31 16:18:22 +1200 | [diff] [blame] | 701 | GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static1.o |
Elliott Hughes | 12949e5 | 2012-09-10 11:16:12 -0700 | [diff] [blame] | 702 | $(GEN): $(libc_crt_target_crtbegin_file) |
Michael Hope | ea8fad1 | 2012-07-31 16:18:22 +1200 | [diff] [blame] | 703 | @mkdir -p $(dir $@) |
Ying Wang | cf46487 | 2012-09-07 17:06:56 -0700 | [diff] [blame] | 704 | $(hide) $(TARGET_CC) $(libc_crt_target_cflags) \ |
| 705 | -MD -MF $(@:%.o=%.d) -o $@ -c $< |
| 706 | $(transform-d-to-p) |
| 707 | -include $(GEN:%.o=%.P) |
Michael Hope | ea8fad1 | 2012-07-31 16:18:22 +1200 | [diff] [blame] | 708 | ALL_GENERATED_SOURCES += $(GEN) |
| 709 | |
Ying Wang | fc9e525 | 2012-05-15 15:15:11 -0700 | [diff] [blame] | 710 | GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static.o |
Michael Hope | ea8fad1 | 2012-07-31 16:18:22 +1200 | [diff] [blame] | 711 | $(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static1.o $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o |
| 712 | @mkdir -p $(dir $@) |
Pavel Chupin | e85c183 | 2013-08-16 18:11:13 +0400 | [diff] [blame] | 713 | $(hide) $(TARGET_LD) $(libc_crt_target_ldflags) -r -o $@ $^ |
Michael Hope | ea8fad1 | 2012-07-31 16:18:22 +1200 | [diff] [blame] | 714 | ALL_GENERATED_SOURCES += $(GEN) |
| 715 | |
| 716 | GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic1.o |
Elliott Hughes | 12949e5 | 2012-09-10 11:16:12 -0700 | [diff] [blame] | 717 | $(GEN): $(libc_crt_target_crtbegin_file) |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 718 | @mkdir -p $(dir $@) |
Ying Wang | cf46487 | 2012-09-07 17:06:56 -0700 | [diff] [blame] | 719 | $(hide) $(TARGET_CC) $(libc_crt_target_cflags) \ |
| 720 | -MD -MF $(@:%.o=%.d) -o $@ -c $< |
| 721 | $(transform-d-to-p) |
| 722 | -include $(GEN:%.o=%.P) |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 723 | ALL_GENERATED_SOURCES += $(GEN) |
| 724 | |
Ying Wang | fc9e525 | 2012-05-15 15:15:11 -0700 | [diff] [blame] | 725 | GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic.o |
Michael Hope | ea8fad1 | 2012-07-31 16:18:22 +1200 | [diff] [blame] | 726 | $(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic1.o $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 727 | @mkdir -p $(dir $@) |
Pavel Chupin | e85c183 | 2013-08-16 18:11:13 +0400 | [diff] [blame] | 728 | $(hide) $(TARGET_LD) $(libc_crt_target_ldflags) -r -o $@ $^ |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 729 | ALL_GENERATED_SOURCES += $(GEN) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 730 | |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 731 | # We rename crtend.o to crtend_android.o to avoid a |
| 732 | # name clash between gcc and bionic. |
Ying Wang | fc9e525 | 2012-05-15 15:15:11 -0700 | [diff] [blame] | 733 | GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_android.o |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 734 | $(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtend.S |
| 735 | @mkdir -p $(dir $@) |
Ying Wang | cf46487 | 2012-09-07 17:06:56 -0700 | [diff] [blame] | 736 | $(hide) $(TARGET_CC) $(libc_crt_target_cflags) \ |
| 737 | -MD -MF $(@:%.o=%.d) -o $@ -c $< |
| 738 | $(transform-d-to-p) |
| 739 | -include $(GEN:%.o=%.P) |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 740 | ALL_GENERATED_SOURCES += $(GEN) |
| 741 | |
| 742 | |
| 743 | # To enable malloc leak check for statically linked programs, add |
| 744 | # "WITH_MALLOC_CHECK_LIBC_A := true" to buildspec.mk |
| 745 | WITH_MALLOC_CHECK_LIBC_A := $(strip $(WITH_MALLOC_CHECK_LIBC_A)) |
| 746 | |
| 747 | # ======================================================== |
Nick Kralevich | 6334c66 | 2012-07-10 10:46:19 -0700 | [diff] [blame] | 748 | # libbionic_ssp.a - stack protector code |
| 749 | # ======================================================== |
| 750 | # |
| 751 | # The stack protector code needs to be compiled |
| 752 | # with -fno-stack-protector, since it modifies the |
| 753 | # stack canary. |
| 754 | |
| 755 | include $(CLEAR_VARS) |
| 756 | |
Elliott Hughes | 642331b | 2013-03-06 15:03:53 -0800 | [diff] [blame] | 757 | LOCAL_SRC_FILES := bionic/__stack_chk_fail.cpp |
Elliott Hughes | dc5ec07 | 2013-02-14 11:15:58 -0800 | [diff] [blame] | 758 | LOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector -Werror |
Nick Kralevich | 6334c66 | 2012-07-10 10:46:19 -0700 | [diff] [blame] | 759 | LOCAL_C_INCLUDES := $(libc_common_c_includes) |
| 760 | LOCAL_MODULE := libbionic_ssp |
Elliott Hughes | ae5c644 | 2012-08-13 14:06:05 -0700 | [diff] [blame] | 761 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Nick Kralevich | 6334c66 | 2012-07-10 10:46:19 -0700 | [diff] [blame] | 762 | LOCAL_SYSTEM_SHARED_LIBRARIES := |
| 763 | |
| 764 | include $(BUILD_STATIC_LIBRARY) |
| 765 | |
| 766 | |
| 767 | # ======================================================== |
Elliott Hughes | ce4783c | 2013-07-12 17:31:11 -0700 | [diff] [blame] | 768 | # libc_tzcode.a - upstream 'tzcode' code |
| 769 | # ======================================================== |
| 770 | |
| 771 | include $(CLEAR_VARS) |
| 772 | |
| 773 | LOCAL_SRC_FILES := $(libc_tzcode_src_files) |
| 774 | LOCAL_CFLAGS := \ |
| 775 | $(libc_common_cflags) \ |
| 776 | -std=gnu99 \ |
| 777 | -DSTD_INSPIRED=1 \ |
| 778 | -DTZDIR=\"/system/usr/share/zoneinfo\" \ |
| 779 | -DTM_GMTOFF=tm_gmtoff \ |
| 780 | -DUSG_COMPAT=1 |
| 781 | LOCAL_C_INCLUDES := $(libc_common_c_includes) |
| 782 | LOCAL_MODULE := libc_tzcode |
| 783 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 784 | LOCAL_SYSTEM_SHARED_LIBRARIES := |
| 785 | |
| 786 | include $(BUILD_STATIC_LIBRARY) |
| 787 | |
| 788 | |
| 789 | # ======================================================== |
Elliott Hughes | f077784 | 2013-03-01 16:59:46 -0800 | [diff] [blame] | 790 | # libc_freebsd.a - upstream FreeBSD C library code |
| 791 | # ======================================================== |
| 792 | # |
| 793 | # These files are built with the freebsd-compat.h header file |
| 794 | # automatically included. |
| 795 | |
| 796 | include $(CLEAR_VARS) |
| 797 | |
| 798 | LOCAL_SRC_FILES := $(libc_upstream_freebsd_src_files) |
| 799 | LOCAL_CFLAGS := \ |
| 800 | $(libc_common_cflags) \ |
| 801 | -I$(LOCAL_PATH)/upstream-freebsd \ |
| 802 | -I$(LOCAL_PATH)/upstream-freebsd/libc/include \ |
| 803 | -include upstream-freebsd/freebsd-compat.h |
| 804 | LOCAL_C_INCLUDES := $(libc_common_c_includes) |
| 805 | LOCAL_MODULE := libc_freebsd |
| 806 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 807 | LOCAL_SYSTEM_SHARED_LIBRARIES := |
| 808 | |
| 809 | include $(BUILD_STATIC_LIBRARY) |
| 810 | |
| 811 | |
| 812 | # ======================================================== |
Elliott Hughes | f8b3a92 | 2012-08-10 11:39:58 -0700 | [diff] [blame] | 813 | # libc_netbsd.a - upstream NetBSD C library code |
| 814 | # ======================================================== |
| 815 | # |
| 816 | # These files are built with the netbsd-compat.h header file |
| 817 | # automatically included. |
| 818 | |
| 819 | include $(CLEAR_VARS) |
| 820 | |
| 821 | LOCAL_SRC_FILES := $(libc_upstream_netbsd_src_files) |
| 822 | LOCAL_CFLAGS := \ |
| 823 | $(libc_common_cflags) \ |
Elliott Hughes | 3d2d448 | 2012-08-13 16:38:29 -0700 | [diff] [blame] | 824 | -I$(LOCAL_PATH)/upstream-netbsd \ |
Elliott Hughes | ab44f52 | 2012-10-23 16:05:09 -0700 | [diff] [blame] | 825 | -I$(LOCAL_PATH)/upstream-netbsd/libc/include \ |
Elliott Hughes | f8b3a92 | 2012-08-10 11:39:58 -0700 | [diff] [blame] | 826 | -include upstream-netbsd/netbsd-compat.h |
| 827 | LOCAL_C_INCLUDES := $(libc_common_c_includes) |
| 828 | LOCAL_MODULE := libc_netbsd |
Elliott Hughes | ae5c644 | 2012-08-13 14:06:05 -0700 | [diff] [blame] | 829 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Elliott Hughes | f8b3a92 | 2012-08-10 11:39:58 -0700 | [diff] [blame] | 830 | LOCAL_SYSTEM_SHARED_LIBRARIES := |
| 831 | |
| 832 | include $(BUILD_STATIC_LIBRARY) |
| 833 | |
| 834 | |
| 835 | # ======================================================== |
Elliott Hughes | 29c7f0b | 2012-10-22 17:05:27 -0700 | [diff] [blame] | 836 | # libc_bionic.a - home-grown C library code |
| 837 | # ======================================================== |
| 838 | # |
| 839 | include $(CLEAR_VARS) |
| 840 | |
| 841 | LOCAL_SRC_FILES := $(libc_bionic_src_files) |
| 842 | LOCAL_CFLAGS := $(libc_common_cflags) -Werror |
| 843 | LOCAL_C_INCLUDES := $(libc_common_c_includes) |
| 844 | LOCAL_MODULE := libc_bionic |
| 845 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 846 | LOCAL_SYSTEM_SHARED_LIBRARIES := |
| 847 | |
| 848 | include $(BUILD_STATIC_LIBRARY) |
| 849 | |
| 850 | |
| 851 | # ======================================================== |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 852 | # libc_common.a |
| 853 | # ======================================================== |
Elliott Hughes | f8b3a92 | 2012-08-10 11:39:58 -0700 | [diff] [blame] | 854 | |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 855 | include $(CLEAR_VARS) |
| 856 | |
| 857 | LOCAL_SRC_FILES := $(libc_common_src_files) |
Elliott Hughes | ab44f52 | 2012-10-23 16:05:09 -0700 | [diff] [blame] | 858 | LOCAL_CFLAGS := $(libc_common_cflags) \ |
| 859 | -std=gnu99 \ |
| 860 | -I$(LOCAL_PATH)/upstream-netbsd/libc/include # for netbsd private headers |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 861 | LOCAL_C_INCLUDES := $(libc_common_c_includes) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 862 | LOCAL_MODULE := libc_common |
Elliott Hughes | ae5c644 | 2012-08-13 14:06:05 -0700 | [diff] [blame] | 863 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Elliott Hughes | ce4783c | 2013-07-12 17:31:11 -0700 | [diff] [blame] | 864 | LOCAL_WHOLE_STATIC_LIBRARIES := \ |
| 865 | libbionic_ssp \ |
| 866 | libc_bionic \ |
| 867 | libc_freebsd \ |
| 868 | libc_netbsd \ |
| 869 | libc_tzcode |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 870 | LOCAL_SYSTEM_SHARED_LIBRARIES := |
| 871 | |
Ying Wang | c97c5fc | 2012-08-11 14:23:19 -0700 | [diff] [blame] | 872 | # TODO: split out the asflags. |
| 873 | LOCAL_ASFLAGS := $(LOCAL_CFLAGS) |
| 874 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 875 | include $(BUILD_STATIC_LIBRARY) |
| 876 | |
| 877 | |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 878 | # ======================================================== |
Dima Zavin | 49e5533 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 879 | # libc_nomalloc.a |
| 880 | # ======================================================== |
| 881 | # |
| 882 | # This is a version of the static C library that does not |
Elliott Hughes | 91a9925 | 2013-02-12 21:56:42 -0800 | [diff] [blame] | 883 | # include malloc. It's useful in situations when the user wants |
| 884 | # to provide their own malloc implementation, or wants to |
| 885 | # explicitly disallow the use of the use of malloc, |
| 886 | # such as in the dynamic loader. |
Dima Zavin | 49e5533 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 887 | |
| 888 | include $(CLEAR_VARS) |
| 889 | |
| 890 | LOCAL_SRC_FILES := \ |
| 891 | $(libc_arch_static_src_files) \ |
David 'Digit' Turner | 6a51def | 2010-08-27 08:19:19 -0700 | [diff] [blame] | 892 | $(libc_static_common_src_files) \ |
Elliott Hughes | 42b2c6a | 2013-02-07 10:14:39 -0800 | [diff] [blame] | 893 | bionic/libc_init_static.cpp |
Dima Zavin | 49e5533 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 894 | |
| 895 | LOCAL_C_INCLUDES := $(libc_common_c_includes) |
David 'Digit' Turner | 6a51def | 2010-08-27 08:19:19 -0700 | [diff] [blame] | 896 | LOCAL_CFLAGS := $(libc_common_cflags) \ |
Elliott Hughes | 29c7f0b | 2012-10-22 17:05:27 -0700 | [diff] [blame] | 897 | -DLIBC_STATIC \ |
| 898 | -std=gnu99 |
Dima Zavin | 49e5533 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 899 | |
| 900 | LOCAL_MODULE := libc_nomalloc |
Elliott Hughes | ae5c644 | 2012-08-13 14:06:05 -0700 | [diff] [blame] | 901 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Dima Zavin | 49e5533 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 902 | LOCAL_WHOLE_STATIC_LIBRARIES := libc_common |
| 903 | LOCAL_SYSTEM_SHARED_LIBRARIES := |
| 904 | |
| 905 | include $(BUILD_STATIC_LIBRARY) |
| 906 | |
| 907 | |
| 908 | # ======================================================== |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 909 | # libc.a |
| 910 | # ======================================================== |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 911 | include $(CLEAR_VARS) |
| 912 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 913 | LOCAL_SRC_FILES := \ |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 914 | $(libc_arch_static_src_files) \ |
David 'Digit' Turner | 6a51def | 2010-08-27 08:19:19 -0700 | [diff] [blame] | 915 | $(libc_static_common_src_files) \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 916 | bionic/dlmalloc.c \ |
Elliott Hughes | c4d1fec | 2012-08-28 14:15:04 -0700 | [diff] [blame] | 917 | bionic/malloc_debug_common.cpp \ |
Elliott Hughes | 42b2c6a | 2013-02-07 10:14:39 -0800 | [diff] [blame] | 918 | bionic/libc_init_static.cpp |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 919 | |
Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 920 | LOCAL_CFLAGS := $(libc_common_cflags) \ |
Elliott Hughes | 29c7f0b | 2012-10-22 17:05:27 -0700 | [diff] [blame] | 921 | -DLIBC_STATIC \ |
| 922 | -std=gnu99 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 923 | LOCAL_C_INCLUDES := $(libc_common_c_includes) |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 924 | LOCAL_MODULE := libc |
Elliott Hughes | ae5c644 | 2012-08-13 14:06:05 -0700 | [diff] [blame] | 925 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 926 | LOCAL_WHOLE_STATIC_LIBRARIES := libc_common |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 927 | LOCAL_SYSTEM_SHARED_LIBRARIES := |
| 928 | |
| 929 | include $(BUILD_STATIC_LIBRARY) |
| 930 | |
| 931 | |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 932 | # ======================================================== |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 933 | # libc.so |
| 934 | # ======================================================== |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 935 | include $(CLEAR_VARS) |
| 936 | |
Mathias Agopian | 7c0c379 | 2011-09-05 23:54:55 -0700 | [diff] [blame] | 937 | # pthread deadlock prediction: |
| 938 | # set -DPTHREAD_DEBUG -DPTHREAD_DEBUG_ENABLED=1 to enable support for |
| 939 | # pthread deadlock prediction. |
| 940 | # Since this code is experimental it is disabled by default. |
| 941 | # see libc/bionic/pthread_debug.c for details |
| 942 | |
Elliott Hughes | 29c7f0b | 2012-10-22 17:05:27 -0700 | [diff] [blame] | 943 | LOCAL_CFLAGS := $(libc_common_cflags) -std=gnu99 -DPTHREAD_DEBUG -DPTHREAD_DEBUG_ENABLED=0 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 944 | LOCAL_C_INCLUDES := $(libc_common_c_includes) |
| 945 | |
| 946 | LOCAL_SRC_FILES := \ |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 947 | $(libc_arch_dynamic_src_files) \ |
David 'Digit' Turner | 6a51def | 2010-08-27 08:19:19 -0700 | [diff] [blame] | 948 | $(libc_static_common_src_files) \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 949 | bionic/dlmalloc.c \ |
Elliott Hughes | c4d1fec | 2012-08-28 14:15:04 -0700 | [diff] [blame] | 950 | bionic/malloc_debug_common.cpp \ |
Elliott Hughes | 1e980b6 | 2013-01-17 18:36:06 -0800 | [diff] [blame] | 951 | bionic/pthread_debug.cpp \ |
Elliott Hughes | 42b2c6a | 2013-02-07 10:14:39 -0800 | [diff] [blame] | 952 | bionic/libc_init_dynamic.cpp |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 953 | |
Ard Biesheuvel | f3cfcd8 | 2012-08-21 14:13:50 +0200 | [diff] [blame] | 954 | ifeq ($(TARGET_ARCH),arm) |
| 955 | LOCAL_NO_CRT := true |
| 956 | LOCAL_CFLAGS += -DCRT_LEGACY_WORKAROUND |
| 957 | |
| 958 | LOCAL_SRC_FILES := \ |
| 959 | arch-arm/bionic/crtbegin_so.c \ |
| 960 | arch-arm/bionic/atexit_legacy.c \ |
| 961 | $(LOCAL_SRC_FILES) \ |
| 962 | arch-arm/bionic/crtend_so.S |
| 963 | endif |
| 964 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 965 | LOCAL_MODULE:= libc |
Elliott Hughes | ae5c644 | 2012-08-13 14:06:05 -0700 | [diff] [blame] | 966 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Elliott Hughes | 914d8d4 | 2012-10-18 11:28:56 -0700 | [diff] [blame] | 967 | LOCAL_REQUIRED_MODULES := tzdata |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 968 | |
| 969 | # WARNING: The only library libc.so should depend on is libdl.so! If you add other libraries, |
| 970 | # make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries. This |
| 971 | # ensures that symbols that are pulled into those new libraries from libgcc.a are not declared |
| 972 | # external; if that were the case, then libc would not pull those symbols from libgcc.a as it |
| 973 | # should, instead relying on the external symbols from the dependent libraries. That would |
| 974 | # create an "cloaked" dependency on libgcc.a in libc though the libraries, which is not what |
| 975 | # you wanted! |
| 976 | |
| 977 | LOCAL_SHARED_LIBRARIES := libdl |
| 978 | LOCAL_WHOLE_STATIC_LIBRARIES := libc_common |
| 979 | LOCAL_SYSTEM_SHARED_LIBRARIES := |
| 980 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 981 | include $(BUILD_SHARED_LIBRARY) |
| 982 | |
| 983 | |
Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 984 | # For all builds, except for the -user build we will enable memory |
| 985 | # allocation checking (including memory leaks, buffer overwrites, etc.) |
| 986 | # Note that all these checks are also controlled by env. settings |
| 987 | # that can enable, or disable specific checks. Note also that some of |
| 988 | # the checks are available only in emulator and are implemeted in |
| 989 | # libc_malloc_qemu_instrumented.so. |
| 990 | ifneq ($(TARGET_BUILD_VARIANT),user) |
| 991 | |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 992 | # ======================================================== |
Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 993 | # libc_malloc_debug_leak.so |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 994 | # ======================================================== |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 995 | include $(CLEAR_VARS) |
| 996 | |
Dima Zavin | ca122b0 | 2009-05-27 10:52:37 -0700 | [diff] [blame] | 997 | LOCAL_CFLAGS := \ |
| 998 | $(libc_common_cflags) \ |
| 999 | -DMALLOC_LEAK_CHECK |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1000 | |
| 1001 | LOCAL_C_INCLUDES := $(libc_common_c_includes) |
| 1002 | |
| 1003 | LOCAL_SRC_FILES := \ |
Elliott Hughes | 1e980b6 | 2013-01-17 18:36:06 -0800 | [diff] [blame] | 1004 | bionic/debug_mapinfo.cpp \ |
| 1005 | bionic/debug_stacktrace.cpp \ |
Elliott Hughes | c4d1fec | 2012-08-28 14:15:04 -0700 | [diff] [blame] | 1006 | bionic/malloc_debug_leak.cpp \ |
| 1007 | bionic/malloc_debug_check.cpp \ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1008 | |
Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 1009 | LOCAL_MODULE:= libc_malloc_debug_leak |
Elliott Hughes | ae5c644 | 2012-08-13 14:06:05 -0700 | [diff] [blame] | 1010 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1011 | |
Pavel Chupin | e007775 | 2012-09-10 19:35:25 +0400 | [diff] [blame] | 1012 | LOCAL_SHARED_LIBRARIES := libc libdl |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1013 | LOCAL_WHOLE_STATIC_LIBRARIES := libc_common |
| 1014 | LOCAL_SYSTEM_SHARED_LIBRARIES := |
Bruce Beare | aa46fa2 | 2010-07-08 14:47:50 -0700 | [diff] [blame] | 1015 | LOCAL_ALLOW_UNDEFINED_SYMBOLS := true |
Iliyan Malchev | 3680704 | 2011-03-14 14:02:05 -0700 | [diff] [blame] | 1016 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1017 | # Don't install on release build |
Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 1018 | LOCAL_MODULE_TAGS := eng debug |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1019 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1020 | include $(BUILD_SHARED_LIBRARY) |
| 1021 | |
Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 1022 | |
| 1023 | # ======================================================== |
| 1024 | # libc_malloc_debug_qemu.so |
| 1025 | # ======================================================== |
| 1026 | include $(CLEAR_VARS) |
| 1027 | |
| 1028 | LOCAL_CFLAGS := \ |
| 1029 | $(libc_common_cflags) \ |
| 1030 | -DMALLOC_QEMU_INSTRUMENT |
| 1031 | |
| 1032 | LOCAL_C_INCLUDES := $(libc_common_c_includes) |
| 1033 | |
| 1034 | LOCAL_SRC_FILES := \ |
Elliott Hughes | c4d1fec | 2012-08-28 14:15:04 -0700 | [diff] [blame] | 1035 | bionic/malloc_debug_qemu.cpp |
Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 1036 | |
| 1037 | LOCAL_MODULE:= libc_malloc_debug_qemu |
Elliott Hughes | ae5c644 | 2012-08-13 14:06:05 -0700 | [diff] [blame] | 1038 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 1039 | |
Mathias Agopian | 7c0c379 | 2011-09-05 23:54:55 -0700 | [diff] [blame] | 1040 | LOCAL_SHARED_LIBRARIES := libc libdl |
Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 1041 | LOCAL_WHOLE_STATIC_LIBRARIES := libc_common |
| 1042 | LOCAL_SYSTEM_SHARED_LIBRARIES := |
Iliyan Malchev | 3680704 | 2011-03-14 14:02:05 -0700 | [diff] [blame] | 1043 | |
Vladimir Chtchetkine | b74ceb2 | 2009-11-17 14:13:38 -0800 | [diff] [blame] | 1044 | # Don't install on release build |
| 1045 | LOCAL_MODULE_TAGS := eng debug |
| 1046 | |
| 1047 | include $(BUILD_SHARED_LIBRARY) |
| 1048 | |
| 1049 | endif #!user |
| 1050 | |
| 1051 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1052 | # ======================================================== |
| 1053 | include $(call all-makefiles-under,$(LOCAL_PATH)) |