1# mips specific configs
2
3# These are shared by all the 32-bit targets, but not the 64-bit ones.
4libc_common_src_files_mips := \
5    bionic/legacy_32_bit_support.cpp \
6    bionic/ndk_cruft.cpp \
7    bionic/time64.c \
8    upstream-openbsd/lib/libc/stdio/putw.c \
9
10# These are shared by all the 32-bit targets, but not the 64-bit ones.
11libc_bionic_src_files_mips += \
12     bionic/mmap.cpp
13
14libc_common_src_files_mips += \
15    bionic/memchr.c \
16    bionic/memcmp.c \
17    bionic/memmove.c \
18    bionic/memrchr.c \
19    bionic/strchr.cpp \
20    bionic/strnlen.c \
21    bionic/strrchr.cpp \
22    upstream-freebsd/lib/libc/string/wcscat.c \
23    upstream-freebsd/lib/libc/string/wcschr.c \
24    upstream-freebsd/lib/libc/string/wcscmp.c \
25    upstream-freebsd/lib/libc/string/wcscpy.c \
26    upstream-freebsd/lib/libc/string/wcslen.c \
27    upstream-freebsd/lib/libc/string/wcsrchr.c \
28    upstream-freebsd/lib/libc/string/wmemcmp.c \
29    upstream-freebsd/lib/libc/string/wmemmove.c \
30    upstream-openbsd/lib/libc/string/bcopy.c \
31    upstream-openbsd/lib/libc/string/stpcpy.c \
32    upstream-openbsd/lib/libc/string/stpncpy.c \
33    upstream-openbsd/lib/libc/string/strcat.c \
34    upstream-openbsd/lib/libc/string/strcmp.c \
35    upstream-openbsd/lib/libc/string/strcpy.c \
36    upstream-openbsd/lib/libc/string/strlcat.c \
37    upstream-openbsd/lib/libc/string/strlcpy.c \
38    upstream-openbsd/lib/libc/string/strncat.c \
39    upstream-openbsd/lib/libc/string/strncmp.c \
40    upstream-openbsd/lib/libc/string/strncpy.c \
41
42# Fortify implementations of libc functions.
43libc_common_src_files_mips += \
44    bionic/__memcpy_chk.cpp \
45    bionic/__memset_chk.cpp \
46    bionic/__strcpy_chk.cpp \
47    bionic/__strcat_chk.cpp \
48
49
50##########################################
51### CPU specific source files
52libc_bionic_src_files_mips += \
53    arch-mips/bionic/__bionic_clone.S \
54    arch-mips/bionic/bzero.S \
55    arch-mips/bionic/cacheflush.cpp \
56    arch-mips/bionic/_exit_with_stack_teardown.S \
57    arch-mips/bionic/_setjmp.S \
58    arch-mips/bionic/setjmp.S \
59    arch-mips/bionic/sigsetjmp.S \
60    arch-mips/bionic/syscall.S \
61    arch-mips/bionic/vfork.S \
62
63ifndef ARCH_MIPS_REV6
64libc_bionic_src_files_mips += \
65    arch-mips/string/memcpy.S \
66    arch-mips/string/memset.S \
67    arch-mips/string/mips_strlen.c \
68
69else
70libc_bionic_src_files_mips += \
71    bionic/memcpy.cpp \
72    bionic/memset.c
73libc_common_src_files_mips += \
74    upstream-openbsd/lib/libc/string/strlen.c
75endif
76
77libc_netbsd_src_files_mips := \
78    upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
79
80libc_crt_target_cflags_mips := \
81    $($(my_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS) \
82    -I$(LOCAL_PATH)/arch-mips/include
83
84libc_crt_target_crtbegin_file_mips := \
85    $(LOCAL_PATH)/arch-mips/bionic/crtbegin.c
86
87libc_crt_target_crtbegin_so_file_mips := \
88    $(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c
89
90libc_crt_target_so_cflags_mips := \
91    -fPIC
92
93libc_crt_target_ldflags_mips := \
94    -melf32ltsmip
95