bionic: rename aarch64 target to arm64

Rename aarch64 build targets to arm64.  The gcc toolchain is still
aarch64.

Change-Id: Ia92d8a50824e5329cf00fd6f4f92eae112b7f3a3
diff --git a/libc/kernel/tools/defaults.py b/libc/kernel/tools/defaults.py
index f6486d7..f235803 100644
--- a/libc/kernel/tools/defaults.py
+++ b/libc/kernel/tools/defaults.py
@@ -7,7 +7,7 @@
 
 # the list of supported architectures
 #
-kernel_archs = [ 'aarch64', 'arm', 'mips', 'x86' ]
+kernel_archs = [ 'arm', 'arm64', 'mips', 'x86' ]
 
 # the list of include directories that belong to the kernel
 # tree. used when looking for sources...
@@ -45,15 +45,15 @@
 # maps an architecture to a set of default macros that would be provided by
 # toolchain preprocessor
 kernel_default_arch_macros = {
-    "aarch64": {},
     "arm": {},
+    "arm64": {},
     "mips": {"CONFIG_32BIT":"1"},
     "x86": {},
     }
 
 kernel_arch_token_replacements = {
-    "aarch64": {},
     "arm": {},
+    "arm64": {},
     "mips": {"off_t":"__kernel_off_t"},
     "x86": {},
     }
@@ -66,13 +66,13 @@
 # this is the set of known static inline functions that we want to keep
 # in the final ARM headers. this is only used to keep optimized byteswapping
 # static functions and stuff like that.
-kernel_known_aarch64_statics = set(
-        [
+kernel_known_arm_statics = set(
+        [ "___arch__swab32",    # asm-arm/byteorder.h
         ]
     )
 
-kernel_known_arm_statics = set(
-        [ "___arch__swab32",    # asm-arm/byteorder.h
+kernel_known_arm64_statics = set(
+        [
         ]
     )
 
@@ -100,8 +100,8 @@
 # we want to keep in the final headers
 #
 kernel_known_statics = {
-        "aarch64" : kernel_known_aarch64_statics,
         "arm" : kernel_known_arm_statics,
+        "arm64" : kernel_known_arm64_statics,
         "mips" : kernel_known_mips_statics,
         "x86" : kernel_known_x86_statics,
     }
diff --git a/libc/kernel/tools/generate_uapi_headers.sh b/libc/kernel/tools/generate_uapi_headers.sh
index de89838..9eeb2a5 100755
--- a/libc/kernel/tools/generate_uapi_headers.sh
+++ b/libc/kernel/tools/generate_uapi_headers.sh
@@ -186,22 +186,16 @@
           "${ANDROID_KERNEL_DIR}/uapi"
 
 for arch in "${ARCH_LIST[@]}"; do
-  if [[ "$arch" == "arm64" ]]; then
-    # The Android headers use aarch64 as the name of the 64 bit arm headers.
-    tgt_arch="asm-aarch64"
-  else
-    tgt_arch="asm-${arch}"
-  fi
   # Copy arch headers.
   copy_hdrs "${KERNEL_DIR}/common/arch/${arch}/include/uapi" \
-            "${ANDROID_KERNEL_DIR}/uapi/${tgt_arch}"
+            "${ANDROID_KERNEL_DIR}/uapi/asm-${arch}"
   # Copy the generated arch headers.
   copy_hdrs "${KERNEL_DIR}/common/arch/${arch}/include/generated/uapi" \
-            "${ANDROID_KERNEL_DIR}/uapi/${tgt_arch}"
+            "${ANDROID_KERNEL_DIR}/uapi/asm-${arch}"
 
   # Special copy of generated header files from arch/<ARCH>/generated/asm that
   # also exist in uapi/asm-generic.
   copy_if_exists "${KERNEL_DIR}/common/include/uapi/asm-generic" \
                  "${KERNEL_DIR}/common/arch/${arch}/include/generated/asm" \
-                 "${ANDROID_KERNEL_DIR}/uapi/${tgt_arch}/asm"
+                 "${ANDROID_KERNEL_DIR}/uapi/asm-${arch}/asm"
 done