Elliott Hughes | 86d16a0 | 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 | 86d16a0 | 2014-09-16 19:06:31 -0700 | [diff] [blame] | 3 | # |
| 4 | # Various kinds of LP32 cruft. |
| 5 | # |
| 6 | |
| 7 | libc_bionic_src_files_arm += \ |
| 8 | bionic/mmap.cpp \ |
| 9 | |
| 10 | libc_common_src_files_arm += \ |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 11 | bionic/legacy_32_bit_support.cpp \ |
| 12 | bionic/ndk_cruft.cpp \ |
Elliott Hughes | 8d77bce | 2014-04-22 13:55:58 -0700 | [diff] [blame] | 13 | bionic/time64.c \ |
Elliott Hughes | 86d16a0 | 2014-09-16 19:06:31 -0700 | [diff] [blame] | 14 | |
| 15 | libc_netbsd_src_files_arm += \ |
| 16 | upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \ |
| 17 | |
| 18 | libc_openbsd_src_files_arm += \ |
Dan Albert | 8e613cf | 2014-06-11 14:17:35 -0700 | [diff] [blame] | 19 | upstream-openbsd/lib/libc/stdio/putw.c \ |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 20 | |
Elliott Hughes | 86d16a0 | 2014-09-16 19:06:31 -0700 | [diff] [blame] | 21 | # |
| 22 | # Default implementations of functions that are commonly optimized. |
| 23 | # |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 24 | |
Elliott Hughes | 86d16a0 | 2014-09-16 19:06:31 -0700 | [diff] [blame] | 25 | libc_bionic_src_files_arm += \ |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 26 | bionic/memchr.c \ |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 27 | bionic/memrchr.c \ |
| 28 | bionic/strchr.cpp \ |
| 29 | bionic/strnlen.c \ |
Elliott Hughes | 53e4329 | 2014-02-24 18:00:43 -0800 | [diff] [blame] | 30 | bionic/strrchr.cpp \ |
Elliott Hughes | 86d16a0 | 2014-09-16 19:06:31 -0700 | [diff] [blame] | 31 | |
| 32 | libc_freebsd_src_files_arm += \ |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 33 | upstream-freebsd/lib/libc/string/wcscat.c \ |
| 34 | upstream-freebsd/lib/libc/string/wcschr.c \ |
| 35 | upstream-freebsd/lib/libc/string/wcscmp.c \ |
| 36 | upstream-freebsd/lib/libc/string/wcscpy.c \ |
| 37 | upstream-freebsd/lib/libc/string/wcslen.c \ |
| 38 | upstream-freebsd/lib/libc/string/wcsrchr.c \ |
| 39 | upstream-freebsd/lib/libc/string/wmemcmp.c \ |
Bernhard Rosenkraenzer | 6f2bde3 | 2014-05-23 17:44:18 +0200 | [diff] [blame] | 40 | upstream-freebsd/lib/libc/string/wmemmove.c \ |
Elliott Hughes | 86d16a0 | 2014-09-16 19:06:31 -0700 | [diff] [blame] | 41 | |
| 42 | libc_openbsd_src_files_arm += \ |
Elliott Hughes | 53e4329 | 2014-02-24 18:00:43 -0800 | [diff] [blame] | 43 | upstream-openbsd/lib/libc/string/bcopy.c \ |
Varvara Rainchik | 5a92284 | 2014-04-24 15:41:20 +0400 | [diff] [blame] | 44 | upstream-openbsd/lib/libc/string/stpncpy.c \ |
Elliott Hughes | 53e4329 | 2014-02-24 18:00:43 -0800 | [diff] [blame] | 45 | upstream-openbsd/lib/libc/string/strlcat.c \ |
| 46 | upstream-openbsd/lib/libc/string/strlcpy.c \ |
| 47 | upstream-openbsd/lib/libc/string/strncat.c \ |
| 48 | upstream-openbsd/lib/libc/string/strncmp.c \ |
| 49 | upstream-openbsd/lib/libc/string/strncpy.c \ |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 50 | |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 51 | # |
Elliott Hughes | 86d16a0 | 2014-09-16 19:06:31 -0700 | [diff] [blame] | 52 | # Inherently architecture-specific code. |
| 53 | # |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 54 | |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 55 | libc_bionic_src_files_arm += \ |
Christopher Ferris | 04954a4 | 2013-02-26 01:30:00 -0800 | [diff] [blame] | 56 | arch-arm/bionic/abort_arm.S \ |
| 57 | arch-arm/bionic/atomics_arm.c \ |
Elliott Hughes | 36d6188 | 2013-11-19 13:31:58 -0800 | [diff] [blame] | 58 | arch-arm/bionic/__bionic_clone.S \ |
Christopher Ferris | 04954a4 | 2013-02-26 01:30:00 -0800 | [diff] [blame] | 59 | arch-arm/bionic/_exit_with_stack_teardown.S \ |
Christopher Ferris | 04954a4 | 2013-02-26 01:30:00 -0800 | [diff] [blame] | 60 | arch-arm/bionic/libgcc_compat.c \ |
Christopher Ferris | 04954a4 | 2013-02-26 01:30:00 -0800 | [diff] [blame] | 61 | arch-arm/bionic/memcmp.S \ |
Elliott Hughes | 7dc2b7b | 2014-09-10 15:20:40 -0700 | [diff] [blame] | 62 | arch-arm/bionic/__restore.S \ |
Christopher Ferris | 04954a4 | 2013-02-26 01:30:00 -0800 | [diff] [blame] | 63 | arch-arm/bionic/_setjmp.S \ |
| 64 | arch-arm/bionic/setjmp.S \ |
| 65 | arch-arm/bionic/sigsetjmp.S \ |
Christopher Ferris | 04954a4 | 2013-02-26 01:30:00 -0800 | [diff] [blame] | 66 | arch-arm/bionic/syscall.S \ |
Christopher Ferris | 04954a4 | 2013-02-26 01:30:00 -0800 | [diff] [blame] | 67 | |
Elliott Hughes | 6e39ba7 | 2014-02-20 11:36:55 -0800 | [diff] [blame] | 68 | libc_arch_static_src_files_arm := arch-arm/bionic/exidx_static.c |
| 69 | libc_arch_dynamic_src_files_arm := arch-arm/bionic/exidx_dynamic.c |
Christopher Ferris | 04954a4 | 2013-02-26 01:30:00 -0800 | [diff] [blame] | 70 | |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 71 | ## CPU variant specific source files |
| 72 | ifeq ($(strip $(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)),) |
| 73 | $(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] | 74 | endif |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 75 | cpu_variant_mk := $(LOCAL_PATH)/arch-arm/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)/$(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT).mk |
| 76 | ifeq ($(wildcard $(cpu_variant_mk)),) |
Shu Zhang | 5b5d6e7 | 2014-03-12 11:18:41 +0800 | [diff] [blame] | 77 | $(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] | 78 | endif |
| 79 | include $(cpu_variant_mk) |
| 80 | libc_common_additional_dependencies += $(cpu_variant_mk) |
Christopher Ferris | 04954a4 | 2013-02-26 01:30:00 -0800 | [diff] [blame] | 81 | |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 82 | cpu_variant_mk := |
| 83 | |
Elliott Hughes | 6e39ba7 | 2014-02-20 11:36:55 -0800 | [diff] [blame] | 84 | |
Ying Wang | f25d677 | 2014-01-23 15:17:50 -0800 | [diff] [blame] | 85 | libc_crt_target_cflags_arm := \ |
| 86 | -I$(LOCAL_PATH)/arch-arm/include \ |
| 87 | -mthumb-interwork |
| 88 | |
| 89 | libc_crt_target_so_cflags_arm := |
| 90 | |
| 91 | libc_crt_target_crtbegin_file_arm := \ |
| 92 | $(LOCAL_PATH)/arch-common/bionic/crtbegin.c |
| 93 | |
| 94 | libc_crt_target_crtbegin_so_file_arm := \ |
| 95 | $(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c |