OSDN Git Service

Fix a few libc makefile mishaps.
authorChristopher Ferris <cferris@google.com>
Fri, 5 Jun 2015 02:24:07 +0000 (19:24 -0700)
committerChristopher Ferris <cferris@google.com>
Fri, 5 Jun 2015 02:40:50 +0000 (19:40 -0700)
These are the problems fixed in this CL:

- The ndk_cruft.cpp file was not compiled for 64 bit.
- Some files where not compiled for libc_bionic.a due to a missing
  patch-up-arch-specific-flags call.
- The libc_bionic_ndk.a patch up call was using bionic src, not
  the bionic_ndk_src_files.
- Move mmap.cpp to the ndk src list where it was before because of
  the above errors.

Bug: 21640784
Change-Id: I31e97bc8bf347c8e584cc17aa4b984a7d122b298

libc/Android.mk

index 4dd1086..620f438 100644 (file)
@@ -549,14 +549,16 @@ libc_thread_atexit_impl_src_files := \
 libc_arch_static_src_files := \
     bionic/dl_iterate_phdr_static.cpp \
 
-# Various kinds of LP32 cruft.
+# Various kinds of cruft.
 # ========================================================
-libc_bionic_src_files_32 += \
+libc_common_src_files += \
+    bionic/ndk_cruft.cpp \
+
+libc_bionic_ndk_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 += \
@@ -956,6 +958,7 @@ LOCAL_ADDRESS_SANITIZER := false
 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
 
 $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
+$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_bionic_src_files))
 include $(BUILD_STATIC_LIBRARY)
 
 
@@ -983,7 +986,7 @@ LOCAL_ADDRESS_SANITIZER := false
 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
 
 $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
-$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_bionic_src_files))
+$(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_bionic_ndk_src_files))
 include $(BUILD_STATIC_LIBRARY)
 
 include $(CLEAR_VARS)