Merge "Add generic aarch64 board config and build rules."
diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk
index c7cbcab..64fafbf 100755
--- a/core/combo/TARGET_linux-x86.mk
+++ b/core/combo/TARGET_linux-x86.mk
@@ -143,19 +143,11 @@
-fno-use-cxa-atexit
TARGET_GLOBAL_CFLAGS += $(arch_variant_cflags)
+TARGET_GLOBAL_CFLAGS += -mmmx
+TARGET_GLOBAL_CFLAGS += -msse
+TARGET_GLOBAL_CFLAGS += -DUSE_SSE2 -msse2
+TARGET_GLOBAL_CFLAGS += -msse3
-ifeq ($(ARCH_X86_HAVE_MMX),true)
- TARGET_GLOBAL_CFLAGS += -DUSE_MMX -mmmx
-endif
-ifeq ($(ARCH_X86_HAVE_SSE),true)
- TARGET_GLOBAL_CFLAGS += -DUSE_SSE -msse
-endif
-ifeq ($(ARCH_X86_HAVE_SSE2),true)
- TARGET_GLOBAL_CFLAGS += -DUSE_SSE2 -msse2
-endif
-ifeq ($(ARCH_X86_HAVE_SSE3),true)
- TARGET_GLOBAL_CFLAGS += -DUSE_SSE3 -msse3
-endif
ifeq ($(ARCH_X86_HAVE_SSSE3),true) # yes, really SSSE3, not SSE3!
TARGET_GLOBAL_CFLAGS += -DUSE_SSSE3 -mssse3
endif
@@ -285,21 +277,3 @@
-Wl,--end-group \
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTEND_O))
endef
-
-# Special check for x86 NDK ABI compatibility.
-# The TARGET_CPU_ABI variable should be defined in BoardConfig.mk to 'x86'
-# *only* if the platform image is compatible with the NDK x86 ABI.
-#
-# We perform a small check here to ensure that nothing bad can happen.
-#
-ifeq ($(TARGET_CPU_ABI),x86)
- ifneq (true-true-true-true,$(ARCH_X86_HAVE_MMX)-$(ARCH_X86_HAVE_SSE)-$(ARCH_X86_HAVE_SSE2)-$(ARCH_X86_HAVE_SSE3))
- $(info ERROR: Your x86 platform image is not compatible with the NDK x86 ABI)
- $(info As such, you should *not* define TARGET_CPU_ABI to 'x86' in your BoardConfig.mk)
- $(info to ensure that your device will not be mistakenly listed as compatible by
- $(info the Android Market. Also, it is likely that the image will fail the CTS tests)
- $(info Please undefine TARGET_CPU_ABI in your BoardConfig.mk, or select the value 'none')
- $(info The corresponding image will still be able to run Dalvik-based Android applications)
- $(error Aborting build! Please fix your BoardConfig.mk)
- endif
-endif
diff --git a/core/combo/TARGET_linux-x86_64.mk b/core/combo/TARGET_linux-x86_64.mk
index 5f6c2af..eeecf98 100755
--- a/core/combo/TARGET_linux-x86_64.mk
+++ b/core/combo/TARGET_linux-x86_64.mk
@@ -146,11 +146,6 @@
-mstackrealign \
-mfpmath=sse
-ARCH_X86_HAVE_MMX := true
-ARCH_X86_HAVE_SSE := true
-ARCH_X86_HAVE_SSE2 := true
-ARCH_X86_HAVE_SSE3 := true
-
ifeq ($(ARCH_X86_HAVE_SSSE3),true) # yes, really SSSE3, not SSE3!
TARGET_GLOBAL_CFLAGS += -DUSE_SSSE3 -mssse3
endif
diff --git a/core/combo/arch/x86/haswell.mk b/core/combo/arch/x86/haswell.mk
index 5cbb3b8..a00e0a6 100644
--- a/core/combo/arch/x86/haswell.mk
+++ b/core/combo/arch/x86/haswell.mk
@@ -1,10 +1,6 @@
# Configuration for Linux on x86.
# Generating binaries for Haswell processors.
#
-ARCH_X86_HAVE_MMX := true
-ARCH_X86_HAVE_SSE := true
-ARCH_X86_HAVE_SSE2 := true
-ARCH_X86_HAVE_SSE3 := true
ARCH_X86_HAVE_SSSE3 := true
ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
diff --git a/core/combo/arch/x86/ivybridge.mk b/core/combo/arch/x86/ivybridge.mk
index c0f8d89..02dc1e0 100644
--- a/core/combo/arch/x86/ivybridge.mk
+++ b/core/combo/arch/x86/ivybridge.mk
@@ -1,10 +1,6 @@
# Configuration for Linux on x86.
# Generating binaries for Ivy Bridge processors.
#
-ARCH_X86_HAVE_MMX := true
-ARCH_X86_HAVE_SSE := true
-ARCH_X86_HAVE_SSE2 := true
-ARCH_X86_HAVE_SSE3 := true
ARCH_X86_HAVE_SSSE3 := true
ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
diff --git a/core/combo/arch/x86/sandybridge.mk b/core/combo/arch/x86/sandybridge.mk
index 8d5e609..dfa540c 100644
--- a/core/combo/arch/x86/sandybridge.mk
+++ b/core/combo/arch/x86/sandybridge.mk
@@ -1,10 +1,6 @@
# Configuration for Linux on x86.
# Generating binaries for SandyBridge processors.
#
-ARCH_X86_HAVE_MMX := true
-ARCH_X86_HAVE_SSE := true
-ARCH_X86_HAVE_SSE2 := true
-ARCH_X86_HAVE_SSE3 := true
ARCH_X86_HAVE_SSSE3 := true
ARCH_X86_HAVE_SSE4_1 := true
ARCH_X86_HAVE_SSE4_2 := true
diff --git a/core/combo/arch/x86/x86-atom.mk b/core/combo/arch/x86/x86-atom.mk
index 1ea4eea..508a0af 100644
--- a/core/combo/arch/x86/x86-atom.mk
+++ b/core/combo/arch/x86/x86-atom.mk
@@ -4,10 +4,6 @@
#
# See build/core/combo/arch/x86/x86.mk for differences.
#
-ARCH_X86_HAVE_MMX := true
-ARCH_X86_HAVE_SSE := true
-ARCH_X86_HAVE_SSE2 := true
-ARCH_X86_HAVE_SSE3 := true
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/x86.mk b/core/combo/arch/x86/x86.mk
index a62d86c..73706c4 100644
--- a/core/combo/arch/x86/x86.mk
+++ b/core/combo/arch/x86/x86.mk
@@ -1,27 +1,13 @@
# This file contains feature macro definitions specific to the
-# base 'x86' platform ABI. This one must *strictly* match the NDK x86 ABI
-# which mandates specific CPU extensions to be available.
+# base 'x86' platform ABI.
#
# It is also used to build full_x86-eng / sdk_x86-eng platform images that
# are run in the emulator under KVM emulation (i.e. running directly on
# the host development machine's CPU).
-#
-
-# If your target device doesn't support the four following features, then
-# it cannot be compatible with the NDK x86 ABI. You should define a new
-# target arch variant (e.g. "x86-mydevice") and a corresponding file
-# under build/core/combo/arch/x86/
-#
-ARCH_X86_HAVE_MMX := true
-ARCH_X86_HAVE_SSE := true
-ARCH_X86_HAVE_SSE2 := true
-ARCH_X86_HAVE_SSE3 := true
# These features are optional and shall not be included in the base platform
-# Otherwise, they sdk_x86-eng system images might fail to run on some
+# 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
diff --git a/core/combo/arch/x86_64/x86_64.mk b/core/combo/arch/x86_64/x86_64.mk
index 8f855cc..9d2b620 100755
--- a/core/combo/arch/x86_64/x86_64.mk
+++ b/core/combo/arch/x86_64/x86_64.mk
@@ -1,22 +1,15 @@
# This file contains feature macro definitions specific to the
-# base 'x86_64' platform ABI. This one must *strictly* match the NDK x86_64 ABI
-# which mandates specific CPU extensions to be available.
+# base 'x86_64' platform ABI.
#
# It is also used to build full_x86_64-eng / sdk_x86_64-eng platform images
# that are run in the emulator under KVM emulation (i.e. running directly on
# the host development machine's CPU).
-#
-
-# These features are optional and shall not be included in the base platform
-# Otherwise, they sdk_x86_64-eng system images might fail to run on some
-# developer machines.
-#
ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_MOVBE := false
+ARCH_X86_HAVE_MOVBE := false # Only supported on Atom.
ARCH_X86_HAVE_POPCNT := true
+
# CFLAGS for this arch
arch_variant_cflags := \
-march=x86-64
-