pw_rpc: Add ifdef guard for assert for Andestech RISC-V GCC10.3.0

Adds an ifdef guard around a static assert which breaks when compiling
using the Andetech RISC-V GCC 10.3.0 toolchain.

Bug: b/285367496
Change-Id: I52a8e87f1563009554f8359f7078eb1aa1c67bae
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/149854
Reviewed-by: Keir Mierle <keir@google.com>
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Daniel Hiranandani <danielhira@google.com>
diff --git a/pw_rpc/public/pw_rpc/internal/method_lookup.h b/pw_rpc/public/pw_rpc/internal/method_lookup.h
index 232e0c4..2f0b81a 100644
--- a/pw_rpc/public/pw_rpc/internal/method_lookup.h
+++ b/pw_rpc/public/pw_rpc/internal/method_lookup.h
@@ -52,8 +52,14 @@
   template <typename Service, uint32_t kMethodId>
   static constexpr const auto& GetMethodUnion() {
     constexpr auto method = GetMethodUnionPointer<Service>(kMethodId);
+// TODO(b/285367496): Remove this #ifndef guard when the static assert
+// compiles correctly when using the Andestech RISC-V GCC 10.3.0 toolchain.
+#if !(defined(__riscv) && defined(__ANDESTECH_GCC__) && (__GNUC__ == 10) && \
+      (__GNUC_MINOR__ == 3) && (__GNUC_PATCHLEVEL__ == 0))
     static_assert(method != nullptr,
                   "The selected function is not an RPC service method");
+#endif  // !(defined(__riscv) && defined(__ANDESTECH_GCC__) && (__GNUC__ == 10)
+        // && (__GNUC_MINOR__ == 3) && (__GNUC_PATCHLEVEL__ == 0))
     return *method;
   }