Clean up the architecture-specific makefiles.
Group things appropriately and name each group. Bug: 18160821 (cherry picked from commit 7c02d9428ca18ac600f7ba7d51bb24ca71e733f6) Change-Id: I863242515af44058154d03e2d8c34678e682d66a
This commit is contained in:
parent
b378c27226
commit
86d16a053e
@ -692,6 +692,7 @@ LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_freebsd_src_files))
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
|
||||
@ -760,6 +761,7 @@ LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
|
||||
$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_openbsd_src_files))
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
|
||||
|
@ -1,22 +1,35 @@
|
||||
# arm specific configs
|
||||
# 32-bit arm.
|
||||
|
||||
# These are used by the 32-bit targets, but not the 64-bit ones.
|
||||
libc_common_src_files_arm := \
|
||||
#
|
||||
# Various kinds of LP32 cruft.
|
||||
#
|
||||
|
||||
libc_bionic_src_files_arm += \
|
||||
bionic/mmap.cpp \
|
||||
|
||||
libc_common_src_files_arm += \
|
||||
bionic/legacy_32_bit_support.cpp \
|
||||
bionic/ndk_cruft.cpp \
|
||||
bionic/time64.c \
|
||||
|
||||
libc_netbsd_src_files_arm += \
|
||||
upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
|
||||
|
||||
libc_openbsd_src_files_arm += \
|
||||
upstream-openbsd/lib/libc/stdio/putw.c \
|
||||
|
||||
# These are shared by all the 32-bit targets, but not the 64-bit ones.
|
||||
libc_bionic_src_files_arm := \
|
||||
bionic/mmap.cpp
|
||||
#
|
||||
# Default implementations of functions that are commonly optimized.
|
||||
#
|
||||
|
||||
libc_common_src_files_arm += \
|
||||
libc_bionic_src_files_arm += \
|
||||
bionic/memchr.c \
|
||||
bionic/memrchr.c \
|
||||
bionic/strchr.cpp \
|
||||
bionic/strnlen.c \
|
||||
bionic/strrchr.cpp \
|
||||
|
||||
libc_freebsd_src_files_arm += \
|
||||
upstream-freebsd/lib/libc/string/wcscat.c \
|
||||
upstream-freebsd/lib/libc/string/wcschr.c \
|
||||
upstream-freebsd/lib/libc/string/wcscmp.c \
|
||||
@ -25,6 +38,8 @@ libc_common_src_files_arm += \
|
||||
upstream-freebsd/lib/libc/string/wcsrchr.c \
|
||||
upstream-freebsd/lib/libc/string/wmemcmp.c \
|
||||
upstream-freebsd/lib/libc/string/wmemmove.c \
|
||||
|
||||
libc_openbsd_src_files_arm += \
|
||||
upstream-openbsd/lib/libc/string/bcopy.c \
|
||||
upstream-openbsd/lib/libc/string/stpcpy.c \
|
||||
upstream-openbsd/lib/libc/string/stpncpy.c \
|
||||
@ -34,18 +49,10 @@ libc_common_src_files_arm += \
|
||||
upstream-openbsd/lib/libc/string/strncmp.c \
|
||||
upstream-openbsd/lib/libc/string/strncpy.c \
|
||||
|
||||
# The C++ fortify function implementations for which there is an
|
||||
# arm assembler version.
|
||||
#
|
||||
# Fortify implementations of libc functions.
|
||||
# libc_common_src_files_arm +=
|
||||
# bionic/__memcpy_chk.cpp \
|
||||
# bionic/__memset_chk.cpp \
|
||||
# bionic/__strcpy_chk.cpp \
|
||||
# bionic/__strcat_chk.cpp \
|
||||
# Inherently architecture-specific code.
|
||||
#
|
||||
|
||||
##########################################
|
||||
### CPU specific source files
|
||||
libc_bionic_src_files_arm += \
|
||||
arch-arm/bionic/abort_arm.S \
|
||||
arch-arm/bionic/atomics_arm.c \
|
||||
@ -62,9 +69,6 @@ libc_bionic_src_files_arm += \
|
||||
libc_arch_static_src_files_arm := arch-arm/bionic/exidx_static.c
|
||||
libc_arch_dynamic_src_files_arm := arch-arm/bionic/exidx_dynamic.c
|
||||
|
||||
libc_netbsd_src_files_arm := \
|
||||
upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
|
||||
|
||||
## CPU variant specific source files
|
||||
ifeq ($(strip $(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)),)
|
||||
$(warning TARGET_$(my_2nd_arch_prefix)ARCH is arm, but TARGET_$(my_2nd_arch_prefix)CPU_VARIANT is not defined)
|
||||
|
@ -1,8 +1,18 @@
|
||||
# arm64 specific configs
|
||||
# 64-bit arm.
|
||||
|
||||
libc_common_src_files_arm64 := \
|
||||
#
|
||||
# Default implementations of functions that are commonly optimized.
|
||||
#
|
||||
|
||||
libc_bionic_src_files_arm64 += \
|
||||
bionic/__memcpy_chk.cpp \
|
||||
bionic/__memset_chk.cpp \
|
||||
bionic/__strcpy_chk.cpp \
|
||||
bionic/__strcat_chk.cpp \
|
||||
bionic/memrchr.c \
|
||||
bionic/strrchr.cpp \
|
||||
|
||||
libc_freebsd_src_files_arm64 += \
|
||||
upstream-freebsd/lib/libc/string/wcscat.c \
|
||||
upstream-freebsd/lib/libc/string/wcschr.c \
|
||||
upstream-freebsd/lib/libc/string/wcscmp.c \
|
||||
@ -10,6 +20,8 @@ libc_common_src_files_arm64 := \
|
||||
upstream-freebsd/lib/libc/string/wcslen.c \
|
||||
upstream-freebsd/lib/libc/string/wcsrchr.c \
|
||||
upstream-freebsd/lib/libc/string/wmemcmp.c \
|
||||
|
||||
libc_openbsd_src_files_arm64 += \
|
||||
upstream-openbsd/lib/libc/string/stpncpy.c \
|
||||
upstream-openbsd/lib/libc/string/strcat.c \
|
||||
upstream-openbsd/lib/libc/string/strlcat.c \
|
||||
@ -17,16 +29,11 @@ libc_common_src_files_arm64 := \
|
||||
upstream-openbsd/lib/libc/string/strncat.c \
|
||||
upstream-openbsd/lib/libc/string/strncpy.c \
|
||||
|
||||
# Fortify implementations of libc functions.
|
||||
libc_common_src_files_arm64 += \
|
||||
bionic/__memcpy_chk.cpp \
|
||||
bionic/__memset_chk.cpp \
|
||||
bionic/__strcpy_chk.cpp \
|
||||
bionic/__strcat_chk.cpp \
|
||||
#
|
||||
# Inherently architecture-specific code.
|
||||
#
|
||||
|
||||
##########################################
|
||||
### CPU specific source files
|
||||
libc_bionic_src_files_arm64 := \
|
||||
libc_bionic_src_files_arm64 += \
|
||||
arch-arm64/bionic/__bionic_clone.S \
|
||||
arch-arm64/bionic/_exit_with_stack_teardown.S \
|
||||
arch-arm64/bionic/_setjmp.S \
|
||||
|
@ -1,17 +1,32 @@
|
||||
# mips specific configs
|
||||
# 32-bit mips.
|
||||
|
||||
# These are shared by all the 32-bit targets, but not the 64-bit ones.
|
||||
libc_common_src_files_mips := \
|
||||
#
|
||||
# Various kinds of LP32 cruft.
|
||||
#
|
||||
|
||||
libc_bionic_src_files_mips += \
|
||||
bionic/mmap.cpp \
|
||||
|
||||
libc_common_src_files_mips += \
|
||||
bionic/legacy_32_bit_support.cpp \
|
||||
bionic/ndk_cruft.cpp \
|
||||
bionic/time64.c \
|
||||
|
||||
libc_netbsd_src_files_mips += \
|
||||
upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
|
||||
|
||||
libc_openbsd_src_files_mips += \
|
||||
upstream-openbsd/lib/libc/stdio/putw.c \
|
||||
|
||||
# These are shared by all the 32-bit targets, but not the 64-bit ones.
|
||||
libc_bionic_src_files_mips += \
|
||||
bionic/mmap.cpp
|
||||
#
|
||||
# Default implementations of functions that are commonly optimized.
|
||||
#
|
||||
|
||||
libc_common_src_files_mips += \
|
||||
libc_bionic_src_files_mips += \
|
||||
bionic/__memcpy_chk.cpp \
|
||||
bionic/__memset_chk.cpp \
|
||||
bionic/__strcpy_chk.cpp \
|
||||
bionic/__strcat_chk.cpp \
|
||||
bionic/memchr.c \
|
||||
bionic/memcmp.c \
|
||||
bionic/memmove.c \
|
||||
@ -19,6 +34,8 @@ libc_common_src_files_mips += \
|
||||
bionic/strchr.cpp \
|
||||
bionic/strnlen.c \
|
||||
bionic/strrchr.cpp \
|
||||
|
||||
libc_freebsd_src_files_mips += \
|
||||
upstream-freebsd/lib/libc/string/wcscat.c \
|
||||
upstream-freebsd/lib/libc/string/wcschr.c \
|
||||
upstream-freebsd/lib/libc/string/wcscmp.c \
|
||||
@ -27,6 +44,8 @@ libc_common_src_files_mips += \
|
||||
upstream-freebsd/lib/libc/string/wcsrchr.c \
|
||||
upstream-freebsd/lib/libc/string/wmemcmp.c \
|
||||
upstream-freebsd/lib/libc/string/wmemmove.c \
|
||||
|
||||
libc_openbsd_src_files_mips += \
|
||||
upstream-openbsd/lib/libc/string/bcopy.c \
|
||||
upstream-openbsd/lib/libc/string/stpcpy.c \
|
||||
upstream-openbsd/lib/libc/string/stpncpy.c \
|
||||
@ -39,16 +58,10 @@ libc_common_src_files_mips += \
|
||||
upstream-openbsd/lib/libc/string/strncmp.c \
|
||||
upstream-openbsd/lib/libc/string/strncpy.c \
|
||||
|
||||
# Fortify implementations of libc functions.
|
||||
libc_common_src_files_mips += \
|
||||
bionic/__memcpy_chk.cpp \
|
||||
bionic/__memset_chk.cpp \
|
||||
bionic/__strcpy_chk.cpp \
|
||||
bionic/__strcat_chk.cpp \
|
||||
#
|
||||
# Inherently architecture-specific code.
|
||||
#
|
||||
|
||||
|
||||
##########################################
|
||||
### CPU specific source files
|
||||
libc_bionic_src_files_mips += \
|
||||
arch-mips/bionic/__bionic_clone.S \
|
||||
arch-mips/bionic/bzero.S \
|
||||
@ -69,13 +82,12 @@ libc_bionic_src_files_mips += \
|
||||
else
|
||||
libc_bionic_src_files_mips += \
|
||||
bionic/memcpy.cpp \
|
||||
bionic/memset.c
|
||||
libc_common_src_files_mips += \
|
||||
upstream-openbsd/lib/libc/string/strlen.c
|
||||
endif
|
||||
bionic/memset.c \
|
||||
|
||||
libc_netbsd_src_files_mips := \
|
||||
upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
|
||||
libc_openbsd_src_files_mips += \
|
||||
upstream-openbsd/lib/libc/string/strlen.c \
|
||||
|
||||
endif
|
||||
|
||||
libc_crt_target_cflags_mips := \
|
||||
$($(my_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS) \
|
||||
|
@ -1,13 +1,25 @@
|
||||
# mips64 specific configs
|
||||
# 64-bit mips.
|
||||
|
||||
libc_common_src_files_mips64 := \
|
||||
#
|
||||
# Default implementations of functions that are commonly optimized.
|
||||
#
|
||||
|
||||
libc_bionic_src_files_mips64 += \
|
||||
bionic/__memcpy_chk.cpp \
|
||||
bionic/__memset_chk.cpp \
|
||||
bionic/__strcpy_chk.cpp \
|
||||
bionic/__strcat_chk.cpp \
|
||||
bionic/memchr.c \
|
||||
bionic/memcmp.c \
|
||||
bionic/memcpy.cpp \
|
||||
bionic/memmove.c \
|
||||
bionic/memrchr.c \
|
||||
bionic/memset.c \
|
||||
bionic/strchr.cpp \
|
||||
bionic/strnlen.c \
|
||||
bionic/strrchr.cpp \
|
||||
|
||||
libc_freebsd_src_files_mips64 += \
|
||||
upstream-freebsd/lib/libc/string/wcscat.c \
|
||||
upstream-freebsd/lib/libc/string/wcschr.c \
|
||||
upstream-freebsd/lib/libc/string/wcscmp.c \
|
||||
@ -16,6 +28,8 @@ libc_common_src_files_mips64 := \
|
||||
upstream-freebsd/lib/libc/string/wcsrchr.c \
|
||||
upstream-freebsd/lib/libc/string/wmemcmp.c \
|
||||
upstream-freebsd/lib/libc/string/wmemmove.c \
|
||||
|
||||
libc_openbsd_src_files_mips64 += \
|
||||
upstream-openbsd/lib/libc/string/stpcpy.c \
|
||||
upstream-openbsd/lib/libc/string/stpncpy.c \
|
||||
upstream-openbsd/lib/libc/string/strcat.c \
|
||||
@ -28,17 +42,11 @@ libc_common_src_files_mips64 := \
|
||||
upstream-openbsd/lib/libc/string/strncmp.c \
|
||||
upstream-openbsd/lib/libc/string/strncpy.c \
|
||||
|
||||
# Fortify implementations of libc functions.
|
||||
libc_common_src_files_mips64 += \
|
||||
bionic/__memcpy_chk.cpp \
|
||||
bionic/__memset_chk.cpp \
|
||||
bionic/__strcpy_chk.cpp \
|
||||
bionic/__strcat_chk.cpp \
|
||||
#
|
||||
# Inherently architecture-specific code.
|
||||
#
|
||||
|
||||
|
||||
##########################################
|
||||
### CPU specific source files
|
||||
libc_bionic_src_files_mips64 := \
|
||||
libc_bionic_src_files_mips64 += \
|
||||
arch-mips64/bionic/__bionic_clone.S \
|
||||
arch-mips64/bionic/_exit_with_stack_teardown.S \
|
||||
arch-mips64/bionic/__get_sp.S \
|
||||
@ -48,25 +56,18 @@ libc_bionic_src_files_mips64 := \
|
||||
arch-mips64/bionic/syscall.S \
|
||||
arch-mips64/bionic/vfork.S \
|
||||
|
||||
# FIXME TODO
|
||||
## libc_bionic_src_files_mips64 += arch-mips64/string/memcpy.S
|
||||
## libc_bionic_src_files_mips64 += arch-mips64/string/memset.S
|
||||
libc_bionic_src_files_mips64 += bionic/memcpy.cpp
|
||||
libc_bionic_src_files_mips64 += bionic/memset.c
|
||||
|
||||
|
||||
libc_crt_target_cflags_mips64 := \
|
||||
$($(my_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS) \
|
||||
-I$(LOCAL_PATH)/arch-mips64/include
|
||||
-I$(LOCAL_PATH)/arch-mips64/include \
|
||||
|
||||
libc_crt_target_crtbegin_file_mips64 := \
|
||||
$(LOCAL_PATH)/arch-mips64/bionic/crtbegin.c
|
||||
$(LOCAL_PATH)/arch-mips64/bionic/crtbegin.c \
|
||||
|
||||
libc_crt_target_crtbegin_so_file_mips64 := \
|
||||
$(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c
|
||||
$(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c \
|
||||
|
||||
libc_crt_target_so_cflags_mips64 := \
|
||||
-fPIC
|
||||
-fPIC \
|
||||
|
||||
libc_crt_target_ldflags_mips64 := \
|
||||
-melf64ltsmip
|
||||
-melf64ltsmip \
|
||||
|
@ -1,27 +1,40 @@
|
||||
# x86 specific configs
|
||||
# 32-bit x86.
|
||||
|
||||
# These are shared by all the 32-bit targets, but not the 64-bit ones.
|
||||
libc_common_src_files_x86 := \
|
||||
#
|
||||
# Various kinds of LP32 cruft.
|
||||
#
|
||||
|
||||
libc_bionic_src_files_x86 += \
|
||||
bionic/mmap.cpp \
|
||||
|
||||
libc_common_src_files_x86 += \
|
||||
bionic/legacy_32_bit_support.cpp \
|
||||
bionic/ndk_cruft.cpp \
|
||||
bionic/time64.c \
|
||||
|
||||
libc_netbsd_src_files_x86 += \
|
||||
upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
|
||||
|
||||
libc_openbsd_src_files_x86 += \
|
||||
upstream-openbsd/lib/libc/stdio/putw.c \
|
||||
|
||||
# Fortify implementations of libc functions.
|
||||
#
|
||||
# Default implementations of functions that are commonly optimized.
|
||||
#
|
||||
|
||||
libc_common_src_files_x86 += \
|
||||
bionic/__memcpy_chk.cpp \
|
||||
bionic/__memset_chk.cpp \
|
||||
bionic/__strcpy_chk.cpp \
|
||||
bionic/__strcat_chk.cpp \
|
||||
|
||||
libc_freebsd_src_files_x86 += \
|
||||
upstream-freebsd/lib/libc/string/wmemmove.c \
|
||||
|
||||
#
|
||||
# Inherently architecture-specific functions.
|
||||
#
|
||||
|
||||
# These are shared by all the 32-bit targets, but not the 64-bit ones.
|
||||
libc_bionic_src_files_x86 := \
|
||||
bionic/mmap.cpp
|
||||
|
||||
##########################################
|
||||
### CPU specific source files
|
||||
libc_bionic_src_files_x86 += \
|
||||
arch-x86/bionic/__bionic_clone.S \
|
||||
arch-x86/bionic/_exit_with_stack_teardown.S \
|
||||
@ -42,9 +55,6 @@ endif
|
||||
include $(arch_variant_mk)
|
||||
libc_common_additional_dependencies += $(arch_variant_mk)
|
||||
|
||||
libc_netbsd_src_files_x86 := \
|
||||
upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
|
||||
|
||||
arch_variant_mk :=
|
||||
|
||||
libc_crt_target_cflags_x86 := \
|
||||
|
@ -1,11 +1,21 @@
|
||||
# x86_64 specific configs
|
||||
# 64-bit x86.
|
||||
|
||||
libc_common_src_files_x86_64 := \
|
||||
#
|
||||
# Default implementations of functions that are commonly optimized.
|
||||
#
|
||||
|
||||
libc_bionic_src_files_x86_64 += \
|
||||
bionic/__memcpy_chk.cpp \
|
||||
bionic/__memset_chk.cpp \
|
||||
bionic/__strcpy_chk.cpp \
|
||||
bionic/__strcat_chk.cpp \
|
||||
bionic/memchr.c \
|
||||
bionic/memrchr.c \
|
||||
bionic/strchr.cpp \
|
||||
bionic/strnlen.c \
|
||||
bionic/strrchr.cpp \
|
||||
|
||||
libc_freebsd_src_files_x86_64 += \
|
||||
upstream-freebsd/lib/libc/string/wcscat.c \
|
||||
upstream-freebsd/lib/libc/string/wcschr.c \
|
||||
upstream-freebsd/lib/libc/string/wcscmp.c \
|
||||
@ -14,20 +24,16 @@ libc_common_src_files_x86_64 := \
|
||||
upstream-freebsd/lib/libc/string/wcsrchr.c \
|
||||
upstream-freebsd/lib/libc/string/wmemcmp.c \
|
||||
upstream-freebsd/lib/libc/string/wmemmove.c \
|
||||
|
||||
libc_openbsd_src_files_x86_64 += \
|
||||
upstream-openbsd/lib/libc/string/strlcat.c \
|
||||
upstream-openbsd/lib/libc/string/strlcpy.c \
|
||||
|
||||
# Fortify implementations of libc functions.
|
||||
libc_common_src_files_x86_64 += \
|
||||
bionic/__memcpy_chk.cpp \
|
||||
bionic/__memset_chk.cpp \
|
||||
bionic/__strcpy_chk.cpp \
|
||||
bionic/__strcat_chk.cpp \
|
||||
#
|
||||
# Inherently architecture-specific code.
|
||||
#
|
||||
|
||||
|
||||
##########################################
|
||||
### CPU specific source files
|
||||
libc_bionic_src_files_x86_64 := \
|
||||
libc_bionic_src_files_x86_64 += \
|
||||
arch-x86_64/bionic/__bionic_clone.S \
|
||||
arch-x86_64/bionic/_exit_with_stack_teardown.S \
|
||||
arch-x86_64/bionic/__restore_rt.S \
|
||||
@ -38,6 +44,10 @@ libc_bionic_src_files_x86_64 := \
|
||||
arch-x86_64/bionic/syscall.S \
|
||||
arch-x86_64/bionic/vfork.S \
|
||||
|
||||
#
|
||||
# Optimized memory/string functions.
|
||||
#
|
||||
|
||||
libc_bionic_src_files_x86_64 += \
|
||||
arch-x86_64/string/sse2-memcpy-slm.S \
|
||||
arch-x86_64/string/sse2-memmove-slm.S \
|
||||
@ -55,15 +65,15 @@ libc_bionic_src_files_x86_64 += \
|
||||
|
||||
libc_crt_target_cflags_x86_64 += \
|
||||
-m64 \
|
||||
-I$(LOCAL_PATH)/arch-x86_64/include
|
||||
-I$(LOCAL_PATH)/arch-x86_64/include \
|
||||
|
||||
libc_crt_target_ldflags_x86_64 := -melf_x86_64
|
||||
libc_crt_target_ldflags_x86_64 := -melf_x86_64 \
|
||||
|
||||
libc_crt_target_crtbegin_file_x86_64 := \
|
||||
$(LOCAL_PATH)/arch-common/bionic/crtbegin.c
|
||||
$(LOCAL_PATH)/arch-common/bionic/crtbegin.c \
|
||||
|
||||
libc_crt_target_crtbegin_so_file_x86_64 := \
|
||||
$(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c
|
||||
$(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c \
|
||||
|
||||
libc_crt_target_so_cflags_x86_64 := \
|
||||
-fPIC
|
||||
-fPIC \
|
||||
|
Loading…
x
Reference in New Issue
Block a user