Support arch-specific LOCAL_ variables

With those variables, you can set up different values for TARGET_ARCH
and TARGET_2ND_ARCH.
Also fixed a couple of variables.

Bug: 11654773
Change-Id: I4c7684a562cd5877d18f67d4f848b8df07d0103b

Conflicts:
	core/base_rules.mk
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index 381d9a5..42ce742 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -145,6 +145,20 @@
 LOCAL_32BIT_ONLY:= # '',true
 LOCAL_NO_2ND_ARCH:= # '',true
 
+# arch specific variables
+LOCAL_SRC_FILES_$(TARGET_ARCH):=
+LOCAL_CFLAGS_$(TARGET_ARCH):=
+LOCAL_ASFLAGS_$(TARGET_ARCH):=
+LOCAL_NO_CRT_$(TARGET_ARCH):=
+LOCAL_LDFLAGS_$(TARGET_ARCH):=
+ifdef TARGET_2ND_ARCH
+LOCAL_SRC_FILES_$(TARGET_2ND_ARCH):=
+LOCAL_CFLAGS_$(TARGET_2ND_ARCH):=
+LOCAL_ASFLAGS_$(TARGET_2ND_ARCH):=
+LOCAL_NO_CRT_$(TARGET_2ND_ARCH):=
+LOCAL_LDFLAGS_$(TARGET_2ND_ARCH):=
+endif
+
 # Trim MAKEFILE_LIST so that $(call my-dir) doesn't need to
 # iterate over thousands of entries every time.
 # Leave the current makefile to make sure we don't break anything