2009-03-04 04:28:35 +01:00
|
|
|
LOCAL_PATH:= $(call my-dir)
|
|
|
|
|
|
|
|
include $(LOCAL_PATH)/arch-$(TARGET_ARCH)/syscalls.mk
|
2009-05-27 19:52:37 +02:00
|
|
|
|
2013-10-03 22:26:22 +02:00
|
|
|
# Make everything depend on any changes to included makefiles.
|
|
|
|
libc_common_additional_dependencies := \
|
|
|
|
$(LOCAL_PATH)/arch-$(TARGET_ARCH)/syscalls.mk \
|
|
|
|
$(LOCAL_PATH)/Android.mk \
|
|
|
|
|
2009-05-27 19:52:37 +02:00
|
|
|
# Define the common source files for all the libc instances
|
|
|
|
# =========================================================
|
2009-03-04 04:28:35 +01:00
|
|
|
libc_common_src_files := \
|
|
|
|
$(syscall_src) \
|
|
|
|
unistd/alarm.c \
|
|
|
|
unistd/exec.c \
|
|
|
|
unistd/fnmatch.c \
|
|
|
|
unistd/syslog.c \
|
|
|
|
unistd/system.c \
|
|
|
|
unistd/time.c \
|
|
|
|
stdio/asprintf.c \
|
|
|
|
stdio/fflush.c \
|
|
|
|
stdio/fgetc.c \
|
|
|
|
stdio/findfp.c \
|
|
|
|
stdio/fprintf.c \
|
|
|
|
stdio/fputc.c \
|
|
|
|
stdio/fread.c \
|
|
|
|
stdio/freopen.c \
|
|
|
|
stdio/fscanf.c \
|
|
|
|
stdio/fseek.c \
|
|
|
|
stdio/ftell.c \
|
|
|
|
stdio/fvwrite.c \
|
|
|
|
stdio/gets.c \
|
|
|
|
stdio/printf.c \
|
|
|
|
stdio/refill.c \
|
|
|
|
stdio/rewind.c \
|
|
|
|
stdio/scanf.c \
|
|
|
|
stdio/snprintf.c\
|
|
|
|
stdio/sprintf.c \
|
|
|
|
stdio/sscanf.c \
|
|
|
|
stdio/stdio.c \
|
|
|
|
stdio/ungetc.c \
|
|
|
|
stdio/vasprintf.c \
|
|
|
|
stdio/vfprintf.c \
|
|
|
|
stdio/vfscanf.c \
|
|
|
|
stdio/vprintf.c \
|
|
|
|
stdio/vsnprintf.c \
|
|
|
|
stdio/vsprintf.c \
|
|
|
|
stdio/vscanf.c \
|
|
|
|
stdio/vsscanf.c \
|
|
|
|
stdio/wbuf.c \
|
|
|
|
stdlib/atexit.c \
|
|
|
|
stdlib/ctype_.c \
|
|
|
|
stdlib/exit.c \
|
|
|
|
stdlib/getenv.c \
|
|
|
|
stdlib/putenv.c \
|
|
|
|
stdlib/setenv.c \
|
|
|
|
stdlib/strtod.c \
|
|
|
|
stdlib/strtoimax.c \
|
|
|
|
stdlib/strtol.c \
|
|
|
|
stdlib/strtoll.c \
|
|
|
|
stdlib/strtoul.c \
|
|
|
|
stdlib/strtoull.c \
|
|
|
|
stdlib/strtoumax.c \
|
|
|
|
stdlib/tolower_.c \
|
|
|
|
stdlib/toupper_.c \
|
|
|
|
string/strcasecmp.c \
|
|
|
|
string/strcspn.c \
|
|
|
|
string/strdup.c \
|
|
|
|
string/strpbrk.c \
|
|
|
|
string/strsep.c \
|
|
|
|
string/strspn.c \
|
|
|
|
string/strstr.c \
|
|
|
|
string/strtok.c \
|
2010-06-15 02:18:35 +02:00
|
|
|
wchar/wcswidth.c \
|
2010-06-16 15:51:52 +02:00
|
|
|
wchar/wcsxfrm.c \
|
2009-03-04 04:28:35 +01:00
|
|
|
bionic/arc4random.c \
|
2012-10-02 02:35:49 +02:00
|
|
|
bionic/atoi.c \
|
|
|
|
bionic/atol.c \
|
|
|
|
bionic/atoll.c \
|
|
|
|
bionic/bindresvport.c \
|
|
|
|
bionic/bionic_clone.c \
|
2010-01-14 02:48:34 +01:00
|
|
|
bionic/clearenv.c \
|
2012-10-02 02:35:49 +02:00
|
|
|
bionic/daemon.c \
|
2010-01-14 06:19:52 +01:00
|
|
|
bionic/err.c \
|
2012-10-02 02:35:49 +02:00
|
|
|
bionic/ether_aton.c \
|
|
|
|
bionic/ether_ntoa.c \
|
2010-01-14 02:48:34 +01:00
|
|
|
bionic/fdprintf.c \
|
2012-10-02 02:35:49 +02:00
|
|
|
bionic/flockfile.c \
|
|
|
|
bionic/ftime.c \
|
|
|
|
bionic/ftok.c \
|
2010-01-14 06:19:52 +01:00
|
|
|
bionic/fts.c \
|
2012-10-02 02:35:49 +02:00
|
|
|
bionic/getdtablesize.c \
|
|
|
|
bionic/gethostname.c \
|
|
|
|
bionic/getpgrp.c \
|
|
|
|
bionic/getpriority.c \
|
|
|
|
bionic/getpt.c \
|
2009-03-04 04:28:35 +01:00
|
|
|
bionic/if_indextoname.c \
|
2012-10-02 02:35:49 +02:00
|
|
|
bionic/if_nametoindex.c \
|
|
|
|
bionic/initgroups.c \
|
2009-03-04 04:28:35 +01:00
|
|
|
bionic/ioctl.c \
|
2012-10-02 02:35:49 +02:00
|
|
|
bionic/isatty.c \
|
|
|
|
bionic/issetugid.c \
|
2009-03-04 04:28:35 +01:00
|
|
|
bionic/ldexp.c \
|
|
|
|
bionic/md5.c \
|
2012-10-02 02:35:49 +02:00
|
|
|
bionic/memmem.c \
|
|
|
|
bionic/memswap.c \
|
|
|
|
bionic/pathconf.c \
|
|
|
|
bionic/perror.c \
|
|
|
|
bionic/ptsname.c \
|
|
|
|
bionic/ptsname_r.c \
|
2009-03-04 04:28:35 +01:00
|
|
|
bionic/pututline.c \
|
2012-10-02 02:35:49 +02:00
|
|
|
bionic/reboot.c \
|
|
|
|
bionic/recv.c \
|
2010-12-03 18:04:01 +01:00
|
|
|
bionic/sched_cpualloc.c \
|
|
|
|
bionic/sched_cpucount.c \
|
2012-10-02 02:35:49 +02:00
|
|
|
bionic/sched_getcpu.c \
|
2009-03-04 04:28:35 +01:00
|
|
|
bionic/semaphore.c \
|
2012-10-02 02:35:49 +02:00
|
|
|
bionic/send.c \
|
|
|
|
bionic/setpgrp.c \
|
|
|
|
bionic/sigblock.c \
|
|
|
|
bionic/siginterrupt.c \
|
|
|
|
bionic/siglist.c \
|
|
|
|
bionic/signame.c \
|
|
|
|
bionic/sigsetmask.c \
|
|
|
|
bionic/sleep.c \
|
|
|
|
bionic/strndup.c \
|
|
|
|
bionic/strntoimax.c \
|
|
|
|
bionic/strntoumax.c \
|
|
|
|
bionic/strtotimeval.c \
|
2009-03-04 04:28:35 +01:00
|
|
|
bionic/system_properties.c \
|
2013-06-25 03:36:39 +02:00
|
|
|
bionic/system_properties_compat.c \
|
2012-10-02 02:35:49 +02:00
|
|
|
bionic/tcgetpgrp.c \
|
|
|
|
bionic/tcsetpgrp.c \
|
|
|
|
bionic/time64.c \
|
|
|
|
bionic/umount.c \
|
|
|
|
bionic/unlockpt.c \
|
|
|
|
bionic/usleep.c \
|
2009-03-04 04:28:35 +01:00
|
|
|
bionic/utmp.c \
|
2012-10-02 02:35:49 +02:00
|
|
|
bionic/wcscoll.c \
|
2013-10-10 00:50:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
libc_dns_src_files += \
|
|
|
|
netbsd/gethnamaddr.c \
|
|
|
|
netbsd/inet/nsap_addr.c \
|
|
|
|
netbsd/nameser/ns_name.c \
|
|
|
|
netbsd/nameser/ns_netint.c \
|
|
|
|
netbsd/nameser/ns_parse.c \
|
|
|
|
netbsd/nameser/ns_print.c \
|
|
|
|
netbsd/nameser/ns_samedomain.c \
|
|
|
|
netbsd/nameser/ns_ttl.c \
|
|
|
|
netbsd/net/base64.c \
|
|
|
|
netbsd/net/getaddrinfo.c \
|
|
|
|
netbsd/net/getnameinfo.c \
|
|
|
|
netbsd/net/getservbyname.c \
|
|
|
|
netbsd/net/getservbyport.c \
|
|
|
|
netbsd/net/getservent.c \
|
|
|
|
netbsd/net/nsdispatch.c \
|
|
|
|
netbsd/resolv/__dn_comp.c \
|
|
|
|
netbsd/resolv/herror.c \
|
|
|
|
netbsd/resolv/res_cache.c \
|
|
|
|
netbsd/resolv/__res_close.c \
|
|
|
|
netbsd/resolv/res_comp.c \
|
|
|
|
netbsd/resolv/res_data.c \
|
|
|
|
netbsd/resolv/res_debug.c \
|
|
|
|
netbsd/resolv/res_init.c \
|
|
|
|
netbsd/resolv/res_mkquery.c \
|
|
|
|
netbsd/resolv/res_query.c \
|
|
|
|
netbsd/resolv/__res_send.c \
|
|
|
|
netbsd/resolv/res_send.c \
|
|
|
|
netbsd/resolv/res_state.c \
|
|
|
|
|
2009-03-04 04:28:35 +01:00
|
|
|
|
2013-11-07 01:20:54 +01:00
|
|
|
# These are used by the 32-bit targets, but not the 64-bit ones.
|
2012-12-18 14:30:02 +01:00
|
|
|
ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm mips x86))
|
|
|
|
libc_common_src_files += \
|
2013-11-07 01:20:54 +01:00
|
|
|
bionic/legacy_32_bit_support.cpp \
|
2013-10-25 02:14:55 +02:00
|
|
|
bionic/ndk_cruft.cpp \
|
2012-12-18 14:30:02 +01:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
2013-08-01 22:13:33 +02:00
|
|
|
# Fortify implementations of libc functions.
|
|
|
|
libc_common_src_files += \
|
2013-10-03 01:11:30 +02:00
|
|
|
bionic/__FD_chk.cpp \
|
2013-08-01 22:13:33 +02:00
|
|
|
bionic/__fgets_chk.cpp \
|
|
|
|
bionic/__memcpy_chk.cpp \
|
|
|
|
bionic/__memmove_chk.cpp \
|
|
|
|
bionic/__memset_chk.cpp \
|
2013-10-10 05:16:34 +02:00
|
|
|
bionic/__read_chk.cpp \
|
2013-09-25 01:32:07 +02:00
|
|
|
bionic/__recvfrom_chk.cpp \
|
2013-08-01 22:13:33 +02:00
|
|
|
bionic/__strcat_chk.cpp \
|
|
|
|
bionic/__strchr_chk.cpp \
|
|
|
|
bionic/__strcpy_chk.cpp \
|
|
|
|
bionic/__strlcat_chk.cpp \
|
|
|
|
bionic/__strlcpy_chk.cpp \
|
|
|
|
bionic/__strlen_chk.cpp \
|
|
|
|
bionic/__strncat_chk.cpp \
|
|
|
|
bionic/__strncpy_chk.cpp \
|
|
|
|
bionic/__strrchr_chk.cpp \
|
|
|
|
bionic/__umask_chk.cpp \
|
|
|
|
bionic/__vsnprintf_chk.cpp \
|
|
|
|
bionic/__vsprintf_chk.cpp \
|
|
|
|
|
2012-10-23 02:05:27 +02:00
|
|
|
libc_bionic_src_files := \
|
2013-06-12 23:05:46 +02:00
|
|
|
bionic/abort.cpp \
|
2013-10-22 22:28:46 +02:00
|
|
|
bionic/access.cpp \
|
2012-10-26 05:55:23 +02:00
|
|
|
bionic/assert.cpp \
|
2013-10-25 00:15:14 +02:00
|
|
|
bionic/bionic_time_conversions.cpp \
|
2013-02-06 01:10:59 +01:00
|
|
|
bionic/brk.cpp \
|
2013-10-22 22:28:46 +02:00
|
|
|
bionic/chmod.cpp \
|
|
|
|
bionic/chown.cpp \
|
2012-10-29 15:32:54 +01:00
|
|
|
bionic/dirent.cpp \
|
2013-10-23 18:48:29 +02:00
|
|
|
bionic/dup2.cpp \
|
|
|
|
bionic/epoll_create.cpp \
|
2013-10-25 00:15:14 +02:00
|
|
|
bionic/epoll_wait.cpp \
|
|
|
|
bionic/epoll_pwait.cpp \
|
2013-10-09 03:50:24 +02:00
|
|
|
bionic/__errno.cpp \
|
2013-04-03 05:29:40 +02:00
|
|
|
bionic/eventfd_read.cpp \
|
|
|
|
bionic/eventfd_write.cpp \
|
2013-10-25 01:29:40 +02:00
|
|
|
bionic/ffs.cpp \
|
2013-10-10 02:35:36 +02:00
|
|
|
bionic/fork.cpp \
|
2013-08-09 02:13:33 +02:00
|
|
|
bionic/futimens.cpp \
|
2013-01-11 23:43:05 +01:00
|
|
|
bionic/getauxval.cpp \
|
2012-10-26 05:55:23 +02:00
|
|
|
bionic/getcwd.cpp \
|
2013-10-23 18:48:29 +02:00
|
|
|
bionic/inotify_init.cpp \
|
2013-10-22 22:28:46 +02:00
|
|
|
bionic/lchown.cpp \
|
2013-02-07 19:14:39 +01:00
|
|
|
bionic/libc_init_common.cpp \
|
2013-03-15 23:30:25 +01:00
|
|
|
bionic/libc_logging.cpp \
|
2012-10-29 22:27:10 +01:00
|
|
|
bionic/libgen.cpp \
|
2013-10-22 22:28:46 +02:00
|
|
|
bionic/link.cpp \
|
|
|
|
bionic/lstat.cpp \
|
|
|
|
bionic/mkdir.cpp \
|
2013-10-22 19:54:11 +02:00
|
|
|
bionic/mkfifo.cpp \
|
2013-10-22 22:28:46 +02:00
|
|
|
bionic/mknod.cpp \
|
|
|
|
bionic/open.cpp \
|
2013-10-25 00:15:14 +02:00
|
|
|
bionic/pause.cpp \
|
2013-10-23 18:48:29 +02:00
|
|
|
bionic/pipe.cpp \
|
2013-10-25 00:15:14 +02:00
|
|
|
bionic/poll.cpp \
|
2013-10-30 22:40:09 +01:00
|
|
|
bionic/pthread_atfork.cpp \
|
2013-02-12 17:40:24 +01:00
|
|
|
bionic/pthread_attr.cpp \
|
2013-10-30 22:40:09 +01:00
|
|
|
bionic/pthread_cond.cpp \
|
|
|
|
bionic/pthread_create.cpp \
|
2013-02-16 04:21:51 +01:00
|
|
|
bionic/pthread_detach.cpp \
|
|
|
|
bionic/pthread_equal.cpp \
|
2013-10-30 22:40:09 +01:00
|
|
|
bionic/pthread_exit.cpp \
|
2013-02-16 04:21:51 +01:00
|
|
|
bionic/pthread_getcpuclockid.cpp \
|
|
|
|
bionic/pthread_getschedparam.cpp \
|
|
|
|
bionic/pthread_internals.cpp \
|
|
|
|
bionic/pthread_join.cpp \
|
2013-10-30 22:40:09 +01:00
|
|
|
bionic/pthread_key.cpp \
|
2013-02-16 04:21:51 +01:00
|
|
|
bionic/pthread_kill.cpp \
|
2013-10-30 22:40:09 +01:00
|
|
|
bionic/pthread_mutex.cpp \
|
|
|
|
bionic/pthread_once.cpp \
|
|
|
|
bionic/pthread_rwlock.cpp \
|
2013-02-16 04:21:51 +01:00
|
|
|
bionic/pthread_self.cpp \
|
2013-02-12 17:40:24 +01:00
|
|
|
bionic/pthread_setname_np.cpp \
|
2013-02-16 04:21:51 +01:00
|
|
|
bionic/pthread_setschedparam.cpp \
|
2013-01-10 23:42:14 +01:00
|
|
|
bionic/pthread_sigmask.cpp \
|
2013-10-30 22:40:09 +01:00
|
|
|
bionic/ptrace.cpp \
|
2012-12-08 03:41:10 +01:00
|
|
|
bionic/raise.cpp \
|
2013-10-22 22:28:46 +02:00
|
|
|
bionic/readlink.cpp \
|
|
|
|
bionic/rename.cpp \
|
|
|
|
bionic/rmdir.cpp \
|
2013-02-06 01:10:59 +01:00
|
|
|
bionic/sbrk.cpp \
|
2013-02-25 22:14:31 +01:00
|
|
|
bionic/scandir.cpp \
|
2013-04-09 18:57:42 +02:00
|
|
|
bionic/sched_getaffinity.cpp \
|
2013-10-10 02:35:36 +02:00
|
|
|
bionic/setegid.cpp \
|
2012-11-30 20:58:57 +01:00
|
|
|
bionic/__set_errno.cpp \
|
2013-10-10 02:35:36 +02:00
|
|
|
bionic/seteuid.cpp \
|
2012-10-26 05:55:23 +02:00
|
|
|
bionic/setlocale.cpp \
|
2013-01-10 00:46:06 +01:00
|
|
|
bionic/signalfd.cpp \
|
2013-10-17 07:27:54 +02:00
|
|
|
bionic/sigaction.cpp \
|
|
|
|
bionic/sigaddset.cpp \
|
|
|
|
bionic/sigdelset.cpp \
|
|
|
|
bionic/sigemptyset.cpp \
|
|
|
|
bionic/sigfillset.cpp \
|
|
|
|
bionic/sigismember.cpp \
|
|
|
|
bionic/signal.cpp \
|
2013-10-16 21:53:58 +02:00
|
|
|
bionic/sigpending.cpp \
|
2013-10-15 20:23:57 +02:00
|
|
|
bionic/sigprocmask.cpp \
|
2013-10-16 03:01:56 +02:00
|
|
|
bionic/sigsuspend.cpp \
|
2013-01-10 23:42:14 +01:00
|
|
|
bionic/sigwait.cpp \
|
2013-10-22 22:28:46 +02:00
|
|
|
bionic/stat.cpp \
|
2013-07-09 22:25:03 +02:00
|
|
|
bionic/statvfs.cpp \
|
2012-10-26 05:55:23 +02:00
|
|
|
bionic/strerror.cpp \
|
|
|
|
bionic/strerror_r.cpp \
|
|
|
|
bionic/strsignal.cpp \
|
|
|
|
bionic/stubs.cpp \
|
2013-10-22 22:28:46 +02:00
|
|
|
bionic/symlink.cpp \
|
2013-02-13 06:56:42 +01:00
|
|
|
bionic/sysconf.cpp \
|
2013-10-30 22:40:09 +01:00
|
|
|
bionic/thread_atexit.cpp \
|
2012-10-26 05:55:23 +02:00
|
|
|
bionic/tdestroy.cpp \
|
2013-10-10 00:50:50 +02:00
|
|
|
bionic/__thread_entry.cpp \
|
2013-10-30 22:40:09 +01:00
|
|
|
bionic/timer.cpp \
|
2012-10-26 05:55:23 +02:00
|
|
|
bionic/tmpfile.cpp \
|
2013-10-22 22:28:46 +02:00
|
|
|
bionic/unlink.cpp \
|
|
|
|
bionic/utimes.cpp \
|
2013-03-21 23:43:53 +01:00
|
|
|
bionic/wait.cpp \
|
2012-10-26 05:55:23 +02:00
|
|
|
bionic/wchar.cpp \
|
2012-10-23 02:05:27 +02:00
|
|
|
|
2012-12-18 14:30:02 +01:00
|
|
|
# These are shared by all the 32-bit targets, but not the 64-bit ones.
|
|
|
|
ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm mips x86))
|
|
|
|
libc_bionic_src_files += \
|
|
|
|
bionic/mmap.cpp \
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2013-07-13 02:31:11 +02:00
|
|
|
libc_tzcode_src_files := \
|
|
|
|
tzcode/asctime.c \
|
|
|
|
tzcode/difftime.c \
|
|
|
|
tzcode/localtime.c \
|
|
|
|
tzcode/strftime.c \
|
|
|
|
tzcode/strptime.c \
|
|
|
|
|
2013-03-02 01:59:46 +01:00
|
|
|
libc_upstream_freebsd_src_files := \
|
2013-04-11 22:54:48 +02:00
|
|
|
upstream-freebsd/lib/libc/stdio/clrerr.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/fclose.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/fdopen.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/feof.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/ferror.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/fgetln.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/fgetpos.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/fgets.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/fileno.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/flags.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/fopen.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/fpurge.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/fputs.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/fsetpos.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/funopen.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/fwalk.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/fwrite.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/getc.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/getchar.c \
|
2013-06-13 00:24:15 +02:00
|
|
|
upstream-freebsd/lib/libc/stdio/makebuf.c \
|
2013-07-20 00:20:31 +02:00
|
|
|
upstream-freebsd/lib/libc/stdio/mktemp.c \
|
2013-04-11 22:54:48 +02:00
|
|
|
upstream-freebsd/lib/libc/stdio/putc.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/putchar.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/puts.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/putw.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/remove.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/rget.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/setbuf.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/setbuffer.c \
|
2013-06-13 00:24:15 +02:00
|
|
|
upstream-freebsd/lib/libc/stdio/setvbuf.c \
|
2013-04-11 22:54:48 +02:00
|
|
|
upstream-freebsd/lib/libc/stdio/tempnam.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/tmpnam.c \
|
|
|
|
upstream-freebsd/lib/libc/stdio/wsetup.c \
|
2013-08-12 21:07:05 +02:00
|
|
|
upstream-freebsd/lib/libc/stdlib/abs.c \
|
2013-06-25 23:48:10 +02:00
|
|
|
upstream-freebsd/lib/libc/stdlib/getopt_long.c \
|
2013-08-12 21:07:05 +02:00
|
|
|
upstream-freebsd/lib/libc/stdlib/imaxabs.c \
|
|
|
|
upstream-freebsd/lib/libc/stdlib/imaxdiv.c \
|
|
|
|
upstream-freebsd/lib/libc/stdlib/labs.c \
|
|
|
|
upstream-freebsd/lib/libc/stdlib/llabs.c \
|
2013-04-12 03:08:34 +02:00
|
|
|
upstream-freebsd/lib/libc/stdlib/qsort.c \
|
2013-03-02 01:59:46 +01:00
|
|
|
upstream-freebsd/lib/libc/stdlib/realpath.c \
|
2013-03-02 03:35:56 +01:00
|
|
|
upstream-freebsd/lib/libc/string/wcpcpy.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcpncpy.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcscasecmp.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcscspn.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcsdup.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcslcat.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcslcpy.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcsncasecmp.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcsncat.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcsncmp.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcsncpy.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcsnlen.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcspbrk.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcsspn.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcsstr.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcstok.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wmemchr.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wmemcpy.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wmemmove.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wmemset.c \
|
2013-03-02 01:59:46 +01:00
|
|
|
|
2012-08-10 20:39:58 +02:00
|
|
|
libc_upstream_netbsd_src_files := \
|
2012-10-23 21:26:26 +02:00
|
|
|
upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
|
|
|
|
upstream-netbsd/common/lib/libc/inet/inet_addr.c \
|
|
|
|
upstream-netbsd/libc/compat-43/creat.c \
|
|
|
|
upstream-netbsd/libc/gen/ftw.c \
|
|
|
|
upstream-netbsd/libc/gen/nftw.c \
|
|
|
|
upstream-netbsd/libc/gen/nice.c \
|
2013-03-07 01:20:55 +01:00
|
|
|
upstream-netbsd/libc/gen/popen.c \
|
2012-10-23 21:26:26 +02:00
|
|
|
upstream-netbsd/libc/gen/psignal.c \
|
2012-10-24 01:05:09 +02:00
|
|
|
upstream-netbsd/libc/gen/setjmperr.c \
|
2012-10-23 21:26:26 +02:00
|
|
|
upstream-netbsd/libc/gen/utime.c \
|
|
|
|
upstream-netbsd/libc/inet/inet_ntoa.c \
|
|
|
|
upstream-netbsd/libc/inet/inet_ntop.c \
|
|
|
|
upstream-netbsd/libc/inet/inet_pton.c \
|
2012-10-24 01:05:09 +02:00
|
|
|
upstream-netbsd/libc/isc/ev_streams.c \
|
|
|
|
upstream-netbsd/libc/isc/ev_timers.c \
|
2012-10-23 21:26:26 +02:00
|
|
|
upstream-netbsd/libc/regex/regcomp.c \
|
|
|
|
upstream-netbsd/libc/regex/regerror.c \
|
|
|
|
upstream-netbsd/libc/regex/regexec.c \
|
|
|
|
upstream-netbsd/libc/regex/regfree.c \
|
|
|
|
upstream-netbsd/libc/stdio/getdelim.c \
|
|
|
|
upstream-netbsd/libc/stdio/getline.c \
|
2012-10-24 01:05:09 +02:00
|
|
|
upstream-netbsd/libc/stdlib/bsearch.c \
|
|
|
|
upstream-netbsd/libc/stdlib/div.c \
|
2012-10-23 21:26:26 +02:00
|
|
|
upstream-netbsd/libc/stdlib/drand48.c \
|
|
|
|
upstream-netbsd/libc/stdlib/erand48.c \
|
|
|
|
upstream-netbsd/libc/stdlib/jrand48.c \
|
2012-10-24 01:05:09 +02:00
|
|
|
upstream-netbsd/libc/stdlib/ldiv.c \
|
|
|
|
upstream-netbsd/libc/stdlib/lldiv.c \
|
2012-10-23 21:26:26 +02:00
|
|
|
upstream-netbsd/libc/stdlib/lrand48.c \
|
|
|
|
upstream-netbsd/libc/stdlib/mrand48.c \
|
|
|
|
upstream-netbsd/libc/stdlib/nrand48.c \
|
|
|
|
upstream-netbsd/libc/stdlib/_rand48.c \
|
|
|
|
upstream-netbsd/libc/stdlib/seed48.c \
|
|
|
|
upstream-netbsd/libc/stdlib/srand48.c \
|
|
|
|
upstream-netbsd/libc/stdlib/tdelete.c \
|
|
|
|
upstream-netbsd/libc/stdlib/tfind.c \
|
|
|
|
upstream-netbsd/libc/stdlib/tsearch.c \
|
2013-01-22 23:41:23 +01:00
|
|
|
upstream-netbsd/libc/string/memccpy.c \
|
2012-10-23 21:26:26 +02:00
|
|
|
upstream-netbsd/libc/string/strcasestr.c \
|
2013-01-23 00:10:19 +01:00
|
|
|
upstream-netbsd/libc/string/strcoll.c \
|
2012-10-23 21:26:26 +02:00
|
|
|
upstream-netbsd/libc/string/strxfrm.c \
|
2012-10-24 01:05:09 +02:00
|
|
|
upstream-netbsd/libc/unistd/killpg.c \
|
2012-08-10 20:39:58 +02:00
|
|
|
|
2013-10-30 00:59:54 +01:00
|
|
|
# Architecture specific source files go here
|
|
|
|
# =========================================================
|
|
|
|
ifeq ($(TARGET_ARCH),arm)
|
|
|
|
libc_common_src_files += \
|
|
|
|
bionic/memchr.c \
|
|
|
|
bionic/memmove.c.arm \
|
|
|
|
bionic/memrchr.c \
|
|
|
|
bionic/strchr.cpp \
|
|
|
|
bionic/strnlen.c \
|
|
|
|
string/bcopy.c \
|
|
|
|
string/index.c \
|
|
|
|
string/strlcat.c \
|
|
|
|
string/strlcpy.c \
|
|
|
|
string/strncat.c \
|
|
|
|
string/strncmp.c \
|
|
|
|
string/strncpy.c \
|
|
|
|
string/strrchr.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcscat.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcschr.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcscmp.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcscpy.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcslen.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcsrchr.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wmemcmp.c \
|
|
|
|
|
|
|
|
endif # arm
|
|
|
|
|
|
|
|
ifeq ($(TARGET_ARCH),mips)
|
|
|
|
libc_common_src_files += \
|
|
|
|
bionic/memchr.c \
|
|
|
|
bionic/memcmp.c \
|
|
|
|
bionic/memrchr.c \
|
|
|
|
bionic/strchr.cpp \
|
|
|
|
bionic/strnlen.c \
|
|
|
|
string/bcopy.c \
|
|
|
|
string/index.c \
|
|
|
|
string/strcat.c \
|
|
|
|
string/strcmp.c \
|
|
|
|
string/strcpy.c \
|
|
|
|
string/strlcat.c \
|
|
|
|
string/strlcpy.c \
|
|
|
|
string/strncat.c \
|
|
|
|
string/strncmp.c \
|
|
|
|
string/strncpy.c \
|
|
|
|
string/strrchr.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcscat.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcschr.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcscmp.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcscpy.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcslen.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcsrchr.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wmemcmp.c \
|
|
|
|
|
|
|
|
endif # mips
|
2009-09-28 09:11:39 +02:00
|
|
|
|
2012-12-18 14:30:02 +01:00
|
|
|
ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86_64))
|
|
|
|
libc_common_src_files += \
|
|
|
|
bionic/memchr.c \
|
|
|
|
bionic/memcmp.c \
|
|
|
|
bionic/memcpy.c \
|
|
|
|
bionic/memmove.c \
|
|
|
|
bionic/memrchr.c \
|
|
|
|
bionic/memset.c \
|
|
|
|
bionic/strchr.cpp \
|
|
|
|
bionic/strnlen.c \
|
|
|
|
string/bcopy.c \
|
|
|
|
string/index.c \
|
|
|
|
string/strcat.c \
|
|
|
|
string/strcmp.c \
|
|
|
|
string/strcpy.c \
|
|
|
|
string/strlcat.c \
|
|
|
|
string/strlcpy.c \
|
|
|
|
string/strlen.c \
|
|
|
|
string/strncat.c \
|
|
|
|
string/strncmp.c \
|
|
|
|
string/strncpy.c \
|
|
|
|
string/strrchr.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcscat.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcschr.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcscmp.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcscpy.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcslen.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wcsrchr.c \
|
|
|
|
upstream-freebsd/lib/libc/string/wmemcmp.c \
|
|
|
|
|
|
|
|
endif # x86_64
|
|
|
|
|
2013-10-30 00:59:54 +01:00
|
|
|
ifeq ($(TARGET_ARCH),arm)
|
|
|
|
ifeq ($(strip $(TARGET_CPU_VARIANT)),)
|
|
|
|
$(warning TARGET_ARCH is arm, but TARGET_CPU_VARIANT is not defined)
|
|
|
|
endif
|
2013-02-26 10:30:00 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
###########################################################
|
|
|
|
## Add cpu specific source files.
|
|
|
|
##
|
|
|
|
## This can be called multiple times, but it will only add
|
|
|
|
## the first source file for each unique $(1).
|
|
|
|
## $(1): Unique identifier to identify the cpu variant
|
|
|
|
## implementation.
|
|
|
|
## $(2): Cpu specific source file.
|
|
|
|
###########################################################
|
|
|
|
|
|
|
|
define libc-add-cpu-variant-src
|
|
|
|
$(if $(filter true,$(_LIBC_ARCH_CPU_VARIANT_HAS_$(1))), \
|
|
|
|
, \
|
|
|
|
$(eval _LIBC_ARCH_CPU_VARIANT_HAS_$(1) := true) \
|
|
|
|
$(eval _LIBC_ARCH_CPU_VARIANT_SRC_FILE.$(1) := $(2)) \
|
|
|
|
$(eval _LIBC_ARCH_CPU_VARIANT_SRC_FILES += $(2)) \
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
|
|
|
_LIBC_ARCH_COMMON_SRC_FILES :=
|
|
|
|
_LIBC_ARCH_CPU_VARIANT_SRC_FILES :=
|
|
|
|
_LIBC_ARCH_STATIC_SRC_FILES :=
|
|
|
|
_LIBC_ARCH_DYNAMIC_SRC_FILES :=
|
2013-10-03 22:26:22 +02:00
|
|
|
_LIBC_ARCH_ADDITIONAL_DEPENDENCIES :=
|
|
|
|
|
|
|
|
libc_common_additional_dependencies += \
|
|
|
|
$(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk
|
|
|
|
include $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk
|
2013-02-26 10:30:00 +01:00
|
|
|
|
2013-10-10 00:50:50 +02:00
|
|
|
libc_bionic_src_files += $(_LIBC_ARCH_COMMON_SRC_FILES)
|
|
|
|
libc_bionic_src_files += $(_LIBC_ARCH_CPU_VARIANT_SRC_FILES)
|
2013-02-26 10:30:00 +01:00
|
|
|
libc_arch_static_src_files := $(_LIBC_ARCH_STATIC_SRC_FILES)
|
|
|
|
libc_arch_dynamic_src_files := $(_LIBC_ARCH_DYNAMIC_SRC_FILES)
|
2013-10-03 22:26:22 +02:00
|
|
|
libc_common_additional_dependencies += $(_LIBC_ARCH_ADDITIONAL_DEPENDENCIES)
|
2013-02-26 10:30:00 +01:00
|
|
|
|
2009-05-27 19:52:37 +02:00
|
|
|
# Define some common cflags
|
|
|
|
# ========================================================
|
2009-03-04 04:28:35 +01:00
|
|
|
libc_common_cflags := \
|
2012-06-06 19:32:56 +02:00
|
|
|
-DANDROID_CHANGES \
|
|
|
|
-D_LIBC=1 \
|
2013-10-09 02:04:33 +02:00
|
|
|
-Wall -Wextra \
|
|
|
|
|
|
|
|
# Try to catch typical 32-bit assumptions that break with 64-bit pointers.
|
|
|
|
libc_common_cflags += \
|
|
|
|
-Werror=pointer-to-int-cast \
|
|
|
|
-Werror=int-to-pointer-cast \
|
|
|
|
-Werror=type-limits \
|
2009-03-04 04:28:35 +01:00
|
|
|
|
2009-04-24 00:50:03 +02:00
|
|
|
ifeq ($(strip $(DEBUG_BIONIC_LIBC)),true)
|
2009-03-04 04:28:35 +01:00
|
|
|
libc_common_cflags += -DDEBUG
|
|
|
|
endif
|
|
|
|
|
2011-11-19 02:48:03 +01:00
|
|
|
# To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in
|
|
|
|
# the appropriate BoardConfig.mk file.
|
|
|
|
#
|
|
|
|
ifneq ($(BOARD_MALLOC_ALIGNMENT),)
|
|
|
|
libc_common_cflags += -DMALLOC_ALIGNMENT=$(BOARD_MALLOC_ALIGNMENT)
|
|
|
|
endif
|
|
|
|
|
2009-03-04 04:28:35 +01:00
|
|
|
ifeq ($(TARGET_ARCH),arm)
|
2012-08-07 21:23:24 +02:00
|
|
|
libc_common_cflags += -DSOFTFLOAT
|
2009-03-04 04:28:35 +01:00
|
|
|
libc_common_cflags += -fstrict-aliasing
|
2009-05-27 19:52:37 +02:00
|
|
|
libc_crt_target_cflags := -mthumb-interwork
|
2013-10-04 08:30:33 +02:00
|
|
|
endif # arm
|
2012-08-07 21:23:24 +02:00
|
|
|
|
|
|
|
ifeq ($(TARGET_ARCH),mips)
|
|
|
|
ifneq ($(ARCH_MIPS_HAS_FPU),true)
|
|
|
|
libc_common_cflags += -DSOFTFLOAT
|
|
|
|
endif
|
|
|
|
libc_common_cflags += -fstrict-aliasing
|
|
|
|
libc_crt_target_cflags := $(TARGET_GLOBAL_CFLAGS)
|
|
|
|
endif # mips
|
|
|
|
|
2013-10-04 08:30:33 +02:00
|
|
|
ifeq ($(TARGET_ARCH),x86)
|
|
|
|
libc_crt_target_cflags := -m32
|
|
|
|
libc_crt_target_ldflags := -melf_i386
|
|
|
|
endif # x86
|
|
|
|
|
|
|
|
ifeq ($(TARGET_ARCH),x86_64)
|
|
|
|
libc_crt_target_cflags := -m64
|
|
|
|
libc_crt_target_ldflags := -melf_x86_64
|
|
|
|
endif # x86_64
|
|
|
|
|
2010-05-28 22:31:45 +02:00
|
|
|
# Define ANDROID_SMP appropriately.
|
|
|
|
ifeq ($(TARGET_CPU_SMP),true)
|
|
|
|
libc_common_cflags += -DANDROID_SMP=1
|
|
|
|
else
|
|
|
|
libc_common_cflags += -DANDROID_SMP=0
|
|
|
|
endif
|
|
|
|
|
2012-08-08 23:07:37 +02:00
|
|
|
# crtbrand.c needs <stdint.h> and a #define for the platform SDK version.
|
|
|
|
libc_crt_target_cflags += \
|
|
|
|
-I$(LOCAL_PATH)/include \
|
2013-10-10 00:50:50 +02:00
|
|
|
-I$(LOCAL_PATH)/arch-$(TARGET_ARCH)/include \
|
|
|
|
-DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) \
|
2010-05-28 22:31:45 +02:00
|
|
|
|
2013-10-01 02:10:53 +02:00
|
|
|
# Define some common conlyflags
|
|
|
|
libc_common_conlyflags := \
|
|
|
|
-std=gnu99
|
|
|
|
|
|
|
|
# Define some common cppflags
|
|
|
|
libc_common_cppflags := \
|
|
|
|
-std=gnu++11
|
|
|
|
|
2009-05-27 19:52:37 +02:00
|
|
|
# Define some common includes
|
|
|
|
# ========================================================
|
2009-03-04 04:28:35 +01:00
|
|
|
libc_common_c_includes := \
|
|
|
|
$(LOCAL_PATH)/stdlib \
|
|
|
|
$(LOCAL_PATH)/string \
|
2012-06-08 01:30:02 +02:00
|
|
|
$(LOCAL_PATH)/stdio \
|
|
|
|
external/safe-iop/include
|
2009-03-04 04:28:35 +01:00
|
|
|
|
2009-05-27 19:52:37 +02:00
|
|
|
# Define the libc run-time (crt) support object files that must be built,
|
|
|
|
# which are needed to build all other objects (shared/static libs and
|
|
|
|
# executables)
|
|
|
|
# ==========================================================================
|
2012-08-07 21:23:24 +02:00
|
|
|
# ARM, MIPS, and x86 all need crtbegin_so/crtend_so.
|
2010-06-18 23:47:22 +02:00
|
|
|
#
|
|
|
|
# For x86, the .init section must point to a function that calls all
|
|
|
|
# entries in the .ctors section. (on ARM this is done through the
|
|
|
|
# .init_array section instead).
|
|
|
|
#
|
2012-08-07 21:23:24 +02:00
|
|
|
# For all the platforms, the .fini_array section must point to a function
|
2010-06-18 23:47:22 +02:00
|
|
|
# that will call __cxa_finalize(&__dso_handle) in order to ensure that
|
|
|
|
# static C++ destructors are properly called on dlclose().
|
|
|
|
#
|
2013-10-02 14:38:05 +02:00
|
|
|
libc_crt_target_crtbegin_file := $(LOCAL_PATH)/arch-common/bionic/crtbegin.c
|
|
|
|
libc_crt_target_crtbegin_so_file := $(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c
|
|
|
|
|
2012-08-07 21:23:24 +02:00
|
|
|
ifeq ($(TARGET_ARCH),arm)
|
|
|
|
libc_crt_target_so_cflags :=
|
|
|
|
endif
|
|
|
|
ifeq ($(TARGET_ARCH),mips)
|
|
|
|
libc_crt_target_so_cflags := -fPIC
|
2013-10-02 14:38:05 +02:00
|
|
|
libc_crt_target_crtbegin_file := $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin.c
|
2012-08-07 21:23:24 +02:00
|
|
|
endif
|
2012-12-18 14:30:02 +01:00
|
|
|
ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64))
|
2012-08-07 21:23:24 +02:00
|
|
|
libc_crt_target_so_cflags := -fPIC
|
|
|
|
endif
|
|
|
|
libc_crt_target_so_cflags += $(libc_crt_target_cflags)
|
2012-07-31 06:18:22 +02:00
|
|
|
|
|
|
|
# See the comment in crtbrand.c for the reason why we need to generate
|
|
|
|
# crtbrand.s before generating crtbrand.o.
|
|
|
|
GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.s
|
|
|
|
$(GEN): $(LOCAL_PATH)/bionic/crtbrand.c
|
|
|
|
@mkdir -p $(dir $@)
|
2012-09-08 02:06:56 +02:00
|
|
|
$(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) -S \
|
|
|
|
-MD -MF $(@:%.s=%.d) -o $@ $<
|
|
|
|
$(hide) sed -i -e '/\.note\.ABI-tag/s/progbits/note/' $@
|
|
|
|
$(call transform-d-to-p-args,$(@:%.s=%.d),$(@:%.s=%.P))
|
|
|
|
-include $(GEN:%.s=%.P)
|
2012-07-31 06:18:22 +02:00
|
|
|
ALL_GENERATED_SOURCES += $(GEN)
|
|
|
|
|
|
|
|
GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o
|
|
|
|
$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.s
|
|
|
|
@mkdir -p $(dir $@)
|
2012-09-08 02:06:56 +02:00
|
|
|
$(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) -o $@ -c $<
|
2012-07-31 06:18:22 +02:00
|
|
|
ALL_GENERATED_SOURCES += $(GEN)
|
|
|
|
|
2012-05-16 00:15:11 +02:00
|
|
|
GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_so.o
|
2012-09-10 20:16:12 +02:00
|
|
|
$(GEN): $(libc_crt_target_crtbegin_so_file)
|
2009-03-04 04:28:35 +01:00
|
|
|
@mkdir -p $(dir $@)
|
2012-09-08 02:06:56 +02:00
|
|
|
$(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) \
|
|
|
|
-MD -MF $(@:%.o=%.d) -o $@ -c $<
|
|
|
|
$(transform-d-to-p)
|
|
|
|
-include $(GEN:%.o=%.P)
|
2009-03-04 04:28:35 +01:00
|
|
|
ALL_GENERATED_SOURCES += $(GEN)
|
|
|
|
|
2012-05-16 00:15:11 +02:00
|
|
|
GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_so.o
|
2013-10-02 14:38:05 +02:00
|
|
|
$(GEN): $(LOCAL_PATH)/arch-common/bionic/crtend_so.S
|
2009-05-27 19:52:37 +02:00
|
|
|
@mkdir -p $(dir $@)
|
2012-09-08 02:06:56 +02:00
|
|
|
$(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) \
|
|
|
|
-MD -MF $(@:%.o=%.d) -o $@ -c $<
|
|
|
|
$(transform-d-to-p)
|
|
|
|
-include $(GEN:%.o=%.P)
|
2009-05-27 19:52:37 +02:00
|
|
|
ALL_GENERATED_SOURCES += $(GEN)
|
2012-07-28 09:33:28 +02:00
|
|
|
|
2012-09-08 02:06:56 +02:00
|
|
|
# The following two are installed to device
|
2012-07-28 09:33:28 +02:00
|
|
|
GEN := $(TARGET_OUT_SHARED_LIBRARIES)/crtbegin_so.o
|
2012-09-08 02:06:56 +02:00
|
|
|
$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_so.o
|
|
|
|
$(hide) mkdir -p $(dir $@) && cp -f $< $@
|
2012-07-28 09:33:28 +02:00
|
|
|
ALL_GENERATED_SOURCES += $(GEN)
|
|
|
|
|
|
|
|
GEN := $(TARGET_OUT_SHARED_LIBRARIES)/crtend_so.o
|
2012-09-08 02:06:56 +02:00
|
|
|
$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_so.o
|
|
|
|
$(hide) mkdir -p $(dir $@) && cp -f $< $@
|
2012-07-28 09:33:28 +02:00
|
|
|
ALL_GENERATED_SOURCES += $(GEN)
|
2009-03-04 04:28:35 +01:00
|
|
|
|
|
|
|
|
2012-07-31 06:18:22 +02:00
|
|
|
GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static1.o
|
2012-09-10 20:16:12 +02:00
|
|
|
$(GEN): $(libc_crt_target_crtbegin_file)
|
2009-05-27 19:52:37 +02:00
|
|
|
@mkdir -p $(dir $@)
|
2012-09-08 02:06:56 +02:00
|
|
|
$(hide) $(TARGET_CC) $(libc_crt_target_cflags) \
|
|
|
|
-MD -MF $(@:%.o=%.d) -o $@ -c $<
|
|
|
|
$(transform-d-to-p)
|
|
|
|
-include $(GEN:%.o=%.P)
|
2009-05-27 19:52:37 +02:00
|
|
|
ALL_GENERATED_SOURCES += $(GEN)
|
2009-03-04 04:28:35 +01:00
|
|
|
|
2012-07-31 06:18:22 +02:00
|
|
|
GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static.o
|
|
|
|
$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static1.o $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o
|
|
|
|
@mkdir -p $(dir $@)
|
2013-08-16 16:11:13 +02:00
|
|
|
$(hide) $(TARGET_LD) $(libc_crt_target_ldflags) -r -o $@ $^
|
2012-07-31 06:18:22 +02:00
|
|
|
ALL_GENERATED_SOURCES += $(GEN)
|
|
|
|
|
|
|
|
GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic1.o
|
2012-09-10 20:16:12 +02:00
|
|
|
$(GEN): $(libc_crt_target_crtbegin_file)
|
2009-03-04 04:28:35 +01:00
|
|
|
@mkdir -p $(dir $@)
|
2012-09-08 02:06:56 +02:00
|
|
|
$(hide) $(TARGET_CC) $(libc_crt_target_cflags) \
|
|
|
|
-MD -MF $(@:%.o=%.d) -o $@ -c $<
|
|
|
|
$(transform-d-to-p)
|
|
|
|
-include $(GEN:%.o=%.P)
|
2009-03-04 04:28:35 +01:00
|
|
|
ALL_GENERATED_SOURCES += $(GEN)
|
|
|
|
|
2012-07-31 06:18:22 +02:00
|
|
|
GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic.o
|
|
|
|
$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic1.o $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o
|
|
|
|
@mkdir -p $(dir $@)
|
2013-08-16 16:11:13 +02:00
|
|
|
$(hide) $(TARGET_LD) $(libc_crt_target_ldflags) -r -o $@ $^
|
2012-07-31 06:18:22 +02:00
|
|
|
ALL_GENERATED_SOURCES += $(GEN)
|
2009-05-27 19:52:37 +02:00
|
|
|
|
|
|
|
# We rename crtend.o to crtend_android.o to avoid a
|
|
|
|
# name clash between gcc and bionic.
|
2012-05-16 00:15:11 +02:00
|
|
|
GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_android.o
|
2013-10-02 14:38:05 +02:00
|
|
|
$(GEN): $(LOCAL_PATH)/arch-common/bionic/crtend.S
|
2009-03-04 04:28:35 +01:00
|
|
|
@mkdir -p $(dir $@)
|
2012-09-08 02:06:56 +02:00
|
|
|
$(hide) $(TARGET_CC) $(libc_crt_target_cflags) \
|
|
|
|
-MD -MF $(@:%.o=%.d) -o $@ -c $<
|
|
|
|
$(transform-d-to-p)
|
|
|
|
-include $(GEN:%.o=%.P)
|
2009-03-04 04:28:35 +01:00
|
|
|
ALL_GENERATED_SOURCES += $(GEN)
|
|
|
|
|
|
|
|
|
2009-05-27 19:52:37 +02:00
|
|
|
# To enable malloc leak check for statically linked programs, add
|
|
|
|
# "WITH_MALLOC_CHECK_LIBC_A := true" to buildspec.mk
|
|
|
|
WITH_MALLOC_CHECK_LIBC_A := $(strip $(WITH_MALLOC_CHECK_LIBC_A))
|
2009-03-04 04:28:35 +01:00
|
|
|
|
2012-07-10 19:46:19 +02:00
|
|
|
# ========================================================
|
|
|
|
# libbionic_ssp.a - stack protector code
|
|
|
|
# ========================================================
|
|
|
|
#
|
|
|
|
# The stack protector code needs to be compiled
|
|
|
|
# with -fno-stack-protector, since it modifies the
|
|
|
|
# stack canary.
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2013-03-07 00:03:53 +01:00
|
|
|
LOCAL_SRC_FILES := bionic/__stack_chk_fail.cpp
|
2013-02-14 20:15:58 +01:00
|
|
|
LOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector -Werror
|
2013-10-01 02:10:53 +02:00
|
|
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
|
|
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
2012-07-10 19:46:19 +02:00
|
|
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
|
|
|
LOCAL_MODULE := libbionic_ssp
|
2013-10-03 22:26:22 +02:00
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
2012-07-10 19:46:19 +02:00
|
|
|
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
|
|
|
|
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
|
2013-07-13 02:31:11 +02:00
|
|
|
# ========================================================
|
|
|
|
# libc_tzcode.a - upstream 'tzcode' code
|
|
|
|
# ========================================================
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES := $(libc_tzcode_src_files)
|
|
|
|
LOCAL_CFLAGS := \
|
|
|
|
$(libc_common_cflags) \
|
|
|
|
-DSTD_INSPIRED=1 \
|
|
|
|
-DTZDIR=\"/system/usr/share/zoneinfo\" \
|
|
|
|
-DTM_GMTOFF=tm_gmtoff \
|
|
|
|
-DUSG_COMPAT=1
|
2013-10-01 02:10:53 +02:00
|
|
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
|
|
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
2013-07-13 02:31:11 +02:00
|
|
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
|
|
|
LOCAL_MODULE := libc_tzcode
|
2013-10-03 22:26:22 +02:00
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
2013-07-13 02:31:11 +02:00
|
|
|
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
|
|
|
|
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
|
2013-10-10 00:50:50 +02:00
|
|
|
# ========================================================
|
|
|
|
# libc_dns.a - modified NetBSD DNS code
|
|
|
|
# ========================================================
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES := $(libc_dns_src_files)
|
|
|
|
LOCAL_CFLAGS := \
|
|
|
|
$(libc_common_cflags) \
|
|
|
|
-DINET6 \
|
|
|
|
-I$(LOCAL_PATH)/private \
|
|
|
|
-I$(LOCAL_PATH)/upstream-netbsd/libc/include # for NetBSD private headers
|
|
|
|
|
|
|
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
|
|
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
|
|
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
|
|
|
LOCAL_MODULE := libc_dns
|
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
|
|
|
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
|
|
|
|
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
|
2013-03-02 01:59:46 +01:00
|
|
|
# ========================================================
|
|
|
|
# libc_freebsd.a - upstream FreeBSD C library code
|
|
|
|
# ========================================================
|
|
|
|
#
|
|
|
|
# These files are built with the freebsd-compat.h header file
|
|
|
|
# automatically included.
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES := $(libc_upstream_freebsd_src_files)
|
|
|
|
LOCAL_CFLAGS := \
|
|
|
|
$(libc_common_cflags) \
|
|
|
|
-I$(LOCAL_PATH)/upstream-freebsd \
|
|
|
|
-I$(LOCAL_PATH)/upstream-freebsd/libc/include \
|
|
|
|
-include upstream-freebsd/freebsd-compat.h
|
2013-10-01 02:10:53 +02:00
|
|
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
|
|
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
2013-03-02 01:59:46 +01:00
|
|
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
|
|
|
LOCAL_MODULE := libc_freebsd
|
2013-10-03 22:26:22 +02:00
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
2013-03-02 01:59:46 +01:00
|
|
|
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
|
|
|
|
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
|
2012-08-10 20:39:58 +02:00
|
|
|
# ========================================================
|
|
|
|
# libc_netbsd.a - upstream NetBSD C library code
|
|
|
|
# ========================================================
|
|
|
|
#
|
|
|
|
# These files are built with the netbsd-compat.h header file
|
|
|
|
# automatically included.
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES := $(libc_upstream_netbsd_src_files)
|
|
|
|
LOCAL_CFLAGS := \
|
|
|
|
$(libc_common_cflags) \
|
2013-10-10 00:50:50 +02:00
|
|
|
-DPOSIX_MISTAKE \
|
2012-08-14 01:38:29 +02:00
|
|
|
-I$(LOCAL_PATH)/upstream-netbsd \
|
2012-10-24 01:05:09 +02:00
|
|
|
-I$(LOCAL_PATH)/upstream-netbsd/libc/include \
|
2012-08-10 20:39:58 +02:00
|
|
|
-include upstream-netbsd/netbsd-compat.h
|
2013-10-01 02:10:53 +02:00
|
|
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
|
|
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
2012-08-10 20:39:58 +02:00
|
|
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
|
|
|
LOCAL_MODULE := libc_netbsd
|
2013-10-03 22:26:22 +02:00
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
2012-08-10 20:39:58 +02:00
|
|
|
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
|
|
|
|
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
|
2012-10-23 02:05:27 +02:00
|
|
|
# ========================================================
|
|
|
|
# libc_bionic.a - home-grown C library code
|
|
|
|
# ========================================================
|
|
|
|
#
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES := $(libc_bionic_src_files)
|
|
|
|
LOCAL_CFLAGS := $(libc_common_cflags) -Werror
|
2013-10-01 02:10:53 +02:00
|
|
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
|
|
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
2012-10-23 02:05:27 +02:00
|
|
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
|
|
|
LOCAL_MODULE := libc_bionic
|
2013-10-03 22:26:22 +02:00
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
2012-10-23 02:05:27 +02:00
|
|
|
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
|
|
|
|
2013-10-31 22:09:39 +01:00
|
|
|
# Set -DPTHREAD_DEBUG_ENABLED=true to enable support for pthread deadlock prediction.
|
|
|
|
# Since this code is experimental it is disabled by default.
|
|
|
|
LOCAL_CFLAGS += $(libc_common_cflags) -DPTHREAD_DEBUG_ENABLED=false
|
|
|
|
|
2012-10-23 02:05:27 +02:00
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
|
2009-05-27 19:52:37 +02:00
|
|
|
# ========================================================
|
|
|
|
# libc_common.a
|
|
|
|
# ========================================================
|
2012-08-10 20:39:58 +02:00
|
|
|
|
2009-05-27 19:52:37 +02:00
|
|
|
include $(CLEAR_VARS)
|
2009-03-04 04:28:35 +01:00
|
|
|
|
2009-05-27 19:52:37 +02:00
|
|
|
LOCAL_SRC_FILES := $(libc_common_src_files)
|
2013-10-10 00:50:50 +02:00
|
|
|
LOCAL_CFLAGS := $(libc_common_cflags)
|
2013-10-01 02:10:53 +02:00
|
|
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
|
|
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
2009-05-27 19:52:37 +02:00
|
|
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
2009-03-04 04:28:35 +01:00
|
|
|
LOCAL_MODULE := libc_common
|
2013-10-03 22:26:22 +02:00
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
2013-07-13 02:31:11 +02:00
|
|
|
LOCAL_WHOLE_STATIC_LIBRARIES := \
|
|
|
|
libbionic_ssp \
|
|
|
|
libc_bionic \
|
2013-10-10 00:50:50 +02:00
|
|
|
libc_dns \
|
2013-07-13 02:31:11 +02:00
|
|
|
libc_freebsd \
|
|
|
|
libc_netbsd \
|
2013-10-10 00:50:50 +02:00
|
|
|
libc_tzcode \
|
|
|
|
|
2009-03-04 04:28:35 +01:00
|
|
|
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
|
|
|
|
2012-08-11 23:23:19 +02:00
|
|
|
# TODO: split out the asflags.
|
|
|
|
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
|
|
|
|
|
2009-03-04 04:28:35 +01:00
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
|
2009-05-27 19:52:37 +02:00
|
|
|
# ========================================================
|
|
|
|
# libc_nomalloc.a
|
|
|
|
# ========================================================
|
|
|
|
#
|
|
|
|
# This is a version of the static C library that does not
|
2013-02-13 06:56:42 +01:00
|
|
|
# include malloc. It's useful in situations when the user wants
|
|
|
|
# to provide their own malloc implementation, or wants to
|
|
|
|
# explicitly disallow the use of the use of malloc,
|
|
|
|
# such as in the dynamic loader.
|
2009-05-27 19:52:37 +02:00
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES := \
|
|
|
|
$(libc_arch_static_src_files) \
|
2010-08-27 17:19:19 +02:00
|
|
|
$(libc_static_common_src_files) \
|
2013-02-07 19:14:39 +01:00
|
|
|
bionic/libc_init_static.cpp
|
2009-05-27 19:52:37 +02:00
|
|
|
|
|
|
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
2010-08-27 17:19:19 +02:00
|
|
|
LOCAL_CFLAGS := $(libc_common_cflags) \
|
2013-10-01 02:10:53 +02:00
|
|
|
-DLIBC_STATIC
|
|
|
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
|
|
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
2009-05-27 19:52:37 +02:00
|
|
|
|
|
|
|
LOCAL_MODULE := libc_nomalloc
|
2013-10-03 22:26:22 +02:00
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
2009-05-27 19:52:37 +02:00
|
|
|
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
|
|
|
|
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
|
|
|
|
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
|
2009-05-27 19:52:37 +02:00
|
|
|
# ========================================================
|
2009-03-04 04:28:35 +01:00
|
|
|
# libc.a
|
|
|
|
# ========================================================
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES := \
|
2009-05-27 19:52:37 +02:00
|
|
|
$(libc_arch_static_src_files) \
|
2010-08-27 17:19:19 +02:00
|
|
|
$(libc_static_common_src_files) \
|
2009-03-04 04:28:35 +01:00
|
|
|
bionic/dlmalloc.c \
|
2012-08-28 23:15:04 +02:00
|
|
|
bionic/malloc_debug_common.cpp \
|
2013-02-07 19:14:39 +01:00
|
|
|
bionic/libc_init_static.cpp
|
2009-03-04 04:28:35 +01:00
|
|
|
|
2009-11-17 23:13:38 +01:00
|
|
|
LOCAL_CFLAGS := $(libc_common_cflags) \
|
2013-10-01 02:10:53 +02:00
|
|
|
-DLIBC_STATIC
|
|
|
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
|
|
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
2009-03-04 04:28:35 +01:00
|
|
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
2009-05-27 19:52:37 +02:00
|
|
|
LOCAL_MODULE := libc
|
2013-10-03 22:26:22 +02:00
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
2009-03-04 04:28:35 +01:00
|
|
|
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
|
|
|
|
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
|
|
|
|
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
|
2009-05-27 19:52:37 +02:00
|
|
|
# ========================================================
|
2009-03-04 04:28:35 +01:00
|
|
|
# libc.so
|
|
|
|
# ========================================================
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2013-10-31 22:09:39 +01:00
|
|
|
LOCAL_CFLAGS := $(libc_common_cflags)
|
2013-10-01 02:10:53 +02:00
|
|
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
|
|
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
2009-03-04 04:28:35 +01:00
|
|
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES := \
|
2009-05-27 19:52:37 +02:00
|
|
|
$(libc_arch_dynamic_src_files) \
|
2010-08-27 17:19:19 +02:00
|
|
|
$(libc_static_common_src_files) \
|
2009-03-04 04:28:35 +01:00
|
|
|
bionic/dlmalloc.c \
|
2012-08-28 23:15:04 +02:00
|
|
|
bionic/malloc_debug_common.cpp \
|
2013-01-18 03:36:06 +01:00
|
|
|
bionic/pthread_debug.cpp \
|
2013-02-07 19:14:39 +01:00
|
|
|
bionic/libc_init_dynamic.cpp
|
2009-03-04 04:28:35 +01:00
|
|
|
|
2012-08-21 14:13:50 +02:00
|
|
|
ifeq ($(TARGET_ARCH),arm)
|
|
|
|
LOCAL_NO_CRT := true
|
|
|
|
LOCAL_CFLAGS += -DCRT_LEGACY_WORKAROUND
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES := \
|
2013-10-02 14:38:05 +02:00
|
|
|
arch-common/bionic/crtbegin_so.c \
|
2012-08-21 14:13:50 +02:00
|
|
|
arch-arm/bionic/atexit_legacy.c \
|
|
|
|
$(LOCAL_SRC_FILES) \
|
2013-10-02 14:38:05 +02:00
|
|
|
arch-common/bionic/crtend_so.S
|
2012-08-21 14:13:50 +02:00
|
|
|
endif
|
|
|
|
|
2009-03-04 04:28:35 +01:00
|
|
|
LOCAL_MODULE:= libc
|
2013-10-03 22:26:22 +02:00
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
2012-10-18 20:28:56 +02:00
|
|
|
LOCAL_REQUIRED_MODULES := tzdata
|
2009-03-04 04:28:35 +01:00
|
|
|
|
|
|
|
# WARNING: The only library libc.so should depend on is libdl.so! If you add other libraries,
|
|
|
|
# make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries. This
|
|
|
|
# ensures that symbols that are pulled into those new libraries from libgcc.a are not declared
|
|
|
|
# external; if that were the case, then libc would not pull those symbols from libgcc.a as it
|
|
|
|
# should, instead relying on the external symbols from the dependent libraries. That would
|
|
|
|
# create an "cloaked" dependency on libgcc.a in libc though the libraries, which is not what
|
|
|
|
# you wanted!
|
|
|
|
|
|
|
|
LOCAL_SHARED_LIBRARIES := libdl
|
|
|
|
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
|
|
|
|
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
|
|
|
|
|
|
|
include $(BUILD_SHARED_LIBRARY)
|
|
|
|
|
|
|
|
|
2009-11-17 23:13:38 +01:00
|
|
|
# For all builds, except for the -user build we will enable memory
|
|
|
|
# allocation checking (including memory leaks, buffer overwrites, etc.)
|
|
|
|
# Note that all these checks are also controlled by env. settings
|
|
|
|
# that can enable, or disable specific checks. Note also that some of
|
|
|
|
# the checks are available only in emulator and are implemeted in
|
|
|
|
# libc_malloc_qemu_instrumented.so.
|
|
|
|
ifneq ($(TARGET_BUILD_VARIANT),user)
|
|
|
|
|
2009-05-27 19:52:37 +02:00
|
|
|
# ========================================================
|
2009-11-17 23:13:38 +01:00
|
|
|
# libc_malloc_debug_leak.so
|
2009-03-04 04:28:35 +01:00
|
|
|
# ========================================================
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2009-05-27 19:52:37 +02:00
|
|
|
LOCAL_CFLAGS := \
|
|
|
|
$(libc_common_cflags) \
|
|
|
|
-DMALLOC_LEAK_CHECK
|
2013-10-01 02:10:53 +02:00
|
|
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
|
|
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
2009-03-04 04:28:35 +01:00
|
|
|
|
|
|
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES := \
|
2013-01-18 03:36:06 +01:00
|
|
|
bionic/debug_mapinfo.cpp \
|
|
|
|
bionic/debug_stacktrace.cpp \
|
2012-08-28 23:15:04 +02:00
|
|
|
bionic/malloc_debug_leak.cpp \
|
|
|
|
bionic/malloc_debug_check.cpp \
|
2009-03-04 04:28:35 +01:00
|
|
|
|
2009-11-17 23:13:38 +01:00
|
|
|
LOCAL_MODULE:= libc_malloc_debug_leak
|
2013-10-03 22:26:22 +02:00
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
2009-03-04 04:28:35 +01:00
|
|
|
|
2012-09-10 17:35:25 +02:00
|
|
|
LOCAL_SHARED_LIBRARIES := libc libdl
|
2009-11-17 23:13:38 +01:00
|
|
|
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
|
|
|
|
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
2010-07-08 23:47:50 +02:00
|
|
|
LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
|
2011-03-14 22:02:05 +01:00
|
|
|
|
2009-11-17 23:13:38 +01:00
|
|
|
# Don't install on release build
|
|
|
|
LOCAL_MODULE_TAGS := eng debug
|
2009-03-04 04:28:35 +01:00
|
|
|
|
2009-11-17 23:13:38 +01:00
|
|
|
include $(BUILD_SHARED_LIBRARY)
|
|
|
|
|
|
|
|
|
|
|
|
# ========================================================
|
|
|
|
# libc_malloc_debug_qemu.so
|
|
|
|
# ========================================================
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_CFLAGS := \
|
|
|
|
$(libc_common_cflags) \
|
|
|
|
-DMALLOC_QEMU_INSTRUMENT
|
2013-10-01 02:10:53 +02:00
|
|
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
|
|
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
2009-11-17 23:13:38 +01:00
|
|
|
|
|
|
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES := \
|
2012-08-28 23:15:04 +02:00
|
|
|
bionic/malloc_debug_qemu.cpp
|
2009-11-17 23:13:38 +01:00
|
|
|
|
|
|
|
LOCAL_MODULE:= libc_malloc_debug_qemu
|
2013-10-03 22:26:22 +02:00
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
2009-11-17 23:13:38 +01:00
|
|
|
|
2011-09-06 08:54:55 +02:00
|
|
|
LOCAL_SHARED_LIBRARIES := libc libdl
|
2009-03-04 04:28:35 +01:00
|
|
|
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
|
|
|
|
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
2011-03-14 22:02:05 +01:00
|
|
|
|
2009-03-04 04:28:35 +01:00
|
|
|
# Don't install on release build
|
2009-11-17 23:13:38 +01:00
|
|
|
LOCAL_MODULE_TAGS := eng debug
|
2009-03-04 04:28:35 +01:00
|
|
|
|
|
|
|
include $(BUILD_SHARED_LIBRARY)
|
|
|
|
|
2009-11-17 23:13:38 +01:00
|
|
|
endif #!user
|
|
|
|
|
|
|
|
|
2009-03-04 04:28:35 +01:00
|
|
|
# ========================================================
|
|
|
|
include $(call all-makefiles-under,$(LOCAL_PATH))
|