[MIPS64] Add support for building Chromium Linux for mips64r2

This change adds missing parts of mips64r2 support.

Bug: 800754
Change-Id: If37183b7c996effe28b7f687ca86ec7f11d90514
Reviewed-on: https://chromium-review.googlesource.com/860058
Commit-Queue: Lei Zhang <[email protected]>
Reviewed-by: Dirk Pranke <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#531691}
diff --git a/chrome/installer/linux/BUILD.gn b/chrome/installer/linux/BUILD.gn
index fbf86a5..604c991d 100644
--- a/chrome/installer/linux/BUILD.gn
+++ b/chrome/installer/linux/BUILD.gn
@@ -406,6 +406,8 @@
       deb_arch = "arm"
     } else if (current_cpu == "mipsel") {
       deb_arch = "mipsel"
+    } else if (current_cpu == "mips64el") {
+      deb_arch = "mips64el"
     } else {
       assert(false, "Linux installer not configured for this architecture.")
     }
@@ -460,6 +462,8 @@
         rpm_arch = "arm"
       } else if (current_cpu == "mipsel") {
         rpm_arch = "mipsel"
+      } else if (current_cpu == "mips64el") {
+        rpm_arch = "mips64el"
       } else {
         assert(false, "Linux installer not configured for this architecture.")
       }
diff --git a/chrome/installer/linux/debian/build.sh b/chrome/installer/linux/debian/build.sh
index 58101b79..1034c703 100755
--- a/chrome/installer/linux/debian/build.sh
+++ b/chrome/installer/linux/debian/build.sh
@@ -285,6 +285,9 @@
   mipsel )
     export ARCHITECTURE="mipsel"
     ;;
+  mips64el )
+    export ARCHITECTURE="mips64el"
+    ;;
   * )
     echo
     echo "ERROR: Don't know how to build DEBs for '$TARGETARCH'."
diff --git a/chrome/installer/linux/debian/calculate_package_deps.py b/chrome/installer/linux/debian/calculate_package_deps.py
index e16c3c4..cb04c9c 100755
--- a/chrome/installer/linux/debian/calculate_package_deps.py
+++ b/chrome/installer/linux/debian/calculate_package_deps.py
@@ -44,6 +44,9 @@
 elif arch == 'mipsel':
   cmd.extend(['-l%s/usr/lib/mipsel-linux-gnu' % sysroot,
               '-l%s/lib/mipsel-linux-gnu' % sysroot])
+elif arch == 'mips64el':
+  cmd.extend(['-l%s/usr/lib/mips64el-linux-gnuabi64' % sysroot,
+              '-l%s/lib/mips64el-linux-gnuabi64' % sysroot])
 else:
   print 'Unsupported architecture ' + arch
   sys.exit(1)
diff --git a/chrome/installer/linux/rpm/build.sh b/chrome/installer/linux/rpm/build.sh
index 5de00a0..261faeaf 100755
--- a/chrome/installer/linux/rpm/build.sh
+++ b/chrome/installer/linux/rpm/build.sh
@@ -265,6 +265,10 @@
     export ARCHITECTURE="mipsel"
     stage_install_rpm
     ;;
+  mips64el )
+    export ARCHITECTURE="mips64el"
+    stage_install_rpm
+    ;;
   * )
     echo
     echo "ERROR: Don't know how to build RPMs for '$TARGETARCH'."