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