Add wrapper over GNU as

Since our GNU toolchain is too old to recognise newer archictures like
cortex-a55, add a wrapper to rewrite these architectures to a similar
older architecture.

Test: m checkbuild
Bug: 110235326
Change-Id: I4cf4eb2ef4326dcafdfd8799510523333eba2fd4
Merged-In: I4cf4eb2ef4326dcafdfd8799510523333eba2fd4
(cherry picked from commit 309aefd83c4adb20482e2863899914f47a31fe39)
(cherry picked from commit 40e65a488cdefd4c800fc7cb3472f3b3c3a97c42)
diff --git a/arm-linux-androideabi/bin/as b/arm-linux-androideabi/bin/as
new file mode 100755
index 0000000..3c8c5f1
--- /dev/null
+++ b/arm-linux-androideabi/bin/as
@@ -0,0 +1,14 @@
+#! /usr/bin/python
+
+from sys import argv
+from subprocess import check_call
+
+if __name__ == '__main__':
+  for index, arg in enumerate(argv):
+    if arg == '-mcpu=cortex-a55':
+      argv[index] = '-mcpu=cortex-a53'
+    elif arg == '-mcpu=cortex-a75':
+      argv[index] = '-mcpu=cortex-a73'
+
+  argv[0] = argv[0] + '.real'
+  check_call(argv)
diff --git a/arm-linux-androideabi/bin/as b/arm-linux-androideabi/bin/as.real
similarity index 100%
rename from arm-linux-androideabi/bin/as
rename to arm-linux-androideabi/bin/as.real