"bionic/system_properties_compat.c",
"stdio/findfp.c",
"stdio/fread.c",
+ "stdio/refill.c",
"stdio/snprintf.c",
"stdio/sprintf.c",
"stdio/stdio.c",
cflags: libc_common_cflags + [
"-fvisibility=hidden",
+ "-Wno-unused-parameter",
// Don't use ridiculous amounts of stack.
"-DALL_STATE",
// Include tzsetwall, timelocal, timegm, time2posix, and posix2time.
"-DSTD_INSPIRED",
+ "-DTHREAD_SAFE",
// The name of the tm_gmtoff field in our struct tm.
"-DTM_GMTOFF=tm_gmtoff",
// Where we store our tzdata.
"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/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/wcscspn.c",
"upstream-freebsd/lib/libc/string/wcsdup.c",
"upstream-freebsd/lib/libc/string/wcslcat.c",
+ "upstream-freebsd/lib/libc/string/wcslen.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/wcsrchr.c",
"upstream-freebsd/lib/libc/string/wcsspn.c",
"upstream-freebsd/lib/libc/string/wcstok.c",
"upstream-freebsd/lib/libc/string/wmemchr.c",
- "upstream-freebsd/lib/libc/string/wmemset.c",
-
- // May be overriden by per-arch optimized versions
- "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",
+ "upstream-freebsd/lib/libc/string/wmemset.c",
"upstream-freebsd/lib/libc/string/wmemmove.c",
],
arch: {
"upstream-freebsd/lib/libc/string/wcsrchr.c",
],
},
- x86_sse3: {
+ atom: {
+ exclude_srcs: [
+ "upstream-freebsd/lib/libc/string/wmemcmp.c",
+ ],
+ },
+ x86_ssse3: {
exclude_srcs: [
- "upstream-freebsd/lib/libc/string/wcscpy.c",
"upstream-freebsd/lib/libc/string/wcscat.c",
+ "upstream-freebsd/lib/libc/string/wcscpy.c",
],
},
x86_sse4: {
"upstream-openbsd/lib/libc/locale/wctomb.c",
"upstream-openbsd/lib/libc/net/htonl.c",
"upstream-openbsd/lib/libc/net/htons.c",
- "upstream-openbsd/lib/libc/net/inet_addr.c",
"upstream-openbsd/lib/libc/net/inet_lnaof.c",
"upstream-openbsd/lib/libc/net/inet_makeaddr.c",
"upstream-openbsd/lib/libc/net/inet_netof.c",
- "upstream-openbsd/lib/libc/net/inet_network.c",
"upstream-openbsd/lib/libc/net/inet_ntoa.c",
"upstream-openbsd/lib/libc/net/inet_ntop.c",
"upstream-openbsd/lib/libc/net/inet_pton.c",
"upstream-openbsd/lib/libc/stdio/puts.c",
"upstream-openbsd/lib/libc/stdio/putwc.c",
"upstream-openbsd/lib/libc/stdio/putwchar.c",
- "upstream-openbsd/lib/libc/stdio/refill.c",
"upstream-openbsd/lib/libc/stdio/remove.c",
"upstream-openbsd/lib/libc/stdio/rewind.c",
"upstream-openbsd/lib/libc/stdio/rget.c",
"upstream-openbsd/lib/libc/string/stpcpy.c",
"upstream-openbsd/lib/libc/string/stpncpy.c",
"upstream-openbsd/lib/libc/string/strcat.c",
- "upstream-openbsd/lib/libc/string/strcmp.c",
"upstream-openbsd/lib/libc/string/strcpy.c",
"upstream-openbsd/lib/libc/string/strlcat.c",
"upstream-openbsd/lib/libc/string/strlcpy.c",
arch: {
arm: {
exclude_srcs: [
- "upstream-openbsd/lib/libc/string/strcmp.c",
"upstream-openbsd/lib/libc/string/strcpy.c",
],
},
"upstream-openbsd/lib/libc/string/strcat.c",
],
},
+ cortex_a53_a57: {
+ exclude_srcs: [
+ "upstream-openbsd/lib/libc/string/memmove.c",
+ "upstream-openbsd/lib/libc/string/stpcpy.c",
+ "upstream-openbsd/lib/libc/string/strcat.c",
+ ],
+ },
cortex_a8: {
exclude_srcs: [
"upstream-openbsd/lib/libc/string/memmove.c",
"upstream-openbsd/lib/libc/string/memchr.c",
"upstream-openbsd/lib/libc/string/memmove.c",
"upstream-openbsd/lib/libc/string/stpcpy.c",
- "upstream-openbsd/lib/libc/string/strcmp.c",
"upstream-openbsd/lib/libc/string/strcpy.c",
"upstream-openbsd/lib/libc/string/strncmp.c",
],
},
- mips: {
- exclude_srcs: [
- "upstream-openbsd/lib/libc/string/strcmp.c",
- ],
- },
-
- mips64: {
- exclude_srcs: [
- "upstream-openbsd/lib/libc/string/strcmp.c",
- ],
- },
-
x86: {
exclude_srcs: [
"upstream-openbsd/lib/libc/string/memchr.c",
"upstream-openbsd/lib/libc/string/stpcpy.c",
"upstream-openbsd/lib/libc/string/stpncpy.c",
"upstream-openbsd/lib/libc/string/strcat.c",
- "upstream-openbsd/lib/libc/string/strcmp.c",
"upstream-openbsd/lib/libc/string/strcpy.c",
"upstream-openbsd/lib/libc/string/strncmp.c",
"upstream-openbsd/lib/libc/string/strncpy.c",
- ],
+ ],
},
- x86_sse3: {
+ x86_ssse3: {
exclude_srcs: [
"upstream-openbsd/lib/libc/string/strlcat.c",
"upstream-openbsd/lib/libc/string/strlcpy.c",
"upstream-openbsd/lib/libc/string/stpcpy.c",
"upstream-openbsd/lib/libc/string/stpncpy.c",
"upstream-openbsd/lib/libc/string/strcat.c",
- "upstream-openbsd/lib/libc/string/strcmp.c",
"upstream-openbsd/lib/libc/string/strcpy.c",
"upstream-openbsd/lib/libc/string/strlcat.c",
"upstream-openbsd/lib/libc/string/strlcpy.c",
"bionic/sysconf.cpp",
"bionic/vdso.cpp",
"bionic/setjmp_cookie.cpp",
- ],
- cflags: libc_common_cflags + ["-Wframe-larger-than=2048"],
- arch: {
- x86_64: {
- clang: use_clang_x86_64,
- },
- },
-
- conlyflags: libc_common_conlyflags,
- cppflags: libc_common_cppflags + ["-Wold-style-cast"],
- product_variables: libc_common_product_variables,
- include_dirs: ["bionic/libstdc++/include"],
- name: "libc_bionic",
-
- stl: "none",
- system_shared_libs: [],
- sanitize: ["never"],
- native_coverage: bionic_coverage,
-
-}
-
-// ========================================================
-// libc_bionic_ndk.a- The portions of libc_bionic that can
-// be safely used in libc_ndk.a (no troublesome global data
-// or constructors).
-// ========================================================
-cc_library_static {
- srcs: [
- "bionic/abort.cpp",
- "bionic/accept.cpp",
- "bionic/accept4.cpp",
- "bionic/access.cpp",
- "bionic/assert.cpp",
- "bionic/atof.cpp",
- "bionic/bionic_systrace.cpp",
- "bionic/bionic_time_conversions.cpp",
- "bionic/brk.cpp",
- "bionic/c16rtomb.cpp",
- "bionic/c32rtomb.cpp",
- "bionic/chmod.cpp",
- "bionic/chown.cpp",
- "bionic/clearenv.cpp",
- "bionic/clock.cpp",
- "bionic/clock_getcpuclockid.cpp",
- "bionic/clock_nanosleep.cpp",
- "bionic/clone.cpp",
- "bionic/close.cpp",
- "bionic/__cmsg_nxthdr.cpp",
- "bionic/connect.cpp",
- "bionic/ctype.cpp",
- "bionic/dirent.cpp",
- "bionic/dup2.cpp",
- "bionic/epoll_create.cpp",
- "bionic/epoll_pwait.cpp",
- "bionic/epoll_wait.cpp",
- "bionic/__errno.cpp",
- "bionic/error.cpp",
- "bionic/eventfd_read.cpp",
- "bionic/eventfd_write.cpp",
- "bionic/faccessat.cpp",
- "bionic/fchmod.cpp",
- "bionic/fchmodat.cpp",
- "bionic/ffs.cpp",
- "bionic/fgetxattr.cpp",
- "bionic/flistxattr.cpp",
- "bionic/flockfile.cpp",
- "bionic/fpclassify.cpp",
- "bionic/fsetxattr.cpp",
- "bionic/ftruncate.cpp",
- "bionic/futimens.cpp",
- "bionic/getcwd.cpp",
- "bionic/gethostname.cpp",
- "bionic/getpgrp.cpp",
- "bionic/getpid.cpp",
- "bionic/gettid.cpp",
- "bionic/__gnu_basename.cpp",
- "bionic/inotify_init.cpp",
- "bionic/lchown.cpp",
- "bionic/lfs64_support.cpp",
- "bionic/__libc_current_sigrtmax.cpp",
- "bionic/__libc_current_sigrtmin.cpp",
- "bionic/libc_init_common.cpp",
- "bionic/libc_logging.cpp",
- "bionic/libgen.cpp",
- "bionic/link.cpp",
- "bionic/locale.cpp",
- "bionic/lstat.cpp",
- "bionic/malloc_info.cpp",
- "bionic/mbrtoc16.cpp",
- "bionic/mbrtoc32.cpp",
- "bionic/mbstate.cpp",
- "bionic/mempcpy.cpp",
- "bionic/mkdir.cpp",
- "bionic/mkfifo.cpp",
- "bionic/mknod.cpp",
- "bionic/mntent.cpp",
- "bionic/NetdClientDispatch.cpp",
- "bionic/open.cpp",
- "bionic/pathconf.cpp",
- "bionic/pause.cpp",
- "bionic/pipe.cpp",
- "bionic/poll.cpp",
- "bionic/posix_fadvise.cpp",
- "bionic/posix_fallocate.cpp",
- "bionic/posix_madvise.cpp",
- "bionic/posix_timers.cpp",
- "bionic/ptrace.cpp",
- "bionic/pty.cpp",
- "bionic/raise.cpp",
- "bionic/rand.cpp",
- "bionic/readlink.cpp",
- "bionic/reboot.cpp",
- "bionic/recv.cpp",
- "bionic/rename.cpp",
- "bionic/rmdir.cpp",
- "bionic/scandir.cpp",
- "bionic/sched_getaffinity.cpp",
- "bionic/sched_getcpu.cpp",
- "bionic/semaphore.cpp",
- "bionic/send.cpp",
- "bionic/setegid.cpp",
- "bionic/__set_errno.cpp",
- "bionic/seteuid.cpp",
- "bionic/setpgrp.cpp",
- "bionic/sigaction.cpp",
- "bionic/sigaddset.cpp",
- "bionic/sigdelset.cpp",
- "bionic/sigemptyset.cpp",
- "bionic/sigfillset.cpp",
- "bionic/sigismember.cpp",
- "bionic/signal.cpp",
- "bionic/signalfd.cpp",
- "bionic/sigpending.cpp",
- "bionic/sigprocmask.cpp",
- "bionic/sigqueue.cpp",
- "bionic/sigsuspend.cpp",
- "bionic/sigtimedwait.cpp",
- "bionic/sigwait.cpp",
- "bionic/sigwaitinfo.cpp",
- "bionic/socket.cpp",
- "bionic/stat.cpp",
- "bionic/statvfs.cpp",
- "bionic/strchrnul.cpp",
- "bionic/strerror.cpp",
- "bionic/strerror_r.cpp",
- "bionic/strsignal.cpp",
- "bionic/strtold.cpp",
- "bionic/stubs.cpp",
- "bionic/symlink.cpp",
- "bionic/sysinfo.cpp",
- "bionic/syslog.cpp",
- "bionic/sys_siglist.c",
- "bionic/sys_signame.c",
- "bionic/system_properties.cpp",
- "bionic/tdestroy.cpp",
- "bionic/termios.cpp",
- "bionic/thread_private.cpp",
- "bionic/tmpfile.cpp",
- "bionic/umount.cpp",
- "bionic/unlink.cpp",
- "bionic/utimes.cpp",
- "bionic/wait.cpp",
- "bionic/wchar.cpp",
- "bionic/wctype.cpp",
- "bionic/wmempcpy.cpp",
-
- // May be overriden by per-arch optimized versions
"bionic/__memcpy_chk.cpp",
"bionic/__memset_chk.cpp",
"bionic/__strcat_chk.cpp",
cflags: libc_common_cflags + ["-Wframe-larger-than=2048"],
arch: {
-
arm: {
srcs: [
"arch-arm/bionic/abort_arm.S",
"bionic/__strcpy_chk.cpp",
],
},
+ cortex_a53_a57: {
+ srcs: [
+ "arch-arm/cortex-a15/bionic/memcpy.S",
+ "arch-arm/cortex-a15/bionic/memset.S",
+ "arch-arm/cortex-a15/bionic/stpcpy.S",
+ "arch-arm/cortex-a15/bionic/strcat.S",
+ "arch-arm/cortex-a15/bionic/__strcat_chk.S",
+ "arch-arm/cortex-a15/bionic/strcmp.S",
+ "arch-arm/cortex-a15/bionic/strcpy.S",
+ "arch-arm/cortex-a15/bionic/__strcpy_chk.S",
+ "arch-arm/cortex-a15/bionic/strlen.S",
+
+ "arch-arm/denver/bionic/memmove.S",
+ ],
+ exclude_srcs: [
+ "arch-arm/generic/bionic/memcpy.S",
+ "arch-arm/generic/bionic/memset.S",
+ "arch-arm/generic/bionic/strcmp.S",
+ "arch-arm/generic/bionic/strcpy.S",
+ "arch-arm/generic/bionic/strlen.c",
+ "bionic/__strcat_chk.cpp",
+ "bionic/__strcpy_chk.cpp",
+ ],
+ },
cortex_a8: {
srcs: [
"arch-arm/cortex-a15/bionic/memcpy.S",
"arch-x86/silvermont/string/sse2-strlen-slm.S",
"arch-x86/silvermont/string/sse2-strncpy-slm.S",
],
+
+ exclude_srcs: [
+ "bionic/strchr.cpp",
+ "bionic/strnlen.c",
+ "bionic/strrchr.cpp",
+ ],
},
- x86_sse3: {
+ atom: {
+ srcs: [
+ "arch-x86/atom/string/sse2-bzero-atom.S",
+ "arch-x86/atom/string/sse2-memset-atom.S",
+ "arch-x86/atom/string/sse2-strlen-atom.S",
+ "arch-x86/atom/string/ssse3-bcopy-atom.S",
+ "arch-x86/atom/string/ssse3-memcmp-atom.S",
+ "arch-x86/atom/string/ssse3-memmove-atom.S",
+ "arch-x86/atom/string/ssse3-strncpy-atom.S",
+ "arch-x86/atom/string/ssse3-wmemcmp-atom.S",
+ ],
+ exclude_srcs: [
+ "arch-x86/generic/string/memcmp.S",
+ "arch-x86/silvermont/string/sse2-bcopy-slm.S",
+ "arch-x86/silvermont/string/sse2-bzero-slm.S",
+ "arch-x86/silvermont/string/sse2-memcpy-slm.S",
+ "arch-x86/silvermont/string/sse2-memmove-slm.S",
+ "arch-x86/silvermont/string/sse2-memset-slm.S",
+ "arch-x86/silvermont/string/sse2-strcpy-slm.S",
+ "arch-x86/silvermont/string/sse2-strlen-slm.S",
+ "arch-x86/silvermont/string/sse2-strncpy-slm.S",
+ ],
+ },
+ x86_ssse3: {
srcs: [
"arch-x86/atom/string/ssse3-strncat-atom.S",
"arch-x86/atom/string/ssse3-strlcat-atom.S",
"arch-x86/atom/string/ssse3-strlcpy-atom.S",
+ "arch-x86/atom/string/ssse3-strcat-atom.S",
"arch-x86/atom/string/ssse3-strcmp-atom.S",
"arch-x86/atom/string/ssse3-strncmp-atom.S",
- "arch-x86/atom/string/ssse3-strcat-atom.S",
"arch-x86/atom/string/ssse3-wcscat-atom.S",
"arch-x86/atom/string/ssse3-wcscpy-atom.S",
],
],
},
-
x86_64: {
clang: use_clang_x86_64,
srcs: [
"arch-x86_64/string/ssse3-strncmp-slm.S",
],
},
+ },
+ conlyflags: libc_common_conlyflags,
+ cppflags: libc_common_cppflags + ["-Wold-style-cast"],
+ product_variables: libc_common_product_variables,
+ include_dirs: ["bionic/libstdc++/include"],
+ name: "libc_bionic",
+
+ stl: "none",
+ system_shared_libs: [],
+ sanitize: ["never"],
+ native_coverage: bionic_coverage,
+
+}
+
+// ========================================================
+// libc_bionic_ndk.a- The portions of libc_bionic that can
+// be safely used in libc_ndk.a (no troublesome global data
+// or constructors).
+// ========================================================
+cc_library_static {
+ srcs: [
+ "bionic/abort.cpp",
+ "bionic/accept.cpp",
+ "bionic/accept4.cpp",
+ "bionic/access.cpp",
+ "bionic/arpa_inet.cpp",
+ "bionic/assert.cpp",
+ "bionic/atof.cpp",
+ "bionic/bionic_systrace.cpp",
+ "bionic/bionic_time_conversions.cpp",
+ "bionic/brk.cpp",
+ "bionic/c16rtomb.cpp",
+ "bionic/c32rtomb.cpp",
+ "bionic/chmod.cpp",
+ "bionic/chown.cpp",
+ "bionic/clearenv.cpp",
+ "bionic/clock.cpp",
+ "bionic/clock_getcpuclockid.cpp",
+ "bionic/clock_nanosleep.cpp",
+ "bionic/clone.cpp",
+ "bionic/close.cpp",
+ "bionic/__cmsg_nxthdr.cpp",
+ "bionic/connect.cpp",
+ "bionic/ctype.cpp",
+ "bionic/dirent.cpp",
+ "bionic/dup2.cpp",
+ "bionic/epoll_create.cpp",
+ "bionic/epoll_pwait.cpp",
+ "bionic/epoll_wait.cpp",
+ "bionic/__errno.cpp",
+ "bionic/error.cpp",
+ "bionic/eventfd_read.cpp",
+ "bionic/eventfd_write.cpp",
+ "bionic/faccessat.cpp",
+ "bionic/fchmod.cpp",
+ "bionic/fchmodat.cpp",
+ "bionic/ffs.cpp",
+ "bionic/fgetxattr.cpp",
+ "bionic/flistxattr.cpp",
+ "bionic/flockfile.cpp",
+ "bionic/fpclassify.cpp",
+ "bionic/fsetxattr.cpp",
+ "bionic/ftruncate.cpp",
+ "bionic/futimens.cpp",
+ "bionic/getcwd.cpp",
+ "bionic/gethostname.cpp",
+ "bionic/getpgrp.cpp",
+ "bionic/getpid.cpp",
+ "bionic/gettid.cpp",
+ "bionic/__gnu_basename.cpp",
+ "bionic/inotify_init.cpp",
+ "bionic/lchown.cpp",
+ "bionic/lfs64_support.cpp",
+ "bionic/__libc_current_sigrtmax.cpp",
+ "bionic/__libc_current_sigrtmin.cpp",
+ "bionic/libc_init_common.cpp",
+ "bionic/libc_logging.cpp",
+ "bionic/libgen.cpp",
+ "bionic/link.cpp",
+ "bionic/locale.cpp",
+ "bionic/lstat.cpp",
+ "bionic/malloc_info.cpp",
+ "bionic/mbrtoc16.cpp",
+ "bionic/mbrtoc32.cpp",
+ "bionic/mbstate.cpp",
+ "bionic/mempcpy.cpp",
+ "bionic/mkdir.cpp",
+ "bionic/mkfifo.cpp",
+ "bionic/mknod.cpp",
+ "bionic/mntent.cpp",
+ "bionic/NetdClientDispatch.cpp",
+ "bionic/open.cpp",
+ "bionic/pathconf.cpp",
+ "bionic/pause.cpp",
+ "bionic/pipe.cpp",
+ "bionic/poll.cpp",
+ "bionic/posix_fadvise.cpp",
+ "bionic/posix_fallocate.cpp",
+ "bionic/posix_madvise.cpp",
+ "bionic/posix_timers.cpp",
+ "bionic/ptrace.cpp",
+ "bionic/pty.cpp",
+ "bionic/raise.cpp",
+ "bionic/rand.cpp",
+ "bionic/readlink.cpp",
+ "bionic/reboot.cpp",
+ "bionic/recv.cpp",
+ "bionic/rename.cpp",
+ "bionic/rmdir.cpp",
+ "bionic/scandir.cpp",
+ "bionic/sched_getaffinity.cpp",
+ "bionic/sched_getcpu.cpp",
+ "bionic/semaphore.cpp",
+ "bionic/send.cpp",
+ "bionic/setegid.cpp",
+ "bionic/__set_errno.cpp",
+ "bionic/seteuid.cpp",
+ "bionic/setpgrp.cpp",
+ "bionic/sigaction.cpp",
+ "bionic/sigaddset.cpp",
+ "bionic/sigdelset.cpp",
+ "bionic/sigemptyset.cpp",
+ "bionic/sigfillset.cpp",
+ "bionic/sigismember.cpp",
+ "bionic/signal.cpp",
+ "bionic/signalfd.cpp",
+ "bionic/sigpending.cpp",
+ "bionic/sigprocmask.cpp",
+ "bionic/sigqueue.cpp",
+ "bionic/sigsuspend.cpp",
+ "bionic/sigtimedwait.cpp",
+ "bionic/sigwait.cpp",
+ "bionic/sigwaitinfo.cpp",
+ "bionic/socket.cpp",
+ "bionic/stat.cpp",
+ "bionic/statvfs.cpp",
+ "bionic/strchrnul.cpp",
+ "bionic/strerror.cpp",
+ "bionic/strerror_r.cpp",
+ "bionic/strsignal.cpp",
+ "bionic/strtold.cpp",
+ "bionic/stubs.cpp",
+ "bionic/symlink.cpp",
+ "bionic/sysinfo.cpp",
+ "bionic/syslog.cpp",
+ "bionic/sys_siglist.c",
+ "bionic/sys_signame.c",
+ "bionic/system_properties.cpp",
+ "bionic/tdestroy.cpp",
+ "bionic/termios.cpp",
+ "bionic/thread_private.cpp",
+ "bionic/tmpfile.cpp",
+ "bionic/umount.cpp",
+ "bionic/unlink.cpp",
+ "bionic/utimes.cpp",
+ "bionic/wait.cpp",
+ "bionic/wchar.cpp",
+ "bionic/wctype.cpp",
+ "bionic/wmempcpy.cpp",
+ ],
+ cflags: libc_common_cflags + ["-Wframe-larger-than=2048"],
+
+ arch: {
+ x86_64: {
+ clang: use_clang_x86_64,
+ },
},
multilib: {
lib32: {
libc_bionic_src_files += bionic/vdso.cpp
libc_bionic_src_files += bionic/setjmp_cookie.cpp
+libc_bionic_src_files += \
+ bionic/__memcpy_chk.cpp \
+ bionic/__memset_chk.cpp \
+ bionic/__strcat_chk.cpp \
+ bionic/__strcpy_chk.cpp \
+ bionic/strchr.cpp \
+ bionic/strnlen.c \
+ bionic/strrchr.cpp \
+
libc_cxa_src_files := \
bionic/__cxa_guard.cpp \
bionic/__cxa_pure_virtual.cpp \
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/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/wcscspn.c \
upstream-freebsd/lib/libc/string/wcsdup.c \
upstream-freebsd/lib/libc/string/wcslcat.c \
+ upstream-freebsd/lib/libc/string/wcslen.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/wcsrchr.c \
upstream-freebsd/lib/libc/string/wcsspn.c \
upstream-freebsd/lib/libc/string/wcstok.c \
upstream-freebsd/lib/libc/string/wmemchr.c \
+ upstream-freebsd/lib/libc/string/wmemcmp.c \
+ upstream-freebsd/lib/libc/string/wmemmove.c \
upstream-freebsd/lib/libc/string/wmemset.c \
libc_upstream_netbsd_src_files := \
upstream-openbsd/lib/libc/crypt/arc4random.c \
upstream-openbsd/lib/libc/crypt/arc4random_uniform.c \
+libc_upstream_openbsd_src_files += \
+ upstream-openbsd/lib/libc/string/memchr.c \
+ upstream-openbsd/lib/libc/string/memmove.c \
+ upstream-openbsd/lib/libc/string/memrchr.c \
+ upstream-openbsd/lib/libc/string/stpcpy.c \
+ upstream-openbsd/lib/libc/string/stpncpy.c \
+ upstream-openbsd/lib/libc/string/strcat.c \
+ upstream-openbsd/lib/libc/string/strcpy.c \
+ upstream-openbsd/lib/libc/string/strlcat.c \
+ upstream-openbsd/lib/libc/string/strlcpy.c \
+ upstream-openbsd/lib/libc/string/strncat.c \
+ upstream-openbsd/lib/libc/string/strncmp.c \
+ upstream-openbsd/lib/libc/string/strncpy.c \
+
libc_upstream_openbsd_ndk_src_files := \
upstream-openbsd/lib/libc/compat-43/killpg.c \
upstream-openbsd/lib/libc/gen/alarm.c \
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
-$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_freebsd_src_files))
+$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES_EXCLUDE,libc_freebsd_src_files_exclude))
include $(BUILD_STATIC_LIBRARY)
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
-$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_openbsd_src_files))
+$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES_EXCLUDE,libc_openbsd_src_files_exclude))
include $(BUILD_STATIC_LIBRARY)
$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_bionic_src_files))
+$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES_EXCLUDE,libc_bionic_src_files_exclude))
include $(BUILD_STATIC_LIBRARY)
# 32-bit arm.
-#
-# Default implementations of functions that are commonly optimized.
-#
-
libc_bionic_src_files_arm += \
- bionic/strchr.cpp \
- bionic/strnlen.c \
- bionic/strrchr.cpp \
+ arch-arm/generic/bionic/memcmp.S \
+ arch-arm/generic/bionic/memcpy.S \
+ arch-arm/generic/bionic/memset.S \
+ arch-arm/generic/bionic/strcmp.S \
+ arch-arm/generic/bionic/strcpy.S \
+ arch-arm/generic/bionic/strlen.c \
-libc_freebsd_src_files_arm += \
- 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 \
- upstream-freebsd/lib/libc/string/wmemmove.c \
+libc_bionic_src_files_exclude_arm += \
+ bionic/__memcpy_chk.cpp \
+ bionic/__memset_chk.cpp \
-libc_openbsd_src_files_arm += \
- upstream-openbsd/lib/libc/string/memchr.c \
- upstream-openbsd/lib/libc/string/memrchr.c \
- upstream-openbsd/lib/libc/string/stpncpy.c \
- upstream-openbsd/lib/libc/string/strlcat.c \
- upstream-openbsd/lib/libc/string/strlcpy.c \
- upstream-openbsd/lib/libc/string/strncat.c \
- upstream-openbsd/lib/libc/string/strncmp.c \
- upstream-openbsd/lib/libc/string/strncpy.c \
+libc_openbsd_src_files_exclude_arm += \
+ upstream-openbsd/lib/libc/string/strcpy.c \
#
# Inherently architecture-specific code.
ifeq ($(strip $(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)),)
$(warning TARGET_$(my_2nd_arch_prefix)ARCH is arm, but TARGET_$(my_2nd_arch_prefix)CPU_VARIANT is not defined)
endif
+ifneq ($(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT),generic)
cpu_variant_mk := $(LOCAL_PATH)/arch-arm/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT).mk
ifeq ($(wildcard $(cpu_variant_mk)),)
$(error "TARGET_$(my_2nd_arch_prefix)CPU_VARIANT not set or set to an unknown value. Possible values are cortex-a7, cortex-a8, cortex-a9, cortex-a15, krait, denver. Use generic for devices that do not have a CPU similar to any of the supported cpu variants.")
libc_common_additional_dependencies += $(cpu_variant_mk)
cpu_variant_mk :=
+endif
libc_crt_target_cflags_arm := \
+libc_openbsd_src_files_exclude_arm += \
+ upstream-openbsd/lib/libc/string/memmove.c \
+ upstream-openbsd/lib/libc/string/stpcpy.c \
+ upstream-openbsd/lib/libc/string/strcat.c \
+
+libc_bionic_src_files_exclude_arm += \
+ arch-arm/generic/bionic/memcpy.S \
+ arch-arm/generic/bionic/memset.S \
+ arch-arm/generic/bionic/strcmp.S \
+ arch-arm/generic/bionic/strcpy.S \
+ arch-arm/generic/bionic/strlen.c \
+ bionic/__strcat_chk.cpp \
+ bionic/__strcpy_chk.cpp \
+
libc_bionic_src_files_arm += \
arch-arm/cortex-a15/bionic/memcpy.S \
arch-arm/cortex-a15/bionic/memset.S \
arch-arm/cortex-a15/bionic/strlen.S \
libc_bionic_src_files_arm += \
- arch-arm/generic/bionic/memcmp.S \
-
-libc_bionic_src_files_arm += \
arch-arm/denver/bionic/memmove.S \
# The cortex-a7 optimized routines, and the cortex-a53 optimized routines
# decrease performance on cortex-a57 processors by as much as 20%.
+libc_openbsd_src_files_exclude_arm += \
+ upstream-openbsd/lib/libc/string/memmove.c \
+ upstream-openbsd/lib/libc/string/stpcpy.c \
+ upstream-openbsd/lib/libc/string/strcat.c \
+
+libc_bionic_src_files_exclude_arm += \
+ arch-arm/generic/bionic/memcpy.S \
+ arch-arm/generic/bionic/memset.S \
+ arch-arm/generic/bionic/strcmp.S \
+ arch-arm/generic/bionic/strcpy.S \
+ arch-arm/generic/bionic/strlen.c \
+ bionic/__strcat_chk.cpp \
+ bionic/__strcpy_chk.cpp \
+
libc_bionic_src_files_arm += \
arch-arm/cortex-a15/bionic/memcpy.S \
arch-arm/cortex-a15/bionic/memset.S \
arch-arm/cortex-a15/bionic/strlen.S \
libc_bionic_src_files_arm += \
- arch-arm/generic/bionic/memcmp.S \
-
-libc_bionic_src_files_arm += \
arch-arm/denver/bionic/memmove.S \
+libc_openbsd_src_files_exclude_arm += \
+ upstream-openbsd/lib/libc/string/memmove.c \
+ upstream-openbsd/lib/libc/string/stpcpy.c \
+ upstream-openbsd/lib/libc/string/strcat.c \
+
+libc_bionic_src_files_exclude_arm += \
+ arch-arm/generic/bionic/memcpy.S \
+ arch-arm/generic/bionic/memset.S \
+ arch-arm/generic/bionic/strcmp.S \
+ arch-arm/generic/bionic/strcpy.S \
+ arch-arm/generic/bionic/strlen.c \
+ bionic/__strcat_chk.cpp \
+ bionic/__strcpy_chk.cpp \
+
libc_bionic_src_files_arm += \
arch-arm/cortex-a53/bionic/memcpy.S \
arch-arm/cortex-a53/bionic/__strcat_chk.S \
arch-arm/cortex-a15/bionic/strlen.S \
libc_bionic_src_files_arm += \
- arch-arm/generic/bionic/memcmp.S \
-
-libc_bionic_src_files_arm += \
arch-arm/denver/bionic/memmove.S \
+libc_openbsd_src_files_exclude_arm += \
+ upstream-openbsd/lib/libc/string/memmove.c \
+ upstream-openbsd/lib/libc/string/stpcpy.c \
+ upstream-openbsd/lib/libc/string/strcat.c \
+
+libc_bionic_src_files_exclude_arm += \
+ arch-arm/generic/bionic/memcpy.S \
+ arch-arm/generic/bionic/memset.S \
+ arch-arm/generic/bionic/strcmp.S \
+ arch-arm/generic/bionic/strcpy.S \
+ arch-arm/generic/bionic/strlen.c \
+ bionic/__strcat_chk.cpp \
+ bionic/__strcpy_chk.cpp \
+
libc_bionic_src_files_arm += \
arch-arm/cortex-a7/bionic/memset.S \
arch-arm/cortex-a15/bionic/strlen.S \
libc_bionic_src_files_arm += \
- arch-arm/generic/bionic/memcmp.S \
-
-libc_bionic_src_files_arm += \
arch-arm/denver/bionic/memmove.S \
+libc_openbsd_src_files_exclude_arm += \
+ upstream-openbsd/lib/libc/string/memmove.c \
+ upstream-openbsd/lib/libc/string/stpcpy.c \
+ upstream-openbsd/lib/libc/string/strcat.c \
+ upstream-openbsd/lib/libc/string/strcpy.c \
+
+libc_bionic_src_files_exclude_arm += \
+ arch-arm/generic/bionic/memcpy.S \
+ arch-arm/generic/bionic/memset.S \
+ arch-arm/generic/bionic/strcmp.S \
+ arch-arm/generic/bionic/strcpy.S \
+ arch-arm/generic/bionic/strlen.c \
+ bionic/__strcat_chk.cpp \
+ bionic/__strcpy_chk.cpp \
+
libc_bionic_src_files_arm += \
arch-arm/cortex-a9/bionic/memcpy.S \
arch-arm/cortex-a9/bionic/memset.S \
arch-arm/cortex-a9/bionic/strlen.S \
libc_bionic_src_files_arm += \
- arch-arm/generic/bionic/memcmp.S \
-
-libc_bionic_src_files_arm += \
arch-arm/denver/bionic/memmove.S \
+libc_openbsd_src_files_exclude_arm += \
+ upstream-openbsd/lib/libc/string/memmove.c \
+ upstream-openbsd/lib/libc/string/stpcpy.c \
+ upstream-openbsd/lib/libc/string/strcat.c \
+
+libc_bionic_src_files_exclude_arm += \
+ arch-arm/generic/bionic/memcpy.S \
+ arch-arm/generic/bionic/memset.S \
+ arch-arm/generic/bionic/strcmp.S \
+ arch-arm/generic/bionic/strcpy.S \
+ arch-arm/generic/bionic/strlen.c \
+ bionic/__strcat_chk.cpp \
+ bionic/__strcpy_chk.cpp \
+
libc_bionic_src_files_arm += \
- arch-arm/generic/bionic/memcmp.S \
arch-arm/denver/bionic/memcpy.S \
arch-arm/denver/bionic/memmove.S \
arch-arm/denver/bionic/memset.S \
+++ /dev/null
-libc_bionic_src_files_arm += \
- arch-arm/generic/bionic/memcmp.S \
- arch-arm/generic/bionic/memcpy.S \
- arch-arm/generic/bionic/memset.S \
- arch-arm/generic/bionic/strcmp.S \
- arch-arm/generic/bionic/strcpy.S \
- arch-arm/generic/bionic/strlen.c \
- bionic/__strcat_chk.cpp \
- bionic/__strcpy_chk.cpp \
-
-libc_openbsd_src_files_arm += \
- upstream-openbsd/lib/libc/string/memmove.c \
- upstream-openbsd/lib/libc/string/stpcpy.c \
- upstream-openbsd/lib/libc/string/strcat.c \
+libc_openbsd_src_files_exclude_arm += \
+ upstream-openbsd/lib/libc/string/memmove.c \
+ upstream-openbsd/lib/libc/string/stpcpy.c \
+ upstream-openbsd/lib/libc/string/stpcpy.c \
+ upstream-openbsd/lib/libc/string/strcat.c \
+
+libc_bionic_src_files_exclude_arm += \
+ arch-arm/generic/bionic/memcpy.S \
+ arch-arm/generic/bionic/memset.S \
+ arch-arm/generic/bionic/strcmp.S \
+ arch-arm/generic/bionic/strcpy.S \
+ arch-arm/generic/bionic/strlen.c \
+ bionic/__strcat_chk.cpp \
+ bionic/__strcpy_chk.cpp \
+
libc_bionic_src_files_arm += \
arch-arm/krait/bionic/memcpy.S \
arch-arm/krait/bionic/memset.S \
arch-arm/cortex-a15/bionic/strlen.S \
libc_bionic_src_files_arm += \
- arch-arm/generic/bionic/memcmp.S \
-
-libc_bionic_src_files_arm += \
arch-arm/denver/bionic/memmove.S \
# 64-bit arm.
#
-# Default implementations of functions that are commonly optimized.
+# Generic arm64 optimizations, may be overriden by CPU variants.
#
libc_bionic_src_files_arm64 += \
- bionic/__memset_chk.cpp \
- bionic/__strcpy_chk.cpp \
- bionic/__strcat_chk.cpp \
- bionic/strrchr.cpp \
+ arch-arm64/generic/bionic/memchr.S \
+ arch-arm64/generic/bionic/memcmp.S \
+ arch-arm64/generic/bionic/memcpy.S \
+ arch-arm64/generic/bionic/memmove.S \
+ arch-arm64/generic/bionic/memset.S \
+ arch-arm64/generic/bionic/stpcpy.S \
+ arch-arm64/generic/bionic/strchr.S \
+ arch-arm64/generic/bionic/strcmp.S \
+ arch-arm64/generic/bionic/strcpy.S \
+ arch-arm64/generic/bionic/strlen.S \
+ arch-arm64/generic/bionic/strncmp.S \
+ arch-arm64/generic/bionic/strnlen.S \
+ arch-arm64/generic/bionic/wmemmove.S \
-libc_freebsd_src_files_arm64 += \
- 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 \
+libc_bionic_src_files_exclude_arm64 += \
+ bionic/__memcpy_chk.cpp \
+ bionic/strchr.cpp \
+ bionic/strnlen.c \
-libc_openbsd_src_files_arm64 += \
- upstream-openbsd/lib/libc/string/memrchr.c \
- upstream-openbsd/lib/libc/string/stpncpy.c \
- upstream-openbsd/lib/libc/string/strcat.c \
- upstream-openbsd/lib/libc/string/strlcat.c \
- upstream-openbsd/lib/libc/string/strlcpy.c \
- upstream-openbsd/lib/libc/string/strncat.c \
- upstream-openbsd/lib/libc/string/strncpy.c \
+libc_freebsd_src_files_exclude_arm64 += \
+ upstream-freebsd/lib/libc/string/wmemmove.c \
+
+libc_openbsd_src_files_exclude_arm64 += \
+ upstream-openbsd/lib/libc/string/memchr.c \
+ upstream-openbsd/lib/libc/string/memmove.c \
+ upstream-openbsd/lib/libc/string/stpcpy.c \
+ upstream-openbsd/lib/libc/string/strcpy.c \
+ upstream-openbsd/lib/libc/string/strncmp.c \
#
# Inherently architecture-specific code.
ifeq ($(strip $(TARGET_CPU_VARIANT)),)
$(warning TARGET_ARCH is arm64, but TARGET_CPU_VARIANT is not defined)
endif
+ifneq ($(TARGET_CPU_VARIANT),generic)
cpu_variant_mk := $(LOCAL_PATH)/arch-arm64/$(TARGET_CPU_VARIANT)/$(TARGET_CPU_VARIANT).mk
ifeq ($(wildcard $(cpu_variant_mk)),)
$(error "TARGET_CPU_VARIANT not set or set to an unknown value. Possible values are generic, denver64. Use generic for devices that do not have a CPU similar to any of the supported cpu variants.")
libc_common_additional_dependencies += $(cpu_variant_mk)
cpu_variant_mk :=
+endif
-include bionic/libc/arch-arm64/generic/generic.mk
libc_bionic_src_files_arm64 += \
- arch-arm64/generic/bionic/memchr.S \
- arch-arm64/generic/bionic/memcmp.S \
arch-arm64/denver64/bionic/memcpy.S \
- arch-arm64/generic/bionic/memmove.S \
arch-arm64/denver64/bionic/memset.S \
- arch-arm64/generic/bionic/stpcpy.S \
- arch-arm64/generic/bionic/strchr.S \
- arch-arm64/generic/bionic/strcmp.S \
- arch-arm64/generic/bionic/strcpy.S \
- arch-arm64/generic/bionic/strlen.S \
- arch-arm64/generic/bionic/strncmp.S \
- arch-arm64/generic/bionic/strnlen.S \
- arch-arm64/generic/bionic/wmemmove.S
+
+libc_bionic_src_files_exclude_arm64 += \
+ arch-arm64/generic/bionic/memcpy.S \
+ arch-arm64/generic/bionic/memset.S \
+++ /dev/null
-libc_bionic_src_files_arm64 += \
- arch-arm64/generic/bionic/memchr.S \
- arch-arm64/generic/bionic/memcmp.S \
- arch-arm64/generic/bionic/memcpy.S \
- arch-arm64/generic/bionic/memmove.S \
- arch-arm64/generic/bionic/memset.S \
- arch-arm64/generic/bionic/stpcpy.S \
- arch-arm64/generic/bionic/strchr.S \
- arch-arm64/generic/bionic/strcmp.S \
- arch-arm64/generic/bionic/strcpy.S \
- arch-arm64/generic/bionic/strlen.S \
- arch-arm64/generic/bionic/strncmp.S \
- arch-arm64/generic/bionic/strnlen.S \
- arch-arm64/generic/bionic/wmemmove.S
# 32-bit mips.
-#
-# Default implementations of functions that are commonly optimized.
-#
-
libc_bionic_src_files_mips += \
arch-mips/string/memcmp.c \
arch-mips/string/memcpy.S \
arch-mips/string/memset.S \
arch-mips/string/strcmp.S \
- bionic/__memcpy_chk.cpp \
- bionic/__memset_chk.cpp \
- bionic/__strcpy_chk.cpp \
- bionic/__strcat_chk.cpp \
- bionic/strchr.cpp \
- bionic/strnlen.c \
- bionic/strrchr.cpp \
-
-libc_freebsd_src_files_mips += \
- 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 \
- upstream-freebsd/lib/libc/string/wmemmove.c \
-
-libc_openbsd_src_files_mips += \
- upstream-openbsd/lib/libc/string/memchr.c \
- upstream-openbsd/lib/libc/string/memmove.c \
- upstream-openbsd/lib/libc/string/memrchr.c \
- upstream-openbsd/lib/libc/string/stpcpy.c \
- upstream-openbsd/lib/libc/string/stpncpy.c \
- upstream-openbsd/lib/libc/string/strcat.c \
- upstream-openbsd/lib/libc/string/strcpy.c \
- upstream-openbsd/lib/libc/string/strlcat.c \
- upstream-openbsd/lib/libc/string/strlcpy.c \
- upstream-openbsd/lib/libc/string/strncat.c \
- upstream-openbsd/lib/libc/string/strncmp.c \
- upstream-openbsd/lib/libc/string/strncpy.c \
#
# Inherently architecture-specific code.
# 64-bit mips.
-#
-# Default implementations of functions that are commonly optimized.
-#
-
libc_bionic_src_files_mips64 += \
arch-mips/string/memcmp.c \
arch-mips/string/memcpy.S \
arch-mips/string/memset.S \
arch-mips/string/strcmp.S \
arch-mips/string/strlen.c \
- bionic/__memcpy_chk.cpp \
- bionic/__memset_chk.cpp \
- bionic/__strcpy_chk.cpp \
- bionic/__strcat_chk.cpp \
- bionic/strchr.cpp \
- bionic/strnlen.c \
- bionic/strrchr.cpp \
-
-libc_freebsd_src_files_mips64 += \
- 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 \
- upstream-freebsd/lib/libc/string/wmemmove.c \
-
-libc_openbsd_src_files_mips64 += \
- upstream-openbsd/lib/libc/string/memchr.c \
- upstream-openbsd/lib/libc/string/memmove.c \
- upstream-openbsd/lib/libc/string/memrchr.c \
- upstream-openbsd/lib/libc/string/stpcpy.c \
- upstream-openbsd/lib/libc/string/stpncpy.c \
- upstream-openbsd/lib/libc/string/strcat.c \
- upstream-openbsd/lib/libc/string/strcpy.c \
- upstream-openbsd/lib/libc/string/strlcat.c \
- upstream-openbsd/lib/libc/string/strlcpy.c \
- upstream-openbsd/lib/libc/string/strncat.c \
- upstream-openbsd/lib/libc/string/strncmp.c \
- upstream-openbsd/lib/libc/string/strncpy.c \
#
# Inherently architecture-specific code.
libc_bionic_src_files_x86 += \
arch-x86/atom/string/sse2-bzero-atom.S \
- arch-x86/atom/string/sse2-memchr-atom.S \
- arch-x86/atom/string/sse2-memrchr-atom.S \
arch-x86/atom/string/sse2-memset-atom.S \
- arch-x86/atom/string/sse2-strchr-atom.S \
arch-x86/atom/string/sse2-strlen-atom.S \
- arch-x86/atom/string/sse2-strnlen-atom.S \
- arch-x86/atom/string/sse2-strrchr-atom.S \
- arch-x86/atom/string/sse2-wcschr-atom.S \
- arch-x86/atom/string/sse2-wcsrchr-atom.S \
- arch-x86/atom/string/sse2-wcslen-atom.S \
- arch-x86/atom/string/sse2-wcscmp-atom.S \
arch-x86/atom/string/ssse3-bcopy-atom.S \
arch-x86/atom/string/ssse3-memcmp-atom.S \
arch-x86/atom/string/ssse3-memcpy-atom.S \
arch-x86/atom/string/ssse3-memmove-atom.S \
- arch-x86/atom/string/ssse3-strcat-atom.S \
- arch-x86/atom/string/ssse3-strcmp-atom.S \
arch-x86/atom/string/ssse3-strcpy-atom.S \
- arch-x86/atom/string/ssse3-strlcat-atom.S \
- arch-x86/atom/string/ssse3-strlcpy-atom.S \
- arch-x86/atom/string/ssse3-strncat-atom.S \
- arch-x86/atom/string/ssse3-strncmp-atom.S \
arch-x86/atom/string/ssse3-strncpy-atom.S \
- arch-x86/atom/string/ssse3-wcscat-atom.S \
- arch-x86/atom/string/ssse3-wcscpy-atom.S \
arch-x86/atom/string/ssse3-wmemcmp-atom.S
-libc_bionic_src_files_x86 += \
- arch-x86/silvermont/string/sse2-stpcpy-slm.S \
- arch-x86/silvermont/string/sse2-stpncpy-slm.S
+libc_bionic_src_files_exclude_x86 += \
+ arch-x86/generic/string/memcmp.S \
+
+libc_bionic_src_files_exclude_x86 += \
+ arch-x86/silvermont/string/sse2-bcopy-slm.S \
+ arch-x86/silvermont/string/sse2-bzero-slm.S \
+ arch-x86/silvermont/string/sse2-memcpy-slm.S \
+ arch-x86/silvermont/string/sse2-memmove-slm.S \
+ arch-x86/silvermont/string/sse2-memset-slm.S \
+ arch-x86/silvermont/string/sse2-strcpy-slm.S \
+ arch-x86/silvermont/string/sse2-strlen-slm.S \
+ arch-x86/silvermont/string/sse2-strncpy-slm.S \
+
+libc_freebsd_src_files_exclude_x86 += \
+ upstream-freebsd/lib/libc/string/wmemcmp.c \
+++ /dev/null
-libc_bionic_src_files_x86 += \
- arch-x86/atom/string/sse2-memchr-atom.S \
- arch-x86/atom/string/sse2-memrchr-atom.S \
- arch-x86/atom/string/sse2-strchr-atom.S \
- arch-x86/atom/string/sse2-strnlen-atom.S \
- arch-x86/atom/string/sse2-strrchr-atom.S \
- arch-x86/atom/string/sse2-wcschr-atom.S \
- arch-x86/atom/string/sse2-wcsrchr-atom.S \
- arch-x86/atom/string/sse2-wcslen-atom.S \
- arch-x86/atom/string/sse2-wcscmp-atom.S \
- arch-x86/silvermont/string/sse2-bcopy-slm.S \
- arch-x86/silvermont/string/sse2-bzero-slm.S \
- arch-x86/silvermont/string/sse2-memcpy-slm.S \
- arch-x86/silvermont/string/sse2-memmove-slm.S \
- arch-x86/silvermont/string/sse2-memset-slm.S \
- arch-x86/silvermont/string/sse2-stpcpy-slm.S \
- arch-x86/silvermont/string/sse2-stpncpy-slm.S \
- arch-x86/silvermont/string/sse2-strcpy-slm.S \
- arch-x86/silvermont/string/sse2-strlen-slm.S \
- arch-x86/silvermont/string/sse2-strncpy-slm.S
-
-ifeq ($(ARCH_X86_HAVE_SSSE3),true)
-libc_bionic_src_files_x86 += \
- arch-x86/atom/string/ssse3-strncat-atom.S \
- arch-x86/atom/string/ssse3-strlcat-atom.S \
- arch-x86/atom/string/ssse3-strlcpy-atom.S \
- arch-x86/atom/string/ssse3-strcmp-atom.S \
- arch-x86/atom/string/ssse3-strncmp-atom.S \
- arch-x86/atom/string/ssse3-strcat-atom.S \
- arch-x86/atom/string/ssse3-wcscat-atom.S \
- arch-x86/atom/string/ssse3-wcscpy-atom.S
-else
-libc_bionic_src_files_x86 += \
- arch-x86/generic/string/strcmp.S \
- arch-x86/generic/string/strncmp.S \
- arch-x86/generic/string/strcat.S \
- upstream-freebsd/lib/libc/string/wcscpy.c \
- upstream-freebsd/lib/libc/string/wcscat.c \
- upstream-openbsd/lib/libc/string/strlcat.c \
- upstream-openbsd/lib/libc/string/strlcpy.c \
- upstream-openbsd/lib/libc/string/strncat.c
-endif
-
-ifeq ($(ARCH_X86_HAVE_SSE4),true)
- libc_bionic_src_files_x86 += \
- arch-x86/silvermont/string/sse4-memcmp-slm.S \
- arch-x86/silvermont/string/sse4-wmemcmp-slm.S
-else
-libc_bionic_src_files_x86 += \
- arch-x86/generic/string/memcmp.S \
- upstream-freebsd/lib/libc/string/wmemcmp.c
-endif
-libc_bionic_src_files_x86 += \
- arch-x86/silvermont/string/sse2-bcopy-slm.S \
- arch-x86/silvermont/string/sse2-bzero-slm.S \
- arch-x86/silvermont/string/sse2-memcpy-slm.S \
- arch-x86/silvermont/string/sse2-memmove-slm.S \
- arch-x86/silvermont/string/sse2-memset-slm.S \
- arch-x86/silvermont/string/sse2-stpcpy-slm.S \
- arch-x86/silvermont/string/sse2-stpncpy-slm.S \
- arch-x86/silvermont/string/sse2-strcpy-slm.S \
- arch-x86/silvermont/string/sse2-strlen-slm.S \
- arch-x86/silvermont/string/sse2-strncpy-slm.S \
- arch-x86/silvermont/string/sse4-memcmp-slm.S \
- arch-x86/silvermont/string/sse4-wmemcmp-slm.S
-
-libc_bionic_src_files_x86 += \
- arch-x86/atom/string/sse2-memchr-atom.S \
- arch-x86/atom/string/sse2-memrchr-atom.S \
- arch-x86/atom/string/sse2-strchr-atom.S \
- arch-x86/atom/string/sse2-strrchr-atom.S \
- arch-x86/atom/string/sse2-strnlen-atom.S \
- arch-x86/atom/string/sse2-wcschr-atom.S \
- arch-x86/atom/string/sse2-wcsrchr-atom.S \
- arch-x86/atom/string/sse2-wcslen-atom.S \
- arch-x86/atom/string/sse2-wcscmp-atom.S \
- arch-x86/atom/string/ssse3-strncat-atom.S \
- arch-x86/atom/string/ssse3-strlcat-atom.S \
- arch-x86/atom/string/ssse3-strlcpy-atom.S \
- arch-x86/atom/string/ssse3-strcmp-atom.S \
- arch-x86/atom/string/ssse3-strncmp-atom.S \
- arch-x86/atom/string/ssse3-strcat-atom.S \
- arch-x86/atom/string/ssse3-wcscat-atom.S \
- arch-x86/atom/string/ssse3-wcscpy-atom.S
# 32-bit x86.
#
-# Default implementations of functions that are commonly optimized.
+# Generic x86 optimizations, may be overriden by CPU variants.
#
-libc_common_src_files_x86 += \
- bionic/__memcpy_chk.cpp \
- bionic/__memset_chk.cpp \
- bionic/__strcpy_chk.cpp \
- bionic/__strcat_chk.cpp \
+libc_bionic_src_files_x86 += \
+ arch-x86/atom/string/sse2-memchr-atom.S \
+ arch-x86/atom/string/sse2-memrchr-atom.S \
+ arch-x86/atom/string/sse2-strchr-atom.S \
+ arch-x86/atom/string/sse2-strnlen-atom.S \
+ arch-x86/atom/string/sse2-strrchr-atom.S \
+ arch-x86/atom/string/sse2-wcschr-atom.S \
+ arch-x86/atom/string/sse2-wcsrchr-atom.S \
+ arch-x86/atom/string/sse2-wcslen-atom.S \
+ arch-x86/atom/string/sse2-wcscmp-atom.S \
+ arch-x86/silvermont/string/sse2-bcopy-slm.S \
+ arch-x86/silvermont/string/sse2-bzero-slm.S \
+ arch-x86/silvermont/string/sse2-memcpy-slm.S \
+ arch-x86/silvermont/string/sse2-memmove-slm.S \
+ arch-x86/silvermont/string/sse2-memset-slm.S \
+ arch-x86/silvermont/string/sse2-stpcpy-slm.S \
+ arch-x86/silvermont/string/sse2-stpncpy-slm.S \
+ arch-x86/silvermont/string/sse2-strcpy-slm.S \
+ arch-x86/silvermont/string/sse2-strlen-slm.S \
+ arch-x86/silvermont/string/sse2-strncpy-slm.S
+
+libc_bionic_src_files_x86 += \
+ arch-x86/generic/string/memcmp.S \
+ arch-x86/generic/string/strcmp.S \
+ arch-x86/generic/string/strncmp.S \
+ arch-x86/generic/string/strcat.S
-libc_freebsd_src_files_x86 += \
- upstream-freebsd/lib/libc/string/wmemmove.c \
+ifeq ($(ARCH_X86_HAVE_SSSE3),true)
+libc_bionic_src_files_x86 += \
+ arch-x86/atom/string/ssse3-strncat-atom.S \
+ arch-x86/atom/string/ssse3-strlcat-atom.S \
+ arch-x86/atom/string/ssse3-strlcpy-atom.S \
+ arch-x86/atom/string/ssse3-strcmp-atom.S \
+ arch-x86/atom/string/ssse3-strncmp-atom.S \
+ arch-x86/atom/string/ssse3-strcat-atom.S \
+ arch-x86/atom/string/ssse3-wcscat-atom.S \
+ arch-x86/atom/string/ssse3-wcscpy-atom.S
+libc_bionic_src_files_exclude_x86 += \
+ arch-x86/generic/string/strcmp.S \
+ arch-x86/generic/string/strncmp.S \
+ arch-x86/generic/string/strcat.S
+endif
+
+ifeq ($(ARCH_X86_HAVE_SSE4),true)
+libc_bionic_src_files_x86 += \
+ arch-x86/silvermont/string/sse4-memcmp-slm.S \
+ arch-x86/silvermont/string/sse4-wmemcmp-slm.S
+libc_bionic_src_files_exclude_x86 += \
+ arch-x86/generic/string/memcmp.S
+endif
+
+#
+# Remove default implementations that we have optimized versions of.
+#
+
+libc_freebsd_src_files_exclude_x86 += \
+ upstream-freebsd/lib/libc/string/wcschr.c \
+ upstream-freebsd/lib/libc/string/wcscmp.c \
+ upstream-freebsd/lib/libc/string/wcslen.c \
+ upstream-freebsd/lib/libc/string/wcsrchr.c \
+
+ifeq ($(ARCH_X86_HAVE_SSSE3),true)
+libc_freebsd_src_files_exclude_x86 += \
+ upstream-freebsd/lib/libc/string/wcscat.c \
+ upstream-freebsd/lib/libc/string/wcscpy.c
+endif
+
+ifeq ($(ARCH_X86_HAVE_SSE4),true)
+libc_freebsd_src_files_exclude_x86 += \
+ upstream-freebsd/lib/libc/string/wmemcmp.c
+endif
+
+libc_openbsd_src_files_exclude_x86 += \
+ upstream-openbsd/lib/libc/string/memchr.c \
+ upstream-openbsd/lib/libc/string/memmove.c \
+ upstream-openbsd/lib/libc/string/memrchr.c \
+ upstream-openbsd/lib/libc/string/stpcpy.c \
+ upstream-openbsd/lib/libc/string/stpncpy.c \
+ upstream-openbsd/lib/libc/string/strcat.c \
+ upstream-openbsd/lib/libc/string/strcpy.c \
+ upstream-openbsd/lib/libc/string/strncmp.c \
+ upstream-openbsd/lib/libc/string/strncpy.c \
+
+ifeq ($(ARCH_X86_HAVE_SSSE3),true)
+libc_openbsd_src_files_exclude_x86 += \
+ upstream-openbsd/lib/libc/string/strlcat.c \
+ upstream-openbsd/lib/libc/string/strlcpy.c \
+ upstream-openbsd/lib/libc/string/strncat.c
+endif
+
+libc_bionic_src_files_exclude_x86 += \
+ bionic/strchr.cpp \
+ bionic/strnlen.c \
+ bionic/strrchr.cpp \
#
# Inherently architecture-specific functions.
## ARCH variant specific source files
arch_variant_mk := $(LOCAL_PATH)/arch-x86/$(TARGET_ARCH_VARIANT)/$(TARGET_ARCH_VARIANT).mk
ifeq ($(wildcard $(arch_variant_mk)),)
- arch_variant_mk := $(LOCAL_PATH)/arch-x86/generic/generic.mk
+ arch_variant_mk :=
endif
+ifneq ($(arch_variant_mk),)
include $(arch_variant_mk)
libc_common_additional_dependencies += $(arch_variant_mk)
arch_variant_mk :=
+endif
libc_crt_target_cflags_x86 := \
-m32 \
# 64-bit x86.
#
-# Default implementations of functions that are commonly optimized.
+# Remove default implementations that we have optimized versions of.
#
-libc_bionic_src_files_x86_64 += \
- bionic/__memcpy_chk.cpp \
- bionic/__memset_chk.cpp \
- bionic/__strcpy_chk.cpp \
- bionic/__strcat_chk.cpp \
- bionic/strchr.cpp \
- bionic/strnlen.c \
- bionic/strrchr.cpp \
-
-libc_freebsd_src_files_x86_64 += \
- 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 \
- upstream-freebsd/lib/libc/string/wmemmove.c \
-
-libc_openbsd_src_files_x86_64 += \
- upstream-openbsd/lib/libc/string/memchr.c \
- upstream-openbsd/lib/libc/string/memrchr.c \
+libc_openbsd_src_files_exclude_x86_64 += \
+ upstream-openbsd/lib/libc/string/memmove.c \
+ upstream-openbsd/lib/libc/string/stpcpy.c \
+ upstream-openbsd/lib/libc/string/stpncpy.c \
+ upstream-openbsd/lib/libc/string/strcat.c \
+ upstream-openbsd/lib/libc/string/strcpy.c \
+ upstream-openbsd/lib/libc/string/strlcat.c \
+ upstream-openbsd/lib/libc/string/strlcpy.c \
+ upstream-openbsd/lib/libc/string/strncat.c \
+ upstream-openbsd/lib/libc/string/strncmp.c \
+ upstream-openbsd/lib/libc/string/strncpy.c \
#
# Inherently architecture-specific code.