Merge "Revert "Enable linker -fix-cortex-a53-843419""
diff --git a/core/clang/config.mk b/core/clang/config.mk
index 13a5ba1..3bc7b56 100644
--- a/core/clang/config.mk
+++ b/core/clang/config.mk
@@ -49,6 +49,11 @@
CLANG_CONFIG_EXTRA_CFLAGS += \
-Wno-reserved-id-macro
+# Disable overly aggressive warning for format strings.
+# Bug: 20148343
+CLANG_CONFIG_EXTRA_CFLAGS += \
+ -Wno-format-pedantic
+
# Workaround for ccache with clang.
# See http://petereisentraut.blogspot.com/2011/05/ccache-and-clang.html.
CLANG_CONFIG_EXTRA_CFLAGS += \
diff --git a/core/combo/HOST_darwin-x86.mk b/core/combo/HOST_darwin-x86.mk
index 7fa48ff..8389bb8 100644
--- a/core/combo/HOST_darwin-x86.mk
+++ b/core/combo/HOST_darwin-x86.mk
@@ -56,12 +56,6 @@
$(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += \
-include $(call select-android-config-h,darwin-x86)
-ifneq ($(filter 10.7 10.7.% 10.8 10.8.%, $(build_mac_version)),)
- $(combo_2nd_arch_prefix)HOST_RUN_RANLIB_AFTER_COPYING := false
-else
- $(combo_2nd_arch_prefix)HOST_RUN_RANLIB_AFTER_COPYING := true
- PRE_LION_DYNAMIC_LINKER_OPTIONS := -Wl,-dynamic
-endif
$(combo_2nd_arch_prefix)HOST_GLOBAL_ARFLAGS := cqs
############################################################
@@ -91,7 +85,7 @@
$(hide) $(PRIVATE_CXX) \
-Wl,-rpath,@loader_path/../$(notdir $($(PRIVATE_2ND_ARCH_VAR_PREFIX)HOST_OUT_SHARED_LIBRARIES)) \
-o $@ \
- $(PRE_LION_DYNAMIC_LINKER_OPTIONS) -Wl,-headerpad_max_install_names \
+ -Wl,-headerpad_max_install_names \
$($(PRIVATE_2ND_ARCH_VAR_PREFIX)HOST_GLOBAL_LD_DIRS) \
$(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
$(PRIVATE_HOST_GLOBAL_LDFLAGS) \
diff --git a/core/combo/HOST_darwin-x86_64.mk b/core/combo/HOST_darwin-x86_64.mk
index c06933d..0efa78f 100644
--- a/core/combo/HOST_darwin-x86_64.mk
+++ b/core/combo/HOST_darwin-x86_64.mk
@@ -55,11 +55,6 @@
HOST_GLOBAL_CFLAGS += \
-include $(call select-android-config-h,darwin-x86)
-ifneq ($(filter 10.7 10.7.% 10.8 10.8.%, $(build_mac_version)),)
- HOST_RUN_RANLIB_AFTER_COPYING := false
-else
- HOST_RUN_RANLIB_AFTER_COPYING := true
-endif
HOST_GLOBAL_ARFLAGS := cqs
# We Reuse the following functions with the same name from HOST_darwin-x86.mk:
diff --git a/core/combo/arch/arm/armv7-a-neon.mk b/core/combo/arch/arm/armv7-a-neon.mk
index d535afc..99f17aa 100644
--- a/core/combo/arch/arm/armv7-a-neon.mk
+++ b/core/combo/arch/arm/armv7-a-neon.mk
@@ -16,14 +16,23 @@
# Fake an ARM compiler flag as these processors support LPAE which GCC/clang
# don't advertise.
arch_variant_cflags += -D__ARM_FEATURE_LPAE=1
+ arch_variant_ldflags := \
+ -Wl,--no-fix-cortex-a8
else
ifeq ($(strip $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT)),cortex-a8)
arch_variant_cflags := -mcpu=cortex-a8
+ arch_variant_ldflags := \
+ -Wl,--fix-cortex-a8
else
ifeq ($(strip $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT)),cortex-a7)
arch_variant_cflags := -mcpu=cortex-a7
+ arch_variant_ldflags := \
+ -Wl,--no-fix-cortex-a8
else
arch_variant_cflags := -march=armv7-a
+ # Generic ARM might be a Cortex A8 -- better safe than sorry
+ arch_variant_ldflags := \
+ -Wl,--fix-cortex-a8
endif
endif
endif
@@ -31,6 +40,3 @@
arch_variant_cflags += \
-mfloat-abi=softfp \
-mfpu=neon
-
-arch_variant_ldflags := \
- -Wl,--fix-cortex-a8
diff --git a/core/definitions.mk b/core/definitions.mk
index e56e0db..4f0daae 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -2091,32 +2091,6 @@
$(hide) mkdir -p $(dir $(3)/$(s)); cp -Rf $(t) $(3)/$(s)$(newline))
endef
-###########################################################
-## On some platforms (MacOS), after copying a static
-## library, ranlib must be run to update an internal
-## timestamp!?!?!
-###########################################################
-
-ifeq ($(HOST_RUN_RANLIB_AFTER_COPYING),true)
-define transform-host-ranlib-copy-hack
- $(hide) ranlib $@ || true
-endef
-else
-define transform-host-ranlib-copy-hack
-@true
-endef
-endif
-
-ifeq ($(TARGET_RUN_RANLIB_AFTER_COPYING),true)
-define transform-ranlib-copy-hack
- $(hide) ranlib $@
-endef
-else
-define transform-ranlib-copy-hack
-@true
-endef
-endif
-
###########################################################
## Commands to call Proguard
diff --git a/core/dex_preopt_libart.mk b/core/dex_preopt_libart.mk
index fb62e0c..6f598be 100644
--- a/core/dex_preopt_libart.mk
+++ b/core/dex_preopt_libart.mk
@@ -105,7 +105,7 @@
--instruction-set=$($(PRIVATE_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH) \
--instruction-set-variant=$($(PRIVATE_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_CPU_VARIANT) \
--instruction-set-features=$($(PRIVATE_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) \
- --include-patch-information --runtime-arg -Xnorelocate --no-include-debug-symbols \
+ --include-patch-information --runtime-arg -Xnorelocate --no-include-debug-symbols --no-include-cfi \
--abort-on-hard-verifier-error \
$(PRIVATE_DEX_PREOPT_FLAGS)
endef
diff --git a/core/dex_preopt_libart_boot.mk b/core/dex_preopt_libart_boot.mk
index 2569d73..cfc7653 100644
--- a/core/dex_preopt_libart_boot.mk
+++ b/core/dex_preopt_libart_boot.mk
@@ -62,5 +62,5 @@
--instruction-set=$($(PRIVATE_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH) \
--instruction-set-variant=$($(PRIVATE_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_CPU_VARIANT) \
--instruction-set-features=$($(PRIVATE_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) \
- --android-root=$(PRODUCT_OUT)/system --include-patch-information --runtime-arg -Xnorelocate --no-include-debug-symbols \
+ --android-root=$(PRODUCT_OUT)/system --include-patch-information --runtime-arg -Xnorelocate --no-include-debug-symbols --no-include-cfi \
$(PRODUCT_DEX_PREOPT_BOOT_FLAGS) $(COMPILED_CLASSES_FLAGS)
diff --git a/core/host_shared_library.mk b/core/host_shared_library.mk
index 438a9ce..e840780 100644
--- a/core/host_shared_library.mk
+++ b/core/host_shared_library.mk
@@ -6,8 +6,8 @@
ifeq ($(HOST_PREFER_32_BIT),true)
my_module_multilib := 32
else
-# By default we only build host module for the first arch.
-my_module_multilib := first
+# libraries default to building for both architecturess
+my_module_multilib := both
endif
endif
endif
diff --git a/core/host_static_library.mk b/core/host_static_library.mk
index 74ac2ea..52c42ef 100644
--- a/core/host_static_library.mk
+++ b/core/host_static_library.mk
@@ -6,8 +6,8 @@
ifeq ($(HOST_PREFER_32_BIT),true)
my_module_multilib := 32
else
-# By default we only build host module for the first arch.
-my_module_multilib := first
+# libraries default to building for both architecturess
+my_module_multilib := both
endif
endif
endif
diff --git a/core/prebuilt_internal.mk b/core/prebuilt_internal.mk
index 47e21ef..d544619 100644
--- a/core/prebuilt_internal.mk
+++ b/core/prebuilt_internal.mk
@@ -256,13 +256,6 @@
else
$(built_module) : $(my_prebuilt_src_file) | $(ACP)
$(transform-prebuilt-to-target)
-ifneq ($(prebuilt_module_is_a_library),)
- ifneq ($(LOCAL_IS_HOST_MODULE),)
- $(transform-host-ranlib-copy-hack)
- else
- $(transform-ranlib-copy-hack)
- endif
-endif
endif
endif # LOCAL_MODULE_CLASS != APPS
diff --git a/target/product/embedded.mk b/target/product/embedded.mk
index 96c0b77..a408860 100644
--- a/target/product/embedded.mk
+++ b/target/product/embedded.mk
@@ -25,6 +25,7 @@
debuggerd \
dumpstate \
dumpsys \
+ fastboot \
gralloc.default \
grep \
gzip \
diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py
index 26fbaf0..21565fc 100755
--- a/tools/releasetools/ota_from_target_files.py
+++ b/tools/releasetools/ota_from_target_files.py
@@ -556,6 +556,10 @@
else if get_stage("%(bcb_dev)s") == "3/3" then
""" % bcb_dev)
+ # Dump fingerprints
+ script.Print("Target: %s" % CalculateFingerprint(
+ oem_props, oem_dict, OPTIONS.info_dict))
+
device_specific.FullOTA_InstallBegin()
system_progress = 0.75
@@ -731,6 +735,12 @@
metadata=metadata,
info_dict=OPTIONS.info_dict)
+ # TODO: Currently this works differently from WriteIncrementalOTAPackage().
+ # This function doesn't consider thumbprints when writing
+ # metadata["pre/post-build"]. One possible reason is that the current
+ # devices with thumbprints are all using file-based OTAs. Long term we
+ # should factor out the common parts into a shared one to avoid further
+ # divergence.
source_fp = GetBuildProp("ro.build.fingerprint", OPTIONS.source_info_dict)
target_fp = GetBuildProp("ro.build.fingerprint", OPTIONS.target_info_dict)
metadata["pre-build"] = source_fp
@@ -828,6 +838,12 @@
else if get_stage("%(bcb_dev)s") != "3/3" then
""" % bcb_dev)
+ # Dump fingerprints
+ script.Print("Source: %s" % CalculateFingerprint(
+ oem_props, oem_dict, OPTIONS.source_info_dict))
+ script.Print("Target: %s" % CalculateFingerprint(
+ oem_props, oem_dict, OPTIONS.target_info_dict))
+
script.Print("Verifying current system...")
device_specific.IncrementalOTA_VerifyBegin()
@@ -1206,6 +1222,10 @@
else if get_stage("%(bcb_dev)s") != "3/3" then
""" % bcb_dev)
+ # Dump fingerprints
+ script.Print("Source: %s" % (source_fp,))
+ script.Print("Target: %s" % (target_fp,))
+
script.Print("Verifying current system...")
device_specific.IncrementalOTA_VerifyBegin()