blob: b5ed7f0e08d5d29f3fee32e7ecc606c2dde00369 [file] [log] [blame]
Elliott Hughes86d16a02014-09-16 19:06:31 -07001# 32-bit arm.
Ying Wangf25d6772014-01-23 15:17:50 -08002
Elliott Hughes86d16a02014-09-16 19:06:31 -07003#
4# Various kinds of LP32 cruft.
5#
6
7libc_bionic_src_files_arm += \
8 bionic/mmap.cpp \
9
10libc_common_src_files_arm += \
Ying Wangf25d6772014-01-23 15:17:50 -080011 bionic/legacy_32_bit_support.cpp \
12 bionic/ndk_cruft.cpp \
Elliott Hughes8d77bce2014-04-22 13:55:58 -070013 bionic/time64.c \
Elliott Hughes86d16a02014-09-16 19:06:31 -070014
15libc_netbsd_src_files_arm += \
16 upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
17
18libc_openbsd_src_files_arm += \
Dan Albert8e613cf2014-06-11 14:17:35 -070019 upstream-openbsd/lib/libc/stdio/putw.c \
Ying Wangf25d6772014-01-23 15:17:50 -080020
Elliott Hughes86d16a02014-09-16 19:06:31 -070021#
22# Default implementations of functions that are commonly optimized.
23#
Ying Wangf25d6772014-01-23 15:17:50 -080024
Elliott Hughes86d16a02014-09-16 19:06:31 -070025libc_bionic_src_files_arm += \
Ying Wangf25d6772014-01-23 15:17:50 -080026 bionic/memchr.c \
Ying Wangf25d6772014-01-23 15:17:50 -080027 bionic/memrchr.c \
28 bionic/strchr.cpp \
29 bionic/strnlen.c \
Elliott Hughes53e43292014-02-24 18:00:43 -080030 bionic/strrchr.cpp \
Elliott Hughes86d16a02014-09-16 19:06:31 -070031
32libc_freebsd_src_files_arm += \
Ying Wangf25d6772014-01-23 15:17:50 -080033 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 \
Bernhard Rosenkraenzer6f2bde32014-05-23 17:44:18 +020040 upstream-freebsd/lib/libc/string/wmemmove.c \
Elliott Hughes86d16a02014-09-16 19:06:31 -070041
42libc_openbsd_src_files_arm += \
Elliott Hughes53e43292014-02-24 18:00:43 -080043 upstream-openbsd/lib/libc/string/bcopy.c \
Varvara Rainchik5a922842014-04-24 15:41:20 +040044 upstream-openbsd/lib/libc/string/stpcpy.c \
45 upstream-openbsd/lib/libc/string/stpncpy.c \
Elliott Hughes53e43292014-02-24 18:00:43 -080046 upstream-openbsd/lib/libc/string/strlcat.c \
47 upstream-openbsd/lib/libc/string/strlcpy.c \
48 upstream-openbsd/lib/libc/string/strncat.c \
49 upstream-openbsd/lib/libc/string/strncmp.c \
50 upstream-openbsd/lib/libc/string/strncpy.c \
Ying Wangf25d6772014-01-23 15:17:50 -080051
Ying Wangf25d6772014-01-23 15:17:50 -080052#
Elliott Hughes86d16a02014-09-16 19:06:31 -070053# Inherently architecture-specific code.
54#
Ying Wangf25d6772014-01-23 15:17:50 -080055
Ying Wangf25d6772014-01-23 15:17:50 -080056libc_bionic_src_files_arm += \
Christopher Ferris04954a42013-02-26 01:30:00 -080057 arch-arm/bionic/abort_arm.S \
58 arch-arm/bionic/atomics_arm.c \
Elliott Hughes36d61882013-11-19 13:31:58 -080059 arch-arm/bionic/__bionic_clone.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080060 arch-arm/bionic/_exit_with_stack_teardown.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080061 arch-arm/bionic/libgcc_compat.c \
Christopher Ferris04954a42013-02-26 01:30:00 -080062 arch-arm/bionic/memcmp.S \
Elliott Hughes7dc2b7b2014-09-10 15:20:40 -070063 arch-arm/bionic/__restore.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080064 arch-arm/bionic/_setjmp.S \
65 arch-arm/bionic/setjmp.S \
66 arch-arm/bionic/sigsetjmp.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080067 arch-arm/bionic/syscall.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080068
Elliott Hughes6e39ba72014-02-20 11:36:55 -080069libc_arch_static_src_files_arm := arch-arm/bionic/exidx_static.c
70libc_arch_dynamic_src_files_arm := arch-arm/bionic/exidx_dynamic.c
Christopher Ferris04954a42013-02-26 01:30:00 -080071
Ying Wangf25d6772014-01-23 15:17:50 -080072## CPU variant specific source files
73ifeq ($(strip $(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)),)
74 $(warning TARGET_$(my_2nd_arch_prefix)ARCH is arm, but TARGET_$(my_2nd_arch_prefix)CPU_VARIANT is not defined)
Christopher Ferris04954a42013-02-26 01:30:00 -080075endif
Ying Wangf25d6772014-01-23 15:17:50 -080076cpu_variant_mk := $(LOCAL_PATH)/arch-arm/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT).mk
77ifeq ($(wildcard $(cpu_variant_mk)),)
Shu Zhang5b5d6e72014-03-12 11:18:41 +080078$(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.")
Ying Wangf25d6772014-01-23 15:17:50 -080079endif
80include $(cpu_variant_mk)
81libc_common_additional_dependencies += $(cpu_variant_mk)
Christopher Ferris04954a42013-02-26 01:30:00 -080082
Ying Wangf25d6772014-01-23 15:17:50 -080083cpu_variant_mk :=
84
Elliott Hughes6e39ba72014-02-20 11:36:55 -080085
Ying Wangf25d6772014-01-23 15:17:50 -080086libc_crt_target_cflags_arm := \
87 -I$(LOCAL_PATH)/arch-arm/include \
88 -mthumb-interwork
89
90libc_crt_target_so_cflags_arm :=
91
92libc_crt_target_crtbegin_file_arm := \
93 $(LOCAL_PATH)/arch-common/bionic/crtbegin.c
94
95libc_crt_target_crtbegin_so_file_arm := \
96 $(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c