blob: 6ef81bb78d417ff63de0feb618b5659d1dbb5385 [file] [log] [blame]
Elliott Hughes7c02d942014-09-16 19:06:31 -07001# 32-bit arm.
Ying Wangf25d6772014-01-23 15:17:50 -08002
Elliott Hughes7c02d942014-09-16 19:06:31 -07003#
Elliott Hughes7c02d942014-09-16 19:06:31 -07004# Default implementations of functions that are commonly optimized.
5#
Ying Wangf25d6772014-01-23 15:17:50 -08006
Elliott Hughes7c02d942014-09-16 19:06:31 -07007libc_bionic_src_files_arm += \
Ying Wangf25d6772014-01-23 15:17:50 -08008 bionic/strchr.cpp \
9 bionic/strnlen.c \
Elliott Hughes53e43292014-02-24 18:00:43 -080010 bionic/strrchr.cpp \
Elliott Hughes7c02d942014-09-16 19:06:31 -070011
12libc_freebsd_src_files_arm += \
Ying Wangf25d6772014-01-23 15:17:50 -080013 upstream-freebsd/lib/libc/string/wcscat.c \
14 upstream-freebsd/lib/libc/string/wcschr.c \
15 upstream-freebsd/lib/libc/string/wcscmp.c \
16 upstream-freebsd/lib/libc/string/wcscpy.c \
17 upstream-freebsd/lib/libc/string/wcslen.c \
18 upstream-freebsd/lib/libc/string/wcsrchr.c \
19 upstream-freebsd/lib/libc/string/wmemcmp.c \
Bernhard Rosenkraenzer6f2bde32014-05-23 17:44:18 +020020 upstream-freebsd/lib/libc/string/wmemmove.c \
Elliott Hughes7c02d942014-09-16 19:06:31 -070021
22libc_openbsd_src_files_arm += \
Elliott Hughes41ef9022015-02-14 13:21:22 -080023 upstream-openbsd/lib/libc/string/memchr.c \
24 upstream-openbsd/lib/libc/string/memrchr.c \
Varvara Rainchik5a922842014-04-24 15:41:20 +040025 upstream-openbsd/lib/libc/string/stpncpy.c \
Elliott Hughes53e43292014-02-24 18:00:43 -080026 upstream-openbsd/lib/libc/string/strlcat.c \
27 upstream-openbsd/lib/libc/string/strlcpy.c \
28 upstream-openbsd/lib/libc/string/strncat.c \
29 upstream-openbsd/lib/libc/string/strncmp.c \
30 upstream-openbsd/lib/libc/string/strncpy.c \
Ying Wangf25d6772014-01-23 15:17:50 -080031
Ying Wangf25d6772014-01-23 15:17:50 -080032#
Elliott Hughes7c02d942014-09-16 19:06:31 -070033# Inherently architecture-specific code.
34#
Ying Wangf25d6772014-01-23 15:17:50 -080035
Ying Wangf25d6772014-01-23 15:17:50 -080036libc_bionic_src_files_arm += \
Christopher Ferris04954a42013-02-26 01:30:00 -080037 arch-arm/bionic/abort_arm.S \
38 arch-arm/bionic/atomics_arm.c \
Elliott Hughes36d61882013-11-19 13:31:58 -080039 arch-arm/bionic/__bionic_clone.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080040 arch-arm/bionic/_exit_with_stack_teardown.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080041 arch-arm/bionic/libgcc_compat.c \
Dmitriy Ivanovcd13b142015-04-03 18:41:42 -070042 arch-arm/bionic/libgcc_protect_unwind.c \
Elliott Hughes36f451a2014-09-10 15:20:40 -070043 arch-arm/bionic/__restore.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080044 arch-arm/bionic/setjmp.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080045 arch-arm/bionic/syscall.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080046
Elliott Hughes6e39ba72014-02-20 11:36:55 -080047libc_arch_static_src_files_arm := arch-arm/bionic/exidx_static.c
48libc_arch_dynamic_src_files_arm := arch-arm/bionic/exidx_dynamic.c
Christopher Ferris04954a42013-02-26 01:30:00 -080049
Ying Wangf25d6772014-01-23 15:17:50 -080050## CPU variant specific source files
51ifeq ($(strip $(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)),)
52 $(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 -080053endif
Ying Wangf25d6772014-01-23 15:17:50 -080054cpu_variant_mk := $(LOCAL_PATH)/arch-arm/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT).mk
55ifeq ($(wildcard $(cpu_variant_mk)),)
Shu Zhang5b5d6e72014-03-12 11:18:41 +080056$(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 -080057endif
58include $(cpu_variant_mk)
59libc_common_additional_dependencies += $(cpu_variant_mk)
Christopher Ferris04954a42013-02-26 01:30:00 -080060
Ying Wangf25d6772014-01-23 15:17:50 -080061cpu_variant_mk :=
62
Elliott Hughes6e39ba72014-02-20 11:36:55 -080063
Ying Wangf25d6772014-01-23 15:17:50 -080064libc_crt_target_cflags_arm := \
65 -I$(LOCAL_PATH)/arch-arm/include \
66 -mthumb-interwork
67
68libc_crt_target_so_cflags_arm :=
69
70libc_crt_target_crtbegin_file_arm := \
71 $(LOCAL_PATH)/arch-common/bionic/crtbegin.c
72
73libc_crt_target_crtbegin_so_file_arm := \
74 $(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c