blob: 7d92ac89cffe7bebd1e542fbf0e1ac4df4d60583 [file] [log] [blame]
Ying Wangf25d6772014-01-23 15:17:50 -08001# arm specific configs
2
3# These are used by the 32-bit targets, but not the 64-bit ones.
4libc_common_src_files_arm := \
5 bionic/legacy_32_bit_support.cpp \
6 bionic/ndk_cruft.cpp \
Elliott Hughes8d77bce2014-04-22 13:55:58 -07007 bionic/time64.c \
Dan Albert8e613cf2014-06-11 14:17:35 -07008 upstream-openbsd/lib/libc/stdio/putw.c \
Ying Wangf25d6772014-01-23 15:17:50 -08009
10# These are shared by all the 32-bit targets, but not the 64-bit ones.
11libc_bionic_src_files_arm := \
12 bionic/mmap.cpp
13
14libc_common_src_files_arm += \
15 bionic/memchr.c \
Ying Wangf25d6772014-01-23 15:17:50 -080016 bionic/memrchr.c \
17 bionic/strchr.cpp \
18 bionic/strnlen.c \
Elliott Hughes53e43292014-02-24 18:00:43 -080019 bionic/strrchr.cpp \
Ying Wangf25d6772014-01-23 15:17:50 -080020 upstream-freebsd/lib/libc/string/wcscat.c \
21 upstream-freebsd/lib/libc/string/wcschr.c \
22 upstream-freebsd/lib/libc/string/wcscmp.c \
23 upstream-freebsd/lib/libc/string/wcscpy.c \
24 upstream-freebsd/lib/libc/string/wcslen.c \
25 upstream-freebsd/lib/libc/string/wcsrchr.c \
26 upstream-freebsd/lib/libc/string/wmemcmp.c \
Bernhard Rosenkraenzer6f2bde32014-05-23 17:44:18 +020027 upstream-freebsd/lib/libc/string/wmemmove.c \
Varvara Rainchik5a922842014-04-24 15:41:20 +040028 upstream-openbsd/lib/libc/string/stpcpy.c \
29 upstream-openbsd/lib/libc/string/stpncpy.c \
Elliott Hughes53e43292014-02-24 18:00:43 -080030 upstream-openbsd/lib/libc/string/strlcat.c \
31 upstream-openbsd/lib/libc/string/strlcpy.c \
32 upstream-openbsd/lib/libc/string/strncat.c \
33 upstream-openbsd/lib/libc/string/strncmp.c \
34 upstream-openbsd/lib/libc/string/strncpy.c \
Ying Wangf25d6772014-01-23 15:17:50 -080035
36# The C++ fortify function implementations for which there is an
37# arm assembler version.
38#
39# Fortify implementations of libc functions.
40# libc_common_src_files_arm +=
41# bionic/__memcpy_chk.cpp \
42# bionic/__memset_chk.cpp \
43# bionic/__strcpy_chk.cpp \
44# bionic/__strcat_chk.cpp \
45
Elliott Hughesb8dc9bb2014-02-20 14:35:20 -080046libc_common_cflags_arm := -DSOFTFLOAT
Ying Wangf25d6772014-01-23 15:17:50 -080047
48##########################################
49### CPU specific source files
50libc_bionic_src_files_arm += \
Christopher Ferris04954a42013-02-26 01:30:00 -080051 arch-arm/bionic/abort_arm.S \
52 arch-arm/bionic/atomics_arm.c \
Elliott Hughes36d61882013-11-19 13:31:58 -080053 arch-arm/bionic/__bionic_clone.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080054 arch-arm/bionic/_exit_with_stack_teardown.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080055 arch-arm/bionic/libgcc_compat.c \
Christopher Ferris04954a42013-02-26 01:30:00 -080056 arch-arm/bionic/memcmp.S \
57 arch-arm/bionic/_setjmp.S \
58 arch-arm/bionic/setjmp.S \
59 arch-arm/bionic/sigsetjmp.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080060 arch-arm/bionic/syscall.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080061
Elliott Hughes6e39ba72014-02-20 11:36:55 -080062libc_arch_static_src_files_arm := arch-arm/bionic/exidx_static.c
63libc_arch_dynamic_src_files_arm := arch-arm/bionic/exidx_dynamic.c
Christopher Ferris04954a42013-02-26 01:30:00 -080064
Dan Albertc82c0b72014-06-16 16:52:27 -070065libc_netbsd_src_files_arm := \
66 upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
67
Ying Wangf25d6772014-01-23 15:17:50 -080068## CPU variant specific source files
69ifeq ($(strip $(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)),)
70 $(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 -080071endif
Xin Qie7632ce2014-08-15 11:12:32 -070072ifneq ($(strip $(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)),krait)
73ifneq ($(strip $(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)),cortex-a53)
74libc_bionic_src_files_arm += \
75 upstream-openbsd/lib/libc/string/bcopy.c
76endif
77endif
Ying Wangf25d6772014-01-23 15:17:50 -080078cpu_variant_mk := $(LOCAL_PATH)/arch-arm/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT).mk
79ifeq ($(wildcard $(cpu_variant_mk)),)
Shu Zhang5b5d6e72014-03-12 11:18:41 +080080$(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 -080081endif
82include $(cpu_variant_mk)
83libc_common_additional_dependencies += $(cpu_variant_mk)
Christopher Ferris04954a42013-02-26 01:30:00 -080084
Ying Wangf25d6772014-01-23 15:17:50 -080085cpu_variant_mk :=
86
Elliott Hughes6e39ba72014-02-20 11:36:55 -080087
Ying Wangf25d6772014-01-23 15:17:50 -080088libc_crt_target_cflags_arm := \
89 -I$(LOCAL_PATH)/arch-arm/include \
90 -mthumb-interwork
91
92libc_crt_target_so_cflags_arm :=
93
94libc_crt_target_crtbegin_file_arm := \
95 $(LOCAL_PATH)/arch-common/bionic/crtbegin.c
96
97libc_crt_target_crtbegin_so_file_arm := \
98 $(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c