1# 32-bit arm.
2
3#
4# Various kinds of LP32 cruft.
5#
6
7libc_bionic_src_files_arm += \
8    bionic/mmap.cpp \
9
10libc_common_src_files_arm += \
11    bionic/legacy_32_bit_support.cpp \
12    bionic/ndk_cruft.cpp \
13    bionic/time64.c \
14
15libc_netbsd_src_files_arm += \
16    upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
17
18libc_openbsd_src_files_arm += \
19    upstream-openbsd/lib/libc/stdio/putw.c \
20
21#
22# Default implementations of functions that are commonly optimized.
23#
24
25libc_bionic_src_files_arm += \
26    bionic/memchr.c \
27    bionic/memrchr.c \
28    bionic/strchr.cpp \
29    bionic/strnlen.c \
30    bionic/strrchr.cpp \
31
32libc_freebsd_src_files_arm += \
33    upstream-freebsd/lib/libc/string/wcscat.c \
34    upstream-freebsd/lib/libc/string/wcschr.c \
35    upstream-freebsd/lib/libc/string/wcscmp.c \
36    upstream-freebsd/lib/libc/string/wcscpy.c \
37    upstream-freebsd/lib/libc/string/wcslen.c \
38    upstream-freebsd/lib/libc/string/wcsrchr.c \
39    upstream-freebsd/lib/libc/string/wmemcmp.c \
40    upstream-freebsd/lib/libc/string/wmemmove.c \
41
42libc_openbsd_src_files_arm += \
43    upstream-openbsd/lib/libc/string/bcopy.c \
44    upstream-openbsd/lib/libc/string/stpncpy.c \
45    upstream-openbsd/lib/libc/string/strlcat.c \
46    upstream-openbsd/lib/libc/string/strlcpy.c \
47    upstream-openbsd/lib/libc/string/strncat.c \
48    upstream-openbsd/lib/libc/string/strncmp.c \
49    upstream-openbsd/lib/libc/string/strncpy.c \
50
51#
52# Inherently architecture-specific code.
53#
54
55libc_bionic_src_files_arm += \
56    arch-arm/bionic/abort_arm.S \
57    arch-arm/bionic/atomics_arm.c \
58    arch-arm/bionic/__bionic_clone.S \
59    arch-arm/bionic/_exit_with_stack_teardown.S \
60    arch-arm/bionic/libgcc_compat.c \
61    arch-arm/bionic/memcmp.S \
62    arch-arm/bionic/__restore.S \
63    arch-arm/bionic/_setjmp.S \
64    arch-arm/bionic/setjmp.S \
65    arch-arm/bionic/sigsetjmp.S \
66    arch-arm/bionic/syscall.S \
67
68libc_arch_static_src_files_arm := arch-arm/bionic/exidx_static.c
69libc_arch_dynamic_src_files_arm := arch-arm/bionic/exidx_dynamic.c
70
71## CPU variant specific source files
72ifeq ($(strip $(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)),)
73  $(warning TARGET_$(my_2nd_arch_prefix)ARCH is arm, but TARGET_$(my_2nd_arch_prefix)CPU_VARIANT is not defined)
74endif
75cpu_variant_mk := $(LOCAL_PATH)/arch-arm/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT).mk
76ifeq ($(wildcard $(cpu_variant_mk)),)
77$(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.")
78endif
79include $(cpu_variant_mk)
80libc_common_additional_dependencies += $(cpu_variant_mk)
81
82cpu_variant_mk :=
83
84
85libc_crt_target_cflags_arm := \
86    -I$(LOCAL_PATH)/arch-arm/include \
87    -mthumb-interwork
88
89libc_crt_target_so_cflags_arm :=
90
91libc_crt_target_crtbegin_file_arm := \
92    $(LOCAL_PATH)/arch-common/bionic/crtbegin.c
93
94libc_crt_target_crtbegin_so_file_arm := \
95    $(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c
96