blob: ccdf5a1d07618446489124e36186f052ff6ca8fe [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 \
7
8# These are shared by all the 32-bit targets, but not the 64-bit ones.
9libc_bionic_src_files_arm := \
10 bionic/mmap.cpp
11
12libc_common_src_files_arm += \
13 bionic/memchr.c \
14 bionic/memmove.c.arm \
15 bionic/memrchr.c \
16 bionic/strchr.cpp \
17 bionic/strnlen.c \
18 string/bcopy.c \
19 string/index.c \
20 string/strlcat.c \
21 string/strlcpy.c \
22 string/strncat.c \
23 string/strncmp.c \
24 string/strncpy.c \
25 string/strrchr.c \
26 upstream-freebsd/lib/libc/string/wcscat.c \
27 upstream-freebsd/lib/libc/string/wcschr.c \
28 upstream-freebsd/lib/libc/string/wcscmp.c \
29 upstream-freebsd/lib/libc/string/wcscpy.c \
30 upstream-freebsd/lib/libc/string/wcslen.c \
31 upstream-freebsd/lib/libc/string/wcsrchr.c \
32 upstream-freebsd/lib/libc/string/wmemcmp.c \
33
34# The C++ fortify function implementations for which there is an
35# arm assembler version.
36#
37# Fortify implementations of libc functions.
38# libc_common_src_files_arm +=
39# bionic/__memcpy_chk.cpp \
40# bionic/__memset_chk.cpp \
41# bionic/__strcpy_chk.cpp \
42# bionic/__strcat_chk.cpp \
43
44# cflags
45libc_common_cflags_arm := \
46 -DSOFTFLOAT \
47 -fstrict-aliasing
48
49##########################################
50### CPU specific source files
51libc_bionic_src_files_arm += \
Christopher Ferris04954a42013-02-26 01:30:00 -080052 arch-arm/bionic/abort_arm.S \
53 arch-arm/bionic/atomics_arm.c \
Elliott Hughes36d61882013-11-19 13:31:58 -080054 arch-arm/bionic/__bionic_clone.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080055 arch-arm/bionic/eabi.c \
56 arch-arm/bionic/_exit_with_stack_teardown.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080057 arch-arm/bionic/futex_arm.S \
58 arch-arm/bionic/__get_sp.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080059 arch-arm/bionic/libgcc_compat.c \
60 arch-arm/bionic/memcmp16.S \
61 arch-arm/bionic/memcmp.S \
62 arch-arm/bionic/_setjmp.S \
63 arch-arm/bionic/setjmp.S \
64 arch-arm/bionic/sigsetjmp.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080065 arch-arm/bionic/syscall.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080066
Ying Wangf25d6772014-01-23 15:17:50 -080067# These are used by the static and dynamic versions of the libc
68# respectively.
69libc_arch_static_src_files_arm := \
Christopher Ferris24053a42013-08-19 17:45:09 -070070 arch-arm/bionic/exidx_static.c \
Christopher Ferris04954a42013-02-26 01:30:00 -080071
Ying Wangf25d6772014-01-23 15:17:50 -080072libc_arch_dynamic_src_files_arm := \
Christopher Ferris24053a42013-08-19 17:45:09 -070073 arch-arm/bionic/exidx_dynamic.c \
Christopher Ferris04954a42013-02-26 01:30:00 -080074
Ying Wangf25d6772014-01-23 15:17:50 -080075## CPU variant specific source files
76ifeq ($(strip $(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)),)
77 $(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 -080078endif
Ying Wangf25d6772014-01-23 15:17:50 -080079cpu_variant_mk := $(LOCAL_PATH)/arch-arm/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT).mk
80ifeq ($(wildcard $(cpu_variant_mk)),)
81$(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. Use generic for devices that do not have a CPU similar to any of the supported cpu variants.")
82endif
83include $(cpu_variant_mk)
84libc_common_additional_dependencies += $(cpu_variant_mk)
Christopher Ferris04954a42013-02-26 01:30:00 -080085
Ying Wangf25d6772014-01-23 15:17:50 -080086cpu_variant_mk :=
87
88##########################################
89# crt-related
90libc_crt_target_cflags_arm := \
91 -I$(LOCAL_PATH)/arch-arm/include \
92 -mthumb-interwork
93
94libc_crt_target_so_cflags_arm :=
95
96libc_crt_target_crtbegin_file_arm := \
97 $(LOCAL_PATH)/arch-common/bionic/crtbegin.c
98
99libc_crt_target_crtbegin_so_file_arm := \
100 $(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c