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