diff --git a/core/base_rules.mk b/core/base_rules.mk index e87624acb..a6af2bc92 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -135,8 +135,10 @@ endif my_register_name := $(LOCAL_MODULE) ifdef LOCAL_2ND_ARCH_VAR_PREFIX +ifndef LOCAL_NO_2ND_ARCH_MODULE_SUFFIX my_register_name := $(LOCAL_MODULE)$(TARGET_2ND_ARCH_MODULE_SUFFIX) endif +endif # Make sure that this IS_HOST/CLASS/MODULE combination is unique. module_id := MODULE.$(if \ $(LOCAL_IS_HOST_MODULE),HOST,TARGET).$(LOCAL_MODULE_CLASS).$(my_register_name) @@ -595,7 +597,7 @@ ALL_MODULES.$(my_register_name).BUILT := \ ALL_MODULES.$(my_register_name).INSTALLED := \ $(strip $(ALL_MODULES.$(my_register_name).INSTALLED) $(LOCAL_INSTALLED_MODULE)) ALL_MODULES.$(my_register_name).REQUIRED := \ - $(ALL_MODULES.$(my_register_name).REQUIRED) $(LOCAL_REQUIRED_MODULES) + $(ALL_MODULES.$(my_register_name).REQUIRED) $(LOCAL_REQUIRED_MODULES) $(LOCAL_REQUIRED_MODULES_$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) ALL_MODULES.$(my_register_name).EVENT_LOG_TAGS := \ $(ALL_MODULES.$(my_register_name).EVENT_LOG_TAGS) $(event_log_tags) ALL_MODULES.$(my_register_name).INTERMEDIATE_SOURCE_DIR := \ diff --git a/core/binary.mk b/core/binary.mk index 957cdc497..3dad049c2 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -86,8 +86,9 @@ include $(BUILD_SYSTEM)/base_rules.mk # Because the same LOCAL_ variables may be used to define modules for both 1st arch and 2nd arch, # we can't modify them in place. my_src_files := $(LOCAL_SRC_FILES) $(LOCAL_SRC_FILES_$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) -my_static_libraries := $(LOCAL_STATIC_LIBRARIES) -my_shared_libraries := $(LOCAL_SHARED_LIBRARIES) +my_static_libraries := $(LOCAL_STATIC_LIBRARIES_$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) $(LOCAL_STATIC_LIBRARIES) +my_whole_static_libraries := $(LOCAL_WHOLE_STATIC_LIBRARIES) $(LOCAL_WHOLE_STATIC_LIBRARIES_$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) +my_shared_libraries := $(LOCAL_SHARED_LIBRARIES) $(LOCAL_SHARED_LIBRARIES_$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) my_32_64_bit_suffix := $(if $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_IS_64_BIT),64,32) my_cflags := $(LOCAL_CFLAGS) $(LOCAL_CFLAGS_$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) $(LOCAL_CFLAGS_$(my_32_64_bit_suffix)) my_cppflags := $(LOCAL_CPPFLAGS) @@ -96,7 +97,7 @@ my_asflags := $(LOCAL_ASFLAGS) $(LOCAL_ASFLAGS_$(TARGET_$(LOCAL_2ND_ARCH_VAR_PRE my_cc := $(LOCAL_CC) my_cxx := $(LOCAL_CXX) my_c_includes := $(LOCAL_C_INCLUDES) $(LOCAL_C_INCLUDES_$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) $(LOCAL_C_INCLUDES_$(my_32_64_bit_suffix)) -my_generated_sources := $(LOCAL_GENERATED_SOURCES) +my_generated_sources := $(LOCAL_GENERATED_SOURCES) $(LOCAL_GENERATED_SOURCES_$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) my_cflags := $(filter-out $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_UNSUPPORTED_CFLAGS),$(my_cflags)) @@ -652,7 +653,7 @@ import_includes := $(intermediates)/import_includes import_includes_deps := $(strip \ $(foreach l, $(installed_shared_library_module_names), \ $(call intermediates-dir-for,SHARED_LIBRARIES,$(l),$(LOCAL_IS_HOST_MODULE),,$(LOCAL_2ND_ARCH_VAR_PREFIX))/export_includes) \ - $(foreach l, $(my_static_libraries) $(LOCAL_WHOLE_STATIC_LIBRARIES), \ + $(foreach l, $(my_static_libraries) $(my_whole_static_libraries), \ $(call intermediates-dir-for,STATIC_LIBRARIES,$(l),$(LOCAL_IS_HOST_MODULE),,$(LOCAL_2ND_ARCH_VAR_PREFIX))/export_includes)) $(import_includes) : $(import_includes_deps) @echo Import includes file: $@ @@ -771,7 +772,7 @@ built_static_libraries += $(my_ndk_stl_static_lib) endif built_whole_libraries := \ - $(foreach lib,$(LOCAL_WHOLE_STATIC_LIBRARIES), \ + $(foreach lib,$(my_whole_static_libraries), \ $(call intermediates-dir-for, \ STATIC_LIBRARIES,$(lib),$(LOCAL_IS_HOST_MODULE),,$(LOCAL_2ND_ARCH_VAR_PREFIX))/$(lib)$(a_suffix)) @@ -781,7 +782,7 @@ built_whole_libraries := \ # libraries that we use. (see notice_files.mk) installed_static_library_notice_file_targets := \ - $(foreach lib,$(my_static_libraries) $(LOCAL_WHOLE_STATIC_LIBRARIES), \ + $(foreach lib,$(my_static_libraries) $(my_whole_static_libraries), \ NOTICE-$(if $(LOCAL_IS_HOST_MODULE),HOST,TARGET)-STATIC_LIBRARIES-$(lib)) # Default is -fno-rtti. diff --git a/core/clear_vars.mk b/core/clear_vars.mk index f884b194c..0f6308cfc 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -153,6 +153,11 @@ LOCAL_C_INCLUDES_$(TARGET_ARCH):= LOCAL_ASFLAGS_$(TARGET_ARCH):= LOCAL_NO_CRT_$(TARGET_ARCH):= LOCAL_LDFLAGS_$(TARGET_ARCH):= +LOCAL_SHARED_LIBRARIES_$(TARGET_ARCH):= +LOCAL_STATIC_LIBRARIES_$(TARGET_ARCH):= +LOCAL_WHOLE_STATIC_LIBRARIES_$(TARGET_ARCH):= +LOCAL_GENERATED_SOURCES_$(TARGET_ARCH):= +LOCAL_REQUIRED_MODULES_$(TARGET_ARCH):= ifdef TARGET_2ND_ARCH LOCAL_SRC_FILES_$(TARGET_2ND_ARCH):= LOCAL_CFLAGS_$(TARGET_2ND_ARCH):= @@ -160,6 +165,11 @@ LOCAL_C_INCLUDES_$(TARGET_2ND_ARCH):= LOCAL_ASFLAGS_$(TARGET_2ND_ARCH):= LOCAL_NO_CRT_$(TARGET_2ND_ARCH):= LOCAL_LDFLAGS_$(TARGET_2ND_ARCH):= +LOCAL_SHARED_LIBRARIES_$(TARGET_2ND_ARCH):= +LOCAL_STATIC_LIBRARIES_$(TARGET_2ND_ARCH):= +LOCAL_WHOLE_STATIC_LIBRARIES_$(TARGET_2ND_ARCH):= +LOCAL_GENERATED_SOURCES_$(TARGET_2ND_ARCH):= +LOCAL_REQUIRED_MODULES_$(TARGET_2ND_ARCH):= endif LOCAL_CFLAGS_32:= diff --git a/core/combo/arch/arm/armv7-a-neon.mk b/core/combo/arch/arm/armv7-a-neon.mk index 53d9220ad..110533033 100644 --- a/core/combo/arch/arm/armv7-a-neon.mk +++ b/core/combo/arch/arm/armv7-a-neon.mk @@ -1,10 +1,10 @@ # Configuration for Linux on ARM. # Generating binaries for the ARMv7-a architecture and higher with NEON # -$(combo_2nd_arch_prefix)ARCH_ARM_HAVE_ARMV7A := true -$(combo_2nd_arch_prefix)ARCH_ARM_HAVE_VFP := true -$(combo_2nd_arch_prefix)ARCH_ARM_HAVE_VFP_D32 := true -$(combo_2nd_arch_prefix)ARCH_ARM_HAVE_NEON := true +ARCH_ARM_HAVE_ARMV7A := true +ARCH_ARM_HAVE_VFP := true +ARCH_ARM_HAVE_VFP_D32 := true +ARCH_ARM_HAVE_NEON := true ifeq ($(TARGET_CPU_VARIANT),$(filter $(TARGET_CPU_VARIANT),cortex-a15 krait)) arch_variant_cflags := -mcpu=cortex-a15 diff --git a/core/combo/arch/arm/armv7-a.mk b/core/combo/arch/arm/armv7-a.mk index 9549478a5..4a519770f 100644 --- a/core/combo/arch/arm/armv7-a.mk +++ b/core/combo/arch/arm/armv7-a.mk @@ -1,8 +1,8 @@ # Configuration for Linux on ARM. # Generating binaries for the ARMv7-a architecture and higher # -$(combo_2nd_arch_prefix)ARCH_ARM_HAVE_ARMV7A := true -$(combo_2nd_arch_prefix)ARCH_ARM_HAVE_VFP := true +ARCH_ARM_HAVE_ARMV7A := true +ARCH_ARM_HAVE_VFP := true # Note: Hard coding the 'tune' value here is probably not ideal, # and a better solution should be found in the future. diff --git a/core/executable.mk b/core/executable.mk index 22884b8ef..6d8734eb0 100644 --- a/core/executable.mk +++ b/core/executable.mk @@ -9,5 +9,7 @@ else LOCAL_2ND_ARCH_VAR_PREFIX := endif +LOCAL_NO_2ND_ARCH_MODULE_SUFFIX := true include $(BUILD_SYSTEM)/executable_internal.mk LOCAL_2ND_ARCH_VAR_PREFIX := +LOCAL_NO_2ND_ARCH_MODULE_SUFFIX :=