blob: d72a160d0553f4e394cadd9c3693367374959572 [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 \
Elliott Hughes36f451a2014-09-10 15:20:40 -070042 arch-arm/bionic/__restore.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080043 arch-arm/bionic/setjmp.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080044 arch-arm/bionic/syscall.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080045
Elliott Hughes6e39ba72014-02-20 11:36:55 -080046libc_arch_static_src_files_arm := arch-arm/bionic/exidx_static.c
47libc_arch_dynamic_src_files_arm := arch-arm/bionic/exidx_dynamic.c
Christopher Ferris04954a42013-02-26 01:30:00 -080048
Ying Wangf25d6772014-01-23 15:17:50 -080049## CPU variant specific source files
50ifeq ($(strip $(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)),)
51 $(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 -080052endif
Ying Wangf25d6772014-01-23 15:17:50 -080053cpu_variant_mk := $(LOCAL_PATH)/arch-arm/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT).mk
54ifeq ($(wildcard $(cpu_variant_mk)),)
Shu Zhang5b5d6e72014-03-12 11:18:41 +080055$(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 -080056endif
57include $(cpu_variant_mk)
58libc_common_additional_dependencies += $(cpu_variant_mk)
Christopher Ferris04954a42013-02-26 01:30:00 -080059
Ying Wangf25d6772014-01-23 15:17:50 -080060cpu_variant_mk :=
61
Elliott Hughes6e39ba72014-02-20 11:36:55 -080062
Ying Wangf25d6772014-01-23 15:17:50 -080063libc_crt_target_cflags_arm := \
64 -I$(LOCAL_PATH)/arch-arm/include \
65 -mthumb-interwork
66
67libc_crt_target_so_cflags_arm :=
68
69libc_crt_target_crtbegin_file_arm := \
70 $(LOCAL_PATH)/arch-common/bionic/crtbegin.c
71
72libc_crt_target_crtbegin_so_file_arm := \
73 $(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c