Elliott Hughes | 7c02d94 | 2014-09-16 19:06:31 -0700 | [diff] [blame] | 1 | # 32-bit arm. |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 2 | |
Elliott Hughes | 7c02d94 | 2014-09-16 19:06:31 -0700 | [diff] [blame] | 3 | # |
Elliott Hughes | 7c02d94 | 2014-09-16 19:06:31 -0700 | [diff] [blame] | 4 | # Default implementations of functions that are commonly optimized. |
| 5 | # |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 6 | |
Elliott Hughes | 7c02d94 | 2014-09-16 19:06:31 -0700 | [diff] [blame] | 7 | libc_bionic_src_files_arm += \ |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 8 | bionic/strchr.cpp \ |
| 9 | bionic/strnlen.c \ |
Elliott Hughes | 53e4329 | 2014-02-24 18:00:43 -0800 | [diff] [blame] | 10 | bionic/strrchr.cpp \ |
Elliott Hughes | 7c02d94 | 2014-09-16 19:06:31 -0700 | [diff] [blame] | 11 | |
| 12 | libc_freebsd_src_files_arm += \ |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 13 | 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 Rosenkraenzer | 6f2bde3 | 2014-05-23 17:44:18 +0200 | [diff] [blame] | 20 | upstream-freebsd/lib/libc/string/wmemmove.c \ |
Elliott Hughes | 7c02d94 | 2014-09-16 19:06:31 -0700 | [diff] [blame] | 21 | |
| 22 | libc_openbsd_src_files_arm += \ |
Elliott Hughes | 41ef902 | 2015-02-14 13:21:22 -0800 | [diff] [blame] | 23 | upstream-openbsd/lib/libc/string/memchr.c \ |
| 24 | upstream-openbsd/lib/libc/string/memrchr.c \ |
Varvara Rainchik | 5a92284 | 2014-04-24 15:41:20 +0400 | [diff] [blame] | 25 | upstream-openbsd/lib/libc/string/stpncpy.c \ |
Elliott Hughes | 53e4329 | 2014-02-24 18:00:43 -0800 | [diff] [blame] | 26 | 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 Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 31 | |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 32 | # |
Elliott Hughes | 7c02d94 | 2014-09-16 19:06:31 -0700 | [diff] [blame] | 33 | # Inherently architecture-specific code. |
| 34 | # |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 35 | |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 36 | libc_bionic_src_files_arm += \ |
Christopher Ferris | 04954a4 | 2013-02-26 01:30:00 -0800 | [diff] [blame] | 37 | arch-arm/bionic/abort_arm.S \ |
| 38 | arch-arm/bionic/atomics_arm.c \ |
Elliott Hughes | 36d6188 | 2013-11-19 13:31:58 -0800 | [diff] [blame] | 39 | arch-arm/bionic/__bionic_clone.S \ |
Christopher Ferris | 04954a4 | 2013-02-26 01:30:00 -0800 | [diff] [blame] | 40 | arch-arm/bionic/_exit_with_stack_teardown.S \ |
Christopher Ferris | 04954a4 | 2013-02-26 01:30:00 -0800 | [diff] [blame] | 41 | arch-arm/bionic/libgcc_compat.c \ |
Dmitriy Ivanov | cd13b14 | 2015-04-03 18:41:42 -0700 | [diff] [blame] | 42 | arch-arm/bionic/libgcc_protect_unwind.c \ |
Elliott Hughes | 36f451a | 2014-09-10 15:20:40 -0700 | [diff] [blame] | 43 | arch-arm/bionic/__restore.S \ |
Christopher Ferris | 04954a4 | 2013-02-26 01:30:00 -0800 | [diff] [blame] | 44 | arch-arm/bionic/setjmp.S \ |
Christopher Ferris | 04954a4 | 2013-02-26 01:30:00 -0800 | [diff] [blame] | 45 | arch-arm/bionic/syscall.S \ |
Christopher Ferris | 04954a4 | 2013-02-26 01:30:00 -0800 | [diff] [blame] | 46 | |
Elliott Hughes | 6e39ba7 | 2014-02-20 11:36:55 -0800 | [diff] [blame] | 47 | libc_arch_static_src_files_arm := arch-arm/bionic/exidx_static.c |
| 48 | libc_arch_dynamic_src_files_arm := arch-arm/bionic/exidx_dynamic.c |
Christopher Ferris | 04954a4 | 2013-02-26 01:30:00 -0800 | [diff] [blame] | 49 | |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 50 | ## CPU variant specific source files |
| 51 | ifeq ($(strip $(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)),) |
| 52 | $(warning TARGET_$(my_2nd_arch_prefix)ARCH is arm, but TARGET_$(my_2nd_arch_prefix)CPU_VARIANT is not defined) |
Christopher Ferris | 04954a4 | 2013-02-26 01:30:00 -0800 | [diff] [blame] | 53 | endif |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 54 | cpu_variant_mk := $(LOCAL_PATH)/arch-arm/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT).mk |
| 55 | ifeq ($(wildcard $(cpu_variant_mk)),) |
Shu Zhang | 5b5d6e7 | 2014-03-12 11:18:41 +0800 | [diff] [blame] | 56 | $(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 Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 57 | endif |
| 58 | include $(cpu_variant_mk) |
| 59 | libc_common_additional_dependencies += $(cpu_variant_mk) |
Christopher Ferris | 04954a4 | 2013-02-26 01:30:00 -0800 | [diff] [blame] | 60 | |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 61 | cpu_variant_mk := |
| 62 | |
Elliott Hughes | 6e39ba7 | 2014-02-20 11:36:55 -0800 | [diff] [blame] | 63 | |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 64 | libc_crt_target_cflags_arm := \ |
| 65 | -I$(LOCAL_PATH)/arch-arm/include \ |
| 66 | -mthumb-interwork |
| 67 | |
| 68 | libc_crt_target_so_cflags_arm := |
| 69 | |
| 70 | libc_crt_target_crtbegin_file_arm := \ |
| 71 | $(LOCAL_PATH)/arch-common/bionic/crtbegin.c |
| 72 | |
| 73 | libc_crt_target_crtbegin_so_file_arm := \ |
| 74 | $(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c |