diff options
author | Colin Cross <ccross@android.com> | 2015-02-05 01:57:27 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-02-05 01:57:28 +0000 |
commit | da2c0a708ed6c0091f3f89fd8838292579dad800 (patch) | |
tree | 366ffdc2136629ea65b5086c3b3a1bbd3a582c14 | |
parent | 17976019a13a94ae428849bfe297f8e531f95013 (diff) | |
parent | 5b869c0bbf8a2924ab69d86a98e9a25558d33494 (diff) | |
download | bionic-da2c0a708ed6c0091f3f89fd8838292579dad800.zip bionic-da2c0a708ed6c0091f3f89fd8838292579dad800.tar.gz bionic-da2c0a708ed6c0091f3f89fd8838292579dad800.tar.bz2 |
Merge changes Ib87855e8,I4b46ae20,I66364a5c,Id3fcf680
* changes:
Use LOCAL_LDFLAGS_64 instead of enumerating 64-bit architectures
Fix typo in cpu variant makefile depenendency for arm64
Remove libc_static_common_src_files
Share LP32 makefile settings between arches
-rw-r--r-- | libc/Android.mk | 28 | ||||
-rw-r--r-- | libc/arch-arm/arm.mk | 18 | ||||
-rw-r--r-- | libc/arch-arm64/arm64.mk | 2 | ||||
-rw-r--r-- | libc/arch-mips/mips.mk | 18 | ||||
-rw-r--r-- | libc/arch-x86/x86.mk | 18 |
5 files changed, 21 insertions, 63 deletions
diff --git a/libc/Android.mk b/libc/Android.mk index fe7b116..fc4940a 100644 --- a/libc/Android.mk +++ b/libc/Android.mk @@ -516,6 +516,23 @@ libc_upstream_openbsd_src_files := \ libc_arch_static_src_files := \ bionic/dl_iterate_phdr_static.cpp \ +# Various kinds of LP32 cruft. +# ======================================================== +libc_bionic_src_files_32 += \ + bionic/mmap.cpp \ + +libc_common_src_files_32 += \ + bionic/legacy_32_bit_support.cpp \ + bionic/ndk_cruft.cpp \ + bionic/time64.c \ + +libc_netbsd_src_files_32 += \ + upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \ + +libc_openbsd_src_files_32 += \ + upstream-openbsd/lib/libc/stdio/putw.c \ + + # Define some common cflags # ======================================================== libc_common_cflags := \ @@ -572,12 +589,13 @@ libc_common_c_includes += \ $(LOCAL_PATH)/stdio \ # ======================================================== -# Add in the arch-specific flags. +# Add in the arch or 32-bit specific flags # Must be called with $(eval). # $(1): the LOCAL_ variable name # $(2): the bionic variable name to pull in define patch-up-arch-specific-flags $(1)_$(TARGET_ARCH) += $($(2)_$(TARGET_ARCH)) +$(1)_32 += $($(2)_32) ifdef TARGET_2ND_ARCH $(1)_$(TARGET_2ND_ARCH) += $($(2)_$(TARGET_2ND_ARCH)) endif @@ -1035,7 +1053,6 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := \ $(libc_arch_static_src_files) \ - $(libc_static_common_src_files) \ bionic/libc_init_static.cpp LOCAL_C_INCLUDES := $(libc_common_c_includes) @@ -1087,7 +1104,6 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := \ $(libc_arch_static_src_files) \ - $(libc_static_common_src_files) \ bionic/malloc_debug_common.cpp \ bionic/libc_init_static.cpp \ @@ -1122,7 +1138,6 @@ LOCAL_CPPFLAGS := $(libc_common_cppflags) LOCAL_C_INCLUDES := $(libc_common_c_includes) LOCAL_SRC_FILES := \ $(libc_arch_dynamic_src_files) \ - $(libc_static_common_src_files) \ bionic/malloc_debug_common.cpp \ bionic/libc_init_dynamic.cpp \ bionic/NetdClient.cpp \ @@ -1152,13 +1167,10 @@ LOCAL_SYSTEM_SHARED_LIBRARIES := # We'd really like to do this for all architectures, but since this wasn't done # before, these symbols must continue to be exported on LP32 for binary # compatibility. -LOCAL_LDFLAGS_arm64 := -Wl,--exclude-libs,libgcc.a -LOCAL_LDFLAGS_mips64 := -Wl,--exclude-libs,libgcc.a -LOCAL_LDFLAGS_x86_64 := -Wl,--exclude-libs,libgcc.a +LOCAL_LDFLAGS_64 := -Wl,--exclude-libs,libgcc.a $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_dynamic_src_files)) -$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_static_common_src_files)) # special for arm LOCAL_NO_CRT_arm := true LOCAL_CFLAGS_arm += -DCRT_LEGACY_WORKAROUND diff --git a/libc/arch-arm/arm.mk b/libc/arch-arm/arm.mk index f712c4c..60600e5 100644 --- a/libc/arch-arm/arm.mk +++ b/libc/arch-arm/arm.mk @@ -1,24 +1,6 @@ # 32-bit 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 \ - -# # Default implementations of functions that are commonly optimized. # diff --git a/libc/arch-arm64/arm64.mk b/libc/arch-arm64/arm64.mk index ba78871..8418993 100644 --- a/libc/arch-arm64/arm64.mk +++ b/libc/arch-arm64/arm64.mk @@ -59,6 +59,6 @@ ifeq ($(wildcard $(cpu_variant_mk)),) $(error "TARGET_CPU_VARIANT not set or set to an unknown value. Possible values are generic, denver64. Use generic for devices that do not have a CPU similar to any of the supported cpu variants.") endif include $(cpu_variant_mk) -libc_common_additional_dependencies += $(cpu_variank_mk) +libc_common_additional_dependencies += $(cpu_variant_mk) cpu_variant_mk := diff --git a/libc/arch-mips/mips.mk b/libc/arch-mips/mips.mk index 7f36635..7e3fe25 100644 --- a/libc/arch-mips/mips.mk +++ b/libc/arch-mips/mips.mk @@ -1,24 +1,6 @@ # 32-bit 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 \ - -# # Default implementations of functions that are commonly optimized. # diff --git a/libc/arch-x86/x86.mk b/libc/arch-x86/x86.mk index 989690c..e5d70a9 100644 --- a/libc/arch-x86/x86.mk +++ b/libc/arch-x86/x86.mk @@ -1,24 +1,6 @@ # 32-bit 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 \ - -# # Default implementations of functions that are commonly optimized. # |