blob: 260d72ef5d1c16b1cd9fa762debf717d97b36d39 [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 += \
Elliott Hughes53e43292014-02-24 18:00:43 -080015 bionic/index.cpp \
Ying Wangf25d6772014-01-23 15:17:50 -080016 bionic/memchr.c \
Ying Wangf25d6772014-01-23 15:17:50 -080017 bionic/memrchr.c \
18 bionic/strchr.cpp \
19 bionic/strnlen.c \
Elliott Hughes53e43292014-02-24 18:00:43 -080020 bionic/strrchr.cpp \
Ying Wangf25d6772014-01-23 15:17:50 -080021 upstream-freebsd/lib/libc/string/wcscat.c \
22 upstream-freebsd/lib/libc/string/wcschr.c \
23 upstream-freebsd/lib/libc/string/wcscmp.c \
24 upstream-freebsd/lib/libc/string/wcscpy.c \
25 upstream-freebsd/lib/libc/string/wcslen.c \
26 upstream-freebsd/lib/libc/string/wcsrchr.c \
27 upstream-freebsd/lib/libc/string/wmemcmp.c \
Bernhard Rosenkraenzer6f2bde32014-05-23 17:44:18 +020028 upstream-freebsd/lib/libc/string/wmemmove.c \
Elliott Hughes53e43292014-02-24 18:00:43 -080029 upstream-openbsd/lib/libc/string/bcopy.c \
Varvara Rainchik5a922842014-04-24 15:41:20 +040030 upstream-openbsd/lib/libc/string/stpcpy.c \
31 upstream-openbsd/lib/libc/string/stpncpy.c \
Elliott Hughes53e43292014-02-24 18:00:43 -080032 upstream-openbsd/lib/libc/string/strlcat.c \
33 upstream-openbsd/lib/libc/string/strlcpy.c \
34 upstream-openbsd/lib/libc/string/strncat.c \
35 upstream-openbsd/lib/libc/string/strncmp.c \
36 upstream-openbsd/lib/libc/string/strncpy.c \
Ying Wangf25d6772014-01-23 15:17:50 -080037
38# The C++ fortify function implementations for which there is an
39# arm assembler version.
40#
41# Fortify implementations of libc functions.
42# libc_common_src_files_arm +=
43# bionic/__memcpy_chk.cpp \
44# bionic/__memset_chk.cpp \
45# bionic/__strcpy_chk.cpp \
46# bionic/__strcat_chk.cpp \
47
Elliott Hughesb8dc9bb2014-02-20 14:35:20 -080048libc_common_cflags_arm := -DSOFTFLOAT
Ying Wangf25d6772014-01-23 15:17:50 -080049
50##########################################
51### CPU specific source files
52libc_bionic_src_files_arm += \
Christopher Ferris04954a42013-02-26 01:30:00 -080053 arch-arm/bionic/abort_arm.S \
54 arch-arm/bionic/atomics_arm.c \
Elliott Hughes36d61882013-11-19 13:31:58 -080055 arch-arm/bionic/__bionic_clone.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080056 arch-arm/bionic/eabi.c \
57 arch-arm/bionic/_exit_with_stack_teardown.S \
Christopher Ferris04954a42013-02-26 01:30:00 -080058 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
Elliott Hughes6e39ba72014-02-20 11:36:55 -080067libc_arch_static_src_files_arm := arch-arm/bionic/exidx_static.c
68libc_arch_dynamic_src_files_arm := arch-arm/bionic/exidx_dynamic.c
Christopher Ferris04954a42013-02-26 01:30:00 -080069
Ying Wangf25d6772014-01-23 15:17:50 -080070## CPU variant specific source files
71ifeq ($(strip $(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)),)
72 $(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 -080073endif
Ying Wangf25d6772014-01-23 15:17:50 -080074cpu_variant_mk := $(LOCAL_PATH)/arch-arm/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT).mk
75ifeq ($(wildcard $(cpu_variant_mk)),)
Shu Zhang5b5d6e72014-03-12 11:18:41 +080076$(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 -080077endif
78include $(cpu_variant_mk)
79libc_common_additional_dependencies += $(cpu_variant_mk)
Christopher Ferris04954a42013-02-26 01:30:00 -080080
Ying Wangf25d6772014-01-23 15:17:50 -080081cpu_variant_mk :=
82
Elliott Hughes6e39ba72014-02-20 11:36:55 -080083
Ying Wangf25d6772014-01-23 15:17:50 -080084libc_crt_target_cflags_arm := \
85 -I$(LOCAL_PATH)/arch-arm/include \
86 -mthumb-interwork
87
88libc_crt_target_so_cflags_arm :=
89
90libc_crt_target_crtbegin_file_arm := \
91 $(LOCAL_PATH)/arch-common/bionic/crtbegin.c
92
93libc_crt_target_crtbegin_so_file_arm := \
94 $(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c