blob: c2b80c5198fa02b60ec49795e1cf81b5272c865f [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/memrchr.c \
Varvara Rainchik5a922842014-04-24 15:41:20 +040024 upstream-openbsd/lib/libc/string/stpncpy.c \
Elliott Hughes53e43292014-02-24 18:00:43 -080025 upstream-openbsd/lib/libc/string/strlcat.c \
26 upstream-openbsd/lib/libc/string/strlcpy.c \
27 upstream-openbsd/lib/libc/string/strncat.c \
28 upstream-openbsd/lib/libc/string/strncmp.c \
29 upstream-openbsd/lib/libc/string/strncpy.c \
Ying Wangf25d6772014-01-23 15:17:50 -080030
Ying Wangf25d6772014-01-23 15:17:50 -080031#
Elliott Hughes7c02d942014-09-16 19:06:31 -070032# Inherently architecture-specific code.
33#
Ying Wangf25d6772014-01-23 15:17:50 -080034
Ying Wangf25d6772014-01-23 15:17:50 -080035libc_bionic_src_files_arm += \
Christopher Ferris04954a42013-02-26 01:30:00 -080036 arch-arm/bionic/abort_arm.S \
37 arch-arm/bionic/atomics_arm.c \
Elliott Hughes36d61882013-11-19 13:31:58 -080038 arch-arm/bionic/__bionic_clone.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080039 arch-arm/bionic/_exit_with_stack_teardown.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080040 arch-arm/bionic/libgcc_compat.c \
Elliott Hughes36f451a2014-09-10 15:20:40 -070041 arch-arm/bionic/__restore.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080042 arch-arm/bionic/setjmp.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080043 arch-arm/bionic/syscall.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080044
Elliott Hughes6e39ba72014-02-20 11:36:55 -080045libc_arch_static_src_files_arm := arch-arm/bionic/exidx_static.c
46libc_arch_dynamic_src_files_arm := arch-arm/bionic/exidx_dynamic.c
Christopher Ferris04954a42013-02-26 01:30:00 -080047
Ying Wangf25d6772014-01-23 15:17:50 -080048## CPU variant specific source files
49ifeq ($(strip $(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)),)
50 $(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 -080051endif
Ying Wangf25d6772014-01-23 15:17:50 -080052cpu_variant_mk := $(LOCAL_PATH)/arch-arm/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT).mk
53ifeq ($(wildcard $(cpu_variant_mk)),)
Steve Kondikd103c302013-08-09 21:56:10 -070054$(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, scorpion, 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 -080055endif
56include $(cpu_variant_mk)
57libc_common_additional_dependencies += $(cpu_variant_mk)
Christopher Ferris04954a42013-02-26 01:30:00 -080058
Ying Wangf25d6772014-01-23 15:17:50 -080059cpu_variant_mk :=
60
Elliott Hughes6e39ba72014-02-20 11:36:55 -080061
Ying Wangf25d6772014-01-23 15:17:50 -080062libc_crt_target_cflags_arm := \
63 -I$(LOCAL_PATH)/arch-arm/include \
64 -mthumb-interwork
65
66libc_crt_target_so_cflags_arm :=
67
68libc_crt_target_crtbegin_file_arm := \
69 $(LOCAL_PATH)/arch-common/bionic/crtbegin.c
70
71libc_crt_target_crtbegin_so_file_arm := \
72 $(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c