Add Elbrus 2000 (e2k) support

Signed-off-by: SSE4 <tomskside@gmail.com>
Change-Id: I4860d1620b7fd0f25fc9c4b04f6cdc2535ed03d9
Reviewed-on: https://gn-review.googlesource.com/c/gn/+/10980
Commit-Queue: Brett Wilson <brettw@chromium.org>
Reviewed-by: Brett Wilson <brettw@chromium.org>
diff --git a/src/gn/args.cc b/src/gn/args.cc
index e59b034..d7f8b66 100644
--- a/src/gn/args.cc
+++ b/src/gn/args.cc
@@ -337,6 +337,7 @@
   static const char kPPC64[] = "ppc64";
   static const char kRISCV32[] = "riscv32";
   static const char kRISCV64[] = "riscv64";
+  static const char kE2K[] = "e2k";
   const char* arch = nullptr;
 
   // Set the host CPU architecture based on the underlying OS, not
@@ -365,6 +366,8 @@
     arch = kRISCV32;
   else if (os_arch == "riscv64")
     arch = kRISCV64;
+  else if (os_arch == "e2k")
+    arch = kE2K;
   else
     CHECK(false) << "OS architecture not handled. (" << os_arch << ")";
 
diff --git a/src/util/build_config.h b/src/util/build_config.h
index 717b4e3..be9b532 100644
--- a/src/util/build_config.h
+++ b/src/util/build_config.h
@@ -164,6 +164,9 @@
 #define ARCH_CPU_32_BITS 1
 #define ARCH_CPU_BIG_ENDIAN 1
 #endif
+#elif defined(__e2k__)
+#define ARCH_CPU_64_BITS 1
+#define ARCH_CPU_LITTLE_ENDIAN 1
 #else
 #error Please add support for your architecture in build_config.h
 #endif