Merge "Inject boot patch level into boot-debug.img"
diff --git a/core/Makefile b/core/Makefile
index 5c16465..e9cd51f 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1172,7 +1172,7 @@
 .PHONY: notice_files
 
 # Create the rule to combine the files into text and html/xml forms
-# $(1) - xml_excluded_vendor_product|xml_vendor|xml_product|html
+# $(1) - xml_excluded_vendor_product|xml_vendor|xml_product|xml_odm|html
 # $(2) - Plain text output file
 # $(3) - HTML/XML output file
 # $(4) - File title
@@ -1197,11 +1197,12 @@
 $(2) : $(3)
 $(3) : $(6) $(BUILD_SYSTEM)/Makefile build/make/tools/generate-notice-files.py
 	build/make/tools/generate-notice-files.py --text-output $(2) \
-	    $(if $(filter $(1),xml_excluded_extra_partitions),-e vendor -e product -e system_ext --xml-output, \
+	    $(if $(filter $(1),xml_excluded_extra_partitions),-e vendor -e product -e system_ext -e odm --xml-output, \
 	      $(if $(filter $(1),xml_vendor),-i vendor --xml-output, \
 	        $(if $(filter $(1),xml_product),-i product --xml-output, \
 	          $(if $(filter $(1),xml_system_ext),-i system_ext --xml-output, \
-	            --html-output)))) $(3) \
+	            $(if $(filter $(1),xml_odm),-i odm --xml-output, \
+	              --html-output))))) $(3) \
 	    -t $$(PRIVATE_MESSAGE) -s $$(PRIVATE_DIR)/src
 notice_files: $(2) $(3)
 endef
@@ -1254,6 +1255,11 @@
 target_system_ext_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_SYSTEM_EXT.xml.gz
 installed_system_ext_notice_xml_gz := $(TARGET_OUT_SYSTEM_EXT)/etc/NOTICE.xml.gz
 
+target_odm_notice_file_txt := $(TARGET_OUT_INTERMEDIATES)/NOTICE_ODM.txt
+target_odm_notice_file_xml := $(TARGET_OUT_INTERMEDIATES)/NOTICE_ODM.xml
+target_odm_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_ODM.xml.gz
+installed_odm_notice_xml_gz := $(TARGET_OUT_ODM)/etc/NOTICE.xml.gz
+
 # Notice files are copied to TARGET_OUT_NOTICE_FILES as a side-effect of their module
 # being built. A notice xml file must depend on all modules that could potentially
 # install a license file relevant to it.
@@ -1265,7 +1271,11 @@
 license_modules_vendor := $(filter $(TARGET_OUT_VENDOR)/%,$(license_modules))
 license_modules_product := $(filter $(TARGET_OUT_PRODUCT)/%,$(license_modules))
 license_modules_system_ext := $(filter $(TARGET_OUT_SYSTEM_EXT)/%,$(license_modules))
-license_modules_agg := $(license_modules_vendor) $(license_modules_product) $(license_modules_system_ext)
+license_modules_odm := $(filter $(TARGET_OUT_ODM)/%,$(license_modules))
+license_modules_agg := $(license_modules_vendor) \
+                       $(license_modules_product) \
+                       $(license_modules_system_ext) \
+                       $(license_modules_odm)
 license_modules_rest := $(filter-out $(license_modules_agg),$(license_modules))
 
 $(eval $(call combine-notice-files, xml_excluded_extra_partitions, \
@@ -1292,6 +1302,12 @@
 	        "Notices for files contained in the system_ext filesystem image in this directory:", \
 	        $(TARGET_OUT_NOTICE_FILES), \
 	        $(license_modules_system_ext)))
+$(eval $(call combine-notice-files, xml_odm, \
+	        $(target_odm_notice_file_txt), \
+	        $(target_odm_notice_file_xml), \
+	        "Notices for files contained in the odm filesystem image in this directory:", \
+	        $(TARGET_OUT_NOTICE_FILES), \
+	        $(license_modules_odm)))
 
 $(target_notice_file_xml_gz): $(target_notice_file_xml) | $(MINIGZIP)
 	$(hide) $(MINIGZIP) -9 < $< > $@
@@ -1301,6 +1317,8 @@
 	$(hide) $(MINIGZIP) -9 < $< > $@
 $(target_system_ext_notice_file_xml_gz): $(target_system_ext_notice_file_xml) | $(MINIGZIP)
 	$(hide) $(MINIGZIP) -9 < $< > $@
+$(target_odm_notice_file_xml_gz): $(target_odm_notice_file_xml) | $(MINIGZIP)
+	$(hide) $(MINIGZIP) -9 < $< > $@
 $(installed_notice_html_or_xml_gz): $(target_notice_file_xml_gz)
 	$(copy-file-to-target)
 $(installed_vendor_notice_xml_gz): $(target_vendor_notice_file_xml_gz)
@@ -1309,6 +1327,8 @@
 	$(copy-file-to-target)
 $(installed_system_ext_notice_xml_gz): $(target_system_ext_notice_file_xml_gz)
 	$(copy-file-to-target)
+$(installed_odm_notice_xml_gz): $(target_odm_notice_file_xml_gz)
+	$(copy-file-to-target)
 
 # if we've been run my mm, mmm, etc, don't reinstall this every time
 ifeq ($(ONE_SHOT_MAKEFILE),)
@@ -1316,6 +1336,7 @@
   ALL_DEFAULT_INSTALLED_MODULES += $(installed_vendor_notice_xml_gz)
   ALL_DEFAULT_INSTALLED_MODULES += $(installed_product_notice_xml_gz)
   ALL_DEFAULT_INSTALLED_MODULES += $(installed_system_ext_notice_xml_gz)
+  ALL_DEFAULT_INSTALLED_MODULES += $(installed_odm_notice_xml_gz)
 endif
 endif # PRODUCT_NOTICE_SPLIT
 
diff --git a/core/combo/TARGET_linux-mips.mk b/core/combo/TARGET_linux-mips.mk
index ba76969..9f14aa2 100644
--- a/core/combo/TARGET_linux-mips.mk
+++ b/core/combo/TARGET_linux-mips.mk
@@ -33,12 +33,6 @@
 TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT := mips32r2-fp
 endif
 
-TARGET_ARCH_SPECIFIC_MAKEFILE := $(BUILD_COMBOS)/arch/$(TARGET_$(combo_2nd_arch_prefix)ARCH)/$(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT).mk
-ifeq ($(strip $(wildcard $(TARGET_ARCH_SPECIFIC_MAKEFILE))),)
-$(error Unknown MIPS architecture variant: $(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT))
-endif
-
-include $(TARGET_ARCH_SPECIFIC_MAKEFILE)
 include $(BUILD_SYSTEM)/combo/fdo.mk
 
 define $(combo_var_prefix)transform-shared-lib-to-toc
diff --git a/core/combo/TARGET_linux-mips64.mk b/core/combo/TARGET_linux-mips64.mk
index b498d1f..ae17e46 100644
--- a/core/combo/TARGET_linux-mips64.mk
+++ b/core/combo/TARGET_linux-mips64.mk
@@ -33,12 +33,6 @@
 TARGET_ARCH_VARIANT := mips64r6
 endif
 
-TARGET_ARCH_SPECIFIC_MAKEFILE := $(BUILD_COMBOS)/arch/$(TARGET_ARCH)/$(TARGET_ARCH_VARIANT).mk
-ifeq ($(strip $(wildcard $(TARGET_ARCH_SPECIFIC_MAKEFILE))),)
-$(error Unknown MIPS architecture variant: $(TARGET_ARCH_VARIANT))
-endif
-
-include $(TARGET_ARCH_SPECIFIC_MAKEFILE)
 include $(BUILD_SYSTEM)/combo/fdo.mk
 
 define $(combo_var_prefix)transform-shared-lib-to-toc
diff --git a/core/combo/arch/arm/armv7-a-neon.mk b/core/combo/arch/arm/armv7-a-neon.mk
index 01d2235..0c01ac3 100644
--- a/core/combo/arch/arm/armv7-a-neon.mk
+++ b/core/combo/arch/arm/armv7-a-neon.mk
@@ -1,7 +1,6 @@
 # Configuration for Linux on ARM.
 # Generating binaries for the ARMv7-a architecture and higher with NEON
 #
-ARCH_ARM_HAVE_ARMV7A            := true
 ARCH_ARM_HAVE_VFP               := true
 ARCH_ARM_HAVE_VFP_D32           := true
 ARCH_ARM_HAVE_NEON              := true
diff --git a/core/combo/arch/arm/armv8-2a.mk b/core/combo/arch/arm/armv8-2a.mk
index c1d8182..7e2ca18 100644
--- a/core/combo/arch/arm/armv8-2a.mk
+++ b/core/combo/arch/arm/armv8-2a.mk
@@ -3,7 +3,6 @@
 #
 # Many libraries are not aware of armv8-2a, and AArch32 is (almost) a superset
 # of armv7-a-neon. So just let them think we are just like v7.
-ARCH_ARM_HAVE_ARMV7A            := true
 ARCH_ARM_HAVE_VFP               := true
 ARCH_ARM_HAVE_VFP_D32           := true
 ARCH_ARM_HAVE_NEON              := true
diff --git a/core/combo/arch/arm/armv8-a.mk b/core/combo/arch/arm/armv8-a.mk
index 9ef5c49..19bc014 100644
--- a/core/combo/arch/arm/armv8-a.mk
+++ b/core/combo/arch/arm/armv8-a.mk
@@ -3,7 +3,6 @@
 #
 # Many libraries are not aware of armv8-a, and AArch32 is (almost) a superset
 # of armv7-a-neon. So just let them think we are just like v7.
-ARCH_ARM_HAVE_ARMV7A            := true
 ARCH_ARM_HAVE_VFP               := true
 ARCH_ARM_HAVE_VFP_D32           := true
 ARCH_ARM_HAVE_NEON              := true
diff --git a/core/combo/arch/mips/mips32-fp.mk b/core/combo/arch/mips/mips32-fp.mk
deleted file mode 100644
index 4b09bc1..0000000
--- a/core/combo/arch/mips/mips32-fp.mk
+++ /dev/null
@@ -1,5 +0,0 @@
-# Configuration for Android on MIPS.
-# Generating binaries for MIPS32/hard-float/little-endian
-
-ARCH_MIPS_HAS_FPU	:=true
-ARCH_HAVE_ALIGNED_DOUBLES :=true
diff --git a/core/combo/arch/mips/mips32r2-fp-xburst.mk b/core/combo/arch/mips/mips32r2-fp-xburst.mk
deleted file mode 100644
index 83fb12e..0000000
--- a/core/combo/arch/mips/mips32r2-fp-xburst.mk
+++ /dev/null
@@ -1,6 +0,0 @@
-# Configuration for Android on Ingenic xb4780/Xburst MIPS CPU.
-# Generating binaries for MIPS32R2/hard-float/little-endian without
-# support for the Madd family of instructions.
-
-ARCH_MIPS_HAS_FPU :=true
-ARCH_HAVE_ALIGNED_DOUBLES :=true
diff --git a/core/combo/arch/mips/mips32r2-fp.mk b/core/combo/arch/mips/mips32r2-fp.mk
deleted file mode 100644
index 97c14c3..0000000
--- a/core/combo/arch/mips/mips32r2-fp.mk
+++ /dev/null
@@ -1,5 +0,0 @@
-# Configuration for Android on MIPS.
-# Generating binaries for MIPS32R2/hard-float/little-endian
-
-ARCH_MIPS_HAS_FPU	:=true
-ARCH_HAVE_ALIGNED_DOUBLES :=true
diff --git a/core/combo/arch/mips/mips32r2dsp-fp.mk b/core/combo/arch/mips/mips32r2dsp-fp.mk
deleted file mode 100644
index 522b6b9..0000000
--- a/core/combo/arch/mips/mips32r2dsp-fp.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-# Configuration for Android on MIPS.
-# Generating binaries for MIPS32R2/hard-float/little-endian/dsp
-
-ARCH_MIPS_HAS_DSP  	:=true
-ARCH_MIPS_DSP_REV	:=1
-ARCH_MIPS_HAS_FPU       :=true
-ARCH_HAVE_ALIGNED_DOUBLES :=true
diff --git a/core/combo/arch/mips/mips32r2dspr2-fp.mk b/core/combo/arch/mips/mips32r2dspr2-fp.mk
deleted file mode 100644
index 886d378..0000000
--- a/core/combo/arch/mips/mips32r2dspr2-fp.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-# Configuration for Android on MIPS.
-# Generating binaries for MIPS32R2/hard-float/little-endian/dsp
-
-ARCH_MIPS_HAS_DSP  	:=true
-ARCH_MIPS_DSP_REV	:=2
-ARCH_MIPS_HAS_FPU       :=true
-ARCH_HAVE_ALIGNED_DOUBLES :=true
diff --git a/core/combo/arch/mips/mips32r6.mk b/core/combo/arch/mips/mips32r6.mk
deleted file mode 100644
index 7bc6cac..0000000
--- a/core/combo/arch/mips/mips32r6.mk
+++ /dev/null
@@ -1,4 +0,0 @@
-# Configuration for Android on MIPS.
-# Generating binaries for MIPS32R6/hard-float/little-endian
-
-ARCH_MIPS_REV6 := true
diff --git a/core/combo/arch/mips64/mips64r2.mk b/core/combo/arch/mips64/mips64r2.mk
deleted file mode 100644
index 54aa387..0000000
--- a/core/combo/arch/mips64/mips64r2.mk
+++ /dev/null
@@ -1,6 +0,0 @@
-# Configuration for Android on mips64r2.
-
-# This target is for temporary use only, until mips64r6 is supported by Android's qemu.
-
-ARCH_MIPS_HAS_FPU	:=true
-ARCH_HAVE_ALIGNED_DOUBLES :=true
diff --git a/core/combo/arch/mips64/mips64r6.mk b/core/combo/arch/mips64/mips64r6.mk
deleted file mode 100644
index 42d6c9e..0000000
--- a/core/combo/arch/mips64/mips64r6.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-# Configuration for Android on mips64r6.
-
-ARCH_MIPS64_REV6 := true
diff --git a/core/combo/arch/x86/amberlake.mk b/core/combo/arch/x86/amberlake.mk
index 37100a4..a7ae6ed 100644
--- a/core/combo/arch/x86/amberlake.mk
+++ b/core/combo/arch/x86/amberlake.mk
@@ -3,11 +3,4 @@
 # that have AVX2 feature flag
 #
 
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX    := true
-ARCH_X86_HAVE_AVX2   := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := true
diff --git a/core/combo/arch/x86/atom.mk b/core/combo/arch/x86/atom.mk
index 43a170c..bae7946 100644
--- a/core/combo/arch/x86/atom.mk
+++ b/core/combo/arch/x86/atom.mk
@@ -4,6 +4,3 @@
 #
 # See build/make/core/combo/arch/x86/x86.mk for differences.
 #
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_MOVBE := true
-ARCH_X86_HAVE_POPCNT := false   # popcnt is not supported by current Atom CPUs
diff --git a/core/combo/arch/x86/broadwell.mk b/core/combo/arch/x86/broadwell.mk
index 37100a4..a7ae6ed 100644
--- a/core/combo/arch/x86/broadwell.mk
+++ b/core/combo/arch/x86/broadwell.mk
@@ -3,11 +3,4 @@
 # that have AVX2 feature flag
 #
 
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX    := true
-ARCH_X86_HAVE_AVX2   := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := true
diff --git a/core/combo/arch/x86/haswell.mk b/core/combo/arch/x86/haswell.mk
index 50c27b4..ffa3bac 100644
--- a/core/combo/arch/x86/haswell.mk
+++ b/core/combo/arch/x86/haswell.mk
@@ -1,11 +1,4 @@
 # Configuration for Linux on x86.
 # Generating binaries for Haswell processors.
 #
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AES_NI := true
-ARCH_X86_HAVE_AVX    := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := true
diff --git a/core/combo/arch/x86/icelake.mk b/core/combo/arch/x86/icelake.mk
index 76fe212..a7ae6ed 100644
--- a/core/combo/arch/x86/icelake.mk
+++ b/core/combo/arch/x86/icelake.mk
@@ -3,12 +3,4 @@
 # that have AVX2 feature flag
 #
 
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX    := true
-ARCH_X86_HAVE_AVX2   := true
-ARCH_X86_HAVE_AVX512 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := true
diff --git a/core/combo/arch/x86/ivybridge.mk b/core/combo/arch/x86/ivybridge.mk
index 44035d8..a1358e6 100644
--- a/core/combo/arch/x86/ivybridge.mk
+++ b/core/combo/arch/x86/ivybridge.mk
@@ -1,11 +1,4 @@
 # Configuration for Linux on x86.
 # Generating binaries for Ivy Bridge processors.
 #
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AES_NI := true
-ARCH_X86_HAVE_AVX    := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := false
diff --git a/core/combo/arch/x86/kabylake.mk b/core/combo/arch/x86/kabylake.mk
index 50518d6..9906259 100644
--- a/core/combo/arch/x86/kabylake.mk
+++ b/core/combo/arch/x86/kabylake.mk
@@ -3,11 +3,4 @@
 # that support AVX2 feature flag
 #
 
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX    := true
-ARCH_X86_HAVE_AVX2   := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := true
diff --git a/core/combo/arch/x86/sandybridge.mk b/core/combo/arch/x86/sandybridge.mk
index a4c1bd9..d6552ab 100644
--- a/core/combo/arch/x86/sandybridge.mk
+++ b/core/combo/arch/x86/sandybridge.mk
@@ -1,11 +1,4 @@
 # Configuration for Linux on x86.
 # Generating binaries for SandyBridge processors.
 #
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AES_NI := false
-ARCH_X86_HAVE_AVX    := false
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := false
diff --git a/core/combo/arch/x86/silvermont.mk b/core/combo/arch/x86/silvermont.mk
index cba1079..8ac2b98 100644
--- a/core/combo/arch/x86/silvermont.mk
+++ b/core/combo/arch/x86/silvermont.mk
@@ -4,10 +4,4 @@
 # See build/make/core/combo/arch/x86/x86-atom.mk for differences.
 #
 
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AES_NI := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := true
diff --git a/core/combo/arch/x86/skylake.mk b/core/combo/arch/x86/skylake.mk
index 03705c0..9906259 100644
--- a/core/combo/arch/x86/skylake.mk
+++ b/core/combo/arch/x86/skylake.mk
@@ -3,13 +3,4 @@
 # that support AVX2 feature flag
 #
 
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX    := true
-ARCH_X86_HAVE_AVX2   := true
-ARCH_X86_HAVE_AVX512 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := true
-
diff --git a/core/combo/arch/x86/stoneyridge.mk b/core/combo/arch/x86/stoneyridge.mk
index 30405a1..05ff77a 100644
--- a/core/combo/arch/x86/stoneyridge.mk
+++ b/core/combo/arch/x86/stoneyridge.mk
@@ -1,12 +1,4 @@
 # Configuration for Linux on x86.
 # Generating binaries for Stoney Ridge processors.
 #
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AES_NI := true
-ARCH_X86_HAVE_AVX    := true
-ARCH_X86_HAVE_AVX2   := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := true
diff --git a/core/combo/arch/x86/tigerlake.mk b/core/combo/arch/x86/tigerlake.mk
index 76fe212..a7ae6ed 100644
--- a/core/combo/arch/x86/tigerlake.mk
+++ b/core/combo/arch/x86/tigerlake.mk
@@ -3,12 +3,4 @@
 # that have AVX2 feature flag
 #
 
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX    := true
-ARCH_X86_HAVE_AVX2   := true
-ARCH_X86_HAVE_AVX512 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := true
diff --git a/core/combo/arch/x86/whiskeylake.mk b/core/combo/arch/x86/whiskeylake.mk
index 37100a4..a7ae6ed 100644
--- a/core/combo/arch/x86/whiskeylake.mk
+++ b/core/combo/arch/x86/whiskeylake.mk
@@ -3,11 +3,4 @@
 # that have AVX2 feature flag
 #
 
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX    := true
-ARCH_X86_HAVE_AVX2   := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := true
diff --git a/core/combo/arch/x86/x86.mk b/core/combo/arch/x86/x86.mk
index db55ff8..066f66a 100644
--- a/core/combo/arch/x86/x86.mk
+++ b/core/combo/arch/x86/x86.mk
@@ -8,9 +8,3 @@
 # These features are optional and shall not be included in the base platform
 # Otherwise, sdk_x86-eng system images might fail to run on some
 # developer machines.
-ARCH_X86_HAVE_SSSE3 := false
-ARCH_X86_HAVE_MOVBE := false
-ARCH_X86_HAVE_POPCNT := false
-ARCH_X86_HAVE_AVX := false
-ARCH_X86_HAVE_AVX2 := false
-ARCH_X86_HAVE_AVX512 := false
diff --git a/core/combo/arch/x86/x86_64.mk b/core/combo/arch/x86/x86_64.mk
index fc2a087..eff406b 100644
--- a/core/combo/arch/x86/x86_64.mk
+++ b/core/combo/arch/x86/x86_64.mk
@@ -4,9 +4,4 @@
 # The generic 'x86' variant cannot be used, since it resets some flags used
 # by the 'x86_64' variant.
 
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_MOVBE := false # Only supported on Atom.
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_SSE4 := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
diff --git a/core/combo/arch/x86_64/amberlake.mk b/core/combo/arch/x86_64/amberlake.mk
index 37100a4..a7ae6ed 100644
--- a/core/combo/arch/x86_64/amberlake.mk
+++ b/core/combo/arch/x86_64/amberlake.mk
@@ -3,11 +3,4 @@
 # that have AVX2 feature flag
 #
 
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX    := true
-ARCH_X86_HAVE_AVX2   := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := true
diff --git a/core/combo/arch/x86_64/broadwell.mk b/core/combo/arch/x86_64/broadwell.mk
index 37100a4..a7ae6ed 100644
--- a/core/combo/arch/x86_64/broadwell.mk
+++ b/core/combo/arch/x86_64/broadwell.mk
@@ -3,11 +3,4 @@
 # that have AVX2 feature flag
 #
 
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX    := true
-ARCH_X86_HAVE_AVX2   := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := true
diff --git a/core/combo/arch/x86_64/haswell.mk b/core/combo/arch/x86_64/haswell.mk
index f9c6ebd..faf12fa 100644
--- a/core/combo/arch/x86_64/haswell.mk
+++ b/core/combo/arch/x86_64/haswell.mk
@@ -1,11 +1,4 @@
 # Configuration for Linux on x86_64.
 # Generating binaries for Haswell processors.
 #
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AES_NI := true
-ARCH_X86_HAVE_AVX    := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := true
diff --git a/core/combo/arch/x86_64/icelake.mk b/core/combo/arch/x86_64/icelake.mk
index 76fe212..a7ae6ed 100644
--- a/core/combo/arch/x86_64/icelake.mk
+++ b/core/combo/arch/x86_64/icelake.mk
@@ -3,12 +3,4 @@
 # that have AVX2 feature flag
 #
 
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX    := true
-ARCH_X86_HAVE_AVX2   := true
-ARCH_X86_HAVE_AVX512 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := true
diff --git a/core/combo/arch/x86_64/ivybridge.mk b/core/combo/arch/x86_64/ivybridge.mk
index 69011d6..464fa98 100644
--- a/core/combo/arch/x86_64/ivybridge.mk
+++ b/core/combo/arch/x86_64/ivybridge.mk
@@ -1,11 +1,4 @@
 # Configuration for Linux on x86_64.
 # Generating binaries for Ivy Bridge processors.
 #
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AES_NI := true
-ARCH_X86_HAVE_AVX    := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := false
diff --git a/core/combo/arch/x86_64/kabylake.mk b/core/combo/arch/x86_64/kabylake.mk
index 37100a4..a7ae6ed 100644
--- a/core/combo/arch/x86_64/kabylake.mk
+++ b/core/combo/arch/x86_64/kabylake.mk
@@ -3,11 +3,4 @@
 # that have AVX2 feature flag
 #
 
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX    := true
-ARCH_X86_HAVE_AVX2   := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := true
diff --git a/core/combo/arch/x86_64/sandybridge.mk b/core/combo/arch/x86_64/sandybridge.mk
index 2092d19..a09db2a 100644
--- a/core/combo/arch/x86_64/sandybridge.mk
+++ b/core/combo/arch/x86_64/sandybridge.mk
@@ -1,11 +1,4 @@
 # Configuration for Linux on x86_64.
 # Generating binaries for SandyBridge processors.
 #
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AES_NI := false
-ARCH_X86_HAVE_AVX    := false
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := false
diff --git a/core/combo/arch/x86_64/silvermont.mk b/core/combo/arch/x86_64/silvermont.mk
index cba1079..8ac2b98 100644
--- a/core/combo/arch/x86_64/silvermont.mk
+++ b/core/combo/arch/x86_64/silvermont.mk
@@ -4,10 +4,4 @@
 # See build/make/core/combo/arch/x86/x86-atom.mk for differences.
 #
 
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AES_NI := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := true
diff --git a/core/combo/arch/x86_64/skylake.mk b/core/combo/arch/x86_64/skylake.mk
index 76fe212..a7ae6ed 100644
--- a/core/combo/arch/x86_64/skylake.mk
+++ b/core/combo/arch/x86_64/skylake.mk
@@ -3,12 +3,4 @@
 # that have AVX2 feature flag
 #
 
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX    := true
-ARCH_X86_HAVE_AVX2   := true
-ARCH_X86_HAVE_AVX512 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := true
diff --git a/core/combo/arch/x86_64/stoneyridge.mk b/core/combo/arch/x86_64/stoneyridge.mk
index f7d9583..5950d9a 100644
--- a/core/combo/arch/x86_64/stoneyridge.mk
+++ b/core/combo/arch/x86_64/stoneyridge.mk
@@ -1,12 +1,4 @@
 # Configuration for Linux on x86_64.
 # Generating binaries for Stoney Ridge processors.
 #
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AES_NI := true
-ARCH_X86_HAVE_AVX    := true
-ARCH_X86_HAVE_AVX2   := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := true
diff --git a/core/combo/arch/x86_64/tigerlake.mk b/core/combo/arch/x86_64/tigerlake.mk
index 76fe212..a7ae6ed 100644
--- a/core/combo/arch/x86_64/tigerlake.mk
+++ b/core/combo/arch/x86_64/tigerlake.mk
@@ -3,12 +3,4 @@
 # that have AVX2 feature flag
 #
 
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX    := true
-ARCH_X86_HAVE_AVX2   := true
-ARCH_X86_HAVE_AVX512 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := true
diff --git a/core/combo/arch/x86_64/whiskeylake.mk b/core/combo/arch/x86_64/whiskeylake.mk
index 37100a4..a7ae6ed 100644
--- a/core/combo/arch/x86_64/whiskeylake.mk
+++ b/core/combo/arch/x86_64/whiskeylake.mk
@@ -3,11 +3,4 @@
 # that have AVX2 feature flag
 #
 
-ARCH_X86_HAVE_SSSE3  := true
-ARCH_X86_HAVE_SSE4   := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX    := true
-ARCH_X86_HAVE_AVX2   := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE  := true
diff --git a/core/combo/arch/x86_64/x86_64.mk b/core/combo/arch/x86_64/x86_64.mk
index e7c8928..17413c7 100755
--- a/core/combo/arch/x86_64/x86_64.mk
+++ b/core/combo/arch/x86_64/x86_64.mk
@@ -5,12 +5,4 @@
 # that are run in the emulator under KVM emulation (i.e. running directly on
 # the host development machine's CPU).
 
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_MOVBE := false # Only supported on Atom.
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_SSE4 := true
 ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX := false
-ARCH_X86_HAVE_AVX2 := false
-ARCH_X86_HAVE_AVX512 := false
diff --git a/core/config.mk b/core/config.mk
index 730e029..c8b468a 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -101,6 +101,23 @@
 $(KATI_obsolete_export It is a global setting. See $(CHANGES_URL)#export_keyword)
 $(KATI_obsolete_var BUILD_BROKEN_ANDROIDMK_EXPORTS)
 $(KATI_obsolete_var PRODUCT_STATIC_BOOT_CONTROL_HAL,Use shared library module instead. See $(CHANGES_URL)#PRODUCT_STATIC_BOOT_CONTROL_HAL)
+$(KATI_obsolete_var \
+  ARCH_ARM_HAVE_ARMV7A \
+  ARCH_DSP_REV \
+  ARCH_HAVE_ALIGNED_DOUBLES \
+  ARCH_MIPS_HAS_DSP \
+  ARCH_MIPS_HAS_FPU \
+  ARCH_MIPS_REV6 \
+  ARCH_X86_HAVE_AES_NI \
+  ARCH_X86_HAVE_AVX \
+  ARCH_X86_HAVE_AVX2 \
+  ARCH_X86_HAVE_AVX512 \
+  ARCH_X86_HAVE_MOVBE \
+  ARCH_X86_HAVE_POPCNT \
+  ARCH_X86_HAVE_SSE4 \
+  ARCH_X86_HAVE_SSE4_2 \
+  ARCH_X86_HAVE_SSSE3 \
+)
 
 # Used to force goals to build.  Only use for conditionally defined goals.
 .PHONY: FORCE
diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk
index 7a9f23e..2439f79 100644
--- a/core/config_sanitizers.mk
+++ b/core/config_sanitizers.mk
@@ -345,9 +345,6 @@
       my_shared_libraries := $($(LOCAL_2ND_ARCH_VAR_PREFIX)ADDRESS_SANITIZER_RUNTIME_LIBRARY) \
                              $(my_shared_libraries)
     endif
-    ifeq (,$(filter $(LOCAL_MODULE),$(ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES)))
-      my_static_libraries += $(ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES)
-    endif
 
     # Do not add unnecessary dependency in shared libraries.
     ifeq ($(LOCAL_MODULE_CLASS),SHARED_LIBRARIES)